Skip to content

Line width in SVGs #326

@djn-ams

Description

@djn-ams

Inspired by bproc265, I generated a minimal example to test line width in SVG creation.

Here's the relevant code:

\documentclass{amsart}

\usepackage{tikz}

\begin{document}

\begin{tikzpicture}

\foreach \width in {1, ..., 10} {
  \draw[line width = \width pt] (\width - 1,0) -- (\width - 1, 5);
  \node at (\width - 1, 5.25) {\width pt};

  \draw[line width = 0.1 * \width pt] (\width - 1, -1) -- (\width - 1, -6);
  \node at (\width - 1, -6.25) {$\frac{\width}{10}$pt};
}

\end{tikzpicture}

\end{document}

And here's the SVG it generates:

Image

Unlike bproc265, the SVG here looks good to me.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions