Skip to content
Snippets Groups Projects
Commit 8a0276dd authored by Karl Fogel's avatar Karl Fogel
Browse files

Add 'otsdot' and 'otsnamedlabel' commands.

parent d9d54ca3
No related branches found
No related tags found
No related merge requests found
......@@ -276,6 +276,34 @@ trim=0cm 11cm 19.3cm 11cm, scale=0.09]{otslogo.pdf}}}
\endgroup
}
% Use $\otscdot$ for a dot that's in between $\cdot$ and $\bullet$.
% Inspired by https://tex.stackexchange.com/questions/235118/\
% making-a-thicker-cdot-for-dot-product-that-is-thinner-than-bullet.
%
% ENHANCEMENT: Make it not need $math mode$.
\usepackage{graphicx}
\makeatletter
\newcommand*\otsdot{\mathpalette\otsdot@{.64}}
\newcommand*\otsdot@[2]{\mathbin{\vcenter{\hbox{\scalebox{#2}{$\m@th#1\bullet$}}}}}
\makeatother
% Use to make description lists with referenceable items. E.g.:
%
% \begin{description}[labelindent=2em]
% \item[\otsnamedlabel{req:low-cost}{$\otsdot$ Low Cost}] --- Cheaper per month.
% \item[\otsnamedlabel{req:data-mgmt}{$\otsdot$ Data Management}] --- Better back-end data management.
% \item[\otsnamedlabel{req:control}{$\otsdot$ More Better}] --- So much more better than before.
% \end{description}
%
% Inspired by https://texblog.org/2012/03/21/cross-referencing-list-items/.
\makeatletter
\def\otsnamedlabel#1#2{\begingroup
#2%
\def\@currentlabel{#2}%
\phantomsection\label{#1}\endgroup
}
\makeatother
% Define a sidebar environment
\usepackage[framemethod=TikZ]{mdframed}
\newcounter{sidebar}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment