Skip to content

Commit

Permalink
Preliminary fix for listing and ttfamily detection
Browse files Browse the repository at this point in the history
Not the final answer tho.
See #26
  • Loading branch information
krono committed May 21, 2019
1 parent 3781117 commit b619728
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion programming.cls
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,11 @@
\lst@AddToHook{DisplayStyle}{\def\baselinestretch{1}\@currsize}
\lst@AddToHook{TextStyle}{\lstset{breaklines=false}}
% work around listings being too smart
\lst@AddToHook{Init}{\let\ttdefault\f@family}
% \lst@AddToHook{Init}{\let\ttdefault\f@family\edef\ttdefault{\ttdefault}}
\patchcmd{\lst@ttfamily}%
{\ifx\f@family\ttdefault#1\relax\else#2\fi}%
{#1}%
{}{\P@warning@noline{Cannot patch listings internals. Ignoring.}}


\AtEndPreamble{\RequirePackage{siunitx}}
Expand Down

0 comments on commit b619728

Please sign in to comment.