[OS X Emacs] Puzzle about quotes in LaTeX mode

Marc Shapiro -- at work marc.shapiro at acm.org
Sat Jan 2 02:57:08 EST 2016


> Le 1 janv. 2016 à 20h03, Stephen Anderson <sra at yale.edu> a écrit :
> 
> […]
> 
> When I added the lines you suggest to my .emacs file, I get an initialization error:
> 
>> Symbol's value as variable is void: TeX-quote-after-quote
> 
> And the “ key produces \og or \fg{}, as before. Once the file invoking babel has been loaded, TeX-quote-after-quote is defined, but not when initializing Aquamacs.  Where can I put the lisp lines so that things will load in the right order?

Sorry, I left some things out.  The right place to put this is in a mode hook, like this:

(add-hook 'LaTeX-mode-hook
	  '(lambda ()
	     (interactive)
	     ;; avoid inserting \og{}...\fg{} auctex default
	     (setq TeX-quote-language-alist
		   `(("french" "«~" "~»" ,TeX-quote-after-quote)))
	     )
	  )



> Also, when I tried to follow the instruction on the page you referred me to for getting multi-language support for ispell, that doesn’t help either.

Sorry, I can’t help, I would need to work it out myself first.

> 
>> On 1 Jan, 2016, at 6:10 AM, Marc Shapiro -- at work <marc.shapiro at acm.org> wrote:
>> 
>> Found a solution (thanks to stackexchange).  Put the following in your .emacs:
>> 
>> 	     (setq TeX-quote-language-alist
>> 		   `(("french" "«" "»" ,TeX-quote-after-quote)))
>> 
>> for inserting french guillemets, or 
>> 
>> 	     (setq TeX-quote-language-alist
>> 		   `(("french” “``” “''" ,TeX-quote-after-quote)))
>> 
>> for inserting standard tex/latex quotes.
>> 
>> Thanks for giving me the opportunity to search for a fix to this problem that has been annoying me for a while!
>> 
>> 						Marc
> 




More information about the MacOSX-Emacs mailing list