Skip to content

Commit

Permalink
Fix circled
Browse files Browse the repository at this point in the history
  • Loading branch information
compor committed Mar 21, 2024
1 parent 4d60865 commit 31691ed
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion paper.tex
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,20 @@
\usepackage{tikz}
\usetikzlibrary{arrows}
\usetikzlibrary{shapes}
\DeclareRobustCommand\circled[2][]{\ifthenelse{\isempty{#1}}{\tikz[baseline=(char.base)]{\node[shape=circle,fill=pairedOneLightBlue,inner sep=1pt] (char) {#2};}}{\autoref{#1}: \hyperref[#1]{\tikz[baseline=(char.base)]{\node[shape=circle,fill=pairedOneLightBlue,inner sep=1pt] (char) {#2};}}}}

% Define base style for circled nodes
\tikzset{
circledbase/.style={
shape=circle,
fill=pairedOneLightBlue,
font=\tt\small,
inner sep=0pt,
outer sep=0pt,
minimum size=1.2em
}
}

\DeclareRobustCommand\circled[2][]{\ifthenelse{\isempty{#1}}{\tikz[baseline=(char.base)]{\node[circledbase] (char) {#2\strut};}}{\autoref{#1}: \hyperref[#1]{\tikz[baseline=(char.base)]{\node[circledbase] (char) {#2\strut};}}}}

% listings don't write "Listing" in autoref without this.
\providecommand*{\listingautorefname}{Listing}
Expand Down

0 comments on commit 31691ed

Please sign in to comment.