Dear All,
I need some help, because I cannot figure out what is happening.
A file that used to work has stopped to work properly.
I have a main.tex file that uploads, through \input{} command, configuration.tex and chapter.tex files.
main.tex file was working, but now sometimes it works and sometimes it doesn't.
You can find the main.tex structure here below, where I already have commented all \input commands in order to find where the error can be positioned.
Consider that all chapter.tex file can change their content depending from which document I am writing, this is why I started commenting those line, because the error could be related with some change made in them recently.
I have found the surprising result that the error arise from a configuration file, that never change and never was changed.
I'll send you the error message from TEX too, because the position it marks seems not being related with the line generating the error.
Ok, hoping I could get your curiosity.
Let's start.
================================================
START OF THE main.tex FILE
================================================
% Load configuration files
\input{.\\TEX\\00-CONFIG\\config.tex}
\input{.\\TEX\\01-DOCFORMAT\\docformat.tex} %<---finally the error seems being here
\starttext
% load title page
\startstandardmakeup
\input{.\\TEX\\01-DOCFORMAT\\TITLEPAGE\\titlepageformat.tex}
\stopstandardmakeup
% ------------------------------------------------------------
\startfrontmatter
Here is working
%\input{.\\TEX\\Chapter_0.tex}
\stopfrontmatter
\completecontent
% -------------------------------------------------------------
\startbodymatter
Here is working
%\input{.\\TEX\\Chapter_1.tex}
%\input{.\\TEX\\Chapter_2.tex}
%\input{.\\TEX\\Chapter_3.tex}
%\input{.\\TEX\\Chapter_4.tex}
%\input{.\\TEX\\Chapter_5.tex}
%\input{.\\TEX\\Chapter_6.tex}
%\input{.\\TEX\\Chapter_7.tex}
%\input{.\\TEX\\Chapter_8.tex}
%\input{.\\TEX\\Chapter_9.tex}
%\input{.\\TEX\\Chapter_10.tex}
\stopbodymatter
% --------------------------------------------------------------
\startappendices
\noheaderandfooterlines
\ \vskip5cm
\midaligned{\bfd APPENDICES}
\page
\startchapter[title={Definition of engineering},reference={sec:engineering}]
Here is working
%\input{.\\TEX\\Appendix_1.tex}
\stopchapter
% \startchapter[title={Definition of take-over points},reference={sec:TOP}]
%\input{.\\TEX\\Appendix_2.tex}
% \stopchapter
\stopappendices
\stoptext
================================================
END OF THE main.tex FILE
================================================
================================================
START OF THE LOG FILE
================================================
system >
system > ConTeXt ver: 2024.02.14 13:38 LMTX fmt: 2024.2.15 int: english/english
system >
system > 'cont-new.mkxl' loaded
open source > level 1, order 1, name 'D:/TECH/03-Programs/context-win64/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl'
system > beware: some patches loaded from cont-new.mkiv
close source > level 1, order 1, name 'D:/TECH/03-Programs/context-win64/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl'
system > files > jobname './P.CODE_CLIENT_(COUNTRY)_Rev.C.', input './P.CODE_CLIENT_(COUNTRY)_Rev.C..tex', result './P.CODE_CLIENT_(COUNTRY)_Rev.C.'
fonts > latin modern fonts are not preloaded
languages > language 'en' is active
open source > level 1, order 2, name './P.CODE_CLIENT_(COUNTRY)_Rev.C..tex'
open source > level 2, order 3, name '.\\TEX\\00-CONFIG\\config.tex'
close source > level 2, order 3, name '.\\TEX\\00-CONFIG\\config.tex'
open source > level 2, order 4, name '.\\TEX\\01-DOCFORMAT\\docformat.tex'
open source > level 3, order 5, name 'D:/TECH/03-Programs/context-win64/tex/texmf-context/tex/context/fonts/mkiv/type-imp-texgyre.mkiv'
close source > level 3, order 5, name 'D:/TECH/03-Programs/context-win64/tex/texmf-context/tex/context/fonts/mkiv/type-imp-texgyre.mkiv'
close source > level 2, order 5, name '.\\TEX\\01-DOCFORMAT\\docformat.tex'
open source > level 2, order 6, name '.\\TEX\\01-DOCFORMAT\\TITLEPAGE\\titlepageformat.tex'
close source > level 2, order 6, name '.\\TEX\\01-DOCFORMAT\\TITLEPAGE\\titlepageformat.tex'
pages > flushing realpage 1, userpage 1, subpage 1
structures > begin of sectionblock 'frontpart'
structures > end of sectionblock 'frontpart'
tex error > tex error on line 14 in file ./P.CODE_CLIENT_(COUNTRY)_Rev.C..tex: Valid keyword expected, likely 'minus'
<macro> \p_blank
Ma
r 25
<macro> \12>:myfootertext
#1->\switchtobodyfont [8pt]\setupinterlinespace \cap \framed [frame=off, align=normal]{\footerdisclaimer \relax \hfill \footerproject \myline \footerrevision \myline \footerdate
\relax }
<macro> \syst_helpers_process_comma_item
#*#1,->\ifarguments \or \commalistcommand {#1}
\expandafter \syst_helpers_process_comma_item_next \fi
<macro> \processcommacommand
[#1]#2->\pushmacro \commalistcommand \def \commalistcommand {#2}\normalexpanded {\syst_helpers_process_comma_item #1}\ignorearguments
\ignorearguments \ignorearguments \popmacro \commalistcommand
<macro> \page_layouts_process_element_single
...content {\detokenize {#1}}\ifcsname \??layouttextspecial \m_page_layouts_element_content \endcsname \lastnamedcs \else \doifelsemarking \m_page_layouts_element_content {\getmarking [\m_page_layouts_element_content ][\v!first ]}{#1}
\fi
<macro> \page_layouts_process_element_indeed
...andcolor #1#2\begincsname \??layouttextstrut \layoutelementparameter \c!strut \endcsname \ignorecrlf \edef \p_width {\layoutelementparameter #3}\ifempty \p_width \else \expandafter \page_layouts_process_element_limited \fi \p_text
\endgroup
...
\stopfrontmatter
4 \starttext
5 % load title page
6 \startstandardmakeup
7 \input{.\\TEX\\01-DOCFORMAT\\TITLEPAGE\\titlepageformat.tex}
8 \stopstandardmakeup
9
10 % ------------------------------------------------------------
11 \startfrontmatter
12 Here is working
13 %\input{.\\TEX\\Chapter_0.tex}
14 >> \stopfrontmatter
15 \completecontent
16 % -------------------------------------------------------------
17 \startbodymatter
18 Here is working
19 %\input{.\\TEX\\Chapter_1.tex}
20 %\input{.\\TEX\\Chapter_2.tex}
21 %\input{.\\TEX\\Chapter_3.tex}
22 %\input{.\\TEX\\Chapter_4.tex}
23 %\input{.\\TEX\\Chapter_5.tex}
24 %\input{.\\TEX\\Chapter_6.tex}
You started a keyword but it seems to be an invalid one. The first character(s)
might give you a clue. You might want to quit unwanted lookahead with \relax.
================================================
END OF THE LOG FILE
================================================
Commenting and decommenting lines in the main.tex file I could find that the error is inside the file:
\input{.\\TEX\\01-DOCFORMAT\\docformat.tex} %<---finally the error seems being here
I opened the docformat.tex file and commented/decommented all lines until I could find the point where TEX stops.
I send you the full docformat.tex here below and then I will give you the line generating the problem.
************************************************
START OF THE docformat.tex FILE
************************************************
% ===================================================================
%% REMARK:
%% The present file will work only if "config.tex" file was loaded,
%% where some defitions are given.
%% ===================================================================
\mainlanguage[en]
\setuppapersize[A4]
%% ===================================================================
%% MAIN PAGE LAYOUT
%% ===================================================================
\setuplayout[
backspace=\mainlayoutbackspace,
width=\mainlayoutwidth,
edge=\mainlayoutedge,
edgedistance=\mainlayoutedgedistance,
margin=\mainlayoutmargin,
margindistance=\mainlayoutmargindistance,
topspace=\mainlayouttopspace,
top=\mainlayouttop,
topdistance=\mainlayouttopdistance,
header=\mainlayoutheader,
headerdistance=\mainlayoutheaderdistance,
footer=\mainlayoutfooter,
footerdistance=\mainlayoutfooterdistance,
bottom=\mainlayoutbottom,
bottomdistance=\mainlayoutbottomdistance,
height=\mainlayoutheight,
textheight=\mainlayouttextheight
]
%% ===================================================================
%% FEATURES OF THE DOCUMENT MAIN FONT
%% ===================================================================
\definebodyfontenvironment[10pt][a=11pt,b=12pt,c=14pt,d=22pt]
\definebodyfontenvironment[ 8pt][a=10pt,b=11pt,c=12pt,d=14pt]
\setupbodyfont
[heros,
10pt,
sansserif]
%% *******************************************************
%% CUSTOMISATION OF THE SECTION COMMANDS
%% *******************************************************
% numbered sections
\setuphead
[chapter]
[style=\ss\cap\bfc,
indentnext=no
]
%after={\blank[small]}]
\setuphead
[section]
[style=\ss\cap\bfb,
indentnext=no]
\setuphead
[subsection,subsubsection,subsubsubsection,subsubsubsubsection,subsubsubsubsubsection]
[style=\ss\bfb]
%% ===================================================================
%% HEADER'S FORMAT
%% ===================================================================
% set the header logo height
\def\headerlogoheight{13mm}%{40pt}%{13mm}
% carico logo aziendale
\useexternalfigure
[logo]
[.\\TEX\\01-DOCFORMAT\\IMG\\Logo_Pomini.png]
[height=\headerlogoheight, frame=off]%[scale=350,frame=on]%500
% setup header
\setupheader
[style=small]%width=100mm]%rightwidth=8cm]
\setupheader
[text]
[after=\hrule]
\setupheadertexts
[{\externalfigure[logo]\hfill\setups{myheadertext}}]
\startsetups myheadertext
\switchtobodyfont[8pt]
\setupinterlinespace
\cap
\framed[height=\headerlogoheight,frame=off, align=normal]
{\headerclient\\\headershorttitle\\\headerdoctype\\\vskip0.75ex\hfill \getmarking[sectionnumber]\hskip0.3em \getmarking[section]}
\stopsetups
%% ===================================================================
%% FOOTER'S FORMAT
%% ===================================================================
\setupfooter
[style=small]
\setupfooter
[text]
[before=\hrule]%\vskip0.1em]
\setupfootertexts[\setups{myfootertext}][\pagenumber/\lastpagenumber]% / \completepagenumber]
\def\myline{\hskip0.2em - \hskip0.2em}
\startsetups myfootertext
\switchtobodyfont[8pt]
\setupinterlinespace
\cap
\framed[frame=off, align=normal]
{\footerdisclaimer\relax\hfill\footerproject\myline\footerrevision\myline\footerdate}
\stopsetups
%% ===================================================================
%% LISTS'S FORMAT
%% ===================================================================
% unordered list: bullets
\defineitemgroup[bullets][levels=5]
\setupitemgroup[bullets]
[each]
[symbol=bullet,
option=packed,
width=0.65em,
distance=0em,
leftmargin=0.65em,
rightmargin=1.65em,
indentnext=no]
%% ===================================================================
%% TABLE OF CONTENTS'S FORMAT
%% ===================================================================
\setupcombinedlist
[content]
[list={chapter,section,subsection}]
\define[1]\mytocitem{
\writetolist[section]{after=\hrule}{\hskip2em\color[blue]{\it #1}}
\page[yes]
\WORD{\bfb #1\hfill\par}
}
%% *******************************************************
%% CONTENT'S TABLE
%% *******************************************************
\setuplist
[section]
[margin=10pt]
\setuplist
[subsection,subsubsection,subsubsubsection,subsubsubsubsection,subsubsubsubsubsection]
[margin=20pt]
%% ===================================================================
%% FIGURES'S FORMAT
%% ===================================================================
\defineexternalfigure
[framedfigure]
[width=0.75\textwidth,
height=0.2\textheight,
factor=fit,
method=auto,%png, jpg, pdf, eps,
frame=on]%,
\defineexternalfigure
[fullwidthfigure]
[width=\textwidth,
height=\textheight,
factor=fit,
method=auto,
frame=on
]
************************************************
END OF THE docformat.tex FILE
************************************************
Ok, now we are at the problem.
The error arise at the footer definition (I had built that definition through a lot of tests in the past, I wouldn't be surprised if it is not the most appropriate one) :
\startsetups myfootertext
\switchtobodyfont[8pt]
\setupinterlinespace
\cap
\framed[frame=off, align=normal]
{\footerdisclaimer\relax\hfill\footerproject\myline\footerrevision\myline\footerdate}
\stopsetups
and the line is:
{\footerdisclaimer\relax\hfill\footerproject\myline\footerrevision\myline\footerdate}
and here starts what's a mistery for me.
if I write {\footerdisclaimer} it works.
if I write {\footerdisclaimer\relax} it works.
if I write {\footerdisclaimer\relax\hfill} it works.
if I write {\footerdisclaimer\relax\hfill\footerproject} it works.
if I write {\footerdisclaimer\relax\hfill\footerproject\myline} it works.
if I write {\footerdisclaimer\relax\hfill\footerproject\myline\footerrevision} it works.
if I write {\footerdisclaimer\relax\hfill\footerproject\myline\footerrevision\myline} it works.
if I write {\footerdate} it works.
if I write {\footerdisclaimer\relax\hfill\footerproject\myline\footerrevision\myline\footerdate} it DOESN'T work.
but till few days ago it was working without errors, and in some occasion it is still working properly.
So, what's happening?!
My OS updated to Windows11, but I don't think this has any relation with this issue.
Thanks for any suggestion.
Best regards
Roberto