0

I am using AUCTeX 13.2.1 in emacs 28.1 and I have a multifile document setup where my master file is called these.tex and an included file is called chapter_01.tex in a subdirectory. In the preamble of the master file I do call :

\usepackage{csquotes}
\usepackage[french]{babel}

And I expect \enquote{ to be inserted in the buffer displaying chapter_01.tex when pressing ". To do so, everything seems to be correctly configured :

At the bottom of the master file there is :

%%% Local Variables:
%%% TeX-master: t                                
%%% End:

And at the bottom of the included file there is :

%%% Local Variables:
%%% TeX-master: "../these"
%%% End:

In my init.el I have LaTeX-csquotes-close-quote, LaTeX-csquotes-open-quote, TeX-parse-self and TeX-master, well seted (see below).

I can successfully compile the pdf from the included file, but when pressing " in my included file all I get is `` instead of the \enquote{ as expected. When doing the same in the master file it works as expected.

Here is my auctex config in init.el :

(use-package latex
    :mode
    ("\\.tex\\'" . latex-mode)
    :hook
    (LaTeX-mode . (lambda ()
                  (prettify-symbols-mode)
                  (LaTeX-math-mode)
                  (reftex-isearch-minor-mode)
          (company-mode)
          (rainbow-delimiters-mode)
          (TeX-fold-mode)
          (TeX-after-TeX-LaTeX-command-finished-hook)
          ))
    :config
    (setq-default TeX-master nil
                  TeX-PDF-mode t
                  TeX-engine 'xetex)     

    (setq TeX-auto-save t
          TeX-save-query t
          TeX-parse-self t
          TeX-show-compilation nil 
          LaTeX-babel-hyphen nil
          LaTeX-csquotes-close-quote "}"
          LaTeX-csquotes-open-quote "\\enquote{"
          reftex-plug-into-AUCTeX t
      )
    
    ;; PDF
    (with-eval-after-load 'tex
    (setq TeX-source-correlate-method 'synctex)
    (TeX-source-correlate-mode)
    (setq TeX-source-correlate-start-server t)
    (add-to-list 'TeX-view-program-selection
         '(output-pdf "Zathura"))
    )
    
    (setq LaTeX-command "latex -shell-escape")

    (add-hook 'TeX-language-fr-hook
      (lambda () (ispell-change-dictionary "french")))
    )

I guess AUCTeX doesn't do the link between the loaded packages in the master file and the included file, but I don't know how to fix this. Any hint on how to debug that ?

Related questions here, here and here.

0

You must log in to answer this question.

Browse other questions tagged .