auctex
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Set background using \special{...}


From: jfbu
Subject: Re: Set background using \special{...}
Date: Wed, 8 Feb 2023 20:42:37 +0100
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:102.0) Gecko/20100101 Thunderbird/102.7.1

Le 08/02/2023 à 00:15, Dimitar Dimitrov a écrit :
Suppose I have the following `math.tex` file

```latex
\documentclass[12pt]{article}

\special{background White}

\usepackage[active,tightpage]{preview}

\begin{document}
\begin{preview}
\fontsize{14}{17}\selectfont $x$
\end{preview}
\end{document}
```

I want to get an SVG file with a white background, so I do:
1. `latex math.tex`
2. `dvisvgm -o math.svg —no-fonts math.dvi`

(Seems -- does transmogrified into en em-dash here, probably by your mailer)

works for me after moving the `\special{background White}`  inside the preview 
environment

I tried with Red too to confirm

with dvisvgm 2.13.3 on macos

Best,

JF

The `\special{background White}` is required by `dvisvgm ` in order to add a 
white rectangle to the SVG.

However, the background is missing. If, on the other hand, I deactivate the 
`preview` package (by removing the `active` option) I get the correct 
background but then I miss some of the goodies coming with `preview`.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]