Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [latex]

Working with LaTeX documents, LaTeX coding, and LaTeX source blocks in other documents.

2
votes
2answers
178 views

How center #+BEGIN_EXAMPLE on org-mode LaTeX export?

I have a verbatim/monospaced block that way: #+BEGIN_EXAMPLE _ / \ T H ...
1
vote
1answer
31 views

disable view prompt in AUCtex [on hold]

I have been attempting to disable a prompt by auctex when pressing C-c C-c to view the document for close to the entire day. As I am a noob to emacs, I attempted to simply modify the auctex ...
1
vote
0answers
40 views

Add custom parenthesis before and after selection

I use emacs to write latex and I need to enclose a lot of small expression in braces ( \{ and \} for latex) I would like to select the text to enclose and have some command that would add { before the ...
0
votes
0answers
7 views

Listings' morekeywords attribute doesn't work in Org mode

I have defined a custom listings style in the header of my org mode file: #+LATEX_HEADER: \usepackage{listings} #+LATEX_HEADER: \usepackage{color} #+LATEX_HEADER: \definecolor{codegreen}{rgb}{0,0.6,0}...
0
votes
0answers
12 views

Spacemacs keeps installing and uninstalling auctex-latexmk

Running spacemacs 0.200.13. Everytime I start spacemacs, it either installs auctex-latexmk or deletes it saying that it is an orphan package. Here is some more information: I have latex layer ...
2
votes
1answer
30 views

Org Mode. Set separation length between elements of a list

I have noticed there is a big gap between the elements of a list when exporting to PDF. Is there a way to modify it?
1
vote
2answers
56 views

Org latex exports $ … $ math as \( … \) : can this be avoided?

As the title says, inline math snippets such as $x+1$ are replaced during org latex export by \(x+1\). But, no one is writing inline math in LaTex files like this. Is there a way to tell Org to leave ...
1
vote
1answer
44 views

comment causes [package error]

I want to export an org file containing a tikz diagram to pdf. I've read the manual. This is the most minimal example I could come up with: #+LATEX_HEADER: \usepackage{tikz} #+begin_src emacs-lisp :...
1
vote
1answer
34 views

Reorder fields using bibtex-mode

I would like to clean up BibTeX entries so that fields always appear in the same order. For example, I would like the order of fields to always be: author, year, title, journal. So, pressing C-c C-q ...
1
vote
1answer
35 views

Disable flycheck for laTeX

I use emacs with AUCTeX for editing tex files. I also use flycheck for some other programming language. How to disable flycheck in TeX mode ? I tried called flycheck-mode nil in the latex hook but ...
0
votes
1answer
17 views

How to get error messages for org-preview-latex-fragment?

(This took a long time to research, so I'm answering my own question, hoping to save others some time) Let's say I have a file like this: one by two is $\froc1{2}$ When I run M-x org-preview-latex-...
1
vote
2answers
223 views

Embed external latex file in org mode

I have an R function which returns a latex fragment, which I'd like to insert into my org file. Here's what I tried, which just inserts the latex source: #+BEGIN_SRC R :exports none :results silent ...
0
votes
0answers
16 views

org-export latex hangs

I'm on macOS 10.14.2 and Emacs 26.1 with the latest version of mactex (via brew cask install mactex). However, I cannot get my PDF to render with Org-export latex. I am looking at the *Org Export ...
1
vote
1answer
69 views

Labelling LaTeX sub-equations in org-mode

How to achieve subequation numbering a,b,etc like https://en.wikibooks.org/wiki/LaTeX/Advanced_Mathematics#Subordinate_equation_numbering in org-mode. I tried using the LaTeX snippet as it is and ...
15
votes
2answers
3k views

how to setup Knitr workflow in Emacs?

RStudio provides a one-button way for produce PDF file from LaTeX+R source with Knitr. It looks great for doing reproducible research. And I am trying to configure my Emacs for: at left buffer LaTeX+...
0
votes
1answer
37 views

Definitive answer to org-mode export HTML versus LaTeX

I keep being stymied by the apparent incompatibility of HTML and LaTeX export. Here's what I have in my .org file header: #+LATEX_CLASS: article #+LATEX_CLASS_OPTIONS: [american] #+LATEX_HEADER: \...
0
votes
1answer
53 views

Customizing org-latex-title-command to edit title page

I would like to know how to go about editing and understanding org-latex-title-command. So far it is set to \maketitle but the documentation just has this: The command used to insert the title ...
0
votes
0answers
62 views

Org Export Latex: Defining Custom Classes for a Title Page From #+TITLE, etc keywords

I stumbled upon this archived email: https://lists.gnu.org/archive/html/emacs-orgmode/2011-02/msg01281.html and a suggestion is to create a custom title page that picks up the title, author, and date ...
8
votes
1answer
293 views

Arara integration in Emacs?

Is there a way to integrate Arara as a way to automate the building process of a LaTeX document in Emacs/AUCTex?
0
votes
0answers
24 views

How do I turn off electric “double-dollar” insert under auctex?

Inserting a $ symbol in a latex document (in AucTex mode) automatically inserts 2 $s in a row (and then hitting "delete" immediately deletes both). I can confirm that the variable TeX-electric-math is ...
1
vote
0answers
9 views

Failing to convert Japanese org-mode document to Latex

I am writing Japanese Org mode note and need to convert it into Latex. I defined the japanese latex class in my config file as follow: (with-eval-after-load 'org (add-to-list 'org-latex-classes ...
0
votes
0answers
39 views

Package pdftex.def Error: File `./xx-eps-converted-to.pdf' not found: using draft setting

I am using Aquamacs 3.4 GNU Emacs 25.3.50.1 on macOS 10.14.2. Recently I encounter an error while converting eps to pdf. The textstudio works fine but Aquamacs does not. I have included the ...
0
votes
1answer
73 views

flyspell overrides company key bindings

I have the following in my init file. ;; ======= Company mode set up ============ (use-package company :ensure t :defer t :init (add-hook 'after-init-hook 'global-company-mode) :config (use-...
0
votes
3answers
830 views

Making pdf-tools work after successful compiling on mac os x

After installing the required dependencies with homebrew, I was able to compile pdf-tools . But I cannot make it work (I cannot see the pdf on emacs after compiling) I would like to know if somebody ...
0
votes
1answer
214 views

AUCTEX won't create dsc file

I'm using Emacs24 on windows with AUCTEX for Latex. When I try to toggle preview it doesn't show, insteed there is a little "not working" picture on each equation and I get an error Running `...
2
votes
2answers
118 views

Is there a way to export latex template to scimax template?

Scimax has already some templates for various journals. However, is there a way to convert latex templates of some specific journals (like nuclear physics A, European physical journal etc.) to org-...
4
votes
1answer
660 views

How to set PDF export in polymode-mode to use xelatex engine?

Consider the below MWE of .Rmd file containing Arabic text which needs xelatex engine to be rendered by pandoc. As the documentation of the latter says putting this option would make it: --latex-...
0
votes
1answer
74 views

Custom verbatim environments/macros in AucTeX

Here's my MWE: \documentclass{article} \newenvironment{tscode}{}{} \def\tscode|#1|{} \begin{document} \tsinline|efwe| \begin{tscode} efihw$feiw$ \end{tscode} \end{document} % Local Variables: % ...
0
votes
1answer
140 views

Export handout with notes using org-mode and beamer

I'm having a lot of trouble getting a nice solution to this problem. I want to export a handout for a beamer presentation using org-mode. I can write a note using \note{sample note}, which creates a ...
0
votes
1answer
145 views

My emacs does not use the LaTeX-includegraphics-extensions option in my .emacs file

I tried to customize my .emacs file adding the options to the macro command \includegraphics. I use Emacs 25.3.1 on MacOS. My .emacsfile is as follows: (package-initialize) (custom-set-variables '(...
1
vote
2answers
343 views

Ways to render latex-like formula like mathjax in Emacs

Assume one has a latex-like formula as the following which is usually rendered by mathjax in webpages supporting it (like wordpress): For all positive integers {n} one has \displaystyle \frac{1}{n+1} ...
3
votes
1answer
176 views

Org-mode #+include: — ignore configuration lines from included file

How can I have org #+INCLUDE: ignore configurations from the included files? I'm thinking of cases where I don't want Latex Classes to be messed up. For example, if I have two org files book.org and ...
3
votes
1answer
61 views

Change overlaid text of an outline header?

Q: how do I add a new outline header regexp but change the overlaid text? I often write presentations with Beamer in LaTeX. As such, there are a lot of frame (ie, "slide") environments: \begin{...
0
votes
1answer
251 views

AUCTeX cannot find a working Tex distribution and don't know how to install exec-path-from-shell

When I was trying to export the pdf file. It notifies me this. And then I searched on Google. People suggest me check the method in the link below. https://github.com/purcell/exec-path-from-shell ...
1
vote
1answer
149 views

Error adding LaTeX class to org-latex-classes

I am trying to register the jfm LaTeX class (Journal of Fluid Mechanics) with the Org LaTeX export backend. After looking around, I have put the following elisp snippet into my .emacs (with-eval-...
0
votes
1answer
35 views

How to fix reftex-toc numbering?

I have used reftex-toc for a while without problem, but a while back it started to show the wrong numbering in the toc-buffer. I don't think I have changed any settings. The latex-output is not ...
2
votes
1answer
97 views

Add new header variable in org-mode document, and use it in (LaTeX) export

I'm using a memorandum specific style when I do LaTeX export of an org-mode document. It has some fields that I'd like to specify/fill in in a manner similar to the way AUTHOR, TITLE, DATE are ...
0
votes
2answers
89 views

Emacs/LaTeX displays _char as a subscript in the editor

Emacs seems to be doing some WYSIWYG with _, as if it were in math mode (in the picture, _ is followed by subscript 'o', inside the include statement. It shouldn't. I'm using Emacs/Tex out of the box, ...
3
votes
1answer
170 views

How to fully fontify latex snippets including subscript and superscript within org-mode

I have many latex snippets delimited by $ inside my org notes. I recently discovered org-highlight-latex-and-related, which highlights latex snippets a certain face. However, I want to also apply the ...
0
votes
1answer
38 views

Creating table of content with the package titletoc in Org Mode for LaTex export produces strange lines of text

I use the LaTeX package titletoc to produce table of contents in some chapters or sections for Org-Mode LaTeX / PDF export with #+TOC: headlines 1 local But in the PDF file there is for example the ...
0
votes
1answer
69 views

opening brace alignment/indentation problem in LaTeX mode

I have an alignment/indentation problem in LaTeX mode. Every time I begin a line with an opening brace and I hit <TAB> or run an indentation command on the region, the brace becomes aligned with ...
6
votes
1answer
346 views

Table cell alignment breaks when using latex inside org table

Let's assume we have a table that looks like this: After running org-preview-latex-fragment command I get this: As you can see the top row is not aligned with the other rows. How can one view ...
1
vote
1answer
71 views

Autocompletion of relative, not absolute, file name

I am typing a Tex file with Emacs and I want to be able to include the relative path of an image file name from inside Emacs. For example, my Tex file that is being opened in Emacs is located at ~/...
6
votes
1answer
177 views

Set image width globally for LaTeX export

I write my research notes in org-mode, and I'd like to avoid writing #+ATTR_LaTeX: :width 5cm :placement [!htpb] right before all of my figures, to save some time. A possible solution might be to make ...
0
votes
0answers
22 views

Enabling asy-mode coloring inside a latex block

I have started using Asymptote for making diagrams in \LaTeX. Asymptote comes with its own Emacs mode for editing .asy files in which we typically write Asymptote code. However, I often write a lot ...
1
vote
1answer
54 views

How to export LaTeX from org-mode to HTML using dvipng instead of mathjax GLOBALLY?

The doc string for org-export-with-latex describes how to select mathjax, verbatim output, or not to export LaTeX at all, although it goes further to say: If you prefer, you can also request that ...
1
vote
1answer
39 views

How to do harvard style referencing using org-ref

I am writing a paper using spacemacs with it's org-mode to export to latex. I want to referencing using the (author, year) style for example if I had the following reference in my .bib file @article{...
0
votes
0answers
33 views

Limitations of latex mode inline math syntax highlighting

My Problems: In latex major mode (not Latex major mode), syntax highlighting works okay for line 1, but not for line 2. line 1 : my hypothesis is $a^2 + b^2 = c^2.$ line 2 : my hypothesis is \(a^2 ...
0
votes
1answer
25 views

Change location of latex options (\bibliography{}) in exported .tex file

I just spend hours trying to figure out why bibtex citations don't work. Turns out it's because \bibliography{testbib} needs to come after begin{document}. This is my test.org: #+LATEX_HEADER: \...
1
vote
0answers
34 views

adding options to org-export dispatcher

I'm trying to customize the workflow that goes from org-mode to latex export. When I launch the export dispatcher, I have four sub-options under [l]atex ... the standard ones. But I think it's ...