The main purpose of the {preview} package is the extraction of selected elements from a LaTeX source, like formulas or graphics, into separate pages of a DVI file.

learn more… | top users | synonyms

19
votes
3answers
883 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] ...
14
votes
3answers
8k views

How to preview LaTeX in Emacs?

I want a similar layout as in SO, I use it currently as my editor but I would like to find such tool under my fingers. I am more vi-prone so having hard time to get preview-latex working with emacs. I ...
10
votes
3answers
2k views

'Standalone' TikZ pictures

I want to create a TikZ picture in an external PDF file, which then can be included in my main document via \includegraphics. However, compiling a document with a TikZ picture in it produces a whole ...
10
votes
2answers
180 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 ...
8
votes
5answers
5k views

Is there a TeX/LaTeX editor that can show results in real-time? [duplicate]

Possible Duplicate: What's the fastest way to preview changes as I learn TeX? This is my first post to TeX. I have taken it upon myself to learn how to type math formulations via LaTeX, ...
8
votes
2answers
540 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
90 views

“Extra }, or forgotten \endgroup” when combining “fixltx2e” and “preview” packages

In a two-column document with figure* floats, where the preview package is set up to preview floats, compilation seems to fail if the fixltx2e package is loaded: \documentclass[twocolumn]{article} ...
7
votes
1answer
168 views

Add additional info to a preview

The following example works in so far as it shows the image in the source latex file and disregards everything else. Is there some way of performing the same task but also list information about each ...
7
votes
6answers
2k views

Live tex compilation

Tools like firebug allow a developer to immediately view the results of changes they make to the HTML of a webpage. Has anyone taken a similar strategy with LaTeX, so that an entire compile cycle is ...
7
votes
2answers
3k views

Is it possible to type LaTeX code and see its real time preview in LyX?

I'm new to LyX. I have just given it a try and written my first article. I discovered a panel from Menu > View > View Source. It shows the source code of my article. But as far as I see, I am ...
7
votes
1answer
479 views

AUCTeX preview font size too small

I have Emacs 24 and AUCTex on a Windows 7 machine, however the preview font size is just way too small. Is there a way to make them bigger?
7
votes
2answers
1k views

Transparency in tikz, preview package and xelatex

Is it possible to have transparency in a tikz picture while using the preview package and compiling with xelatex? The following mwe compiles without warnings/errors under both xelatex and pdflatex ...
7
votes
1answer
93 views

preview.sty and font transparency in LuaLaTeX

Using the preview package removes font transparency in LuaLaTeX: \documentclass{article} \usepackage{luaotfload} \usepackage[active]{preview} \begin{document} \begin{preview} ...
6
votes
1answer
128 views

Is there an option to trim the remaining whitespace to the right?

\documentclass{article} \usepackage[active,tightpage]{preview} \PreviewBorder=12pt \begin{document} \begin{preview} $ \frac{1}{3}=0.333\ldots \Rightarrow 1=3\times\frac{1}{3}=3\times ...
6
votes
1answer
115 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
537 views

Customizing preview-latex command to use LaTeX when in TeX-Pdf mode

In short: Is there a way to tell preview-latex to NOT use pdflatex instead of just toggling TeX-Pdf mode every time I want to re-generate previews? I have a somewhat odd setup. AucTeX + GNU Emacs 24 ...
5
votes
3answers
1k views

Crop equations with preview package

Is it possible to avoid left space from equations previewed with preview package? \documentclass{minimal} \usepackage{amsmath} \usepackage[active,tightpage,displaymath]{preview} ...
5
votes
1answer
382 views

How to make a new tex command in org-mode-latex?

In a general tex-file, one can easily define a new command, for my case, let me take this as an example: To put this code in header \newcommand{\dd}{\,\mathrm{d}} I can use the shorter command to ...
5
votes
1answer
484 views

Preview TikZ figure in AUCTeX?

I am using AUCTeX on Emacs. Recently I began to draw pics using TikZ, but the problem is AUCTeX doesn't generate preview of this environment. (However, it does generate preview for the general figure ...
5
votes
1answer
1k views

