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
141
votes
5 answers

How to have no pagebreak after \include in LaTeX

My LaTeX makes me pagebreaks after each subsection because my subsections are in separate files. I use the command \include{file} which adds a pagebreak after the use of it. I would like to have no pagebreak caused by the use of \include{file}. …
Léo Léopold Hertz 준영
  • 134,464
  • 179
  • 445
  • 697
139
votes
3 answers

Make code in LaTeX look *nice*

I'm currently writing a project report, and to explain the slightly crazy un-intuitive code that I've used I need to put lots and lots of short excerpts of example code in. How I can get code into LaTeX that: looks nice doesn't go off the side of…
Ed James
  • 10,385
  • 16
  • 71
  • 103
138
votes
10 answers

Latex - Change margins of only a few pages

I have a Latex document where I need to change the margins of only a few pages (the pages where I'm adding a lot of graphics). In particular, I'd like to change the top margins (\voffset). I've tried doing: \addtolength{\voffset}{-4cm} % Insert…
pgb
  • 24,813
  • 12
  • 83
  • 113
131
votes
7 answers

Eliminate space before \begin{itemize}

In Latex, how do I eliminate the space inserted before itemize? \begin{itemize} % produces lots of vertical space \item ... \item ... \end{itemize}
Alexandru
  • 25,070
  • 18
  • 69
  • 78
128
votes
7 answers

How do I make a reference to a figure in markdown using pandoc?

I'm currently writing a document in markdown and I'd like to make a reference to an image from my text. this is my text, I want a reference to my image1 [here]. blablabla ![image1](img/image1.png) I want to do that reference because after…
Romain Piel
  • 11,017
  • 15
  • 71
  • 106
128
votes
1 answer

Remove data.frame row names when using xtable

OK, I admit this one is a bit uptight (read: "stupid"), and I assume it's quite easy too. I'm writing a report and I want to use xtable package for LaTeX table generation (note that memisc package does the job, but say I want to do this solely with…
aL3xa
  • 35,415
  • 18
  • 79
  • 112
127
votes
2 answers

How to display a content in two-column layout in LaTeX?

I am writing an article in LaTeX and I would like to display some content in two column layout. In the left column a matrix and in the right column a list of items. I have tried with tabular environment but it does not work as I want. My question…
czuk
  • 6,218
  • 10
  • 36
  • 47
125
votes
10 answers

How do I get LaTeX to hyphenate a word that contains a dash?

In a LaTeX document I'm writing, I get an overfull hbox warning because of the word "multi-disciplinary", which happens to be rendered at the end of a line. I can get rid of this particular warning by changing it into multi-discipli\-nary, but the…
Gyom
  • 3,773
  • 5
  • 29
  • 38
124
votes
5 answers

Latex Remove Spaces Between Items in List

What is the best way to format a list as to remove the spaces between list items.
Dave
  • 2,849
  • 4
  • 28
  • 20
124
votes
26 answers

Is a successor for TeX/LaTeX in sight?

TeX/LaTeX is great, I use it in many ways. Some of its advantages are: it uses text files, this way the input-files can be diffed and many tools exist to work with text it is very flexible it has a stable layout: if I change something at the start…
Mnementh
  • 50,487
  • 48
  • 148
  • 202
121
votes
8 answers

How do I remove blank pages coming between two chapters in Appendix?

Is there a way to remove blank pages appearing between two chapters, in Appendix?
tksy
  • 3,429
  • 17
  • 56
  • 61
120
votes
6 answers

Two statements next to curly brace in an equation

How can I write an equation with one curly brace ({), and on the right-hand side next to the curly, two statements in two different lines?
y2p
  • 4,791
  • 10
  • 40
  • 56
112
votes
10 answers

QED symbol in latex

How do I type a QED symbol - I want a full box and not an empty box like \qed gives you. (I'm not using \begin{proof})
Guy
  • 14,178
  • 27
  • 67
  • 88
105
votes
6 answers

How to label each equation in align environment?

I wonder how to label each equation in align environment? For example \begin{align} \label{eq:lnnonspbb} \lambda_i + \mu_i = 0 \\ \mu_i \xi_i = 0 \\ \lambda_i [y_i( w^T x_i + b) - 1 + \xi_i] = 0 \end{align} only label the first equation and only…
Tim
  • 1
  • 141
  • 372
  • 590
104
votes
5 answers

How to change font size on part of the page in LaTeX?

I would like to change the text size for some page part, e.g. for a verbatim block: \begin{verbatim} \end{verbatim}
jwaliszko
  • 16,942
  • 22
  • 92
  • 158