LaTex2Web logo

Documents Live, a web authoring and publishing system

If you see this, something is wrong

Table of contents

First published on Saturday, Nov 2, 2024 and last modified on Tuesday, Sep 2, 2025

tikz

François Chaplais

LaTeX2Web DOES NOT SUPPORT TIKZ FIGURES. However...

1 Figures

If your document contains tikzpicture (resp. tikzcd) environments, upon upload two actions will be performed:

  • each tikzpicture (resp. tikzcd) environment will be replaced by the following command: \includegraphics{figure-<figure number>.pdf} where <figure number> is the number of the figure

  • a zip archive will be downloaded

In the zip archive, there will be collection of figure-<figure number>.tex tex files. Compiling these will produce all the figure-<figure number>.pdf files. Then, convert the PDF files to a suitable format, and upload the resulting files to your LaTeX2Web project, using the Upload media menu item of the "Action" menu. You can upload them one by one, or all of them in a zip archive. Your document will be then ready for processing.

If there is a great number of tex files in the download, and if you have access to a shell and the latexpdf command, you can run the shell script runMe.sh to automate the process. To do this, go (in the shell) to the folder where the tex files are and run:

chmod a+rx runMe.sh

then

./runMe.sh

Note: there is a Javascript library that renders tikz figures in the browser. Unfortunately, the result is not responsive. Specifically, tikz uses fixed dimensions, and we could not find a way to make the figure fill the document width, which is variable.

By contrast, raster images that are produced from the PDF files can be resized to fill the document width.

2 Inside text

Please, do NOT use tikz inside text. Tikz produces pictures, which break the text flow. In some cases, there are Unicode characters (traditional glyphs or emojis) that can replace the tikz object. Since the latter are just characters, they will insert nicely inside the text.