2

Almost always, I simply render electronic documents, so I don't need pages. Also, pages make it difficult to arrange images in a document.

I want to draw TikZ graphs for my blog articles, and I don't want to see pages when I walk with graphs. I want vertically infinite canvas that the web layout provides.

How can I remove pages in LaTeX documents?

  • 1
    Something like standalone or tikzexternalize? –  Apr 25 '16 at 03:26
  • What is standalone? –  Apr 25 '16 at 03:26
  • 1
    A class which provides very tight boundaries, i.e. the 'page' is just th the content which has been typeset –  Apr 25 '16 at 03:27
  • Is there not a document class without pages? –  Apr 25 '16 at 03:28
  • 1
    What's the problem with a page? The content must be typeset somewhere. Where should it go to? –  Apr 25 '16 at 03:30
  • standalone and tikzexternalize seems to serve the purpose for TikZ. But, a web layout without pages would free me from page-breaking in general. –  Apr 25 '16 at 03:38
  • @ChristianHupfer I assume he will want 1 page, which approaches (as much as possible) infinity in its dimensions? – O0123 Apr 25 '16 at 03:53
  • @VincentVerheyen: That's what I had in mind too, but the extracting of images has to be done anyway, regardless whether they are scaled or not. For web content still gif/png/jpg is needed, as far as I know and .pdf only in an embedded viewer. –  Apr 25 '16 at 03:55
  • I want everything in a big page unless I typeset a paper book, and I will probably not typeset a paper book for many years. And, you're right. I need to extract a tikz picture as an image file. –  Apr 25 '16 at 03:57
  • @crocket I am not sure if the file size of such image with huge dimensions will get huge or not. Perhaps not if you output as a png which interprets the page's background as transparent? – O0123 Apr 25 '16 at 04:32
  • @VincentVerheyen I'm not worried about file size. How do I externalize a tikz picture as a png file? –  Apr 25 '16 at 04:51
  • @crocket You'll might find an answer in TikZ to non-PDF. – O0123 Apr 25 '16 at 04:54
  • @VincentVerheyen I derived my own answer from the link. –  Apr 25 '16 at 04:58

1 Answers1

1

I derived an answer from TikZ to non-PDF

% blah.tex
\documentclass[convert]{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
  \node {ok};
\end{tikzpicture}
\end{document}

[convert] option to standalone class requires convert from ImageMagick and -shell-escape option to be passed to pdflatex.

  • Why do you use the external library? – mirkom Apr 25 '16 at 05:02
  • I didn't know [convert] clashes with external library. –  Apr 25 '16 at 05:12
  • If you run pdflatex -shell-escape with the convert option you get a pdf AND a png. The external library outputs a pdf every time it sees a tikzpicture that is to be used in a document if you have many pictures to reduce typesetting time. – mirkom Apr 25 '16 at 05:15
  • Did not you install anything to get the png image? I recall I had to install Image Magick to get the png. I think this is something to include in your answer. – mirkom Apr 25 '16 at 05:24