brucemiller / LaTeXML

LaTeXML: a TeX and LaTeX to XML/HTML/ePub/MathML translator.
http://dlmf.nist.gov/LaTeXML/
Other
957 stars 101 forks source link

TikZ pictures in title, authors, etc have no color #2398

Open xworld21 opened 3 months ago

xworld21 commented 3 months ago

The following

\documentclass{article}
\usepackage{tikz}
\title{Title}
\author{Author\begin{tikzpicture}\filldraw[red] (0,0) circle (4pt);\end{tikzpicture}}
\date{1 January 1980}
\begin{document}
  \maketitle

  \begin{tikzpicture}\filldraw[red] (0,0) circle (4pt);\end{tikzpicture}
\end{document}

should have a red disk next to the author name. However, it comes out black (or more precisely, it takes the color of the surrounding text). This happens only when \author{} is specified in the preamble; behaviour seems normal if \author{} is after \begin{document}

In preamble:

<svg:g fill="#000000" stroke="#000000" ...>

In document body (note the additional @color):

<svg:g color="#FF0000" fill="#FF0000" stroke="#FF0000" ...>

(First spotted in https://github.com/brucemiller/LaTeXML/pull/2395#issuecomment-2294924608.)