AUCTeX, preview-latex, and Ghostscript (Emacs)

I'll keep this short and sweet; Emacs can't find gs, which has been installed via brew and works fine. Error PDF2DSC sentinel: Searching for program: No such file or directory, gs MWE ...
5
votes
1answer
91 views

Instant preview color in LyX

I'm using the instant preview feature in LyX, which as I understand is based on a LaTeX package of the same name. As I have LyX configured with a dark background - Is there anyway to configure the ...
4
votes
3answers
1k views

preview-latex does not function

Preview-latex installs, but doesn't actually preview. When I generate the preview from the source, all I see is... the source. For example, the math equations are highlighted, but not rendered. Some ...
4
votes
3answers
167 views

How to trim the left and right white spaces when a table is previewed?

The following table has unwanted right and left white spaces. But you cannot see them because the figure has been converted to PNG with alpha channel enabled. How to trim the left and right white ...
4
votes
2answers
432 views

Is there a “smarter” way to know the size of \psbarcode?

The size of 2D barcode depends on the first argument of \psbarcode. I usually do trial and error to find the size of \pspicture such that I get a tight output. \documentclass{article} ...
4
votes
1answer
1k views

Does tikz 2.1 no longer work with the preview package?

I used to be able to create png images of diagrams made with tikz code by using the preview package and printing the dvi output from dvips to a png file using ghostscript. The latest version of tikz ...
4
votes
2answers
6k views

LaTeX editor with live preview for Windows and RTL language support?

Looking for a LaTeX editor for Windows with the following features: Live preview. (Inherited live preview, not something achievable if you do some tricks.) RTL language support. (Hebrew for example) ...
4
votes
1answer
89 views

Emacs, preview-latex, sseq

I like using preview-latex in Emacs. I have been working a lot with spectral sequences lately and so I would like to get the figures I draw in sseq to show up in preview-latex. So far no luck. Does ...
4
votes
2answers
297 views

AUCTeX: how to jump to PDF (with synctex) without recompile when inline preview has been created?

I'm using Aquamacs 2.4 on MacOS X 10.6.8 with pdflatex (TeXLive 2011). My problem: I can create inline previews of formulas, figures etc. in the source code with AUCTeX which is very helpful - e. ...
4
votes
1answer
146 views
+500

Why is beamer+pstricks+preview no longer compatible now?

The following code is taken from Gonzalo Medina' answer here (click). At the time he posted the answer the code was compilable. \documentclass{beamer} \usepackage{pstricks-add} ...
4
votes
1answer
171 views

fancy-preview with other \ref-like commands (such as \autoref and \cref)

I finally got fancy-preview working, and I found the place (around line 97) in the script to add to the list of environments which it catches (to add propositions and so on). But what I can't find ...
4
votes
0answers
45 views

What needs to be done to get preview of TeX/LaTeX files in Preview-Pane of Windows Explorer?

When you click on a usual text file you see its preview (contents) in the Preview Pane of the Windows Explorer. Same is possible with many other formats like Word, Excel etc. Is it possible for ...
3
votes
3answers
2k views

preview-latex in emacs auctex: empty boxes?

I originally posted this question directly on the Auctex mailing list but did not receive a response. I'll hopefully get more luck on the TeX Exchange. I was recently reminded by this post regarding ...
3
votes
1answer
175 views

Figure preview wrapper

How do I best preview my figures? I have one file with this: \begin{figure} \begin{tikzpicture} %if tikz ... \end{tikzpicture} \includegraphics{...} %if eps \caption{...} \label{fig:..} ...
3
votes
1answer
115 views

How to preserve the indentation when using standalone or preview?

The following output has no correct paragraph indentation after incorporating standalone documentclass or preview package. \documentclass[border=12pt,preview]{standalone} \parindent=12pt% does not ...
3
votes
1answer
522 views

What kind of “magic” does preview package do to produce a tight paper size?

