yatex

changeset 167:d891d7c6cd8e dev

YaTeX::bibitem
author yuuji@gentei.org
date Mon, 14 Feb 2011 14:50:33 +0900
parents 2f183a28d798
children 191cffccc912
files yatexadd.el
diffstat 1 files changed, 9 insertions(+), 3 deletions(-) [+]
line diff
     1.1 --- a/yatexadd.el	Mon Feb 14 12:50:05 2011 +0900
     1.2 +++ b/yatexadd.el	Mon Feb 14 14:50:33 2011 +0900
     1.3 @@ -2,7 +2,7 @@
     1.4  ;;; YaTeX add-in functions.
     1.5  ;;; yatexadd.el rev.19
     1.6  ;;; (c)1991-2011 by HIROSE Yuuji.[yuuji@yatex.org]
     1.7 -;;; Last modified Mon Feb 14 12:48:47 2011 on firestorm
     1.8 +;;; Last modified Mon Feb 14 14:48:30 2011 on firestorm
     1.9  ;;; $Id$
    1.10  
    1.11  ;;;
    1.12 @@ -1119,14 +1119,16 @@
    1.13  	    (bury-buffer YaTeX-label-buffer)))
    1.14  	label)))))
    1.15  
    1.16 -(defun YaTeX::label (argp &optional refname)
    1.17 +(defun YaTeX::label (argp &optional labname refname)
    1.18    "Read label name and return it with copying \\ref{LABEL-NAME} to kill-ring."
    1.19    (cond
    1.20     ((= argp 1)
    1.21      (let*((dlab (if (boundp (intern-soft "old"))
    1.22  		    old ;if called via YaTeX-change-section (tricky...)
    1.23  		  (YaTeX::ref-default-label)))
    1.24 -	  (label (read-string "New label name: " (cons dlab 1))))
    1.25 +	  (label (read-string
    1.26 +		  (format "New %s name: " (or labname "label"))
    1.27 +		  (cons dlab 1))))
    1.28        (if (string< "" label)
    1.29  	  (let ((refstr (format "\\%s{%s}" (or refname "ref") label))
    1.30  		(key (key-description (where-is-internal 'yank nil t)))
    1.31 @@ -1306,6 +1308,10 @@
    1.32  
    1.33     (t nil)))
    1.34  
    1.35 +(defun YaTeX::bibitem (argp)
    1.36 +  "Add-in function to insert argument of \\bibitem."
    1.37 +  (YaTeX::label argp "label" "cite"))
    1.38 +
    1.39  ;;; for AMS-LaTeX
    1.40  (and YaTeX-use-AMS-LaTeX (fset 'YaTeX::eqref 'YaTeX::ref))
    1.41  ;;; for Harvard citation style