texlive[69368] Master/texmf-dist: ffcode (10jan24)

commits+karl at tug.org commits+karl at tug.org
Wed Jan 10 21:43:37 CET 2024


Revision: 69368
          https://tug.org/svn/texlive?view=revision&revision=69368
Author:   karl
Date:     2024-01-10 21:43:37 +0100 (Wed, 10 Jan 2024)
Log Message:
-----------
ffcode (10jan24)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/ffcode/DEPENDS.txt
    trunk/Master/texmf-dist/doc/latex/ffcode/LICENSE.txt
    trunk/Master/texmf-dist/doc/latex/ffcode/README.md
    trunk/Master/texmf-dist/doc/latex/ffcode/ffcode.pdf
    trunk/Master/texmf-dist/source/latex/ffcode/ffcode.dtx
    trunk/Master/texmf-dist/source/latex/ffcode/ffcode.ins
    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	2024-01-10 20:43:26 UTC (rev 69367)
+++ trunk/Master/texmf-dist/doc/latex/ffcode/DEPENDS.txt	2024-01-10 20:43:37 UTC (rev 69368)
@@ -1,3 +1,20 @@
+hard listings
 hard pgfopts
-hard minted
 hard tcolorbox
+soft docshots
+soft environ
+soft href-ul
+soft hypdoc
+soft iexec
+soft l3build
+soft libertine
+soft mathtools
+soft microtype
+soft pdfcrop
+soft pgf
+soft pgfopts
+soft scheme-basic
+soft tools
+soft xetex
+soft fvextra
+soft upquote
\ No newline at end of file

Modified: trunk/Master/texmf-dist/doc/latex/ffcode/LICENSE.txt
===================================================================
--- trunk/Master/texmf-dist/doc/latex/ffcode/LICENSE.txt	2024-01-10 20:43:26 UTC (rev 69367)
+++ trunk/Master/texmf-dist/doc/latex/ffcode/LICENSE.txt	2024-01-10 20:43:37 UTC (rev 69368)
@@ -1,6 +1,6 @@
 (The MIT License)
 
-Copyright (c) 2021-2022 Yegor Bugayenko
+Copyright (c) 2021-2024 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

