auctex

Using minted (source code LaTeX package) with emacs/auctex

一曲冷凌霜 提交于 2020-01-22 12:04:29
问题 As is explained in here, I find minted package is pretty cool for source code listing. My question is how to use minted package with AucTeX/emacs? For command line I can use pdflatex -shell-escape SOURCE , but Q1 : How can I modify the AucTeX to insert the -shell-escape ? I mean, how to change the action for C - c + C - c ? Q2 : Do I need special key other than C - c + C - c for -shell-escape option? Or, is it just OK to use it without any problem? Q3 : What is the -shell-escape for? 回答1: Q1:

Using minted (source code LaTeX package) with emacs/auctex

喜欢而已 提交于 2020-01-22 12:03:51
问题 As is explained in here, I find minted package is pretty cool for source code listing. My question is how to use minted package with AucTeX/emacs? For command line I can use pdflatex -shell-escape SOURCE , but Q1 : How can I modify the AucTeX to insert the -shell-escape ? I mean, how to change the action for C - c + C - c ? Q2 : Do I need special key other than C - c + C - c for -shell-escape option? Or, is it just OK to use it without any problem? Q3 : What is the -shell-escape for? 回答1: Q1:

Sync Emacs AUCTeX with Sumatra PDF

江枫思渺然 提交于 2019-12-20 09:47:29
问题 With these lines in my init.el I am able to sync the Emacs LaTeX buffer with Sumatra: (setq TeX-source-correlate-mode t) (setq TeX-source-correlate-method 'synctex) (setq TeX-view-program-list '(("Sumatra PDF" ("\"C:/bin86/SumatraPDF/SumatraPDF.exe\" -reuse-instance" (mode-io-correlate " -forward-search %b %n ") " %o")))) (setq TeX-view-program-selection '(((output-dvi style-pstricks) "dvips and start") (output-dvi "Yap") (output-pdf "Sumatra PDF") (output-html "start"))) To set a double

Code folding for LaTeX in Emacs

≡放荡痞女 提交于 2019-12-18 12:57:10
问题 Is there an Emacs minor-mode (or piece of elisp code) that lets you selectively hide/show environments while in LaTeX mode? For instance, I would like to move to the beginning of a long \begin{figure} block, hit a keystroke, and have the contents of that figure environment hidden from view. Similarly with \begin{proof} and so on, and ideally even with \subsection s. Is this possible? I just tried hs-minor-mode , allout-mode , and outline-minor-mode , but most of them don't recognize LaTeX's

If I open doc.foo file, I want emacs to look for and open doc.bar file in the same folder

一个人想着一个人 提交于 2019-12-13 15:21:37
问题 Specifically this problem arises when working in LaTeX (auctex) for me, but I think it must have a general emacs solution. To every doc.tex file, I have an associated and oft-edited doc.sty file in the same folder. Is there a way that whenever I open the doc.tex file I can have emacs open the doc.sty file in that folder? I'm not proficient at all in elisp, so something very simple---it doesn't need to be robust code: it can work on the assumption that both files are named doc.* and that both

Run TeX-command-master without querying in emacs

只愿长相守 提交于 2019-12-12 09:33:52
问题 The key combination C-c C-c in Emacs/AucTeX runs the function TeX-command-master which decides what command should be run (latex, bibtex, view, or others) and then asks the user for confirmation before running the command. I would like to bind this to a key (say F9 ) except without asking for confirmation. This way I would just press F9 and the most appropriate command would be run. How can I do that? 回答1: I have this snippet (taken from Emacswiki link below), which does every thing with out

Add a TeX symbol in the Emacs init file

旧街凉风 提交于 2019-12-11 02:59:31
问题 I am trying to add the following code to my .emacs init file: (TeX-add-symbols '("eqref" TeX-arg-ref)) But I cannot get it to work. I get the following error when running emacs t.tex ( t.tex is here a sample text file) from the command line: Warning (initialization): An error occurred while loading `.emacs': Symbol's function definition is void: TeX-add-symbols I am using GNU Emacs version 23.3.1 on Ubuntu 12.04. My .emacs init file looks like (setq TeX-auto-parse t) (setq TeX-electric-escape

Emacs Auctex custom syntax highlight

一笑奈何 提交于 2019-12-09 18:24:20
问题 I'd like to highlight a new command I created in LaTeX: \newcommand{\conceito}[3]{ \subsection{#1} (Original: \textit{#2} #3). } I use this code in this way: \conceito{Foo}{Bar}{Bla} I followed the manual and put this code in my ~/.emacs , but it didn't work: (add-hook 'LaTeX-mode-hook (lambda () (font-lock-add-keywords nil '((""\\<\\(\\conceito)\\>"" 1 font-lock-warning-face t))))) What's wrong? 回答1: EDIT: Deokhwan Kim originally pointed out that your regexp contains two consecutive double

FlySpell in Org-Mode recognize latex syntax like auctex

∥☆過路亽.° 提交于 2019-12-07 02:15:25
问题 Original Response: I was trying to figure out how in auctex mode latex doesn't seem to highlight any latex functions with flyspell turned on. Is this a custom dictionary file or how is this implemented? Can this be easily incorporated into an org-mode file so it doesn't highlight inserted latex code that will get exported. Edit: Simple example taken from top of file and in the text. Basically so latex syntax like ref or label inside {} won't be spell checked (this has been fixed by using

emacs AUCTeX macros fontification

守給你的承諾、 提交于 2019-12-06 06:06:15
问题 I recently started using the excellent package xargs that provides \newcommandx . It shares a syntax similar to the default \newcommand . I would like font-lock to reflect this. I did (custom-set-variables '(font-latex-user-keyword-classes (quote (("cx" ("newcommandx" "*|{\\[[{") (:family "font-lock-type-face") command))))) But this fontifies just the command name itself, not its body ( \newcommand fontifies the body with 'font-lock-function-name-face , which in my case is bold). I want