I know there is a package called comment, which can let latex ignore some text.
How can I do the inverse?
I want to compile just a small segment of the whole tex file and let latex ignore other part.
EDIT
This is desirable when I'm looking for a specific coordinate in drawing on an image.
But I do not want an solution just for handling figures.
I've been using ktikz for drawing tikz figures, and the following to generate the pdf image and the complete latex source.
```
#!/bin/bash
filename="${1%.*}"".TeXTiKz"
echo " \documentclass{article}
\usepackage{pgfplots}
\usepackage{tikz}
\usepackage[active,tightpage]{preview}
\PreviewEnvironment{tikzpicture}
\setlength\PreviewBorder{2mm}
\begin{document}
\input{$1}
\end{document}" > $filename
echo $filename
pdflatex $filename
ktikzto draw Tikz images. – giordano Jun 12 '13 at 12:01\includeon the main document to join them all and\includeonly{name}on the preamble to compile just the content of name.tex. – latex user Jun 12 '13 at 12:04includeonlythe only way to do this (as per @LuanResende 's comment)? – Hongying Jun 12 '13 at 12:36includeonlyisn't really useful. You can try some editors allowing preview of regions of the document, such as Emacs+AUCTeX or TeXstudio – giordano Jun 12 '13 at 12:40TeXin a separate file that you can both compile by itself and\inputin your full document. Thestandalonepackage makes the magic work. – Ethan Bolker Jun 12 '13 at 13:12