texlive[61550] Master/texmf-dist: ffcode (9jan22)
commits+karl at tug.org
commits+karl at tug.org
Sun Jan 9 22:19:22 CET 2022
Revision: 61550
http://tug.org/svn/texlive?view=revision&revision=61550
Author: karl
Date: 2022-01-09 22:19:22 +0100 (Sun, 09 Jan 2022)
Log Message:
-----------
ffcode (9jan22)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/ffcode/DEPENDS.txt
trunk/Master/texmf-dist/doc/latex/ffcode/ffcode.pdf
trunk/Master/texmf-dist/doc/latex/ffcode/ffcode.tex
trunk/Master/texmf-dist/tex/latex/ffcode/ffcode.sty
Modified: trunk/Master/texmf-dist/doc/latex/ffcode/DEPENDS.txt
===================================================================
--- trunk/Master/texmf-dist/doc/latex/ffcode/DEPENDS.txt 2022-01-09 21:19:09 UTC (rev 61549)
+++ trunk/Master/texmf-dist/doc/latex/ffcode/DEPENDS.txt 2022-01-09 21:19:22 UTC (rev 61550)
@@ -1,3 +1,2 @@
-hard xkeyval
hard minted
hard tcolorbox
Modified: trunk/Master/texmf-dist/doc/latex/ffcode/ffcode.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/ffcode/ffcode.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/ffcode/ffcode.tex 2022-01-09 21:19:09 UTC (rev 61549)
+++ trunk/Master/texmf-dist/doc/latex/ffcode/ffcode.tex 2022-01-09 21:19:22 UTC (rev 61550)
@@ -1,6 +1,6 @@
% (The MIT License)
%
-% Copyright (c) 2021 Yegor Bugayenko
+% Copyright (c) 2021-2022 Yegor Bugayenko
%
% Permission is hereby granted, free of charge, to any person obtaining a copy
% of this software and associated documentation files (the 'Software'), to deal
@@ -30,7 +30,7 @@
\usepackage{microtype}
\title{\ff{ffcode}: \LaTeX{} Package \\ for Fixed-Font Code Blocks}
\author{Yegor Bugayenko}
-\date{0.3.2 2021/09/13}
+\date{0.4.0 2022/01/09}
\begin{document}
\pagenumbering{gobble}
\raggedbottom
@@ -94,6 +94,9 @@
If you want to omit the light gray frames around \ff{\char`\\ff}
texts, use the package option \ff{noframes}.
+To omit the vertical gray bar at the left side of each snippet,
+use the \ff{nobars} option of the package.
+
To omit the line numbers, use the \ff{nonumbers} option of the package.
By default, the numbering is continuous: line numbers start at the
Modified: trunk/Master/texmf-dist/tex/latex/ffcode/ffcode.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/ffcode/ffcode.sty 2022-01-09 21:19:09 UTC (rev 61549)
+++ trunk/Master/texmf-dist/tex/latex/ffcode/ffcode.sty 2022-01-09 21:19:22 UTC (rev 61550)
@@ -1,6 +1,6 @@
% (The MIT License)
%
-% Copyright (c) 2021 Yegor Bugayenko
+% Copyright (c) 2021-2022 Yegor Bugayenko
%
% Permission is hereby granted, free of charge, to any person obtaining a copy
% of this software and associated documentation files (the 'Software'), to deal
@@ -21,55 +21,79 @@
% SOFTWARE.
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{ffcode}[2021/09/13 0.3.2 Fixed Font Code]
+\ProvidesPackage{ffcode}[2022/01/09 0.4.0 Fixed Font Code]
-\RequirePackage{xkeyval}
-
\makeatletter
-\newif\ifffcode at nopygments
-\DeclareOptionX{nopygments}{\ffcode at nopygmentstrue}
-\newif\ifffcode at noframes
-\DeclareOptionX{noframes}{\ffcode at noframestrue}
-\newif\ifffcode at nonumbers
-\DeclareOptionX{nonumbers}{\ffcode at nonumberstrue}
-\newif\ifffcode at nocn
-\DeclareOptionX{nocn}{\ffcode at nocntrue}
+\DeclareOptionX{nopygments}{\PassOptionsToPackage{draft=true}{minted}}
+\newif\ifff at noframes
+\DeclareOptionX{noframes}{\ff at noframestrue}
+\newif\ifff at nobars
+\DeclareOptionX{nobars}{\ff at nobarstrue}
+\newif\ifff at nonumbers
+\DeclareOptionX{nonumbers}{\ff at nonumberstrue}
+\newif\ifff at nocn
+\DeclareOptionX{nocn}{\ff at nocntrue}
\ProcessOptionsX\relax
\makeatother
-\makeatletter\ifffcode at nopygments
- \RequirePackage[draft=true]{minted}
-\else
- \RequirePackage{minted}
-\fi\makeatother
+\RequirePackage{minted}
+
\setminted{breaklines}
\usemintedstyle{bw}
-\makeatletter\ifffcode at nonumbers
- \newminted[ffcode]{text}{framesep=6pt,framerule=1pt,rulecolor=gray,frame=leftline,escapeinside=||,mathescape,highlightcolor=gray!30}
+
+\makeatletter\ifff at nonumbers
+ \ifff at nobars
+ \newminted[ffcode]{text}{
+ escapeinside=||,mathescape,highlightcolor=gray!30
+ }
+ \else
+ \newminted[ffcode]{text}{
+ framesep=6pt,framerule=1pt,rulecolor=gray,frame=leftline,
+ escapeinside=||,mathescape,highlightcolor=gray!30
+ }
+ \fi
\else
\renewcommand{\theFancyVerbLine}{\textcolor{gray}{\tiny\oldstylenums{\ttfamily\arabic{FancyVerbLine}}}}
- \ifffcode at nocn
- \newminted[ffcode]{text}{linenos,numbersep=2pt,framesep=6pt,framerule=1pt,highlightcolor=gray!30,rulecolor=gray,frame=leftline,escapeinside=||,mathescape}
+ \ifff at nocn
+ \ifff at nobars
+ \newminted[ffcode]{text}{
+ linenos,numbersep=2pt,highlightcolor=gray!30,escapeinside=||,mathescape
+ }
+ \else
+ \newminted[ffcode]{text}{
+ framesep=6pt,framerule=1pt,rulecolor=gray,frame=leftline,
+ linenos,numbersep=2pt,highlightcolor=gray!30,escapeinside=||,mathescape
+ }
+ \fi
\else
- \newminted[ffcode]{text}{firstnumber=last,linenos,numbersep=2pt,framesep=6pt,framerule=1pt,highlightcolor=gray!30,rulecolor=gray,frame=leftline,escapeinside=||,mathescape}
+ \ifff at nobars
+ \newminted[ffcode]{text}{
+ firstnumber=last,linenos,numbersep=2pt,highlightcolor=gray!30,escapeinside=||,mathescape
+ }
+ \else
+ \newminted[ffcode]{text}{
+ framesep=6pt,framerule=1pt,rulecolor=gray,frame=leftline,
+ firstnumber=last,linenos,numbersep=2pt,highlightcolor=gray!30,escapeinside=||,mathescape
+ }
+ \fi
\fi
\fi\makeatother
\makeatletter
-\newcommand\ffcode at print{\begingroup\obeyspaces\ffcode at printx}
-\newcommand\ffcode at printx[1]{\texttt{#1}\endgroup}
+\newcommand\ff at print{\begingroup\obeyspaces\ff at printx}
+\newcommand\ff at printx[1]{\texttt{#1}\endgroup}
\makeatother
-\makeatletter\newcommand\ffcode at rule{\vrule height 6pt depth 1pt width 0pt}
-\makeatletter\ifffcode at noframes
- \newcommand\ff[1]{\ffcode at rule\ffcode at print{#1}}
+\makeatletter\newcommand\ff at rule{\vrule height 6pt depth 1pt width 0pt}
+\makeatletter\ifff at noframes
+ \newcommand\ff[1]{\ff at rule\ff at print{#1}}
\else
\RequirePackage{tcolorbox}
- \newtcbox\ffcode at box{nobeforeafter,colframe=gray!80!white,
+ \newtcbox\ff at 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]{\ffcode at box{\ffcode at rule\ffcode at print{#1}}}
+ \newcommand\ff[1]{\ff at box{\ff at rule\ff at print{#1}}}
\fi\makeatother
\endinput
More information about the tex-live-commits
mailing list.