LaTeXML icon indicating copy to clipboard operation
LaTeXML copied to clipboard

TikZ pictures in title, authors, etc have no color

Open xworld21 opened this issue 1 year ago • 0 comments
trafficstars

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.)

xworld21 avatar Aug 18 '24 13:08 xworld21