summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/ffcode/ffcode.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-09-13 20:08:48 +0000
committerKarl Berry <karl@freefriends.org>2021-09-13 20:08:48 +0000
commit4a18f607fa288537a2a1415e54606e8ae5aa28b5 (patch)
tree0360a728cdfe65193deab414aada4a555bf9b036 /Master/texmf-dist/tex/latex/ffcode/ffcode.sty
parent7ebc72c089edc1288bdf20ee274e6f098174d688 (diff)
ffcode (13sep21)
git-svn-id: svn://tug.org/texlive/trunk@60500 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/ffcode/ffcode.sty')
-rw-r--r--Master/texmf-dist/tex/latex/ffcode/ffcode.sty48
1 files changed, 25 insertions, 23 deletions
diff --git a/Master/texmf-dist/tex/latex/ffcode/ffcode.sty b/Master/texmf-dist/tex/latex/ffcode/ffcode.sty
index f4c23b51bbb..1c51720636c 100644
--- a/Master/texmf-dist/tex/latex/ffcode/ffcode.sty
+++ b/Master/texmf-dist/tex/latex/ffcode/ffcode.sty
@@ -21,53 +21,55 @@
% SOFTWARE.
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{ffcode}[2021/09/07 0.3.0 Fixed Font Code]
+\ProvidesPackage{ffcode}[2021/09/13 0.3.2 Fixed Font Code]
-\RequirePackage{microtype}
\RequirePackage{xkeyval}
-\newif\ifnopygments
-\DeclareOptionX{nopygments}{\nopygmentstrue}
-\newif\ifnoframes
-\DeclareOptionX{noframes}{\noframestrue}
-\newif\ifnonumbers
-\DeclareOptionX{nonumbers}{\nonumberstrue}
-\newif\ifnocn
-\DeclareOptionX{nocn}{\nocntrue}
+
+\makeatletter
+\newif\ifffcode@nopygments
+\DeclareOptionX{nopygments}{\ffcode@nopygmentstrue}
+\newif\ifffcode@noframes
+\DeclareOptionX{noframes}{\ffcode@noframestrue}
+\newif\ifffcode@nonumbers
+\DeclareOptionX{nonumbers}{\ffcode@nonumberstrue}
+\newif\ifffcode@nocn
+\DeclareOptionX{nocn}{\ffcode@nocntrue}
\ProcessOptionsX\relax
+\makeatother
-\ifnopygments
+\makeatletter\ifffcode@nopygments
\RequirePackage[draft=true]{minted}
\else
\RequirePackage{minted}
-\fi
+\fi\makeatother
\setminted{breaklines}
\usemintedstyle{bw}
-\ifnonumbers
+\makeatletter\ifffcode@nonumbers
\newminted[ffcode]{text}{framesep=6pt,framerule=1pt,rulecolor=gray,frame=leftline,escapeinside=||,mathescape,highlightcolor=gray!30}
\else
\renewcommand{\theFancyVerbLine}{\textcolor{gray}{\tiny\oldstylenums{\ttfamily\arabic{FancyVerbLine}}}}
- \ifnocn
+ \ifffcode@nocn
\newminted[ffcode]{text}{linenos,numbersep=2pt,framesep=6pt,framerule=1pt,highlightcolor=gray!30,rulecolor=gray,frame=leftline,escapeinside=||,mathescape}
\else
\newminted[ffcode]{text}{firstnumber=last,linenos,numbersep=2pt,framesep=6pt,framerule=1pt,highlightcolor=gray!30,rulecolor=gray,frame=leftline,escapeinside=||,mathescape}
\fi
-\fi
+\fi\makeatother
\makeatletter
-\newcommand\ffprint{\begingroup\obeyspaces\@ffprint}
-\newcommand{\@ffprint}[1]{\texttt{#1}\endgroup}
+\newcommand\ffcode@print{\begingroup\obeyspaces\ffcode@printx}
+\newcommand\ffcode@printx[1]{\texttt{#1}\endgroup}
\makeatother
-\newcommand\ffcoderule{\vrule height 6pt depth 1pt width 0pt}
-\ifnoframes
- \newcommand{\ff}[1]{\ffcoderule\ffprint{#1}}
+\makeatletter\newcommand\ffcode@rule{\vrule height 6pt depth 1pt width 0pt}
+\makeatletter\ifffcode@noframes
+ \newcommand\ff[1]{\ffcode@rule\ffcode@print{#1}}
\else
\RequirePackage{tcolorbox}
- \newtcbox{\ffcodebox}{nobeforeafter,colframe=gray!80!white,
+ \newtcbox\ffcode@box{nobeforeafter,colframe=gray!80!white,
colback=gray!5!white,boxrule=0.1pt,arc=1pt,
boxsep=1.2pt,left=0.5pt,right=0.5pt,top=0.2pt,bottom=0.2pt,
tcbox raise base}
- \newcommand{\ff}[1]{\ffcodebox{\ffcoderule\ffprint{#1}}}
-\fi
+ \newcommand\ff[1]{\ffcode@box{\ffcode@rule\ffcode@print{#1}}}
+\fi\makeatother
\endinput