[latex3-commits] [git/LaTeX3-latex3-latex3] master: Pick up 'traditional' class options for backend (6bb0c2743)
Joseph Wright
joseph.wright at morningstar2.co.uk
Tue Oct 8 14:04:42 CEST 2019
Repository : https://github.com/latex3/latex3
On branch : master
Link : https://github.com/latex3/latex3/commit/6bb0c2743a1f070fdc07fec1877567fd4db6f92c
>---------------------------------------------------------------
commit 6bb0c2743a1f070fdc07fec1877567fd4db6f92c
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date: Tue Oct 8 13:04:42 2019 +0100
Pick up 'traditional' class options for backend
>---------------------------------------------------------------
6bb0c2743a1f070fdc07fec1877567fd4db6f92c
l3kernel/CHANGELOG.md | 1 +
l3kernel/expl3.dtx | 28 ++++++++++++++++++++++++++++
2 files changed, 29 insertions(+)
diff --git a/l3kernel/CHANGELOG.md b/l3kernel/CHANGELOG.md
index 77987682b..ba109925d 100644
--- a/l3kernel/CHANGELOG.md
+++ b/l3kernel/CHANGELOG.md
@@ -11,6 +11,7 @@ this project uses date-based 'snapshot' version identifiers.
- Moved `\debug_on:`, `\debug_off:`, `\debug_suspend:` and `\debug_resume:`
to stable
+- Accept 'traditional' class options for backend (`dvipdfmx`, `dvips`, etc.)
## [2019-10-02]
diff --git a/l3kernel/expl3.dtx b/l3kernel/expl3.dtx
index 7dfc70847..83cea5bc2 100644
--- a/l3kernel/expl3.dtx
+++ b/l3kernel/expl3.dtx
@@ -1208,6 +1208,34 @@
% \end{macrocode}
%
% \begin{macrocode}
+%<@@=sys>
+% \end{macrocode}
+%
+% If there is a class option set, and recognised, we pick it up: these
+% will over-ride anything set automatically but will themsevles be
+% over-written if there is a package option.
+% \begin{macrocode}
+\cs_if_exist:NT \@classoptionslist
+ {
+ \cs_if_eq:NNF \@classoptionslist \scan_stop:
+ {
+ \clist_map_inline:Nn \@classoptionslist
+ {
+ \str_case:nnT {#1}
+ {
+ { dvipdfmx } { \tl_gset:Nn \g_@@_backend_tl { dvipdfmx } }
+ { dvips } { \tl_gset:Nn \g_@@_backend_tl { dvips } }
+ { dvisvgm } { \tl_gset:Nn \g_@@_backend_tl { dvisvgm } }
+ { pdftex } { \tl_gset:Nn \g_@@_backend_tl { pdfmode } }
+ { xetex } { \tl_gset:Nn \g_@@_backend_tl { xdvipdfmx } }
+ }
+ { \clist_remove_all:Nn \@unusedoptionlist {#1} }
+ }
+ }
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
%<@@=expl>
% \end{macrocode}
%
More information about the latex3-commits
mailing list