MartinScharrer / standalone

A LaTeX class and package is provided which allows LaTeX diagrams or other LaTeX code to be compiled standalone or as part of a main document. Special support for pictures with beamer overlays is also provided.
LaTeX Project Public License v1.3c
9 stars 2 forks source link

`\color` in preamble fails when the `preview` option is enabled #13

Open microlith57 opened 4 months ago

microlith57 commented 4 months ago

This:

\documentclass[crop]{standalone}
\usepackage{xcolor}
\color{cyan}
\begin{document}
test
\end{document}

results in cyan text (pdfTeX 3.141592653-2.6-1.40.22, standalone v1.3a, xcolor v2.13), while this:

\documentclass[preview]{standalone}
\usepackage{xcolor}
\color{cyan}
\begin{document}
test
\end{document}

results in black text. Is this because of the preview environment?

For context, being able to set the text color in the preamble is useful for https://github.com/ManimCommunity/manim/pull/3643, and changing the document class might not be a good solution.

microlith57 commented 4 months ago

With crop: image With standalone: image