Questions tagged [latex]

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

LaTeX is a document preparation system that uses macros with the TeX engine for producing scientific or technical books and articles of typeset quality.

Use tag for general questions about working with LaTeX documents in Emacs. Other tags may also be applicable depending on the question and specific feature or mode of Emacs. For example, there are many modes for working with LaTeX documents, three of the common ones are:

  • The basic tex-mode package included in GNU Emacs. Use the tag for questions pertaining to this mode.
  • The complete AUCTeX third-party package (included in XEmacs). AUCTeX provides advanced features, including syntax highlighting, completion macros in third-party packages, better support for complex compilations, preview of math equations. Use the tag for questions about AUCTeX.
  • For questions about LaTeX in org-mode, use the appropriate org tag as well. For example, for LaTeX exports, use .

For questions about (La)TeX and companion tools unrelated to Emacs, consult TeX - LaTeX Stack Exchange as well.

825 questions
32
votes
2 answers

How can I hide/display LaTeX section just like org-mode does with headlines?

When editing org files, I find it extremely convenient how you can hide and display headlines and their content by just hitting TAB on the headline. For instance, consider the following buffer * Headline 1 Some text here. * Headline 2 Some more…
Malabarba
  • 22,878
  • 6
  • 78
  • 163
31
votes
2 answers

Is there a way to resize margins when exporting PDF in org-mode?

I want to export my org document as a PDF, but its margins are way too big. I would like to re-size them as I wish. I am using #+LaTeX_CLASS: report I do not know if there is a way. Any help?
makeMonday
  • 445
  • 1
  • 5
  • 8
30
votes
5 answers

Editing files with one-sentence-per-line

A bit of background. I’m trying to version-control my latex documents, and the effectiveness of this initiative would be greatly improved if I adopt a one-sentence-per-line approach. For instance, the following is what my documents will look…
Malabarba
  • 22,878
  • 6
  • 78
  • 163
23
votes
3 answers

Label and reference LaTeX equations in org-mode

This is similar to Org export to latex and HTML references, but for equations. I like to use LaTeX math snippets in my org-files, as in * The Quadratic Equation The roots of $ax^2 + bx + c$ are given by \begin{equation} \label{eq:1} x = \frac{-b…
Kevin
  • 534
  • 1
  • 5
  • 15
21
votes
3 answers

Hide \author, \date, and \title when exporting to pdf with org-latex-export-to-pdf

I am very new to LaTeX and exporting org-mode files to pdf. When I run the command org-latex-export-to-pdf it adds a title, author name, and date to the top of the exported pdf. Looking at the generated LaTeX, I assume that comes from the…
elethan
  • 4,755
  • 3
  • 29
  • 56
21
votes
2 answers

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+R code in Knitr way; at right buffer PDF output…
drobnbobn
  • 575
  • 4
  • 15
19
votes
6 answers

Reducing LATEX_HEADER clutter at the top of my org files

I often write notes in org mode and export them to latex. However, because some documents are complex I need to include many latex packages at the top like so: #+LATEX_HEADER: \usepackage[margin=1.15in]{geometry} #+LATEX_HEADER:…
smilingbuddha
  • 1,131
  • 10
  • 26
19
votes
2 answers

Font size control of LateX previews in Org files

I love the ability to preview LateX fragments in Org-mode. With two easy shortcuts one can turn them on and off on-demand: Turning previewing ON: C-c C-x, C-l Turning previewing OFF: C-c C-c One problem I encounter often is that the preview has a…
Amelio Vazquez-Reina
  • 5,157
  • 4
  • 32
  • 47
18
votes
3 answers

Exporting unicode characters to pdf using latex from org mode

Hello Good people of Emacs! I'm having trouble exporting unicode math symbols from buffer (org-mode) to pdf file. 1. Problem Description: Symbols are inserted to the buffer as unicode characters (via TEX input method or company-math) Here is…
Empty_Mind
  • 1,341
  • 12
  • 27
17
votes
6 answers

org-mode ignore heading when exporting to latex

I have a problem where I want to structure my document visually with a heading but do not want it to actually execute a \section{Fake Heading} for the latex export. I imagine this would be customizable through an org mode property that I am unaware…
costrouc
  • 421
  • 3
  • 8
17
votes
1 answer

How to indent items in LaTeX/AUCTeX itemize environments?

Q: how can I get "proper" indentation of LaTeX itemize environments in auctex? Here's where I'd like to be with an item in an itemize environment: \item line is indented two spaces relative to the beginning of the environment continuation lines in…
Dan
  • 32,584
  • 6
  • 98
  • 168
15
votes
5 answers

How to enlarge latex fragments in org mode at the same time as the buffer text?

I'm using org-mode in emacs, but I think the question is also relevant for auctex users. In org-mode you can show latex fragments, as the manual demonstrates. But: these fragments (mostly math formulae) seem to have constant size. When I type C-x…
michaell
  • 151
  • 1
  • 3
15
votes
3 answers

How should I write inline equations in Org Mode so they export to LaTeX properly?

I have a sentence with the words 42 m s^{-1}. When this is exported to LaTeX it exports as 42 m s$^{\text{-1}}$. How should I write it, or what flags should I set in the #+OPTIONS: line, so that it exports as 42 m s^{-1}?
mankoff
  • 4,108
  • 1
  • 22
  • 39
14
votes
5 answers

How to replace matching parentheses?

I write (and rewrite) a lot of mathematical formulas in LaTeX with Emacs. I frequently run into situations where I want to change a pair of matching parentheses, to improve readability. My Emacs is kind enough to show me the matching delimiter, but…
Mankka
  • 243
  • 2
  • 8
14
votes
1 answer

Long org-export latex header

I need many lines in my org-export latex header. #+LATEX_HEADER: \usepackage[main=british,polutonikogreek]{babel} #+LATEX_HEADER: \usepackage{fontspec} #+LATEX_HEADER: \usepackage{hanging} #+LATEX_HEADER:…
Toothrot
  • 3,204
  • 1
  • 12
  • 30
1
2 3
54 55