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
76
votes
3 answers

How to center cell contents of a LaTeX table whose columns have fixed widths?

Consider the following piece of LaTeX code: \begin{tabular}{p{1in}p{1in}} A & B\\ C & D\\ \end{tabular} How can I make the contents of each cell aligned in the center of the cell rather than the left? Note that I want to make sure that the widths…
reprogrammer
  • 14,298
  • 16
  • 57
  • 93
73
votes
14 answers

How do I convert LaTeX to plain-text (ASCII)?

Scenario: I have a document I created using LaTeX (my resume in this case), it's compiling in pdflatex correctly and outputting exactly what I'd like. Now I need the same document to be converted to plain old ASCII. Example: I have seen this done…
chuckg
  • 9,195
  • 7
  • 28
  • 26
72
votes
4 answers

Don't make me manually abort a LaTeX compile when there's an error

As suggested here, latexmk is a handy way to continually compile your document whenever the source changes. But often when you're working on a document you'll end up with errors and then latex will panic and wait for user input before continuing. …
dreeves
  • 26,430
  • 45
  • 154
  • 229
72
votes
5 answers

How to control font sizes in pgf/tikz graphics in latex?

I'm creating graphs in pgf/tikz. When I use these in my document they are scaled, several are in minipage/subfig like environments. When this happens the font sizes are scaled with the graphics making them very small or unreadable. I've been through…
Jay
  • 2,917
  • 3
  • 18
  • 13
71
votes
7 answers

Disabling underscore-to-subscript in Emacs Org-Mode export

When I export to PDF via org-mode (C-c C-e d), any words with underscores end up being partially converted to subscript. How can I prevent this from happening? I found this article on the subject: Disabling Underscore subscript in Emacs Tex…
zpinter
  • 2,232
  • 2
  • 23
  • 29
71
votes
4 answers

Getting R plots into LaTeX?

I'm a newbie to both R and LaTeX and have just recently found how to plot a standard time series graph using R and save it as a png image. What I'm worried about is that saving it as an image and then embedding it into LaTeX is going to scale it and…
agentofuser
  • 8,987
  • 11
  • 54
  • 85
71
votes
3 answers

LaTeX: How to adjust how the Sum symbol turns out

Not sure if LaTeX counts as programming, or if my question even makes sense, but I have this LaTeX expression (or what you call it): \sum_{k=1}^n k^2 = 1+4+9+\ldots +n^2 = \frac{1}{3}n^3 + \frac{1}{2}n^2 + \frac{1}{6}n The problem is that the k=1…
Svish
  • 152,914
  • 173
  • 462
  • 620
70
votes
3 answers

Export a LaTeX table from pandas DataFrame

Is there an easy way to export a data frame (or even a part of it) to LaTeX? I searched in google and was only able to find solutions using asciitables.
PlagTag
  • 6,107
  • 6
  • 36
  • 48
70
votes
25 answers

Listings in Latex with UTF-8 (or at least german umlauts)

Trying to include a source-file into my latex document using the listings package, i got problems with german umlauts inside of the comments in the code. Using \lstset{ extendedchars=\true, inputencoding=utf8x } Umlauts in the source files (encoded…
Janosch
  • 1,204
  • 1
  • 11
  • 19
69
votes
6 answers

Making LaTeX tables smaller?

I have a LaTeX table that looks like this: \begin{table}[!ht] \centering \small \caption{ \bf{Caption}} \begin{tabular}{l|c|c|l|c|c|c|c|c} field1 & field 2 & ... \\ \hline ... the problem is that even with "\small" the table is too big, since I…
user248237
68
votes
4 answers

knitr/rmarkdown/Latex: How to cross-reference figures and tables?

I'm trying to cross-reference figures and tables in a PDF produced with knitr/rmarkdown. There are some questions on SO and tex.stackexchange (here and here, for example), that suggest the way to do this inline is to add \ref{fig:my_fig}, where…
eipi10
  • 91,525
  • 24
  • 209
  • 285
66
votes
3 answers

How can I start pagenumbers, where the first section occurs in LaTex?

This question is related to the post about having abstract at the titlepage. I want to reset the page numbering at the given section.
Léo Léopold Hertz 준영
  • 134,464
  • 179
  • 445
  • 697
66
votes
5 answers

How to manually equalize columns in an IEEE paper if using BibTex?

IEEE conference publications in two-column format require authors to manually equalize the lengths of the columns on the last page of the final submission. I have typically done this by inserting a \newpage where necessary -- which usually ends up…
ezod
  • 7,261
  • 2
  • 24
  • 34
66
votes
12 answers

What is the best way to embed LaTeX in a webpage?

I'm not asking about converting a LaTeX document to html. What I'd like to be able to do is have some way to use LaTeX math commands in an html document, and have it appear correctly in a browser. This could be done server or client side.
Phenwoods
  • 671
  • 1
  • 6
  • 6
65
votes
2 answers

How to get rid of navigation bars in beamer

How to remove the navigation bar of sections and subsections on the top of each slide generated from a beamer latex file? By the way, in my preamble, I wrote: \setbeamertemplate{navigation symbols}{} \usepackage{beamerthemeshadow}
user376089
  • 1,245
  • 3
  • 14
  • 18