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:
\documentclass[tikz]{standalone}
% BEGIN section 1
\usepackage{tikz}
\usetikzlibrary{calc, positioning,fit}
% END section 1
\begin{document}
% BEGIN section 2
\begin{tikzpicture}[scale=1]
\tikzset{
pics/circle vertically split/.style 2 args = {
code = {
\pgfmathsetmacro{\widthOne}{width("#1")+4pt}
\pgfmathsetmacro{\widthTwo}{width("#2")+4pt}
\node[text=green](-this_is_currcent_center){+};
\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{tikzpicture}
% END section 2
\end{document}
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:
- Clone repository (this is fork of template) --
git clone https://github.com/xoac/aghdpl-imir.git - Checkout to branch split-circle --
git checkout split-circle - 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

--versionin your question... – Rmano Feb 20 '20 at 09:49