The standalone bundle allows users to easily place picture environments or other material in own source files and compile these on their own or as part of a main document

learn more… | top users | synonyms

21
votes
1answer
367 views

How can I make a standalone document loading siunitx work?

I've got a standalone document that uses siunitx: % subdocument.tex \documentclass{standalone} \usepackage{siunitx} \begin{document} \SI{10}{\kilo\newton} \end{document} I'd like to include this ...
19
votes
3answers
916 views

How to make a smarter cropping with standalone or preview packages?

The arrow tail at the bottom left corner is not properly cropped. \documentclass[tikz,border=0pt]{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture}[scale=3,line width=3pt] ...
17
votes
3answers
1k views

How to make a standalone document with one equation?

I was surprised to find that standalone package can not compile a document with an equation: \documentclass{standalone} \begin{document} \begin{equation} % not working! F(V, T) = E(V) + D(T) ...
16
votes
2answers
3k views

The perfect pdfcrop

I need a "perfect" pdfcrop, one that crops exactly to the edge of the figure or text for alignment issues as a graphic in other programs. I'm aware of the standalone package, and have gone through ...
15
votes
3answers
1k views

Standalone package creates a page with a fixed width

Recently I found the standalone package. I am using it to create figures and such in external files. But everytime content is created the width of the page seems to be fixed, it does not shrink to the ...
14
votes
3answers
907 views

Standalone producing cropped / truncated formulae

I'm using standalone to produce, well, standalone formulae. However, sometimes they end up being cropped too close and parts get left off. I'm including a sample .tex file and output. What can I do to ...
13
votes
1answer
3k views

TikZ to non-PDF

How do I tell TikZ to output to a standalone image file? Like JPG, PNG, etc? Yes, there is a way to output it to PDF, then do a snapshot. But this is for mathematical-visual comparisons, and I need ...
13
votes
1answer
288 views

TikZ 3.0.0 (release) produces strange shadings if used with XeLaTeX and standalone

I would like to use shadings in my TikZ graphics together with the standalone package and XeLaTeX, but for some reason it is broken if I try with the new 3.0.0 release (download here). Any other ...
11
votes
2answers
820 views

Nested standalone files with standalone package

Is it possible to nest files with the standalone package? I have something like the following: In A.tex: \documentclass{article} \usepackage{standalone} \begin{document} \input{B} \end{document}‚Äč ...
11
votes
2answers
207 views

Path problem with included file inside of a standalone file

How can I get the current path inside an included standalone file? 1. Theoretical Example: let's assume the following directory structure: main.tex img/ |-standalonefile.tex |-data ...
11
votes
1answer
764 views

Compiling a main document with many TikZ subfiles efficiently

What would be the most efficient way to compile a document of the article class with many TikZ subfiles? In the main document, I have added \usepackage{standalone} and then \includestandalone for the ...
10
votes
2answers
193 views

I'm using the standalone package. How can I get regular paragraph breaks?

I'm using the standalone class to render images for individual math problems that will be displayed in an app, so the cropping functionality is essential. However, the package seems to destroy ...
9
votes
3answers
303 views

Why is there extra whitespace to the left of this standalone document when using siunitx?

I'm using the standalone document class. Here is a minimal working example: \documentclass{standalone} \usepackage[siunitx]{circuitikz} \begin{document} Hello world \end{document} The problem ...
9
votes
3answers
647 views

\documentclass[convert]{standalone} ignores linebreak

I tried to combine this answer Compile a LaTeX document into a PNG image that's as short as possible with my answer Add column in a table But the pdflatex -shell-escape table.tex ignores ...
9
votes
2answers
221 views

Why do I get white space at the bottom of my diagram?

I have this code : \documentclass[tikz}]{standalone} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{lmodern} \usepackage[frenchb]{babel} \usepackage{tikz} ...
9
votes
1answer
254 views

Latex Standalone always rebuilds / apostroph in filename?

I have started toying around with Martin Scharrer's standalone package because tikz external does not work with todonotes and I feel that the workflow for standalone makes more sense as far as I have ...
9
votes
1answer
222 views

Standalone package advanced conversion options inside LaTeX source file

I want to use the conversion options of the standalone package to produce a PNG image file from a LaTeX source file. The package documentation lists two tables with options for conversion. The normal ...
9
votes
0answers
402 views

