diff options
Diffstat (limited to 'macros/latex/contrib/semtex/semtex.tex')
-rw-r--r-- | macros/latex/contrib/semtex/semtex.tex | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/macros/latex/contrib/semtex/semtex.tex b/macros/latex/contrib/semtex/semtex.tex index e390c4ba23..67f8d548bf 100644 --- a/macros/latex/contrib/semtex/semtex.tex +++ b/macros/latex/contrib/semtex/semtex.tex @@ -38,7 +38,7 @@ \usepackage[nameinlink]{cleveref} -\title{\texttt{semtex}: For stripped Seman\!\TeX\ documents (v0.44)} +\title{\texttt{semtex}: For stripped Seman\!\TeX\ documents (v0.45)} \date{\today} \author{Sebastian Ørsted (\href{mailto:sorsted@gmail.com}{sorsted@gmail.com})} @@ -58,7 +58,7 @@ basicstyle=\ttfamily\small, commentstyle=\itshape\ttfamily\small, alsoletter={\\}, - escapechar=@, + %escapechar=@, breaklines=true, breakindent={0pt}, captionpos=t, @@ -123,7 +123,8 @@ the macros it provides by macros from other packages. The package provides the commands \mylst!\SemantexBullet! and \mylst!\SemantexDoubleBullet!. These commands print bullets which are smaller (and prettier, in my opinion) -than the standard \lstinline!\bullet! command from~\LaTeX: +than the standard \lstinline!\bullet! command from~\LaTeX. +They are (of course) based on code by egreg, see \url{tex.stackexchange.com/a/564506/19809}. \begin{LTXexample} $ H^{\SemantexBullet} $, $ H^{\SemantexDoubleBullet} $ @@ -132,12 +133,17 @@ $ H^{\SemantexDoubleBullet} $ You can recreate them yourself as follows, rendering the package \pack{semtex} unnecessary for this purpose: \begin{lstlisting} -\newcommand\SemantexBullet{% - \raisebox{-0.25ex}{\scalebox{1.2}{$\cdot$}}% +\usepackage{graphicx} + +\makeatletter +\DeclareRobustCommand\SemantexBullet{% + \mathord{\mathpalette\SemantexBullet@{0.5}}% } -\newcommand\SemantexDoubleBullet{% - \SemantexBullet\SemantexBullet +\newcommand\SemantexBullet@[2]{% + \vcenter{\hbox{\scalebox{#2}{$\m@th#1\bullet$}}}% } +\DeclareRobustCommand\SemantexDoubleBullet{\SemantexBullet \SemantexBullet} +\makeatother \end{lstlisting} \chapter*{Replacements for \texorpdfstring{\textbackslash\texttt{left} and~\textbackslash\texttt{right}}{\left and \right}} |