From abd35bc33cd5e180d1aace63c5ddba89870742e8 Mon Sep 17 00:00:00 2001 From: Udi Fogiel Date: Tue, 10 Sep 2024 15:17:07 +0300 Subject: [PATCH] fix jlreq abstract layout and adapt Chinese docs for unicode engines jlreq layout defined the abstract environment to be boxed in the preamble. Doing any kind of typesetting before all the setup has finished is error prone and may lead to wrong output (wrong fonts for example). The correct place to put the abstract code is right before \maketitle. The Chinese docs loaded the ctex package in case system fonts were used. Now, with the new support for languages with babel and polyglossia it is no longer necessary and creates collisions. --- lib/doc/zh_CN/Intro.lyx | 7 ------- lib/doc/zh_CN/Tutorial.lyx | 7 ------- lib/layouts/jlreq-common.inc | 2 +- 3 files changed, 1 insertion(+), 15 deletions(-) diff --git a/lib/doc/zh_CN/Intro.lyx b/lib/doc/zh_CN/Intro.lyx index eab48dae40..762040272b 100644 --- a/lib/doc/zh_CN/Intro.lyx +++ b/lib/doc/zh_CN/Intro.lyx @@ -5,13 +5,6 @@ \save_transient_properties true \origin /systemlyxdir/doc/zh_CN/ \textclass article -\begin_preamble -% Chinese localization -\@ifpackageloaded{fontspec}% -{\usepackage{ctex}}% ctex with non-TeX fonts -{%\usepackage[UTF8]{ctex}% error with font setup (missing font?) -} -\end_preamble \use_default_options true \maintain_unincluded_children no \language chinese-simplified diff --git a/lib/doc/zh_CN/Tutorial.lyx b/lib/doc/zh_CN/Tutorial.lyx index 346d280be4..93f95e389e 100644 --- a/lib/doc/zh_CN/Tutorial.lyx +++ b/lib/doc/zh_CN/Tutorial.lyx @@ -5,13 +5,6 @@ \save_transient_properties true \origin /systemlyxdir/doc/zh_CN/ \textclass book -\begin_preamble -% Chinese localization -\@ifpackageloaded{fontspec}% -{\usepackage{ctex}}% ctex with non-TeX fonts -{%\usepackage[UTF8]{ctex}% error with font setup (missing font?) -} -\end_preamble \options cjk \use_default_options true \maintain_unincluded_children no diff --git a/lib/layouts/jlreq-common.inc b/lib/layouts/jlreq-common.inc index fb7dfba2c3..d601c4ab3b 100644 --- a/lib/layouts/jlreq-common.inc +++ b/lib/layouts/jlreq-common.inc @@ -94,7 +94,7 @@ End Style Abstract_over_Columns CopyStyle Abstract - InPreamble 1 + InTitle 1 LabelString "Abstract" Category FrontMatter LatexType Command