Skip to content

Commit

Permalink
try with OR/ -> build/
Browse files Browse the repository at this point in the history
check for void \@outputpage
  • Loading branch information
FrankMittelbach committed Feb 12, 2025
1 parent c63f311 commit c31b81c
Show file tree
Hide file tree
Showing 36 changed files with 267 additions and 256 deletions.
56 changes: 28 additions & 28 deletions required/latex-lab/OR-refactoring.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@

```
\def\@makecol{%
\UseHook {OR/column/before}% % <--------
\UseHook {build/column/before}% % <--------
%
\setbox \@outputbox \box \@cclv
\@outputbox@removebskip
%
\UseTaggingSocket{OR/column/outputbox} % <--------
\UseTaggingSocket{build/column/outputbox} % <--------
%
\let \@elt \relax
\xdef \@freelist {\@freelist \@midlist}%
\global \let \@midlist \@empty
%
\UseSocket {OR/column/outputbox}% % <--------
\UseSocket {build/column/outputbox}% % <--------
%
\ifvbox \@kludgeins
\@make@specialcolbox
Expand All @@ -24,14 +24,14 @@
\fi
\global \maxdepth \@maxdepth
%
\UseHook {OR/column/before/after}% % <--------
\UseHook {build/column/before/after}% % <--------
}
```


```
\def\@outputpage{%
\UseHook {OR/page/before}% % <--------
\UseHook {build/page/before}% % <--------
%
\begingroup
\let \protect \noexpand
Expand All @@ -40,7 +40,7 @@
\global \let \@@if@newlist \if@newlist
\global \@newlistfalse
\@parboxrestore
\UseHook {OR/page/reset}% % <--------
\UseHook {build/page/reset}% % <--------
\shipout \vbox {%
\set@typeset@protect
\aftergroup \endgroup
Expand Down Expand Up @@ -74,7 +74,7 @@
\vfil
%
\pdfannot_link_off:
\UseTaggingSocket{OR/page/header}{} % <--------
\UseTaggingSocket{build/page/header}{} % <--------
{
\color@hbox
\normalcolor
Expand All @@ -91,7 +91,7 @@
\baselineskip \footskip
%
\pdfannot_link_off:
\UseTaggingSocket{OR/page/footer}{} % <--------
\UseTaggingSocket{build/page/footer}{} % <--------
{
\color@hbox
\normalcolor
Expand All @@ -106,60 +106,60 @@
\global \@colht \textheight
\stepcounter {page}%
%
\UseHook {OR/page/after}% % <--------
\UseHook {build/page/after}% % <--------
}
```

## Questions

### What hook/socket names should we use

- all `OR/...` as done above?
- all `build/...` as done above?
- or closer to the command names, e.g., `cmd/@outputpage/before` `@outputpage/reset`, etc?
In that case one can use the generic hooks but I'm not so keen on using generic hooks for internal commands

- if we can assume that tagging for header and footer is always idential we could reuse the sockets and call them
`OR/page/headerfoot/before` and `OR/page/headerfoot/after`
`build/page/headerfoot/before` and `build/page/headerfoot/after`


## Hook, sockets, plugs

