Skip to content

Commit

Permalink
Add workarounds for minted bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
marcin-serwin committed Apr 18, 2023
1 parent 7ccacc2 commit 479e24c
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/deprecated.tex
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ \chapter{Things You Shouldn't Use}
\NewDocumentCommand{\chto}{+v+v}{
\begin{trivlist}
\item
% Workaround for https://github.com/gpoore/minted/issues/356
\RenewCommandCopy\VerbEnv\Verbatim
\RenewCommandCopy\endVerbEnv\endVerbatim
\begin{minipage}{0.4\textwidth}
\mintinline{latex}:#1:
\end{minipage}
Expand All @@ -67,7 +70,10 @@ \chapter{Things You Shouldn't Use}
}
\NewDocumentCommand{\vchto}{+v+v}{
\begin{center}
\mintinline{latex}:#1:\\[.2cm]
% Workaround for https://github.com/gpoore/minted/issues/356
\RenewCommandCopy\VerbEnv\Verbatim
\RenewCommandCopy\endVerbEnv\endVerbatim
\mintinline{latex}:#1:
\(\big\downarrow\)\\[.2cm]
\mintinline{latex}:#2:
\end{center}
Expand Down Expand Up @@ -155,7 +161,7 @@ \section{Defining New Commands}\label{sec:def}
followed by few mandatory ones (specified as number in first optional
argument).
\begin{chktexignore}
\vchto|\newcommand{\foo}[4][bar]{ ... }|
\vchto|\newcommand{\foo}[4][bar]{ ... }|%
|\NewDocumentCommand{\foo}{O{bar}mmmm}{ ... }|
\end{chktexignore}

Expand Down
1 change: 1 addition & 0 deletions src/lshort.sty
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
Script=Arabic,
}
\newfontfamily\arabicfonttt{Iran Nastaliq}
\newfontfamily\arabicfont{Iran Nastaliq}
\newfontface\@swash[
Style=Swash,
]{EB Garamond}
Expand Down
7 changes: 7 additions & 0 deletions src/lshortexample.sty
Original file line number Diff line number Diff line change
Expand Up @@ -368,3 +368,10 @@
}
}
}
% Workaround for https://github.com/gpoore/minted/issues/354
\ifwindows
\def\minted@opt@quote#1{\detokenize\expandafter{\expandafter"\expanded{#1}"}}
\else
\def\minted@opt@quote#1{\detokenize\expandafter{\expandafter'\expanded{#1}'}}
\fi

0 comments on commit 479e24c

Please sign in to comment.