Pregunta

I would like to have syntaxic highlighting in emacs when I write LaTeX code in French.

More precisely, I want emacs to recognize when I'm quoting someone.

In english when you write :

``quote''

Emacs reconizes that it's a quotation and put "quote" in some color.

In French, quotation are made with the help of babel and looks like this :

\og quote\fg{}

I would like to color "quote" in the same way than in English.

¿Fue útil?

Solución

AUCTeX recognizes french latex files by this code fragment.

\usepackage[frenchb]{babel}

This will install french style quoting via key ', but no font-lock support. To add this, you can put

(add-hook 'TeX-language-fr-hook
          (lambda ()
            (font-latex-add-quotes '("\\og" "\\fg{}")))))

in your init-file.

muede

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top