63 votes
Accepted

LuaLaTeX, TeXLive 2016, standalone: undefined control sequence

The fix is easy: add \RequirePackage{luatex85} as the very first line, a temporary workaround until standalone is updated. It should do no harm even after the update. \RequirePackage{luatex85} \...
44 votes
Accepted

What's the benefit of using {standalone} instead of {article}?

The main advantages, in my opinion, are: You can readily compile your figure and make modifications without compiling the whole document. You can include the standalone .tex file using the \...
mirkom's user avatar
  • 1,624
29 votes
Accepted

Multiple pages with standalone

What I use is \documentclass[multi=my,crop]{standalone} After this, wrap every figure into \begin{my}…\end{my}.
Ilya Zakharevich's user avatar
26 votes
Accepted

Installing latex standalone in ubuntu for humans

The standalone latex package is included in the Ubuntu package texlive-latex-extra. You can install it through the terminal with the command: sudo apt-get install texlive-latex-extra or with any ...
LucaD's user avatar
  • 1,541
25 votes
Accepted

The PNG image of a TikZ picture that is generated by the standalone document class has the wrong dimensions

Conceptually bitmaps do not have a size, they just have a number of pixels. As documented in the standalone manual the class tells convert to assume 300dpi which makes a high resolution image for ...
David Carlisle's user avatar
22 votes
Accepted

Standalone: class vs package

