Skip to main content

Questions tagged [latex]

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

Filter by
Sorted by
Tagged with
34 votes
2 answers
14k views

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's user avatar
33 votes
2 answers
9k views

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 * ...
Malabarba's user avatar
  • 23.2k
30 votes
5 answers
3k views

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, ...
Malabarba's user avatar
  • 23.2k
23 votes
3 answers
12k views

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 ...
Kevin's user avatar
  • 576
22 votes
3 answers
16k views

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 ...
elethan's user avatar
  • 4,835
21 votes
2 answers
11k views

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 ...
Amelio Vazquez-Reina's user avatar
21 votes
2 answers
5k 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+...
drobnbobn's user avatar
  • 585
20 votes
6 answers
3k views

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....
smilingbuddha's user avatar
18 votes
6 answers
10k views

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 ...
costrouc's user avatar
  • 451
18 votes
3 answers
5k views

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 (...
Empty_Mind's user avatar
  • 1,371
17 votes
1 answer
4k views

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 ...
Dan's user avatar
  • 33.1k
16 votes
5 answers
3k views

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 ...
michaell's user avatar
  • 161
15 votes
3 answers
16k views

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 ...
mankoff's user avatar
  • 4,226
14 votes
5 answers
2k views

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 ...
Mankka's user avatar
  • 243
14 votes
2 answers
5k views

How to reference source blocks in org text

I want to create source blocks (in any language including LaTeX), then refer to these in the text using internal links, with descriptions as shown below. This similar post is not working for me. I ...
n1k31t4's user avatar
  • 689
14 votes
1 answer
3k views

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} #+...
Toothrot's user avatar
  • 3,274
13 votes
3 answers
2k views

Any science book written in org-mode?

I am thinking to write a physics book in org-mode. Although there are many open-source science books written in LaTeX to figure out its work-flow (and its source) I couldn't find any science book ...
ofenerci's user avatar
  • 337
13 votes
1 answer
1k views

How to change comment string used by comment-region?

Emacs generally comments regions well, but sometimes I wish I could change the string it prepends to lines. For example, in LaTeX, I would like to have a commented region only use a single % per line ...
karlo's user avatar
  • 231
13 votes
1 answer
1k views

Is it possible to have the entire org-table use math environment?

I have an org-mode table that needs to have some math text in each cell. Wrapping every cell with $ both looks ugly and takes much more space than it deserves. Is there any way to somehow put the ...
wvxvw's user avatar
  • 11.4k
12 votes
3 answers
1k views

How to delete a LaTeX macro while preserving its text content?