Actually the following method, that looks like reinventing the wheel, has been discarded once I have known the existence of preview package. % WithoutPreview.tex \documentclass{article} ...
3
votes
2answers
222 views

Add -shell-escape option to the LaTeX invocation of preview-latex in AUCTeX

I need preview-latex to use the -shell-escape option when it invokes PDFLaTeX, which is required by the minted package for syntax highlighting, as it invokes python. How can I do that?
3
votes
1answer
646 views

preview and standalone crop too much of tikz picture

When I try to fit the page size to my tikz image, too much is cropped. No matter whether I use \documentclass{standalone}, \documentclass[preview=true]{standalone} or ...
3
votes
1answer
264 views

Using \usepackage[active,tightpage]{preview} does not generate any page

What is wrong with this code? \documentclass{article} \usepackage[active,tightpage]{preview} \begin{document} \(1 + 1 = 2\) \end{document} I get this error. $ pdflatex bar.tex This is pdfTeX, ...
3
votes
2answers
127 views

Turn off equation numbers when using 'preview' package

I am trying to export all of the equations from my document. I have added \usepackage[active,displaymath,tightpage]{preview} then compiled, and then from a command line run: pdfcrop output.pdf ...
3
votes
1answer
77 views

How to get a tight output when using pst-tree package and standalone class?

\documentclass[preview,border=3pt,varwidth]{standalone} \usepackage{pst-tree} \psset{levelsep=2,treesep=-2,angleA=90,angleB=-90,arm=12pt} \def\psedge#1#2{\ncangle{#2}{#1}} \begin{document} ...
3
votes
4answers
2k views

Problem getting preview to work in Auctex on Windows 7

I'm trying to get preview of math formulas to work in AUCTeX. When running M-x preview-buffer on simple test document I get the following error: Preview-DviPS finished at Wed Dec 28 00:53:14 DviPS ...
3
votes
1answer
1k views

Emacs + Auctex, Latex environment

I'm writing a document in LaTeX. The document is divided in .tex documents and compiled using a Makefile. My question is, could I see the dvi/PDF for the section of the document that I'm already ...
3
votes
1answer
36 views

Exporting preview-generated image width and height to a text file

I use the preview package to generate some pictures from the equation environment. I need the width and height of each picture. I guess the preview package does some black magic and, at some point, ...
3
votes
2answers
177 views

Difference with standalone and preview? [duplicate]

I have a table, but for cleanliness (I'll use the figure in a paper and in talks), I'd like to compile to a single PDF and include it with includegraphics instead of having the table rendered within ...
3
votes
1answer
174 views

Crop to floats with Preview but skip caption?

I would like my 'figure' environments to be exported tightly cropped. If I use this: \usepackage[floats,active,tightpage]{preview} the caption is included. If I use this (of course, with real ...
3
votes
2answers
365 views

Sluggish cursor movement in emacs LaTeX-mode

I'm editing a large (around 50k words) tex file in Emacs using AUCTeX and cursor movement is quite sluggish, especially when jumping by word. This isn't a problem in any other mode. Edit: I did some ...
3
votes
0answers
55 views

PreviewMacro for todonotes

I like auctex with Preview and would like my todonote \todo's shown in my emacs browser. However, this will either not show at all or consist of the \tikzpicture building blocks, namely each line ...
3
votes
0answers
34 views

opening pdf at the cursor on lyx

While creating a preview on lyx , I expect the pdf to show me the position of the text at which cursor is positioned. The default behaviour seem to open pdf at first page. How can I change this ...
3
votes
0answers
61 views

Is it possible to make AUCTeX preview of equations work with beamer?

When I generate preview images (using C-c C-p C-p) for the following document, the images are correctly generated but they are placed in wrong places in the buffer. Is it just me or MS Windows users? ...
3
votes
0answers
73 views

Equations as pictures in text

Is there a way to compile a document with pdflatex and render all displaymath into graphics which are then included in the document instead of the equation code itself? Analogous to what you can do ...