Skip to content

Commit

Permalink
Set up backend right at the start of \document (fixes #657)
Browse files Browse the repository at this point in the history
  • Loading branch information
josephwright committed Jan 6, 2020
1 parent 564cbb0 commit 26da686
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
3 changes: 3 additions & 0 deletions l3kernel/CHANGELOG.md
Expand Up @@ -13,6 +13,9 @@ this project uses date-based 'snapshot' version identifiers.
### Changed
- Distribute LaTeX3 News

### Fixed
- Set backend at the beginning of `\document` (see #657)

## [2019-11-07]

### Fixed
Expand Down
8 changes: 6 additions & 2 deletions l3kernel/expl3.dtx
Expand Up @@ -1322,13 +1322,17 @@
}
% \end{macrocode}
%
% A backend has to be in place by the start of the document.
% A backend has to be in place by the start of the document: this has to be
% before global options are checked for use. The odd group stuff avoids
% needing to actually patch \tn{document}.
% \begin{macrocode}
%<*2ekernel>
\AtBeginDocument
\tl_put_left:Nn \document
{
\endgroup
\str_if_exist:NF \c_sys_backend_str
{ \sys_load_backend:n { } }
\begingroup
}
%</2ekernel>
%<*!2ekernel>
Expand Down

0 comments on commit 26da686

Please sign in to comment.