Missing \endgroup error for Beamer standalone with subpreambles option [closed]

I am trying to use Martin Scharrer's nifty standalone package to put a Beamer animation into a standalone file. Here is a minimal example that demonstrates the error I am running into. The subfile, ...
8
votes
2answers
562 views

Build cropped PDF image from LaTeX

I have created an image with pgfplots in a separate file and want to add the PDF that is built from that as an image in my report. The problem is that the image PDF created is a complete A4 format. ...
8
votes
1answer
923 views

gnuplot true standalone

Finally I have decided to go PDF. I can add pictures without EPS wrapper, and do drawings with TikZ - life is good :o) But how do I use gnuplot? For consistency I would like to use the tikz terminal, ...
8
votes
1answer
282 views

Avoid paragraph due to trailing empty line in standalone file

Using my standalone class and package it is possible to compile diagrams etc. inside own files stand-alone or as part of a main document. However, a common user error is to keep an empty line between ...
7
votes
2answers
471 views

auto-pst-pdf produces a confusing error message

Actually I don't want to use auto-pst-pdf forever. But Harish Kumar (in his comment) requested to use it for the sake of simplicity. I tried it several decades ago and it did not work. The MWE below ...
7
votes
1answer
166 views

How to remove the unwanted space on the left side of the following gather*?

\documentclass[preview,border=12pt,varwidth]{standalone} \usepackage{amsmath} \begin{document} \abovedisplayskip=0pt\relax \begin{gather*} 6x^2-30x+36=0\\ 6(x^2-5x+6)=0\\ 6(x-2)(x-3)=0\\ x-2=0 \quad ...
7
votes
1answer
280 views

algorithmicx crashes standalone

I am creating SVG files from different stuff from my LaTeX document. For this, I am using the standalone package followed by pdf2svg. This compiles: \documentclass{article} \usepackage{algorithmicx} ...
7
votes
1answer
615 views

How to use the standalone package in beamer?

I have a beamer presentation that shows a lot of graphs (in the sense of graph theory) and it takes a lot to compile. I think that the standalone package might help me but I cannot see how. Let us say ...
7
votes
1answer
546 views

Including pictures in subdirectories with standalone package

After using standalone package extensively, I ran into one problem, which I cannot solve. The problem is that I need to include a TikZ picture in main files subdirectory. What is more I want to build ...
7
votes
0answers
421 views

best practice to include (standalone precompiled) graphics

General understanding I know that several people have asked about how to include plots and graphics (created by tikz and pstricks) into a latex document. What is the best way to include Matlab ...
6
votes
2answers
904 views

Package incompatibilites: etoolbox, hyperref, and bm, standalone?

I am trying to transition to using the etoolbox package, but seem to have run into some difficulties and they appear related to the hyperref and bm packages which to me seem totally unrelated. The ...
6
votes
2answers
191 views

Weird blank space when drawing standalone tikz

I am drawing an tikz picture using standalone class, but there is weird blank space on the left side. My code is \documentclass{standalone} \usepackage{kerkis} \usepackage{tikz} \begin{document} ...
6
votes
1answer
964 views

\usepackage{enumitem} produces “Environment description undefined” error

If I run pdflatex on the following: \documentclass[class=minimal,border=0pt]{standalone} \usepackage{tikz} \usepackage{varwidth} \usepackage{upquote} % \usepackage{enumitem} ...
6
votes
2answers
534 views

How do I use QTikZ on a standalone file

My file is quite simple, e.g., \documentclass{article} \usepackage[landscape]{geometry} \usepackage{tikz} \begin{document} \begin{tikzpicture} \draw (-1.5,0) -- (1.5,0); \draw (0,-1.5) -- ...
6
votes
1answer
109 views

Generate an image with minimum space around it

I'm using this solution to generate images: \ifdefined\formula \else \def\formula{E = m c^2} \fi \documentclass[border=2pt]{standalone} \usepackage{amsmath} \usepackage{varwidth} \begin{document} ...
6
votes
1answer
594 views

Errors using standalone package to create a table

I'm learning using standalone package. I tried to create a page including a table but I got errors: Error Something's wrong--perhaps a missing \item. \begin{table} Something's wrong--perhaps a ...
6
votes
2answers
126 views

Problems to get two graphics in different pages with standalone

