summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/pkgloader/pkgloader-error.sty
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /macros/latex/contrib/pkgloader/pkgloader-error.sty
Initial commit
Diffstat (limited to 'macros/latex/contrib/pkgloader/pkgloader-error.sty')
-rw-r--r--macros/latex/contrib/pkgloader/pkgloader-error.sty60
1 files changed, 60 insertions, 0 deletions
diff --git a/macros/latex/contrib/pkgloader/pkgloader-error.sty b/macros/latex/contrib/pkgloader/pkgloader-error.sty
new file mode 100644
index 0000000000..7ec796ef6e
--- /dev/null
+++ b/macros/latex/contrib/pkgloader/pkgloader-error.sty
@@ -0,0 +1,60 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \iffalse %%%%
+% %
+% Copyright (c) 2018 - Michiel Helvensteijn (www.mhelvens.net) %
+% %
+% https://github.com/mhelvens/latex-pkgloader %
+% %
+% This work may be distributed and/or modified under the conditions %
+% of the LaTeX Project Public License, either version 1.3 of this %
+% license or (at your option) any later version. The latest version %
+% of this license is in http://www.latex-project.org/lppl.txt %
+% and version 1.3 or later is part of all distributions of LaTeX %
+% version 2005/12/01 or later. %
+% %
+% This work has the LPPL maintenance status `maintained'. %
+% %
+% The Current Maintainer of this work is Michiel Helvensteijn. %
+% %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \fi %%%%
+% %
+% This file is loaded whenever a combination of packages is %
+% requested that has been marked as illegal. Loading this %
+% file always results in the termination of the LaTeX run. %
+% %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+
+%%% Back to expl3 syntax
+%
+\ExplSyntaxOn
+
+
+%%% Add an empty line to the log before the errors are printed
+%
+\typeout{}
+
+
+%%% Initialization for the error-message loop
+%
+\cs_generate_variant:Nn \int_step_inline:nnnn {nnvn}
+\cs_generate_variant:Nn \int_compare:nNnTF {nNvTF}
+\cs_generate_variant:Nn \msg_error:nnnn {nnvv}
+
+
+%%% The loop issues one error message for each reason the
+%%% package combination is illegal. None of them are
+%%% critical or fatal errors; we terminate the run manually.
+%
+\int_step_inline:nnvn {1} {1} {g__pkgloader_count_(pkgloader-error.sty)_int} {
+ \bool_if:cT {g__pkgloader_used_(pkgloader-error.sty)_(#1)_bool} {
+ \msg_error:nnvv
+ {pkgloader} {illegal-combination}
+ {g__pkgloader_condition_(pkgloader-error.sty)_(#1)_tl}
+ {g__pkgloader_reason_ (pkgloader-error.sty)_(#1)_tl}
+ }
+}
+
+
+%%% Terminate the LaTeX run
+%
+\stop\bye