Created
June 22, 2023 12:31
-
-
Save fmitha/c2e8e730b9a7b2c9e3037658ace85ca9 to your computer and use it in GitHub Desktop.
Revisions
-
fmitha created this gist
Jun 22, 2023 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,37 @@ % 12pt default for scrlttr2 \documentclass{scrlttr2} % \NewDocumentCommand{\foo}{m +m} % { % \IfFileExists{./#1} % {#2} % {\PackageError{formletterbug}{CONFIG FILE '#1' DOES NOT EXIST - NOT CREATING FORMLETTER}{Check that the config filename (first argument) has been correctly passed to \formletter}} % %{\PackageError{formletterbug}{CONFIG FILE '#1' DOES NOT EXIST - NOT CREATING FORMLETTER}{Check that the config filename (first argument) has been correctly passed to \foo}} % } \ExplSyntaxOn \NewDocumentCommand{\foo}{m +m} { \file_if_exist:nTF{./#1} {#2} {\PackageError{foo}{CONFIG~FILE~'#1'~DOES~NOT~EXIST~-~NOT~CREATING~FORMLETTER}{Check~that~the~config~filename~(first~argument)~has~been~correctly~passed~to~\formletter}} %{\PackageError{foo}{CONFIG~FILE~'#1'~DOES~NOT~EXIST~-~NOT~CREATING~FORMLETTER}{Check~that~the~config~filename~(first~argument)~has~been~correctly~passed~to~\foo}} } \ExplSyntaxOff % Parameters for document commands \newcommand{\addressesconfigfilename}{fifmacroerr.txt} \begin{document} \newcounter{letternum} \foo{\addressesconfigfilename} { Text } \end{document} %%% Local Variables: %%% mode: latex %%% TeX-engine: luatex %%% TeX-master: t %%% End: