Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix circled command #42

Merged
merged 8 commits into from
Apr 17, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Fix circled
  • Loading branch information
compor committed Mar 21, 2024
commit 31691edae3ddb3c77d1383c8be598bef58230c69
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
Loading