| 1 |
% background.4ht (2025-10-31-14:45), generated from tex4ht-4ht.tex |
| 2 |
% Copyright 2025 TeX Users Group |
| 3 |
% |
| 4 |
% This work may be distributed and/or modified under the |
| 5 |
% conditions of the LaTeX Project Public License, either |
| 6 |
% version 1.3c of this license or (at your option) any |
| 7 |
% later version. The latest version of this license is in |
| 8 |
% http://www.latex-project.org/lppl.txt |
| 9 |
% and version 1.3c or later is part of all distributions |
| 10 |
% of LaTeX version 2005/12/01 or later. |
| 11 |
% |
| 12 |
% This work has the LPPL maintenance status "maintained". |
| 13 |
% |
| 14 |
% The Current Maintainer of this work |
| 15 |
% is the TeX4ht Project <http://tug.org/tex4ht>. |
| 16 |
% |
| 17 |
% If you modify this program, changing the |
| 18 |
% version identification would be appreciated. |
| 19 |
\immediate\write-1{version 2025-10-31-14:45} |
| 20 |
|
| 21 |
|
| 22 |
\NewConfigure{BackgroundMaterial}{2}% |
| 23 |
|
| 24 |
\def\background:material{ |
| 25 |
\a:BackgroundMaterial% |
| 26 |
\Background@Contents% |
| 27 |
\b:BackgroundMaterial% |
| 28 |
} |
| 29 |
|
| 30 |
|
| 31 |
% We must block the dafault command which is used in page hooks, as we will add the background in TeX4ht hooks |
| 32 |
\def\:tempa{} |
| 33 |
\HLet\bg@material\:tempa |
| 34 |
|
| 35 |
% we now need to declare what will be inserted for particular pages |
| 36 |
% this is reuse of code from background.sty, it set the default background |
| 37 |
\ifbg@some |
| 38 |
\let\background:default\relax |
| 39 |
\else |
| 40 |
\let\background:default\background:material |
| 41 |
\fi |
| 42 |
|
| 43 |
\let\background:thispage\background:default |
| 44 |
|
| 45 |
% insert background at the begining of body of each page |
| 46 |
\Configure{@BODY}{ |
| 47 |
\background:thispage |
| 48 |
% reset to default for next page |
| 49 |
\global\let\background:thispage\background:default |
| 50 |
} |
| 51 |
|
| 52 |
% commands that will set background for the next page only |
| 53 |
\def\:tempa{ |
| 54 |
\let\background:thispage\background:material |
| 55 |
} |
| 56 |
\HLet\BgThispage\:tempa |
| 57 |
|
| 58 |
\def\:tempa{ |
| 59 |
\let\background:thispage\relax |
| 60 |
} |
| 61 |
\HLet\NoBgThispage\relax |
| 62 |
|
| 63 |
|
| 64 |
\Hinput{background} |
| 65 |
\endinput |
| 66 |
|