The standalone class is designed to create individual snippets of content whose size adapts to the content itself. This is implemented with the [crop=true] option, which is enabled by default. The [...
Alan Munn's user avatar
  • 210k
21 votes
Accepted

How does standalone crop?

Never read the documentation. Bad things happen. --- David Carlisle Edit: [26/03/18] Martin Scharrer just uploaded version 1.3 of standalone.cls to CTAN, which has the correct order of the border ...
Phelype Oleinik's user avatar
20 votes
Accepted

What is best practice to set up Multi-file tex documents?

I think that the multifile howto is pretty easy, but as commented, it depends on what you want to achieve or how you organize your contents in the hard disk. Also, you must be aware that some package ...
Fran's user avatar
  • 77.3k
19 votes
Accepted

Is my current workflow worth using or idiotic?

So as promised in the comments, here is my current setup for image-heavy documents using TikZ and similar (the below uses TikZ, circuitikz, includes SVGs, plots created with Python and possibly other ...
Skillmon's user avatar
  • 53.9k
18 votes

LuaLaTeX, TeXLive 2016, standalone: undefined control sequence

The easiest way is to load luatex85 package. You probably will need to load it before documentclass, using RequirePackage The longer story is that luatex now no longer defines many primitives with ...
Yan Zhou's user avatar
  • 8,922
18 votes
Accepted

How to control padding around standaloneframe content?

The standalone package by default crops the page to its contents. There is also a border option (also called margin, which I think is a better name) that allows you to put a white space margin around ...
Pieter van Oostrum's user avatar
14 votes
Accepted

Centering standalone tikz picture

Detecting the problem By adding a \frame around the tikzpicture, you'll get a tight frame around the image that will show you what is really happening and where is the additional space; adding a ...
Gonzalo Medina's user avatar
14 votes
Accepted

Standalone: document size

As the TeX Book says (p. 63) From TeX's viewpoint, a single character from a font is a box [...] The character shape need not fit inside the boundaries of its box. Here we have such a situation: ...
campa's user avatar
  • 27.3k
13 votes
Accepted

Doesn't the verbatim environment work with the standalone class?

Try \documentclass[preview]{standalone}% <-- added option "preview" \begin{document} \begin{verbatim} Ciao \end{verbatim} \end{document} This should work ... Edit: Also work with option ...
Zarko's user avatar
  • 283k
12 votes

Image shifts when removing percent (%) signs with standalone class

This is a specific problem of standalone. You can look at What is the use of percent signs (%) at the end of lines? for understanding what follows. By default, standalone typesets the text in the ...
egreg's user avatar
  • 1.1m
12 votes
Accepted

Tikz image of normalizing flow

To nest figures, I use savebox as shown in this answer. Update 1: Improved dash pattern closure around the circle with dash pattern. Value found by do-it-yourself, and trial-and-error. \draw[dash ...
AndréC's user avatar
  • 23.5k
12 votes

Tikz image of normalizing flow

With the great help from @AndréC, this is what I ended up with: \documentclass[border=1cm,tikz]{standalone} \usetikzlibrary{positioning} \newcommand{\distro}[4][40]{ \begin{tikzpicture}[scale=.8] ...
Janosh's user avatar
  • 3,962
11 votes

The PNG image of a TikZ picture that is generated by the standalone document class has the wrong dimensions

No. It does not. It depends how you measure it. Measuring in MS Word: Three different resolution images placed in Word: When printed: Measuring in LaTeX: The Code: \documentclass[]{...
berkus's user avatar
  • 1,148
11 votes
Accepted

TikZ in standalone not centering

It's the end of line after the \tikzstyle declaration. Move it before \begin{document}. By the way, \tikzstyle is deprecated and I changed it to the currently preferred format. \documentclass{...
egreg's user avatar
  • 1.1m
11 votes
Accepted

How to ensure two standalone documents have same dimensions

The reason can be seen from this example: \documentclass{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture} \draw [line width=1cm] (0,0) -- (1,0); \draw [red] (0,0) -- (1,0); \...
Torbjørn T.'s user avatar
10 votes
Accepted

How to use standalone with multiple files?

You have to enclose each “page” in an environment: \documentclass[multi,crop,border=2]{standalone} \standaloneenv{my} \begin{document} \begin{my} Test1 \end{my} \begin{my} Test2 \end{my} \end{...
egreg's user avatar
  • 1.1m
10 votes
Accepted

Find the coordinates of a point in a TikZ picture, with respect to the borders drawn by standalone package

The coordinate of the center of the node (at (0,0)) will stay the same. But you can extract the coordinates of the bounding box (which is identical with the output format if you use the standalone ...
Jasper Habicht's user avatar
9 votes

Errors using standalone package to create a table

I think the key here is to add the [varwidth=\maxdimen] class option to the preamble. It's similar to using minipage. I removed all the unnecessary clutter to keep it clear and simple, but you can add ...
voices's user avatar
  • 2,009
9 votes
Accepted

tikz with standalone has border at left

This happens because there are paragraphs and other whitespace before the actual image. If you move the \begin{document} to be right before \begin{tikzpicture}, the problem disappears because ...
wrtlprnft's user avatar
  • 3,819
9 votes
Accepted

Conversion by standalone fails when compiling using lualatex

That's because standalone is still using \write18 for shell escape. Just don't use standalone, it's broken in too many places (in my opinion). You can trick standalone into thinking that traditional ...
Henri Menke's user avatar
9 votes
Accepted

LaTeX Table to Standalone?

I don't think that using a tabularx environment with two equally wide columns and some ensuing line-breaks in the first column generates a good layout. I'd go with a basic tabular environment, use l ...
Mico's user avatar
  • 478k
8 votes
Accepted

Support for typesetting a table as stand-alone PDF

The abstract of documentation for package standalone notes: The standalone bundle allows users to easily place picture environments or other material in own source files and compile these on ...
Zarko's user avatar
  • 283k
8 votes
Accepted

chessboard + standalone

You can enlarge the right margin of the board (the default value is 1em): \documentclass[]{standalone} \usepackage{chessboard} \usepackage{moreenum} \begin{document} \chessboard[% setwhite={Qa1,...
Ulrike Fischer's user avatar
8 votes
Accepted

Using standalone to combine multiple .tex into a single file

Use this master: \documentclass{article} \usepackage{standalone} \title{My Book} \author{Me} \begin{document} \maketitle \input{Section1.tex} \end{document} and this Section1 \documentclass{article}...
Ulrike Fischer's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible