Questions tagged [latex]
Working with LaTeX documents, LaTeX coding, and LaTeX source blocks in other documents.
848
questions
0
votes
0
answers
7
views
Prevent ox-koma-letter.el from creating .tex files?
When running org-koma-letter-export-to-pdf on an .org file to create a .pdf file ox-koma-letter.el also creates a .tex file. Does anyone know if there is any way to prevent it (or just clean it up ...
1
vote
1
answer
34
views
How to get the starred version of a latex section on org-mode?
How do I get the starred version of a latex chapter/section from an org-mode headlight?
* my section ---> \section{my section}
??? ---> \section*{my section}
thanks
1
vote
1
answer
20
views
How to make orgtbl-mode work within embedded LaTeX environment in org-mode itself?
I read a blog, which mentioned using orgtbl-mode to write a matrix quickly in org table format and then translated it into the LaTeX format. The post mentioned that due to the close relation between ...
0
votes
0
answers
31
views
Change vertical margins/size of the address fields in the koma-letter-export
I'm trying to export a letter as a pdf using org-koma-letter-export-to-pdf command, which is part of the koma-letter-export package (ox-koma-letter.el).
By default to and from address fields take up ...
0
votes
1
answer
30
views
Org-mode LaTeX export set AUCTeX local variables
I have an org-mode document, say
#+TITLE: My Title
* Section
My first section
and I want to export it to LaTeX with org-latex-export-to-latex.
This generates a .tex file that I can now compile.
...
0
votes
1
answer
32
views
org mode embedded LaTeX does not work for packages imported using usepackage?
I have used org mode embedded LaTeX for a while. The commonly used syntax such as subscripts, fractions and math symbols works well out of the box. All that is needed is to put the LaTeX content ...
1
vote
0
answers
46
views
org-mode latex export of source block with engraved gives error for latex3 code due to missing color-`face` processing
I want to export my source blocks from org-mode to pdf through latex with the export backend engraved. I installed the package engraved-faces, set the variable with (setq org-latex-src-block-backend '...
0
votes
0
answers
22
views
Autopair parenthesis with cdlatex
I'm trying to write my configuration for the first time and I am facing the problem with cdlatex completion of parenthesis conflicting with tools like autopairs. What happens is that, inside a TeX ...
1
vote
1
answer
49
views
Making cleveref insertions globally available
I keep all my commonly used latex packages in one custom package, including the referencing package cleveref. However, reftex is configured to only provide insertion of cleveref referencing commands ...
0
votes
1
answer
21
views
Is there a way to Insert a Table from external pdf similar to inserting external pdf as figure?
We can easily insert figures from external PDF, but how do I insert a table the same way?
For example: I have a table in .tex file in a standalone class as it is easier to generate it from an external ...
1
vote
0
answers
39
views
How to add a specific pdf page as an image in org-mode, and correctly export it?
I am working in a file document.org, and I have an embedded image, the second page of a file images.pdf.
The org-file shows this correctly (with the code shown below). However, upon exporting it to ...
0
votes
1
answer
38
views
Why does adding a return value to my Python code stop it from printing?
Load up Emacs in the default modes, i.e. emacs -Q. After this, make a new .Org file with the following contents and run the Emacs Lisp code.
(setq org-babel-python-command "python3")
(setq ...
0
votes
0
answers
38
views
why is "org-highlight-latex-and-related" messing with org-hyperlink description?
Basically, to highlight latex equation I need to include native in org-highlight-latex-and-related.
But that messes up links with _ ([[file:asdfk_jkfke_erj224jk.txt][a link]] for the example below).
(...
0
votes
1
answer
44
views
org-latex-preview fails when \usepackage{fontspec} used
To write in different language, I'm exploring different LaTeX engine mainly XeLaTex.
#+LATEX_COMPILER: xelatex
#+LATEX_HEADER: \usepackage{fontspec}
#+LATEX_HEADER: \setmainfont{CMU Serif}
* This is ...
2
votes
1
answer
52
views
AUCTeX: Some general macros/command missing from auto-completion/macro insertion
While further trying to set up a Latex environment in emacs I stumbled over a "problem" with macro-completion which I don't understand right now.
When writing Latex code the usual way to ...
1
vote
1
answer
73
views
Add parsing of latex-style .el file to LaTeX-hook using AUCTeX
I did some online research (e.g. here) but couldn't figure out how to solve the following problem so far (of course, I might have overlooked something since the whole emacs community is new to me).
...
0
votes
0
answers
13
views
Upgraded emacs and now there's extra whitespace around latex equations using org-latex-preview
This is inside a docstring in a python script, using org-preview-latex:
After rendering:
The whitespace goes away if I run convert -trim ltximg/org-ltximg_60b58ddb1d181ad22bd828dd88e5039cf2e80a89....
1
vote
1
answer
49
views
How can I make AUCTeX recognise this macro?
I'm writing a custom helper command for my beamer presentation:
\newcommand{\sectionfigure}[1]{
\begin{tikzpicture}[overlay, remember picture]
\node at ([shift={(0, 0.27925\paperheight)}] foot....
0
votes
1
answer
23
views
How to remove padding for display math equations when `org-export-preserve-breaks t`?
When the variable org-export-preserve-breaks is t, the org contents...
text
\[
a + b + c
\]
text
gets exported to LaTeX as...
text\\[0pt]
\[
a + b + c
\]\\[0pt]
Text\\[0pt]
This adds a lot of extra ...
0
votes
0
answers
8
views
don't show images in html or local links in pdf-latex
I want to transfer folders with documents with Syncthing to the Android tablet, the documentation is made in orgmode and I export to PDF or HTML. But they don't resolve local addresses in the tablet; ...
0
votes
0
answers
28
views
How to make LaTeX in org-msg e-mails look nice?
I just want to send nice-looking e-mails like this
This e-mail is achieved by using Apple Mail, LaTeXiT and a bit of hand-waving. However, in org-msg mode I can by default with dvipng/imagemagick ...
0
votes
1
answer
14
views
browse-url: replace \% with % in the url argument
Short version: how can I make sure that \% strings are replaced by %, in the url argument of browse-url?
Long version:
In LaTeX, URLs that appear in \url{} macros need to have any % character escaped ...
2
votes
0
answers
17
views
Stop producing excess whitespace in .png files from TikZ code
I've been using Org src blocks like the following to generate .png images of TikZ diagrams.
#+name: tikz-functions
#+header: :file tikz-functions.png
#+header: :imagemagick t :iminoptions -density 800
...
1
vote
2
answers
68
views
How to tangle code blocks from an org file, compile the output, and open the result, with a single command?
I use org-babel-tangle to generate lilypond and latex documents from org files.
These org files have the following first line:
#+PROPERTY: header-args :LANG :comments org :tangle PATH/FILE_NAME.EXT
...
0
votes
1
answer
45
views
AucTeX: Keybinding for compiling document
Is there a command, for which I can set a keybind for compiling the document? The command (TeX-command-master, bound to C-c C-c) gives you a list of options but it's rather inefficient. I'm looking ...
0
votes
0
answers
28
views
Save LaTeX/AucTeX generated auxiliary files to a separate directory EXCEPT for the PDF file
I am using AucTex in Emacs to compile my LaTeX files. Is there a way to keep just the PDF file in the current directory and send all the other auxiliary files to a separate folder? I have set TeX-...
0
votes
0
answers
16
views
Need help using a custom tcblistings environment for src blocks
I'm trying to advise the function org-latex-src-block--listings to use a tcblistings environment that I like. In LaTeX the environment is used like...
\begin{code}[title=TITLE, language=LANGUAGE, file=...
2
votes
1
answer
52
views
Why are LaTeX previews oversized when using Imagemagick but not when using Dvipng?
I am taking mathematical notes using org mode and would like to have inline previews for commutative diagrams. For mathematical equations this works perfectly with dvipng. However, dvipng doesn't play ...
1
vote
1
answer
19
views
Make auctex ask me only for position and width when inserting a minipage environment
If I insert a minipage environment using auctex LaTeX-environment it asks me for "Position", "Height", "Inner Position" and "Width". However I only want to be ...
0
votes
0
answers
52
views
Export to Latex error
I’m working on a new computer (MacBook Pro) and I copied my old .emacs file to the new computer. It all looked fine, but export to Latex C-c C-e lo gives the error below: (it works fine on the old ...
0
votes
0
answers
15
views
Multilingual LaTeX pdf export
I have an org mode file with a mix of Bengali and English text, which I got to work using Adib Hasan's solution here:
#+LATEX_HEADER: \usepackage[banglamainfont=Kalpurush, banglattfont=Akaash, feature=...
1
vote
0
answers
24
views
CDLaTeX: No such modifier ‘t’ outside math mode
I'm trying out CDLaTeX, but I'm running into the problem that when typing e.g. "don't" in text mode, I get:
cdlatex-math-modify: No such modifier ‘t’ outside math mode
I have a similar ...
0
votes
0
answers
32
views
How can I simulate book parts in org-mode?
I can get a nicely highlighted separation of chapters
with book.org
#+title: Species
#+author: CRD
#+HTML_HEAD: <link rel="stylesheet" type="text/css" href="style.css"...
0
votes
1
answer
32
views
Getting cdlatex to recognize mathmode in tikzcd or similar environments
I'm using Emacs with cdlatex to write latex-files and I frequently have to draw commutative diagrams using tikzcd. The interior of a tikzcd-environment is automatically parsed as being in mathmode, ...
0
votes
1
answer
31
views
How to hide the "Contents" header in the pdf output
Every time I would export the org doc as a PDF I would get this random "Contents" tag before the table and I am not sure how to remove it.
I attached below an image of what I mean
There's ...
0
votes
1
answer
43
views
Suppress empty lines around `align` in latex export from `org-mode` [duplicate]
Is there an elegant way to visually set apart an align environment in org-mode but have no newlines around the environment in the LaTeX output?
The naive attempt
Some text.
#
\begin{align}
1=1
\...
0
votes
1
answer
31
views
transient mark mode highlighting not visible inside preview latex
I am using preview latex in auctex. When you are inside
an equation there is a blue background around the latex you
are previewing, which means I cannot see the highlighing from
transient mark mode. ...
0
votes
1
answer
71
views
Adding some padding for LaTeX fragments in Org mode
When writing in Org mode, I have a minor pet peeve where the Org document becomes too "cramped", and so I like to add newlines separating the equations from the text, like this:
* Very ...
0
votes
1
answer
43
views
Pointing Emacs to LaTeX under zsh (for org-latex-export-to-pdf)
After moving to zsh and installing
MacTeX,
I can run pdflatex fine from the Terminal.
$ which pdflatex
/Library/TeX/texbin/pdflatex
I copy that location, itself a soft link
/Library/tex/texbin:
...
0
votes
1
answer
79
views
Change latexmkrc by setting file local variable
How can I specify inside a latex file (for example as a local variable) that compiling with latexmk should use a latexmkrc file with a specific path say /path/to/latexmkrc and not the default one and ...
0
votes
1
answer
16
views
change the tag of the exported code
I want to change the exported tag of
#+begin_src python
..
#+end_src
exports to
\begin{verbatim}
...
\end{verbatim}
I want it to be export to
\begin{python}
\end{python}
Anyone has any idea ?...
0
votes
0
answers
73
views
org-latex-preview error on Windows: file was not generated please adjust dvisvgm part of org-latex-preview-process-alist
I have used org-mode before in Linux to generate LaTeX fragments very smoothly. I am using dvisvgm.
Now, I have switched to Windows. I keep getting the error "file orgtex00000.dvi was not ...
0
votes
1
answer
71
views
Make Yasnippet insert characters before the key
I want to create a snippet, which does the following:
When I write . foo it creates A.B while the cursor is in front of B.
I only found ways to insert text after the key and to delete text before, but ...
0
votes
0
answers
50
views
more org-preview-latex-fragment issues on mac
I must have messed up my .spacemacs file, latex preview in org mode is no longer working. My config is below. It seems to be a path problem. The output when I attempt to preview is:
../../../../....
1
vote
1
answer
35
views
Always replace " with \enquote{ or }
You can configure AuCTeX to automatically replace " with \enquote{ or }, if the package csquotes is loaded, which is great.
But when I am using my own custom class, where csquotes is loaded in ...
0
votes
2
answers
67
views
How to pass a variable to a LaTeX code block?
I'd like to set a variable to be expanded in several LaTeX code blocks. For the sake of simplicity, there is only one in this case, foo. :header-args :var is ignored: I presume because LaTeX does not ...
1
vote
1
answer
21
views
org-babel latex picture resolution very low
I try below code in ubuntu 22.04 but the output image resolution very low:
#+HEADER: :file /media/sf_work/demo.jpg
#+HEADER: :results file graphics
#+HEADER: :headers '("\\usepackage{tikz}")...
1
vote
0
answers
20
views
shr/filling: don't split inline latex in html
my package mastodon.el uses shr-render-region to render posts, which fills text at shr-width.
if the post contains inline latex, shr's filling will split up the latex so that it will not be possible ...
1
vote
0
answers
63
views
Check math as you compose it
I have no end of frustration trying to do math with pen and paper. I can not seem to complete a page of working without making multiple mistakes.
I'm looking for something that will allow me to work ...
0
votes
1
answer
53
views
How can I wrap the main text of a document around a table when exporting from Org to Latex?
I have a long, skinny table that's likely going to end up spanning multiple pages that I'm using the longtable environment for. I want to have this placed on the left-hand side of my document, and to ...