Modified: trunk/Master/texmf-dist/doc/latex/ffcode/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/ffcode/README.md	2024-01-10 20:43:26 UTC (rev 69367)
+++ trunk/Master/texmf-dist/doc/latex/ffcode/README.md	2024-01-10 20:43:37 UTC (rev 69368)
@@ -3,7 +3,7 @@
 [![License](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/yegor256/ffcode/blob/master/LICENSE.txt)
 
 This LaTeX package helps you write source code in your academic papers
-and make sure it looks neat. The package uses [`minted`](https://ctan.org/pkg/minted) 
+and make sure it looks neat. The package uses [`listings`](https://ctan.org/pkg/listings) 
 and [`tcolorbox`](https://ctan.org/pkg/tcolorbox) packages.
 
 First, [install it](https://en.wikibooks.org/wiki/LaTeX/Installing_Extra_Packages)
@@ -23,7 +23,7 @@
 \end{document}
 ```
 
-Otherwise, you can download [`ffcode.sty`](https://raw.githubusercontent.com/yegor256/ffcode/gh-pages/ffcode/ffcode.sty) and add to your project.
+Otherwise, you can download [`ffcode.sty`](https://yegor256.github.io/ffcode/ffcode.sty) and add to your project.
 
 If you want to contribute yourself, make a fork, then create a branch,
 then run `l3build ctan` in the root directory.

Modified: trunk/Master/texmf-dist/doc/latex/ffcode/ffcode.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/latex/ffcode/ffcode.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/ffcode/ffcode.dtx	2024-01-10 20:43:26 UTC (rev 69367)
+++ trunk/Master/texmf-dist/source/latex/ffcode/ffcode.dtx	2024-01-10 20:43:37 UTC (rev 69368)
@@ -1,7 +1,7 @@
 % \iffalse meta-comment
 % (The MIT License)
 %
-% Copyright (c) 2021-2022 Yegor Bugayenko
+% Copyright (c) 2021-2024 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
@@ -50,7 +50,7 @@
 %<package>\NeedsTeXFormat{LaTeX2e}
 %<package>\ProvidesPackage{ffcode}
 %<*package>
-[2022-12-02 0.8.0 Fixed Font Code]
+[2024-01-10 0.9.0 Fixed Font Code]
 %</package>
 %<*driver>
 \documentclass{ltxdoc}
@@ -97,7 +97,7 @@
 % \begin{ffcode}
 % int fibo(int n) {
 %   if (n < 2) {
-%     return n; |\label{ln:ret}|
+%     return n; (*@ \label{ln:ret} @*)
 %   }
 %   return fibo(n-1)+fibo(n-2);
 % }
@@ -109,12 +109,6 @@
 
 % \section{Package Options}
 
-% \DescribeMacro{nopygments}
-% You have to run |pdflatex| with |--shell-escape| flag
-% in order to let |minted| (the package we use) to run Pygments
-% and format the code. If you don't want this to happen,
-% just use |nopygments| option.
-
 % \DescribeMacro{noframes}
 % If you want to omit the light gray frames around |\ff|
 % texts, use the package option |noframes|.
@@ -194,7 +188,7 @@
 
 % You can highlight some lines in your |ffcode| environment,
 % or can use any other additional configuration parameters from
-% |minted| package:
+% |fancyvrb| and |fvextra| packages:
 % \docshotOptions{firstline=6,lastline=13}
 % \begin{docshot}
 % \documentclass{article}
@@ -202,19 +196,19 @@
 % \usepackage{ffcode}
 % \pagestyle{empty}
 % \begin{document}
-% \begin{ffcode*}{highlightlines={1,4-5}}
+% \begin{ffcode}[backgroundcolor=\color{gray!20}]
 % while (true) {
-%   print("Hello!")
+%   (*@\textcolor{red}{print("Hi!")}@*)
 %   print("Enter your name:")
 %   scan(x)
-%   print("You name is " + x)
+%   print("You name | " + x)
 % }
-% \end{ffcode*}
+% \end{ffcode}
 % \end{document}
 % \end{docshot}
 
-% Using this second argument of |ffcode*| (with the trailing asterisk),
-% you can provide any other options from |minted| package to the
+% Using this second argument of |ffcode|,
+% you can provide any other options from the |listings| package to the
 % snippet.
 
 % \StopEventually{}
@@ -237,7 +231,6 @@
   /ff/.cd,
   bold/.store in=\ff at bold,
   sf/.store in=\ff at sf,
-  nopygments/.store in=\ff at nopygments,
   noframes/.store in=\ff at noframes,
   nonumbers/.store in=\ff at nonumbers,
   nobars/.store in=\ff at nobars,
@@ -247,59 +240,33 @@
 \ProcessPgfPackageOptions{/ff}
 %    \end{macrocode}
 
-% Then, we disable pygments for \href{https://ctan.org/pkg/minted}{minted}, if necessary:
+% Then, we configure the \href{https://ctan.org/pkg/listings}{listings} package:
+% \changes{v0.9.0}{2024/01/09}{The \texttt{minted} package is replaced by the \texttt{listings} package.}
 %    \begin{macrocode}
-\makeatletter\ifdefined\ff at nopygments
-  \PassOptionsToPackage{draft=true}{minted}
-\fi\makeatother
+\RequirePackage{xcolor}
+\RequirePackage{listings}
 %    \end{macrocode}
 
-% Then, we configure \href{https://ctan.org/pkg/minted}{minted} package:
-%    \begin{macrocode}
-\RequirePackage{minted}
-\setminted{breaklines}
-\setminted{escapeinside=||,mathescape}
-\setminted{highlightcolor=gray!25}
-\usemintedstyle{bw}
-%    \end{macrocode}
-
 % \begin{macro}{ffcode}
-% Then, we define |ffcode| environment:
+% Then, we define the |ffcode| environment and its supplementary |ffcode*| counterpart:
 %    \begin{macrocode}
-\makeatletter\ifdefined\ff at nonumbers
-  \ifdefined\ff at nobars
-    \newminted[ffcode]{text}{}
-  \else
-    \newminted[ffcode]{text}{framesep=6pt,
-      framerule=1pt,rulecolor=gray,frame=leftline}
-  \fi
-\else
-  \renewcommand{\theFancyVerbLine}{\textcolor{gray}%
-    {\tiny\oldstylenums{\ttfamily\arabic{FancyVerbLine}}}}
-  \ifdefined\ff at nocn
-    \ifdefined\ff at nobars
-      \newminted[ffcode]{text}{
-        linenos,numbersep=2pt
-      }
-    \else
-      \newminted[ffcode]{text}{
-        framesep=6pt,framerule=1pt,rulecolor=gray,
-        frame=leftline,linenos,numbersep=2pt
-      }
+\makeatletter
+\lstnewenvironment{ffcode}[1][]
+  {
+    \lstset{breaklines}
+    \lstset{escapeinside={(*@}{@*)}}
+    \lstset{basicstyle={\ttfamily}}
+    \lstset{columns=fullflexible}
+    \ifdefined\ff at nonumbers\else
+      \lstset{numbers=left,numbersep=5pt,numberstyle={\tiny\sffamily\color{gray}}}
     \fi
-  \else
-    \ifdefined\ff at nobars
-      \newminted[ffcode]{text}{
-        firstnumber=last,linenos,numbersep=2pt
-      }
-    \else
-      \newminted[ffcode]{text}{
-        framesep=6pt,framerule=1pt,rulecolor=gray,
-        frame=leftline,firstnumber=last,linenos,numbersep=2pt
-      }
-    \fi
-  \fi
-\fi\makeatother
+    \ifdefined\ff at nobars\else
+      \lstset{frame=leftline,framerule=.3pt,rulecolor={\color{gray}}}
+    \ifdefined\ff at nocn\else\fi
+    \lstset{#1}
+  }
+  {}
+\makeatother
 %    \end{macrocode}
 % \end{macro}
 

Modified: trunk/Master/texmf-dist/source/latex/ffcode/ffcode.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/ffcode/ffcode.ins	2024-01-10 20:43:26 UTC (rev 69367)
+++ trunk/Master/texmf-dist/source/latex/ffcode/ffcode.ins	2024-01-10 20:43:37 UTC (rev 69368)
@@ -1,6 +1,6 @@
 %% (The MIT License)
 %%
-%% Copyright (c) 2021-2022 Yegor Bugayenko
+%% Copyright (c) 2021-2024 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
@@ -26,7 +26,7 @@
 \preamble
 (The MIT License)
 
-Copyright (c) 2021-2022 Yegor Bugayenko
+Copyright (c) 2021-2024 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

Modified: trunk/Master/texmf-dist/tex/latex/ffcode/ffcode.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/ffcode/ffcode.sty	2024-01-10 20:43:26 UTC (rev 69367)
+++ trunk/Master/texmf-dist/tex/latex/ffcode/ffcode.sty	2024-01-10 20:43:37 UTC (rev 69368)
@@ -7,7 +7,7 @@
 %% ffcode.dtx  (with options: `package')
 %% (The MIT License)
 %% 
-%% Copyright (c) 2021-2022 Yegor Bugayenko
+%% Copyright (c) 2021-2024 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
@@ -31,7 +31,7 @@
 
 \NeedsTeXFormat{LaTeX2e}
 \ProvidesPackage{ffcode}
-[2022-12-02 0.8.0 Fixed Font Code]
+[2024-01-10 0.9.0 Fixed Font Code]
 
 
 
@@ -50,13 +50,11 @@
 
 
 
-
 \RequirePackage{pgfopts}
 \pgfkeys{
   /ff/.cd,
   bold/.store in=\ff at bold,
   sf/.store in=\ff at sf,
-  nopygments/.store in=\ff at nopygments,
   noframes/.store in=\ff at noframes,
   nonumbers/.store in=\ff at nonumbers,
   nobars/.store in=\ff at nobars,
@@ -65,50 +63,26 @@
 }
 \ProcessPgfPackageOptions{/ff}
 
-\makeatletter\ifdefined\ff at nopygments
-  \PassOptionsToPackage{draft=true}{minted}
-\fi\makeatother
+\RequirePackage{xcolor}
+\RequirePackage{listings}
 
-\RequirePackage{minted}
-\setminted{breaklines}
-\setminted{escapeinside=||,mathescape}
-\setminted{highlightcolor=gray!25}
-\usemintedstyle{bw}
-
-\makeatletter\ifdefined\ff at nonumbers
-  \ifdefined\ff at nobars
-    \newminted[ffcode]{text}{}
-  \else
-    \newminted[ffcode]{text}{framesep=6pt,
-      framerule=1pt,rulecolor=gray,frame=leftline}
-  \fi
-\else
-  \renewcommand{\theFancyVerbLine}{\textcolor{gray}%
-    {\tiny\oldstylenums{\ttfamily\arabic{FancyVerbLine}}}}
-  \ifdefined\ff at nocn
-    \ifdefined\ff at nobars
-      \newminted[ffcode]{text}{
-        linenos,numbersep=2pt
-      }
-    \else
-      \newminted[ffcode]{text}{
-        framesep=6pt,framerule=1pt,rulecolor=gray,
-        frame=leftline,linenos,numbersep=2pt
-      }
+\makeatletter
+\lstnewenvironment{ffcode}[1][]
+  {
+    \lstset{breaklines}
+    \lstset{escapeinside={(*@}{@*)}}
+    \lstset{basicstyle={\ttfamily}}
+    \lstset{columns=fullflexible}
+    \ifdefined\ff at nonumbers\else
+      \lstset{numbers=left,numbersep=5pt,numberstyle={\tiny\sffamily\color{gray}}}
     \fi
-  \else
-    \ifdefined\ff at nobars
-      \newminted[ffcode]{text}{
-        firstnumber=last,linenos,numbersep=2pt
-      }
-    \else
-      \newminted[ffcode]{text}{
-        framesep=6pt,framerule=1pt,rulecolor=gray,
-        frame=leftline,firstnumber=last,linenos,numbersep=2pt
-      }
-    \fi
-  \fi
-\fi\makeatother
+    \ifdefined\ff at nobars\else
+      \lstset{frame=leftline,framerule=.3pt,rulecolor={\color{gray}}}
+    \ifdefined\ff at nocn\else\fi
+    \lstset{#1}
+  }
+  {}
+\makeatother
 
 \makeatletter
 \newcommand\ff at print[1]{%



More information about the tex-live-commits mailing list.