Plug definition indirect as long as tagpdf.sty still uses the old names
```
\NewSocket{tagsupport/OR/column/outputbox}{0}
\NewSocketPlug{tagsupport/OR/column/outputbox}{default}
\NewSocket{tagsupport/build/column/outputbox}{0}
\NewSocketPlug{tagsupport/build/column/outputbox}{default}
{ \@kernel@tagsupport@@makecol }
\AssignSocketPlug{tagsupport/OR/column/outputbox}{default}
\AssignSocketPlug{tagsupport/build/column/outputbox}{default}
\NewSocket{tagsupport/OR/column/footins}{0}
\NewSocketPlug{tagsupport/OR/column/footins}{default}
\NewSocket{tagsupport/build/column/footins}{0}
\NewSocketPlug{tagsupport/build/column/footins}{default}
{ \@kernel@before@footins }
\AssignSocketPlug{tagsupport/OR/column/footins}{default}
\AssignSocketPlug{tagsupport/build/column/footins}{default}
\NewSocket{tagsupport/OR/page/header}{2}
\NewSocketPlug{tagsupport/OR/page/header}{default}
\NewSocket{tagsupport/build/page/header}{2}
\NewSocketPlug{tagsupport/build/page/header}{default}
{ \@kernel@before@head #2 \@kernel@after@head }
\AssignSocketPlug{tagsupport/OR/page/header}{default}
\AssignSocketPlug{tagsupport/build/page/header}{default}
\NewSocket{tagsupport/OR/page/footer}{2}
\NewSocketPlug{tagsupport/OR/page/footer}{default}
\NewSocket{tagsupport/build/page/footer}{2}
\NewSocketPlug{tagsupport/build/page/footer}{default}
{ \@kernel@before@foot #2 \@kernel@after@foot }
\AssignSocketPlug{tagsupport/OR/page/footer}{default}
\AssignSocketPlug{tagsupport/build/page/footer}{default}
```


The hooks are there to support external packages (not yet used).

```
\NewHook{OR/column/before} % we could use cmd/@makecol/before instead
\NewHook{OR/column/after} % we could use cmd/@makecol/after instead
\NewHook{build/column/before} % we could use cmd/@makecol/before instead
\NewHook{build/column/after} % we could use cmd/@makecol/after instead
\NewHook{OR/page/before} % we could use cmd/@outputpage/before instead
\NewHook{OR/page/after} % we could use cmd/@outputpage/after instead
\NewHook{build/page/before} % we could use cmd/@outputpage/before instead
\NewHook{build/page/after} % we could use cmd/@outputpage/after instead
\NewHook{OR/page/reset}
\NewHook{build/page/reset}
```
20 changes: 10 additions & 10 deletions required/latex-lab/latex-lab-footnotes.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
%
% for those people who are interested or want to report an issue.
%
\def\ltlabfootnotedate{2025-02-11}
\def\ltlabfootnoteversion{0.8i}
\def\ltlabfootnotedate{2025-02-12}
\def\ltlabfootnoteversion{0.8j}

%<*driver>
\documentclass{l3doc}
Expand Down Expand Up @@ -2311,10 +2311,10 @@
% \texttt{dblfnote} package if we integrate that).
% \begin{macrocode}
\ifFN@para
\NewSocketPlug{OR/column/footnotes}{para}{%
\NewSocketPlug{build/column/footnotes}{para}{%
\global\setbox\footins\vbox{\FN@makefootnoteparagraph}%
}
\AssignSocketPlug{OR/column/footnotes}{para}
\AssignSocketPlug{build/column/footnotes}{para}
\fi
% \end{macrocode}
%
Expand Down Expand Up @@ -2347,21 +2347,21 @@
\ERROR
\or %1
\ifFN@abovefloats
\AssignSocketPlug {OR/column/outputbox}{space-footnotes-floats}
\AssignSocketPlug {build/column/outputbox}{space-footnotes-floats}
\else
\AssignSocketPlug {OR/column/outputbox}{floats-footnotes-space}
\AssignSocketPlug {build/column/outputbox}{floats-footnotes-space}
\fi
\or %2
\ifFN@abovefloats
\AssignSocketPlug {OR/column/outputbox}{footnotes-space-floats}
\AssignSocketPlug {build/column/outputbox}{footnotes-space-floats}
\else
\AssignSocketPlug {OR/column/outputbox}{space-floats-footnotes}
\AssignSocketPlug {build/column/outputbox}{space-floats-footnotes}
\fi
\or %3
\ifFN@abovefloats
\AssignSocketPlug {OR/column/outputbox}{footnotes-floats}
\AssignSocketPlug {build/column/outputbox}{footnotes-floats}
\else
\AssignSocketPlug {OR/column/outputbox}{floats-footnotes}
\AssignSocketPlug {build/column/outputbox}{floats-footnotes}
\fi
\else
\ERROR
Expand Down
Loading

0 comments on commit c31b81c

Please sign in to comment.