Questions tagged [latex]

LaTeX is a programming language used primarily for creating high quality academic written documents, slideshows and posters. LaTeX questions are often a better fit for the sister site "TeX - LaTeX" (https://tex.stackexchange.com). This includes questions on tools and other languages producing LaTeX code. The JavaScript libraries MathJax and KaTeX are off-topic on "TeX - LaTeX" and should be asked on Stack Overflow instead (and tagged accordingly).

LaTeX is a macro package implemented on Donald Knuth's TeX programming language and is used primarily for creating high quality written documents. The underlying TeX system is Turing complete and LaTeX inherits this property, making it possible (but rarely advisable) to perform arbitrary computations in LaTeX; more interestingly it makes it possible to get any layout scheme you can describe precisely.

Which site to use for LaTeX questions?

As LaTeX is primarily used for simply writing documents many people characterize it as a "markup language" (like HTML) and site selection criteria have been discussed several times. See:

The Stack Exchange site dedicated to LaTeX is tex.stackexchange.com, which is probably a better place to ask any LaTeX-related questions than here on Stack Overflow. The other site also covers TeX and other related technologies.

Other resources

11140 questions
6
votes
4 answers

How to have superscript content "overflow" in overbrace in LaTeX

I'm trying to overbrace a short equation (or part thereof) with a long superscript. This expands the overbrace to both fit content and superscript, which takes up a lot of space and looks ugly. There is a way to have the content "overflow" the…
xeen
  • 61
  • 2
6
votes
2 answers

Making Latex typeset given text on two facing pages

How do I encourage/make Latex typeset some portion of text so that it will all appear on a consecutive even-page, odd-page pair of pages? With trial and error, \nopagebreak can be coaxed into doing this, but is there a strategy that Just Works? …
Charles Stewart
  • 11,661
  • 4
  • 46
  • 85
6
votes
4 answers

LaTeX - Adding a varying amount of horizontal spacing to the beginning of each new line in a sequence

I'm using LaTeX for an algorithms assignment and I need to show the steps for Horspool's algorithm for string matching similar to what is shown in the textbook. The way it demonstrates the algorithm is showing how the pattern shifts along the text…
Feanor
  • 2,715
  • 4
  • 29
  • 43
6
votes
6 answers

LaTeX equations in Ruby on Rails

How can I render LaTeX stuff like \frac{1}{2} in a Ruby on Rails application? I mean to get an image? Thanks!
Dimitar Vouldjeff
  • 2,067
  • 3
  • 19
  • 24
6
votes
2 answers

Troubleshooting Latex table from pandas dataframe to_latex()

I am unable to visualize the Latex table generated using dataframe.to_latex() from pandas in my IPython notebook. It shows the exact string with the "\begin.." line in a box. I am also curious why the table is formatted {lrrrrr} and how I can change…
6
votes
1 answer

Using LaTeX Beamer to display code

I'm using the following LaTeX code in a Beamer presentation: \begin{frame} \begin{figure} \centering \tiny \lstset{language=python} \lstinputlisting{code/get_extent.py} \end{figure} \end{frame} Is it possible to select…
djq
  • 14,810
  • 45
  • 122
  • 157
6
votes
3 answers

Can one make Theorem numbers behave like subsubsection numbers in latex?

I would like to ask two questions about the numbering schemes in Latex for which I am unable to find any precise reference. I will be very happy if somebody could help me out on this. Question 1) Is it possible to number theorems and…
MNT
  • 163
  • 1
  • 4
6
votes
1 answer

PDFs are missing images when compiling knitr .RNW examples

I'm new to creating documents with knitr and Latex and I'm slowly being driven insane trying to figure out why the images of plots are missing from compiled pdfs. For example, if I open the knitr minimal example that comes with the knitr package…
Paul Raftery
  • 223
  • 2
  • 6
6
votes
1 answer

How to Write Multiple Authors in Markdown (Pandoc)

I want to write a markdown file containing multiple authors, then convert it into a LaTeX and Doc file using Pandoc. Based on the answers to these questions, I tried to write: % Author
Another Author Pandoc can convert that into two lines in…
Edy Jo
  • 161
  • 1
  • 5
6
votes
1 answer

IPython Syntax Lexer for Latex Minted Package

Is there a way to get IPython sessions with syntax highlighting integrated into a latex document using, for example, the minted package (https://github.com/gpoore/minted)? I have seen many ways of converting a notebook using nbconvert to a tex…
sanguineturtle
  • 1,425
  • 2
  • 15
  • 29
6
votes
3 answers

Changing the numberings of nested lists in an Enumerate environment, in LaTeX

I want to produce the following in LaTeX: 1. Item 2. Item 3a. Item 3b. Item 4. Item 5. Item Basically I have already tried using nested enumerate environments, but I have a problem with implementing the different numberings. How can…
Andreas Grech
  • 105,982
  • 98
  • 297
  • 360
6
votes
1 answer

Use xtable to produce a Latex table with significance stars (***)

I am currently using xtable to generate Latex tables from R. It works fine, but in one of the tables I have significance stars to some of the numbers. Something like this dataframe X: 1 2 3 4 5 Test1 Test2 Test3 a "1.34" "0.43" "-0.26" "0.13"…
user3032689
  • 627
  • 1
  • 10
  • 23
6
votes
4 answers

wiki/docbook/latex documentation template system

I'm searching for a documentation template system or rather will be creating one. It should support the following features: Create output in PDF and HTML Support for large & complicated (LaTeX) formulas References between…
Wolfgang Ulmer
  • 3,450
  • 2
  • 21
  • 13
6
votes
3 answers

Emacs regex: replacing a string inside a latex equation

I'd like to replace all occurrences of the letter 'n' that occur inside any LaTeX equation, with the letter 'N'. It can be assumed that the LaTeX equations in the document are of the form $...$ Will accept also solutions in perl or any other…
Evan Aad
  • 5,699
  • 6
  • 25
  • 36
6
votes
2 answers

Does pybtex support accent/special characters in .bib file?

from pybtex.database.input import bibtex parser = bibtex.Parser() bibdata = parser.parse_file("sample.bib") The above code snippet works really well in parsing a .bib file but it seems not to support accent characters, like {\"u} or \"{u}(From…
Drake Guan
  • 14,514
  • 15
  • 67
  • 94