Skip to content
Thomas edited this page May 4, 2020 · 12 revisions

Unicode math preview

TeXiFy can show a unicode preview of some math characters like greek letters. You can trigger this with your cursor on a math command and clicking Code  Folding  Collapse or using Ctrl+NumPad -. Clicking on it will expand it again. TeXiFy shows these previews automatically when a project is opened.

Equation preview

You can use the Equation Preview by making sure your cursor is in a math environment and clicking Tools  LaTeX  Preview Equation, or using Ctrl+Shift+X. It works by putting your equation in a new temporary (fairly minimal) document and compiling that, so custom commands and packages from your document will not be taken into account, but it ensures the preview is really fast.

The current implementation of the Equation Preview was contributed by Sergei Izmailov and requires external dependencies, for which installation instructions follow.

Instructions for Linux

  • Install Inkscape from inkscape.org/release.

  • If not using Inkscape 1.0 or later, you have to install the pdf2svg package for your distro, for example on Ubuntu with sudo apt-get install pdf2svg or on Arch Linux with sudo pacman -S pdf2svg.

Instructions for Windows

  • Install Inkscape from inkscape.org/release, suppose you install it in C:\Program Files\Inkscape.

  • If not using Inkscape 1.0 or later, you have to install pdf2svg from github.com/textext/pdf2svg/releases, suppose you install it in C:\Program Files\pdf2svg.

  • Add both C:\Program Files\Inkscape and (if you installed it) C:\Program Files\pdf2svg to your PATH environment variable, for example by searching for Environment Variables on your computer, clicking 'Edit the system environment variables', clicking 'Environment Variables', and under System variables find the one named Path, edit it and insert the paths here. Make sure the paths are separated by a ; if using Windows 8 or lower.

  • Log out and back in.

TikZ preview

You can use the TikZ Preview by placing your cursor in a tikzpicture environment and clicking Tools  LaTeX  TikZ Picture Preview, or using Ctrl+Shift+Y.

The TikZ Preview will take TikZ and pgf libraries into account.

The requirements are the same as for the Equation preview.

Custom preamble for equation and TikZ preview

Since b.0.6.10

To include part of your preamble in the equation/TikZ preview, enclose this part with the magic comments %! begin preamble = tikz and %! end preamble = tikz for the TikZ preview, and %! begin preamble = math and %! end preamble = math for the math preview.

To include an entire file (for example your tikzsettings.sty) in the preamble, put the magic comment %! preview preamble = tikz at the start of the file.

For example, to include your custom command \newcommand{\letters}{\alpha \beta \gamma \delta \epsilon} in the preamble of the equation preview, use

\documentclass{article}

%! begin preamble = math
\newcommand{\letters}{\alpha \beta \gamma \delta \epsilon}
%! end preamble = math

\begin{document}
    \[
        x = \letters
    \]
\end{document}

This documentation has moved to https://hannah-sten.github.io/TeXiFy-IDEA

Clone this wiki locally