| 1 |
%% |
| 2 |
%% This is file `structuredlog.sty', |
| 3 |
%% generated with the docstrip utility. |
| 4 |
%% |
| 5 |
%% The original source files were: |
| 6 |
%% |
| 7 |
%% ltfilehook.dtx (with options: `structuredlog') |
| 8 |
%% |
| 9 |
%% This is a generated file. |
| 10 |
%% |
| 11 |
%% The source is maintained by the LaTeX Project team and bug |
| 12 |
%% reports for it can be opened at https://latex-project.org/bugs.html |
| 13 |
%% (but please observe conditions on bug reports sent to that address!) |
| 14 |
%% |
| 15 |
%% |
| 16 |
%% Copyright (C) 1993-2025 |
| 17 |
%% The LaTeX Project and any individual authors listed elsewhere |
| 18 |
%% in this file. |
| 19 |
%% |
| 20 |
%% This file was generated from file(s) of the LaTeX base system. |
| 21 |
%% -------------------------------------------------------------- |
| 22 |
%% |
| 23 |
%% It may be distributed and/or modified under the |
| 24 |
%% conditions of the LaTeX Project Public License, either version 1.3c |
| 25 |
%% of this license or (at your option) any later version. |
| 26 |
%% The latest version of this license is in |
| 27 |
%% https://www.latex-project.org/lppl.txt |
| 28 |
%% and version 1.3c or later is part of all distributions of LaTeX |
| 29 |
%% version 2008 or later. |
| 30 |
%% |
| 31 |
%% This file has the LPPL maintenance status "maintained". |
| 32 |
%% |
| 33 |
%% This file may only be distributed together with a copy of the LaTeX |
| 34 |
%% base system. You may however distribute the LaTeX base system without |
| 35 |
%% such generated files. |
| 36 |
%% |
| 37 |
%% The list of all files belonging to the LaTeX base distribution is |
| 38 |
%% given in the file `manifest.txt'. See also `legal.txt' for additional |
| 39 |
%% information. |
| 40 |
%% |
| 41 |
%% The list of derived (unpacked) files belonging to the distribution |
| 42 |
%% and covered by LPPL is defined by the unpacking scripts (with |
| 43 |
%% extension .ins) which are part of the distribution. |
| 44 |
%%% From File: ltfilehook.dtx |
| 45 |
\def\ltfilehookdate{2025/06/20} |
| 46 |
\def\ltfilehookversion{v1.0o} |
| 47 |
\ProvidesExplPackage |
| 48 |
{structuredlog}{\ltfilehookdate}{\ltfilehookversion} |
| 49 |
{Structuring the TeX transcript file} |
| 50 |
\int_new:N \g__filehook_nesting_level_int |
| 51 |
\int_gset:Nn \g__filehook_nesting_level_int |
| 52 |
{ ( \tl_count:N \@currnamestack ) / 3 - 1 } |
| 53 |
\cs_new_protected:Npn \__filehook_log_file_record:n #1 |
| 54 |
{ |
| 55 |
\str_if_eq:nnT {#1} {START} { \int_gincr:N \g__filehook_nesting_level_int } |
| 56 |
\iow_term:x |
| 57 |
{ |
| 58 |
\prg_replicate:nn { \g__filehook_nesting_level_int } { = } ~ |
| 59 |
( LEVEL ~ \int_use:N \g__filehook_nesting_level_int \c_space_tl #1 ) ~ |
| 60 |
\CurrentFileUsed |
| 61 |
\str_if_eq:NNF \CurrentFileUsed \CurrentFile |
| 62 |
{ ~ ( \CurrentFile \c_space_tl requested ) } |
| 63 |
\iow_newline: |
| 64 |
} |
| 65 |
\str_if_eq:nnT {#1} {STOP} { \int_gdecr:N \g__filehook_nesting_level_int } |
| 66 |
} |
| 67 |
\AddToHook{file/before}{ \__filehook_log_file_record:n { START } } |
| 68 |
\AddToHookNext{file/after} |
| 69 |
{ \AddToHook{file/after}{ \__filehook_log_file_record:n { STOP } } } |
| 70 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 71 |
\endinput |
| 72 |
%% |
| 73 |
%% End of file `structuredlog.sty'. |