I have created vertically split circle and it works standalone but it stop when I add this code to my university template. Here is standalone code:

% BEGIN section 1 
\usetikzlibrary{calc, positioning,fit}
% END section 1
% BEGIN section 2
    pics/circle vertically split/.style 2 args = {
       code = {

         \node[xshift=-\widthOne/2] (-left) {#1};
         \node[xshift=\widthTwo/2] (-right) {#2};
         \node[fit=(-left)(-right),draw,circle,text=red](-shape) {+};
         \node(-splitline) at ($ (-left.east)!.5!(-right.west) $) {};
         \draw (-shape.north east -| -splitline.center) -- (-shape.south east -| -splitline.center);
% this doesn't center correctly but it's not part of this question
\pic[inner sep = 1pt, align=left] (A) {circle vertically split={$Aaaaaa$}{$B$}};
\pic[inner sep = 1pt, align=left, right = of A-shape] (B) {circle vertically split={A}{$Bbbbb$}};
% END section 2

Standalone code produce: result of standalone code

Error after adding to university template:

! Package PGF Math Error: Unknown function `Aaaaaa' (in 'width(""Aaaaaa"")+4pt' ).

How to reproduce error

For anyone who want to help me I created a quick way to repoduce error in 30s:

  1. Clone repository (this is fork of template) --git clone https://github.com/xoac/aghdpl-imir.git
  2. Checkout to branch split-circle -- git checkout split-circle
  3. Compile with command latexmk -outdir=build -pdf praca.tex

Additional information:

Check difference between raw template and after my changes git diff master split-circle

pdflatex --version:

pdfTeX 3.14159265-2.6-1.40.20 (TeX Live 2019/Arch Linux) kpathsea version 6.3.1
Copyright 2019 Han The Thanh (pdfTeX) et al. There is NO warranty. Redistribution of this software is covered by the terms of both the pdfTeX copyright and the Lesser GNU General Public License.
For more information about these matters, see the file named COPYING and the pdfTeX source.
Primary author of pdfTeX: Han The Thanh (pdfTeX) et al.
Compiled with libpng 1.6.37; using libpng 1.6.37
Compiled with zlib 1.2.11; using zlib 1.2.11
Compiled with poppler version 0.85.0

How can I find why it stopped compiling after adding my code?

I create my vertically split circle mixed this two solutions: 1. https://tex.stackexchange.com/a/528851/192768 2. https://tex.stackexchange.com/a/186506/192768

  • 1
    PD --- notice that you have mispelled --version in your question...
    – Rmano
    Feb 20, 2020 at 9:49
  • @Rmano Thank you. It's fixed now.
    – S.R
    Feb 20, 2020 at 10:31

1 Answer 1


The problem is probably that your format is used with

\usepackage[english, polish]{babel}

which transforms the meaning of some special char (technically it makes chars active), in this case probably the quote " which I suppose it is used to add some accent around... (I do not know Polish, so I don't know the details).

If you use utf8 to input special chars, you can try to disable babel shorthands with

 \usepackage[english, polish, shorthands=off]{babel}

or you can try loading the TikZ library


I think that both approaches work in your example.

Problem with babel and tikz using \draw is very similar to this, I suspect.

  • Both answers works. Thanks. Errors are very unintuitive in latex!
    – S.R
    Feb 20, 2020 at 10:45

You must log in to answer this question.

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