In TeXStudio by hitting ALT+DEL in a LaTeX macro like this \macroname{content} while the cursor stands just before the first { will result in deleting all that except its content (as shown below). ...
doctorate's user avatar
  • 1,829
12 votes
3 answers
9k views

How to make auto-complete work in AucTeX mode?

I want auto-complete (ac) to work when I am inside AucTeX mode. I get all packages from MELPA by package installation. This is my relevant code in init.el file: (require 'package) (package-...
doctorate's user avatar
  • 1,829
12 votes
1 answer
3k views

How to have wrapped text when exporting from org to Latex?

I have an org file which I export to LaTeX and then to a PDF document. The problem is I have some long text that exceeds the length of the page. How to wrap it so that it falls into the next line? ...
Alex's user avatar
  • 363
12 votes
1 answer
6k views

How do I limit the width of a table or columns in org-mode PDF export?

I'd like to format a table with a wide column nicely in PDF export from org-mode. Ideally it would be with a wrap on that column, but I can deal with a manual character or fraction of \textwidth for ...
bright-star's user avatar
12 votes
2 answers
6k views

Change org-mode table style just for LaTeX export

I am trying to customize the style of my org-mode tables when exported to Latex. I need to change their font face, their font size, the background color of the header and the background color of every ...
xav's user avatar
  • 245
12 votes
3 answers
2k views

How can I write [0,1) in LaTeX mode without breaking indentation?

When writing LaTeX using latex-mode, I often want to write "half-open intervals" in my text. For instance, [0,1), which refers to the set of all numbers x with 0 <= x < 1. Unfortunately, ...
Nate Eldredge's user avatar
12 votes
2 answers
1k views

Aligning multi-lined equations and tables in latex-mode

Let's say I'm editing a latex in Auctex's latex-mode, and I have the following equation. This is just indented with indent-region. \begin{align} \phi & = a + b + c + d \\ & = a + ...
Malabarba's user avatar
  • 23.2k
12 votes
1 answer
1k views

how to detect if inside a LaTeX math environment?

Q: is there a way to detect if point is inside a LaTeX math environment? How would one detect whether point is or is not inside a LaTeX math environment, whether delineated inline by $...$ or by ...
Dan's user avatar
  • 33.1k
12 votes
1 answer
329 views

Auto-Indenting \if statements with AUCTeX

The current AUCTeX behaviour for primitive tex code involving if-like statements is to indent the conditional statement at the same level as the surrounding condition. I.e. code such as \if@...
elemakil's user avatar
  • 2,537
12 votes
2 answers
2k views

How to get rainbow-delimiters/rainbow-blocks to highlight in-line math in LaTeX equations

I'm using spacemacs with AUCTeX for LaTeX editing and would like to make rainbow-delimiters and/or rainbow-blocks highlight LaTeX math equations. Unfortunately this only works partly, i.e., some ...
nemesit's user avatar
  • 291
11 votes
4 answers
1k views

How to make emacs align and indent a bibtex entry?

I want bibtex-mode to align and properly indent fields. I copied a bibtex entry for the following article into Emacs: (Article source here) But, with a simple paste, the alignment is lost in Emacs ...
Viesturs's user avatar
  • 835
11 votes
1 answer
7k views

Changing default font size in Org LaTeX export

Org exports LaTeX with default font size of 11 pts. Is it possible to make this font size to 10 pts and also reduce spacing to one and half space ? Regards
Vaibhav's user avatar
  • 583
11 votes
2 answers
1k views

RefTex searching for multiple articles with Helm

I recently started using Helm and am really enjoying it. However, I use emacs to write a lot of LaTeX. When I cite articles, I often need to cite several in the same cite macro - I could search my ...
user2178117's user avatar
11 votes
1 answer
659 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?
Francis's user avatar
  • 113
11 votes
1 answer
284 views

Gradually learning the keybindings provided by AUCTeX

If I do M-x forward-char, Emacs gives a very useful message You can run the command "forward-char" with C-f. Considering the fact that Emacs can find all LaTeX keybindings in the file latex.el ...
Name's user avatar
  • 7,895
10 votes
3 answers
2k views

How to make a shell command totally silent (preventing it to split window or to open a new frame/window etc)

Is it possible to run a shell command silently (in background)? When I use async-shell-command, emacs split the windows. I would like that an specific shell command to be totally in background (...
Name's user avatar
  • 7,895
10 votes
1 answer
580 views

Can emacs close open LaTeX tags automatically?

When using web-mode, typing a </ will autocomplete with the highest level open tag name. For example, if I have an open <div>, </ will be autocompleted to </div>. Is it possible to ...
terdon's user avatar
  • 745
10 votes
3 answers
2k views

orgmode image export side by side to both latex and html

In org export, I want to place two images side by side. I want them to be side by side in both LaTeX export and HTML export. In the example below, the first pair works for LaTeX and the second pair ...
user3414663's user avatar
10 votes
1 answer
159 views

Speed up TeX-insert-macro on \input

In latex-mode when I use TeX-insert-macro to type a \input{...} macro, Auctex conveniently offers filename completion, which is great. However, it seems to search a lot of places to compile the ...
Malabarba's user avatar
  • 23.2k
9 votes
1 answer
3k views

org-mode / export to PDF: How to disable numbering for pages?

When I export a simple text file to PDF with the command org-latex-export-to-pdf, by default, Org-mode adds the number of each page at the bottom of the PDF file. But I would like Emacs to print ...
Albert Colvert's user avatar
9 votes
2 answers
3k views

org-mode different latex document class

I am trying to use tufte-book document class in org-mode. But for some reason, org-mode doesn't let me use it and says it is unrecognized. So I am going to the resulting .tex file and manually ...
meguli's user avatar
  • 377
9 votes
1 answer
3k views

Efficient workflow to write a book in Org-mode

I plan to write a short statistics textbook using Org-mode. Even if some textbooks have been written using equivalent systems (e.g., the R package bookdown), I have no examples in mind of books ...
Philopolis's user avatar
  • 1,134
9 votes
1 answer
3k views

Specify sidewaystable placement in Org-mode export

I have an Org-mode document that I am exporting to PDF, and my document contains a table that I would like to rotate on export. I have been able to achieve the rotation with #+ATTR_LATEX: :float ...
Kara Woo's user avatar
  • 442
9 votes
4 answers
3k views

Show math formula in emacs when coding

Is it possible that emacs shows real formulas in the editor if they are written in Latex or similiar? I am asking because it would be much more readable if you are coding (in lets say python or C++) ...
Miguellissimo's user avatar
9 votes
2 answers
2k views

Org: Add front cover for LaTeX/PDF export?

I want to add a front cover for my Org document which will export as a PDF (#+LaTeX_CLASS: article). I don't want to modify my org-latex-classes and apply globally. I tried to add the following block ...
kuanyui's user avatar
  • 1,040
9 votes
2 answers
2k views

Deactivate subscripts and superscripts raising / lowering in latex mode

On a new install, I noticed that Emacs systematically lowers or raises what it identifies as subscripts or superscripts (sometimes correctly, sometimes incorrectly...) due to the presence of _ or ^ in ...
Xavier's user avatar
  • 91
9 votes
1 answer
901 views

Helm and LaTeX mode

When I run the command LaTeX-environment (bound to C-c C-e by default) Helm properly selects from a list of all relevant environments (i.e. the same list I'd get without Helm turned on). The prompt ...
Patrick Steele's user avatar
9 votes
1 answer
656 views

Overriding fill-paragraph in LaTeX mode

I would like to change the behavior of fill-paragraph in certain modes (e.g. LaTeX-mode provided by AucTeX). I could just rebind the key M-q, but I am also using evil-mode whose implementation of ...
Kevin's user avatar
  • 576
9 votes
1 answer
440 views

Make consistent syntax highlighting of LaTeX source blocks

Org manual's solution for syntax highlighting of org-babel code blocks is to turn on native fontification with (setq org-src-fontify-natively t) works well for LaTeX code enclosed in blocks with #+...
Emacs User's user avatar
  • 5,663
8 votes
1 answer
4k views

Unnumbered section among numbered ones in Org-mode

It is known that the option num:nil drops the numeration of sections (when exporting from org-mode), but How could I include a unnumbered section among numbered ones in Org-mode?
Dox's user avatar
  • 985
8 votes
1 answer
1k views

Change figure environment options

It is possible to change the figure options for a latex figure in org-mode? Currently I'm using the following to insert a figure in my org document. #+CAPTION: awesome figure #+NAME: fig:my-figure [[...
kain88's user avatar
  • 835

1
2 3 4 5
18