Skip to content

multiple circles with "global" radius option #1461

Description

@Mo-Gul

While trying to rewrite some code examples in the manual to use "global" radius option with multiple circles, these raise an error if there is no empty bracket (see PR #1460). It would be nice if these could be avoided.

Here an MWE with possible syntaxes that came to my mind how multiple circles can be used on a path.

\documentclass[border=2pt]{standalone}
\usepackage{tikz}
\begin{document}
    % old syntax
    \tikz \fill circle (0.1)         (0,1)     circle (0.1);
    \tikz \fill circle (2pt)         (0cm,1cm) circle (2pt);
    \tikz \fill circle (0.1 and 0.2) (0,1)     circle (0.1 and 0.2);
    \tikz \fill circle (2pt and 4pt) (0cm,1cm) circle (2pt and 4pt);

    % new syntax
    \tikz \fill circle [radius=0.1]                 (0,1)     circle [radius=0.1];
    \tikz \fill circle [radius=2pt]                 (0cm,1cm) circle [radius=2pt];
    \tikz \fill circle [x radius=0.1, y radius=0.2] (0,1)     circle [x radius=0.1, y radius=0.2];
    \tikz \fill circle [x radius=2pt, y radius=4pt] (0cm,1cm) circle [x radius=2pt, y radius=4pt];

    % new syntax with global option
    % (and additional empty brackets to avoid the error)
    \tikz \fill [radius=0.1]                 circle [] (0,1)     circle;
    \tikz \fill [radius=2pt]                 circle [] (0cm,1cm) circle;
    \tikz \fill [x radius=0.1, y radius=0.2] circle [] (0,1)     circle;
    \tikz \fill [x radius=2pt, y radius=4pt] circle [] (0cm,1cm) circle;

%    % feature request/bug fix:
%    % new syntax with global option, but without empty brackets
%    \tikz \fill [radius=0.1]                 circle    (0,1)     circle;
%    \tikz \fill [radius=2pt]                 circle    (0cm,1cm) circle;
%    \tikz \fill [x radius=0.1, y radius=0.2] circle    (0,1)     circle;
%    \tikz \fill [x radius=2pt, y radius=4pt] circle    (0cm,1cm) circle;
\end{document}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    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