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.

4
votes
1answer
768 views

Math autocompletion in org mode

What is the easiest way to get autocompletion for math symbols when I write latex formulas between \(..\) or \[...\] in org-mode? Could packages like company-math or ac-math be used in org-mode, for ...
4
votes
1answer
120 views

Use command other than \item to render lists in LaTeX export

I am trying to come up with a template for moderncv package. I would like to be able to render org-mode lists using \cvitem for example. Better yet, if I could choose the LaTeX command for rendering ...
4
votes
2answers
435 views

apostrophe in org-babel export to latex and beamer

How can I get org-babel to properly render ' and not ’ when exporting to LaTeX and to Beamer? I didn't find any good solution yet, and I would like the code to be copy-pasteable.
4
votes
1answer
515 views

How to define LaTeX document class for org-mode export (other than default)?

I want to add to org-latex-classes new class, namely "exam" (as described here: https://www.sharelatex.com/templates/exams/exam), here's a preview of an example document beginning: \documentclass[...
4
votes
1answer
847 views

how to style block quotes in org-mode LaTeX export?

I am trying to change the style of block quote formatting in org-mode export to PDF via LaTeX. Using this answer, I defined a new LaTeX environment called fancyquotes. I am successfully able to ...
4
votes
1answer
456 views

org-mode doesn't display image when LaTeX Image Attributes are included

I'm facing this problem that when I include some LaTeX specific attributes for my image, then the image doesn't display inside org-mode (although it is displayed fine in my exported LaTeX PDF). For ...
4
votes
2answers
146 views

Yet another request for Emacs templates

I'd like to find a way to organize and access my (Latex) templates within Emacs and so far, I didn't find a satisfying solution. (This post is related, but doesn't solve my question.) Let's say that ...
4
votes
1answer
78 views

AUCTeX - removing an environment from auto-complete list

I use the auto-complete feature of LaTeX-environment often. I'd like to be able to remove entries from the auto-complete list. I usually need to use the packages amsmath and amsthm, which introduce ...
4
votes
2answers
589 views

Org-mode: How to render latex inside ~code~

This seems a catch-22: I want to render code in an org-mode export (html or latex pdf) where the snippet below done as a ~code block > (cons 1 nil) \to (1) actually renders \to as a proper right ...
4
votes
1answer
76 views

Query-replace with some context checking?

(query-replace "foo" "bar") shows you all occurrences of foo and offers to replace them by bar. I would love to have a version of query-replace that only picks the occurrences of foo that are "in ...
4
votes
0answers
157 views

new lines in org mode export to LaTeX

This is similar to (this question). I would like to export the following org-mode document to LaTeX: * Test text 1 text 2 text 3 - list 1 - list 2 - list 3 #+BEGIN_definition ...
4
votes
0answers
490 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 ...
4
votes
0answers
98 views

how to include remote images in org-mode export to LaTeX?

When I paste the URL of an image into an org-mode file and then export it to HTML, the remote image URL gets turned into an img tag and displayed in my HTML file without the need for me to save the ...
4
votes
1answer
715 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-...
4
votes
0answers
172 views

Prevent :EXPORT_LATEX_HEADER: in a subtree from overriding all buffer #+LATEX_ lines

Possibly a bug: When using :EXPORT_LATEX_HEADER: in a subtree's :PROPERTIES: it overrides all the buffer-level #+LATEX_HEADER: commands as well as everything given in an external file with #+SETUPFILE:...
4
votes
0answers
90 views

using global-linum-mode with ess with a latex/R knit file

When using global-linum-mode with a latex file that has blocks of R code (*.rnw file) moving in and out of the R code blocks cause the line numbers to disappear until the cursor is moved again. Is ...
4
votes
0answers
125 views

LaTeX-aware sentence endings?

Q: how do I define sentence endings to be LaTeX macro-aware? I'd like backward-sentence and forward-sentence to be smarter about LaTeX macros -- particularly \footnote -- when working in LaTeX ...
3
votes
2answers
199 views

How does AUCTeX determine the documentclass?

It's clear that AUCTeX has some way of determining the documentclass, since some functions behave differently depending on which documentclass is selected. For example, LaTeX-insert-item behaves ...
3
votes
2answers
1k views

Working with LaTeX in Spacemacs: can PDFs be seen in a buffer, rather than via external PDF reader?

I have been using the latest version of Spacemacs, with AUCTeX. However, when I compile the .tex file into a .pdf file, it opens in my default external PDF viewer software. Is there a way to make ...
3
votes
2answers
599 views

org-mode Beamer export: can't change format of title page and TOC

I have an org file that I use to create a pdf with org-beamer-export-to-pdf. The file has things like this at the top: #+TITLE: Training #+OPTIONS: H:2 toc:1 num:t #+LATEX_CLASS: beamer #+...
3
votes
1answer
1k views

latex-mode-hook or LaTeX-mode-hook?

When I did some clean up of my Emacs init file, I discovered that I had used both (add-hook 'LaTeX-mode-hook ...) and (add-hook 'latex-mode-hook ...) What is the difference between LaTeX-mode-...
3
votes
2answers
89 views

Make siunitx.el automatically recognize values and unit of unformatted text

I use siunitx to typeset units in LaTeX. This is quite painless when typesetting it directly because of Emacs's siunitx.el (see below). However, sometimes I copy exercises or solutions containing ...
3
votes
1answer
562 views

how to include gif images in org-export to LaTeX?

When I export from org-mode to PDF via LaTeX, my jpg images export successfully, but my gif images do not appear. The gif images do export when I export to HTML. I found a variable called org-export-...
3
votes
1answer
154 views

Fixed width font in Latex

I can't figure out how to have every character have the same fixed width in Latex. In this example: I would like the characters {i \in \math to have the same width as the others.
3
votes
4answers
795 views

Autocomplete environments like in TeXStudio

TeXStudio autocompletes environments. How can I get AUCTeX to do the same? I can begin typing an environment name (say myenvironment) and, after entering a part of it (my, myenv, etc.), I hit ...
3
votes
1answer
592 views

How to get rid of the auto folder with .el files?

I'm using Emacs 25.1, and I use it primarily for LaTeX with AucTeX. Some time ago in the directories of my .tex files, there started to appear a folder named "auto" with .el files in it. The .el files ...
3
votes
2answers
99 views

Ignoring line when exporting with latex backend

I have an org file that I want to export to both latex and html. The file contains a bibliography, so I want to make sure that my org-exporter processes it correctly for both export backends. For ...
3
votes
1answer
692 views

Blank lines after org-mode code block results in LaTeX export

Context I am embedding org-mode source code blocks and their results into my document and am exporting it to LaTeX. I usually wrap the output of my code into helper functions that generate formatted ...
3
votes
1answer
744 views

how to modify default command for TeX-command-master (ie, C-c C-c)?

Q: how can I get TeX-command-master (C-c C-c) to default to LaTeX rather than View? TeX-command-master dispatches to various commands, such as LaTeX, BibTeX, View, etc., almost none of which I use ...
3
votes
1answer
273 views

Yasnippet prompt when using commands interactively?

How can I use yasnippet to invoke LaTeX commands interactively? If I use auctex to insert \usepackage it starts a minibuffer which lets me select the desired package (including tab completion). ...
3
votes
1answer
534 views

org Images in LaTeX export set default width

By default these org lines: my image: [[./figure1.png]] are exported into these ones in latex: \includegraphics[width=.9\linewidth]{./figure1.png} How can I change the default value of width \...
3
votes
1answer
701 views

How to force the indentation of the first paragraph on org-mode export?

I have a simple Org file with this: #+STARTUP: showall align #+OPTIONS: todo:nil tasks:all tags:nil #+AUTHOR: Manoel Vilela #+TITLE: Super title @@latex:\\@@ Title to be write #+DATE: <2017-08-24 ...
3
votes
1answer
239 views

Export org-mode to LaTeX without preamble and document environment

I have recently started using org-mode as an electronic lab notebook for my work, and would like to combine these files with the files that I have set up in my old lab notebook, which was done in ...
3
votes
1answer
266 views

Prompt for inserting label when using theorem style environments in latex

When inserting the environment equation (by C-c C-e equation) in latex-mode, emacs shows a prompt to insert a label. It is desirable to have the same prompt for a theorem-style environment like lem ...
3
votes
1answer
469 views

How to cite author-date including page number in org-mode?

I am using org-ref in org-mode. I want to cite a book like this: \citep[p. 1445]{Fong:2006} but I am only getting citep:Fong:2006. How can I include page number?
3
votes
1answer
412 views

Polymode appears in minibuffer but does not weave into a file on Windows, why?

This is a follow-up post to Polymode installation on Windows machine. Accordingly I installed polymode using this code in the init.el file after ESS code: (require 'poly-R) (require 'poly-markdown)...
3
votes
1answer
443 views

Org headlines are never exported to \paragraph in LaTeX

I want to export an Org file into PDF, with any depth titles showed in TOC; however, cannot works. Even though adding \setcounter{tocdepth}{5}, TOC still only contains the title of 3rd depth (\...
3
votes
1answer
2k views

Org-mode doesn't seem to be exporting listings/minted correctly

Emacs is exporting listings blocks (i.e. #+BEGIN_SRC <lang>) in a strange, incorrect way. Here's an example of what I mean with a simple org file: #+AUTHOR: #+BEGIN_SRC js var dog = "dog!" #+...
3
votes
1answer
62 views

Check latex \left \right balance

I've found a function for checking parenthesis/brackets balance. Full code is in the bottom. I wanted to use it to check LaTeX commands like \left(/\right), \[/\] etc. How can I modify this function ...
3
votes
1answer
26 views

LaTeX-environment inserts unwanted empty line

When I'm editing a LaTeX document and I'm using C-c C-e for LaTeX-environment, I often get a blank line after the newly-inserted environment. This is never what I want and sometimes even plainly ...
3
votes
1answer
55 views

How to display a marked-up string without the markup?

Q: how can I display a marked-up string without the markup? I have a string with LaTeX markup, such as the following name with an umlaut: Tezc\"ur I want to display the string in a buffer without ...
3
votes
2answers
194 views

Greek (Unicode) in Org mode export to PDF

I am working on a project that deals with polytonic Greek, and wish to write everything in Org mode, and export to a PDF with one of the compilers (like XeLaTeX). I have spent hours today reading ...
3
votes
1answer
470 views

Exporting Org in Landsacpe

I have an org document I'd like to export to PDF - with several wide tables columns in it - so much so that it makes sense to export the whole document in A4 landscape to keep the orientation ...
3
votes
1answer
104 views

disable strange comment behavior in AUCTeX

When I have a commented line in my TeX file, eg some text that is not commented |%% here is a comment followed by more uncommented text (the | represents point), and I hit RET, point is moved past ...
3
votes
1answer
304 views

How to change the appearance of list bullets in LaTeX/beamer exports?

It's very neat that simple org-mode lists get exported to itemize (or enumerate) environments in LaTeX. Yet I would like also to be able to change the face of an \item bullet using square brackets, as ...
3
votes
1answer
98 views

How to tell Emacs to keep indentation in algorithmic environment?

I frequently find myself typesetting algorithms, and I choose the algorithmicx/algpseudocode package for that. I like the package, it is simple to use and has everything I typically need. The problem ...
3
votes
1answer
77 views

Emacs: `cal-tex-cursor-month-landscape` is texing as portrait

Emacs has a buit-in library to generate a landscape calendar with the function cal-tex-cursor-month-landscape. I am using TexLive 2012 on a OSX. The calendar image gets truncated on portrait ...
3
votes
1answer
1k views

How to control newline and indent when export to LaTeX from org-mode file?

I have a test org-mode file as below: #+OPTIONS: ':nil *:t -:nil ::nil <:nil H:3 \n:nil ^:{} arch:headline #+OPTIONS: author:nil c:nil creator:nil d:(not "LOGBOOK") date:t e:t #+OPTIONS: email:nil ...
3
votes
1answer
268 views

Installing Auctex from Package Manager: Scan error

When install auctex from the Package manager using GNU Archive, I get this error: forward-sexp: Scan error: "Unbalanced parentheses", 18984, 38451 This always happens to me when I install it using ...
3
votes
1answer
144 views

cycling through latex math mode and equation

Is there a way to cycle through \( x=1 \), \[ x=1\] and \begin{equation} x=1 \end{equation} in any latex package? I find this function practical but I didn't know how to implement using elisp or ...