In the following MWE I get a single page with the two graphics within: \documentclass[multi]{standalone} \standaloneenv{pspicture} \usepackage[dvipsnames, svgnames, prologue]{xcolor} ...
6
votes
1answer
101 views

Without playing with “border” option of “standalone”, how to remove the top white space?

Without playing with border option of standalone, how to remove the top white space? \documentclass[preview]{standalone} \usepackage{amsmath} \begin{document} \abovedisplayskip=0pt \[ F(V, T) = ...
6
votes
1answer
304 views

Is it possible to place standalone graphics in subdirectories

When using standalone sub-directories do not seem to work properly. While \documentclass{article} \usepackage[subpreambles,mode=buildnew]{standalone} %standalone tikz \begin{document} ...
6
votes
1answer
259 views

Standalone document with chapter

When compiling large documents (with chapters) it is often useful to put different parts in separate files. I do this with the standalone-documentclass for all my tikzpictures. That way I can compile ...
6
votes
4answers
205 views

Standalone package, preserve preamble

Is it in a way possible to preserve parts of a preamble of a standalone document? For example when I have a savebox or a macro inside it and don't want to repeat it in the preamble of my main ...
6
votes
1answer
118 views

How to remove the white space on the top of the following table?

How to remove the white space on the top of the following table? \documentclass[preview,border=0pt,varwidth]{standalone} \usepackage[table]{xcolor} \usepackage{array} \usepackage{longtable} ...
6
votes
1answer
255 views

tikz picture inside a tabular environment

Why does the following code fail to compile? \documentclass[tikz]{standalone} \begin{document} \tikzset{every path/.style={line width=0.66em}} \begin{tabular}{ll} $<$ 1 hour & \tikz \draw ...
6
votes
1answer
420 views

Get {standalone} to ignore blocks of text from \input files (e.g., \begin{spacing} and \maketitle)

I've got a number of separate .tex files that are all \documentclass{article}. I'm inputting these into a \documentclass{book} file as chapters. In the book.tex file, then, I've got inputs like this: ...
6
votes
2answers
96 views

Standalone: unique page per equation without white space

I'd like to create a document with several formulas and each formula is supposed to stand alone on a page. Here is an example: \documentclass[preview,varwidth ,multi,border=1pt]{standalone} ...
6
votes
1answer
305 views

What's causing extra white space to the left of my standalone TikZ image?

I have extra whitespace to the left of a TikZ image produced in a standalone environment: I don't know why this is occurring. I thought perhaps the left projector bounding box, but the right ...
6
votes
1answer
988 views

How do I include and scale on-image-TikZ-drawings made by the standalone class?

I am building several on image TikZ drawings. In detail: I am having PDFs of technical drawings, I crop the white margins, overlay nodes and some arrows and compile them. The result should give me a ...
5
votes
3answers
229 views

A correct bounding box for a standalone logo

Writing \documentclass{standalone} \usepackage{varwidth} \begin{document} \begin{varwidth}{\linewidth} {\em line 1} {\em line 2} \end{varwidth} \end{document} produces an incorrect bounding ...
5
votes
2answers
1k views

standalone figure and tabular

I'd like to generate a standalone pdf containing a pgf/tikz image and a tabular. I'm almost getting the desired result but there is a paragraph between the image and the tabular that breaks my layout ...
5
votes
1answer
158 views

Force minimum paper size in “standalone” (or use an alternative)

I compile small latex math snippets using the standalone document class. I rasterize the resulting PDF to a PNG image using ImageMagick and finally include these images in some HTML document. However, ...
5
votes
1answer
113 views

Can we use enumerate with standalone class?

Can we use \enumerate with \standalone class? Isn't enumerate basic LaTeX? The minimal example, which does not compile with standalone but it does with article, is: \documentclass{standalone} ...
5
votes
2answers
95 views

Empty space in standalone document with textopo

The question is related to similar issues with standalone package: lots of empty space is added in addition to the desired figure. However, this time no empty paragraphs in source code. My MWE: ...
5
votes
1answer
347 views

Problems with \pgfplotstableread and relative paths

I have this folder structure in my project: main.tex mystyle.sty tex mytex.tex img myimg.tex dat mydat.dat And the following files: main.tex: \documentclass{scrartcl} \usepackage{mystyle} ...