Skip to content
This repository was archived by the owner on Oct 16, 2025. It is now read-only.
This repository was archived by the owner on Oct 16, 2025. It is now read-only.

tikzpictures which set overlay are invisible #12

@stuebinm

Description

@stuebinm

While playing around with the latest git (3a62360), I stumbled across an interesting (though in practice, probably not often relevant) divergence between pdf & html output:

Here is a box:
\begin{tikzpicture}
\draw (0,0) -- (1,0) -- (1,1) -- (0,1) -- cycle;
\end{tikzpicture}

produces a box in the html:

grafik

but if the tikzpicture has the overlay option set:

Here is a box:
\begin{tikzpicture}[overlay]
\draw (0,0) -- (1,0) -- (1,1) -- (0,1) -- cycle;
\end{tikzpicture}

then the box is gone:

grafik

In the html, the svg it was translated to is actually still there — but with width & height set to 0, and hence invisible. I'm not sure how much can be done about it (the tikz manual states that setting overlay turns off computation of the bounding box, which it seems would be needed here), and tbh I was beyond impressed that anything tikz-related works at all; but I still thought I'd let you know in case you're not aware of it already / it is something that can be fixed by someone more familiar with RusTeX's internal workings.

(as a short postscript: this was discovered when someone asked me 'but does the coffeestains package work?' — the answer turned out to be yes, but only by using the 'internal' \stainA, \stainB by hand in a tikzpicture; \coffeestainA & friends as given in the documentation set overlay & hence fail)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions