X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=lib%2Fchkconfig.ltx;h=a9b82e6e4806698e5180fca318e6cca410f865af;hb=029adfa28cedf921ee7ee4709422441705d93520;hp=34f9aff13252d6880328815fc16e5975af84ebf0;hpb=41146030b6551619c306b6af98fd53d8ce0ad004;p=lyx.git diff --git a/lib/chkconfig.ltx b/lib/chkconfig.ltx index 34f9aff132..a9b82e6e48 100644 --- a/lib/chkconfig.ltx +++ b/lib/chkconfig.ltx @@ -75,8 +75,8 @@ \newcommand{\AddVariable}[2]{ \immediate\write\vars{chk_#1='#2'}} -\newcommand{\AddPackage}[1]{ - \immediate\write\packages{#1}} +\newcommand{\AddPackage}[2][]{ + \immediate\write\packages{#2 #1}} % Tests whether an item is present % Syntax: \TestItem[]{}{}{}{}{} @@ -148,20 +148,6 @@ \fi} -% Test for the LaTeX version -\newcommand{\TestLaTeXVersion}[1]{ - \message{^^J\prefix checking for LaTeX version at least as of #1...} - \@ifl@t@r\fmtversion{#1}{\existstrue}{\existsfalse} - \ifexists - \message{yes^^J} - \AddVariable{#1}{yes} - \AddPackage{LaTeX-#1} - \else - \message{no^^J} - \AddVariable{#1}{no} - \fi} - - % Adapted from ltxcheck.tex \newcommand{\TestFont}[2][\default]{ \def\default{#2} @@ -180,6 +166,7 @@ \fi} \newcommand{\TestPackage}[2][\default]{ + \def\default{#2} \TestItem[#1]{#2}{package}{sty}{\AddPackage{#2}}{}} \newcommand{\TestDocClass}[2]{ @@ -234,20 +221,8 @@ \message{^^J\prefix checking for LaTeX version... \fmtversion} \AddVariable{fmtversion}{\fmtversion} -%%% Crucial versions -% This one introduces \textsubscript -\TestLaTeXVersion{2005/12/01} -% This one introduces \UseRawInputEncoding -\TestLaTeXVersion{2018/04/01} -% This one introduces path encoding changes -\TestLaTeXVersion{2019/10/01} -% This introduces all math and text spaces -% previously only available via amsmath -\TestLaTeXVersion{2020/10/01} -% This robustifies LaTeX commands -\TestLaTeXVersion{2021/06/01} -% Introduction of \\DocumentMetadata -\TestLaTeXVersion{2022/06/01} +%%% Store the current LaTeX version +\AddPackage[\fmtversion]{LaTeX} %%% And now, the list of available languages % The trick is to know that \the\everyjob contains something like