lib/softcover/template/latex_styles/softcover.sty in softcover-0.9.17 vs lib/softcover/template/latex_styles/softcover.sty in softcover-0.9.18
- old
+ new
@@ -68,12 +68,10 @@
% \end{metacode}
\DefineVerbatimEnvironment%
{metacode}{Verbatim}{fontsize=\relsize{-2.5},fontseries=b}
% Use a nice font in code environments.
\usepackage[scaled=0.92]{helvet}
-% Fix quotes in code environments
-\usepackage{latex_styles/upquote}
% Filesystem paths
\newcommand{\filepath}[1]{\textit{\texttt{\small #1}}}
% Size-constrained images
@@ -126,11 +124,12 @@
\definecolor{boxcolor}{gray}{0.10}
\newenvironment{shaded_aside}[2]{\begin{full_framed_shaded}\begin{aside}\label{#2} \textbf{#1}\end{aside}}{\bigskip\end{full_framed_shaded}}
% Additional commands
\newcommand{\heading}[1]{\textbf{#1}}
-\newcommand{\kode}[1]{\textcolor{darkgreen}{\textbf{\texttt{#1}}}}
+\newcommand{\kodesize}{\smaller[0.75]}
+\newcommand{\kode}[1]{\textcolor{darkgreen}{\textbf{\texttt{\kodesize #1}}}}
% Subtitle command
\usepackage{titling}
\newcommand{\subtitle}[1]{%
\posttitle{%
@@ -146,9 +145,22 @@
\usepackage{newunicodechar}
\newunicodechar{—}{---}
\newunicodechar{–}{--}
\usepackage{latex_styles/language_customization}
+
+% Fix quotes in code environments.
+% Provides "upquote.sty" functionality compatible with the latest Pygments.
+\RequirePackage{textcomp}
+\begingroup
+\catcode`'=\active
+\catcode``=\active
+\g@addto@macro\@noligs
+ {\let`\textasciigrave
+ \let'\textquotesingle
+ \let\PYZsq\textquotesingle}
+\endgroup
+\endinput
% Add custom commands.
\usepackage{latex_styles/custom}
\usepackage{latex_styles/custom_pdf}