11

The following MWE is from calligraphy's manual (p.9) with Joseph Wright's workaround for the library's use of obsolete functions:

\documentclass[border=10pt]{standalone}
\usepackage{tikz}
\usepackage{expl3}
\ExplSyntaxOn
\int_zero_new:N \g__prg_map_int 
\ExplSyntaxOff
\usetikzlibrary{decorations,calligraphy}
\begin{document}
\tikz \calligraphy [copperplate] (0,0) .. controls
+(1,−1) and +(−1,1) .. ++(3,0) [this stroke
style={light,taper=start}] +(0,0) .. controls
+(1,−1) and +(−1,1) .. ++(3,0) [this stroke
style={heavy}] +(0,0) .. controls +(1,−1) and
+(−1,1) .. ++(3,0) [this stroke
style={light,taper=end}] ;
\end{document}

However, I get the following compilation error:

! Undefined control sequence.
\GenericError  ...                                
                                                    #4  \errhelp \@err@     ...
l.20 style={light,taper=end}] ;

?

What's the best workaround or fix? I realise that \GenericError is defined, as latexdef says so. Indeed, it gives a definition which uses \@err@, too. So, presumably, \@err@ should be defined before \GenericError is called, but isn't. But none of this really explains why I get an error with the manual's code at all.

The library also relies on \__prop_split:cnTF which is defined as a variant of \__prop_split:NnTF. However, I can't find this in interface3,pdf. On the other hand, it is in l3kernel/expl3-code.tex, so I guess it should work?

4
  • before calligraphy you also need to load library decorations.pathreplacing.
    – Zarko
    Jul 18, 2018 at 2:43
  • @Zarko I already added decorations. Making it decorations.pathreplacing doesn't help. You only need that, I think, for calligraphic brackets and such. That code is conditionalised on the decorations stuff being defined.
    – cfr
    Jul 18, 2018 at 3:02
  • @Zarko Oops, but I see I didn't add it here. Thanks. Doesn't change the error. (I don't think it is really needed. But just in case.)
    – cfr
    Jul 18, 2018 at 3:04
  • 1
    For \__prop_split:NnTF see page 148 of interface3.pdf (version dated 2018/03/05)
    – user30471
    Jul 18, 2018 at 3:10

1 Answer 1

12

The issue here is those symbols: they are not 'hyphen-minus' (-). You are getting a somewhat cryptic error as LaTeX2e 2018-onwards enables UTF-8 support as-standard for pdfTeX. In an expansion context, a (non-ASCII) UTF-8 char will give some odd results under such a scheme, but it was never 'right'. Replacing the characters by a standard hyphen deals with the issue.

\documentclass[border=10pt]{standalone}
\usepackage{tikz}
\usepackage{expl3}
\ExplSyntaxOn
\int_zero_new:N \g__prg_map_int 
\ExplSyntaxOff
\usetikzlibrary{decorations.pathreplacing,calligraphy}
\begin{document}
\tikz \calligraphy [copperplate] (0,0) .. controls +(1,-1) and +(-1,1) .. ++(3,0) [this stroke
style={light,taper=start}] +(0,0) .. controls
+(1,-1) and +(-1,1) .. ++(3,0) [this stroke
style={heavy}] +(0,0) .. controls +(1,-1) and
+(-1,1) .. ++(3,0) [this stroke
style={light,taper=end}] ;
\end{document}

enter image description here

2
  • Thanks. Do you mean the -1 in the coordinates? I guess I shouldn't have copied an example from the manual?
    – cfr
    Jul 19, 2018 at 0:32
  • i took a liberty and ad image produced by your code :-)
    – Zarko
    Jul 19, 2018 at 9:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .