mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-25 19:07:45 +00:00
Fix polyglossia exports for docs with babel cmds
Many of our documents have babel-specific preamble code. By putting
this code in a \@ifpackageloaded{babel}{}{} conditional, XeTeX and
LuaTeX compilation with polyglossia now works. This fixes some
LuaTeX tests that were broken by edd37de8
and also allows us to
uninvert some XeTeX tests.
Note that in some of the files although the preambles were fixed to
allow for polyglossia, they still do not compile without errors:
es/Math.lyx
es/Customization.lyx
de/Customization.lyx
Similar fixes might be desired in other manuals but these at least
fix regressions in the tests.
This commit is contained in:
parent
efa78b22fc
commit
2b1b233bc0
@ -42,12 +42,10 @@ export/doc/uk/Intro_dvi3_systemF
|
|||||||
# it is unlikely that a user would want to use system fonts to view LyX's
|
# it is unlikely that a user would want to use system fonts to view LyX's
|
||||||
# documents, fixing these would provide further tests for LyX's handling of
|
# documents, fixing these would provide further tests for LyX's handling of
|
||||||
# XeTeX/LuaTeX with system fonts.
|
# XeTeX/LuaTeX with system fonts.
|
||||||
export/doc/(|de/|es/|fr/)Customization_pdf4_systemF
|
export/doc/(de/|es/|fr/)Customization_pdf4_systemF
|
||||||
export/doc/(es/|fr/)Math_dvi3_systemF
|
export/doc/(es/|fr/)Math_dvi3_systemF
|
||||||
export/doc/(|de/|es/)Math_pdf4_systemF
|
export/doc/(es/)Math_pdf4_systemF
|
||||||
# es would be in here also but it is set to "always babel".
|
export/doc/(es|fr|id)/UserGuide_pdf4_systemF
|
||||||
export/doc/de/EmbeddedObjects_pdf4_systemF
|
|
||||||
export/doc/(de|es|fr|id)/UserGuide_pdf4_systemF
|
|
||||||
export/doc/es/Tutorial_pdf4_systemF
|
export/doc/es/Tutorial_pdf4_systemF
|
||||||
export/doc/gl/Tutorial_dvi3_systemF
|
export/doc/gl/Tutorial_dvi3_systemF
|
||||||
export/doc/(nb|sk)/Intro_pdf4_systemF
|
export/doc/(nb|sk)/Intro_pdf4_systemF
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#LyX 2.2 created this file. For more info see http://www.lyx.org/
|
#LyX 2.2 created this file. For more info see http://www.lyx.org/
|
||||||
\lyxformat 497
|
\lyxformat 498
|
||||||
\begin_document
|
\begin_document
|
||||||
\begin_header
|
\begin_header
|
||||||
\origin /systemlyxdir/doc/
|
\origin /systemlyxdir/doc/
|
||||||
@ -35,12 +35,14 @@
|
|||||||
% increase link area for cross-references and autoname them,
|
% increase link area for cross-references and autoname them,
|
||||||
\AtBeginDocument{\renewcommand{\ref}[1]{\mbox{\autoref{#1}}}}
|
\AtBeginDocument{\renewcommand{\ref}[1]{\mbox{\autoref{#1}}}}
|
||||||
\@ifundefined{extrasenglish}{\usepackage[english]{babel}}{}
|
\@ifundefined{extrasenglish}{\usepackage[english]{babel}}{}
|
||||||
\addto\extrasenglish{%
|
\@ifpackageloaded{babel}{
|
||||||
\renewcommand*{\equationautorefname}[1]{}%
|
\addto\extrasenglish{%
|
||||||
\renewcommand{\sectionautorefname}{sec.\negthinspace}%
|
\renewcommand*{\equationautorefname}[1]{}%
|
||||||
\renewcommand{\subsectionautorefname}{sec.\negthinspace}%
|
\renewcommand{\sectionautorefname}{sec.\negthinspace}%
|
||||||
\renewcommand{\subsubsectionautorefname}{sec.\negthinspace}%
|
\renewcommand{\subsectionautorefname}{sec.\negthinspace}%
|
||||||
}
|
\renewcommand{\subsubsectionautorefname}{sec.\negthinspace}%
|
||||||
|
}
|
||||||
|
}{}
|
||||||
\end_preamble
|
\end_preamble
|
||||||
\options fleqn,bibliography=totoc,index=totoc,BCOR7.5mm,titlepage,captions=tableheading
|
\options fleqn,bibliography=totoc,index=totoc,BCOR7.5mm,titlepage,captions=tableheading
|
||||||
\use_default_options false
|
\use_default_options false
|
||||||
|
@ -34,12 +34,14 @@
|
|||||||
% increase link area for cross-references and autoname them,
|
% increase link area for cross-references and autoname them,
|
||||||
\AtBeginDocument{\renewcommand{\ref}[1]{\mbox{\autoref{#1}}}}
|
\AtBeginDocument{\renewcommand{\ref}[1]{\mbox{\autoref{#1}}}}
|
||||||
\@ifundefined{extrasenglish}{\usepackage[english]{babel}}{}
|
\@ifundefined{extrasenglish}{\usepackage[english]{babel}}{}
|
||||||
\addto\extrasenglish{%
|
\@ifpackageloaded{babel}{
|
||||||
\renewcommand*{\equationautorefname}[1]{}%
|
\addto\extrasenglish{%
|
||||||
\renewcommand{\sectionautorefname}{sec.\negthinspace}%
|
\renewcommand*{\equationautorefname}[1]{}%
|
||||||
\renewcommand{\subsectionautorefname}{sec.\negthinspace}%
|
\renewcommand{\sectionautorefname}{sec.\negthinspace}%
|
||||||
\renewcommand{\subsubsectionautorefname}{sec.\negthinspace}%
|
\renewcommand{\subsectionautorefname}{sec.\negthinspace}%
|
||||||
}
|
\renewcommand{\subsubsectionautorefname}{sec.\negthinspace}%
|
||||||
|
}
|
||||||
|
}{}
|
||||||
|
|
||||||
% don't load packages twice
|
% don't load packages twice
|
||||||
% see first footnote in sec. 9.3
|
% see first footnote in sec. 9.3
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#LyX 2.2 created this file. For more info see http://www.lyx.org/
|
#LyX 2.2 created this file. For more info see http://www.lyx.org/
|
||||||
\lyxformat 497
|
\lyxformat 498
|
||||||
\begin_document
|
\begin_document
|
||||||
\begin_header
|
\begin_header
|
||||||
\origin /systemlyxdir/doc/de/
|
\origin /systemlyxdir/doc/de/
|
||||||
@ -36,14 +36,16 @@
|
|||||||
\myTOC
|
\myTOC
|
||||||
\mainmatter }
|
\mainmatter }
|
||||||
|
|
||||||
% Linkfläche für Querverweise vergrößern und automatisch benennen,
|
\@ifpackageloaded{babel}{
|
||||||
\AtBeginDocument{\renewcommand{\ref}[1]{\mbox{\autoref{#1}}}}
|
% Linkfläche für Querverweise vergrößern und automatisch benennen,
|
||||||
\addto\extrasngerman{%
|
\AtBeginDocument{\renewcommand{\ref}[1]{\mbox{\autoref{#1}}}}
|
||||||
\renewcommand*{\equationautorefname}[1]{}%
|
\addto\extrasngerman{%
|
||||||
\renewcommand{\sectionautorefname}{Kap.\negthinspace}%
|
\renewcommand*{\equationautorefname}[1]{}%
|
||||||
\renewcommand{\subsectionautorefname}{Kap.\negthinspace}%
|
\renewcommand{\sectionautorefname}{Kap.\negthinspace}%
|
||||||
\renewcommand{\subsubsectionautorefname}{Kap.\negthinspace}%
|
\renewcommand{\subsectionautorefname}{Kap.\negthinspace}%
|
||||||
}
|
\renewcommand{\subsubsectionautorefname}{Kap.\negthinspace}%
|
||||||
|
}
|
||||||
|
}{}
|
||||||
\end_preamble
|
\end_preamble
|
||||||
\options fleqn,bibliography=totoc,index=totoc,BCOR7.5mm,titlepage,captions=tableheading
|
\options fleqn,bibliography=totoc,index=totoc,BCOR7.5mm,titlepage,captions=tableheading
|
||||||
\use_default_options false
|
\use_default_options false
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#LyX 2.2 created this file. For more info see http://www.lyx.org/
|
#LyX 2.2 created this file. For more info see http://www.lyx.org/
|
||||||
\lyxformat 497
|
\lyxformat 498
|
||||||
\begin_document
|
\begin_document
|
||||||
\begin_header
|
\begin_header
|
||||||
\origin /systemlyxdir/doc/de/
|
\origin /systemlyxdir/doc/de/
|
||||||
@ -160,8 +160,10 @@
|
|||||||
\setboolean{diagbox}{true}}
|
\setboolean{diagbox}{true}}
|
||||||
{\setboolean{diagbox}{false}}
|
{\setboolean{diagbox}{false}}
|
||||||
|
|
||||||
% Damit der Index den Namen "Stichwortverzeichnis" erhält
|
\@ifpackageloaded{babel}{
|
||||||
\addto\captionsngerman{\renewcommand{\indexname}{Stichwortverzeichnis}}
|
% Damit der Index den Namen "Stichwortverzeichnis" erhält
|
||||||
|
\addto\captionsngerman{\renewcommand{\indexname}{Stichwortverzeichnis}}
|
||||||
|
}{}
|
||||||
\end_preamble
|
\end_preamble
|
||||||
\options bibliography=totoc,index=totoc,BCOR7.5mm,titlepage,captions=tableheading,usenames,dvipsnames,table
|
\options bibliography=totoc,index=totoc,BCOR7.5mm,titlepage,captions=tableheading,usenames,dvipsnames,table
|
||||||
\use_default_options false
|
\use_default_options false
|
||||||
|
@ -35,12 +35,14 @@
|
|||||||
|
|
||||||
% Linkfläche für Querverweise vergrößern und automatisch benennen,
|
% Linkfläche für Querverweise vergrößern und automatisch benennen,
|
||||||
\AtBeginDocument{\renewcommand{\ref}[1]{\mbox{\autoref{#1}}}}
|
\AtBeginDocument{\renewcommand{\ref}[1]{\mbox{\autoref{#1}}}}
|
||||||
\addto\extrasngerman{%
|
\@ifpackageloaded{babel}{
|
||||||
\renewcommand*{\equationautorefname}[1]{}%
|
\addto\extrasngerman{%
|
||||||
\renewcommand{\sectionautorefname}{Kap.\negthinspace}%
|
\renewcommand*{\equationautorefname}[1]{}%
|
||||||
\renewcommand{\subsectionautorefname}{Kap.\negthinspace}%
|
\renewcommand{\sectionautorefname}{Kap.\negthinspace}%
|
||||||
\renewcommand{\subsubsectionautorefname}{Kap.\negthinspace}%
|
\renewcommand{\subsectionautorefname}{Kap.\negthinspace}%
|
||||||
}
|
\renewcommand{\subsubsectionautorefname}{Kap.\negthinspace}%
|
||||||
|
}
|
||||||
|
}{}
|
||||||
|
|
||||||
% Makros damit Pakete nicht doppelt geladen werden.
|
% Makros damit Pakete nicht doppelt geladen werden.
|
||||||
% siehe erste Fußnote in Kap. 9.3
|
% siehe erste Fußnote in Kap. 9.3
|
||||||
@ -97,10 +99,12 @@
|
|||||||
% Beispielmakro aus Kap. 19.4
|
% Beispielmakro aus Kap. 19.4
|
||||||
%\def\tagform@#1{\maketag@@@{|#1|}}
|
%\def\tagform@#1{\maketag@@@{|#1|}}
|
||||||
|
|
||||||
% Damit der Index einen anderen Namen erhält.
|
\@ifpackageloaded{babel}{
|
||||||
\addto\captionsngerman
|
% Damit der Index einen anderen Namen erhält.
|
||||||
{\renewcommand{\indexname}
|
\addto\captionsngerman
|
||||||
{Stichwort- und Befehlsverzeichnis}}
|
{\renewcommand{\indexname}
|
||||||
|
{Stichwort- und Befehlsverzeichnis}}
|
||||||
|
}{}
|
||||||
|
|
||||||
|
|
||||||
% ------------------------------------
|
% ------------------------------------
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#LyX 2.2 created this file. For more info see http://www.lyx.org/
|
#LyX 2.2 created this file. For more info see http://www.lyx.org/
|
||||||
\lyxformat 497
|
\lyxformat 498
|
||||||
\begin_document
|
\begin_document
|
||||||
\begin_header
|
\begin_header
|
||||||
\origin /systemlyxdir/doc/de/
|
\origin /systemlyxdir/doc/de/
|
||||||
@ -34,8 +34,10 @@
|
|||||||
\myTOC
|
\myTOC
|
||||||
\mainmatter }
|
\mainmatter }
|
||||||
|
|
||||||
% Damit der Index den Namen "Stichwortverzeichnis" erhält
|
\@ifpackageloaded{babel}{
|
||||||
\addto\captionsngerman{\renewcommand{\indexname}{Stichwortverzeichnis}}
|
% Damit der Index den Namen "Stichwortverzeichnis" erhält
|
||||||
|
\addto\captionsngerman{\renewcommand{\indexname}{Stichwortverzeichnis}}
|
||||||
|
}{}
|
||||||
|
|
||||||
% macro for italic page numbers in the index
|
% macro for italic page numbers in the index
|
||||||
\newcommand{\IndexDef}[1]{\textit{#1}}
|
\newcommand{\IndexDef}[1]{\textit{#1}}
|
||||||
|
@ -32,14 +32,16 @@
|
|||||||
\myTOC
|
\myTOC
|
||||||
\mainmatter }
|
\mainmatter }
|
||||||
|
|
||||||
% increase link area for cross-references and autoname them,
|
\@ifpackageloaded{babel}{
|
||||||
\AtBeginDocument{\renewcommand{\ref}[1]{\mbox{\autoref{#1}}}}
|
% increase link area for cross-references and autoname them,
|
||||||
\addto\extrasspanish{%
|
\AtBeginDocument{\renewcommand{\ref}[1]{\mbox{\autoref{#1}}}}
|
||||||
\renewcommand*{\equationautorefname}[1]{}%
|
\addto\extrasspanish{%
|
||||||
\renewcommand{\sectionautorefname}{sec.\negthinspace}%
|
\renewcommand*{\equationautorefname}[1]{}%
|
||||||
\renewcommand{\subsectionautorefname}{sec.\negthinspace}%
|
\renewcommand{\sectionautorefname}{sec.\negthinspace}%
|
||||||
\renewcommand{\subsubsectionautorefname}{sec.\negthinspace}%
|
\renewcommand{\subsectionautorefname}{sec.\negthinspace}%
|
||||||
}
|
\renewcommand{\subsubsectionautorefname}{sec.\negthinspace}%
|
||||||
|
}
|
||||||
|
}{}
|
||||||
\end_preamble
|
\end_preamble
|
||||||
\options fleqn,bibliography=totoc,index=totoc,BCOR7.5mm,titlepage,captions=tableheading
|
\options fleqn,bibliography=totoc,index=totoc,BCOR7.5mm,titlepage,captions=tableheading
|
||||||
\use_default_options false
|
\use_default_options false
|
||||||
|
@ -33,14 +33,16 @@
|
|||||||
\renewcommand{\l@subsection}{\@dottedtocline{2}{1.5em}{2.8em}}
|
\renewcommand{\l@subsection}{\@dottedtocline{2}{1.5em}{2.8em}}
|
||||||
\renewcommand{\l@subsubsection}{\@dottedtocline{3}{4.3em}{3.6em}}
|
\renewcommand{\l@subsubsection}{\@dottedtocline{3}{4.3em}{3.6em}}
|
||||||
|
|
||||||
% increase link area for cross-references and autoname them,
|
\@ifpackageloaded{babel}{
|
||||||
\AtBeginDocument{\renewcommand{\ref}[1]{\mbox{\autoref{#1}}}}
|
% increase link area for cross-references and autoname them,
|
||||||
\addto\extrasspanish{%
|
\AtBeginDocument{\renewcommand{\ref}[1]{\mbox{\autoref{#1}}}}
|
||||||
\renewcommand*{\equationautorefname}[1]{}%
|
\addto\extrasspanish{%
|
||||||
\renewcommand{\sectionautorefname}{sec.\negthinspace}%
|
\renewcommand*{\equationautorefname}[1]{}%
|
||||||
\renewcommand{\subsectionautorefname}{sec.\negthinspace}%
|
\renewcommand{\sectionautorefname}{sec.\negthinspace}%
|
||||||
\renewcommand{\subsubsectionautorefname}{sec.\negthinspace}%
|
\renewcommand{\subsectionautorefname}{sec.\negthinspace}%
|
||||||
}
|
\renewcommand{\subsubsectionautorefname}{sec.\negthinspace}%
|
||||||
|
}
|
||||||
|
}{}
|
||||||
|
|
||||||
% don't load packages twice
|
% don't load packages twice
|
||||||
% see first footnote in sec. 9.3
|
% see first footnote in sec. 9.3
|
||||||
|
@ -31,14 +31,16 @@
|
|||||||
\myTOC
|
\myTOC
|
||||||
\mainmatter }
|
\mainmatter }
|
||||||
|
|
||||||
% increase link area for cross-references and autoname them,
|
\@ifpackageloaded{babel}{
|
||||||
\AtBeginDocument{\renewcommand{\ref}[1]{\mbox{\autoref{#1}}}}
|
% increase link area for cross-references and autoname them,
|
||||||
\addto\extrasfrench{%
|
\AtBeginDocument{\renewcommand{\ref}[1]{\mbox{\autoref{#1}}}}
|
||||||
\renewcommand*{\equationautorefname}[1]{}%
|
\addto\extrasfrench{%
|
||||||
\renewcommand{\sectionautorefname}{sec.\negthinspace}%
|
\renewcommand*{\equationautorefname}[1]{}%
|
||||||
\renewcommand{\subsectionautorefname}{sec.\negthinspace}%
|
\renewcommand{\sectionautorefname}{sec.\negthinspace}%
|
||||||
\renewcommand{\subsubsectionautorefname}{sec.\negthinspace}%
|
\renewcommand{\subsectionautorefname}{sec.\negthinspace}%
|
||||||
}
|
\renewcommand{\subsubsectionautorefname}{sec.\negthinspace}%
|
||||||
|
}
|
||||||
|
}{}
|
||||||
\end_preamble
|
\end_preamble
|
||||||
\options fleqn,liststotoc,bibtotoc,idxtotoc,BCOR7.5mm,titlepage,tablecaptionabove
|
\options fleqn,liststotoc,bibtotoc,idxtotoc,BCOR7.5mm,titlepage,tablecaptionabove
|
||||||
\use_default_options false
|
\use_default_options false
|
||||||
|
@ -15,15 +15,17 @@
|
|||||||
|
|
||||||
\fi % end if pdflatex is used
|
\fi % end if pdflatex is used
|
||||||
|
|
||||||
% increase link area for cross-references and autoname them,
|
\@ifpackageloaded{babel}{
|
||||||
\AtBeginDocument{\renewcommand{\ref}[1]{\mbox{\autoref{#1}}}}
|
% increase link area for cross-references and autoname them,
|
||||||
\@ifundefined{extrasenglish}{\usepackage[english]{babel}}{}
|
\AtBeginDocument{\renewcommand{\ref}[1]{\mbox{\autoref{#1}}}}
|
||||||
\addto\extrasenglish{%
|
\@ifundefined{extrasenglish}{\usepackage[english]{babel}}{}
|
||||||
\renewcommand*{\equationautorefname}[1]{}%
|
\addto\extrasenglish{%
|
||||||
\renewcommand{\sectionautorefname}{sec.\negthinspace}%
|
\renewcommand*{\equationautorefname}[1]{}%
|
||||||
\renewcommand{\subsectionautorefname}{sec.\negthinspace}%
|
\renewcommand{\sectionautorefname}{sec.\negthinspace}%
|
||||||
\renewcommand{\subsubsectionautorefname}{sec.\negthinspace}%
|
\renewcommand{\subsectionautorefname}{sec.\negthinspace}%
|
||||||
}
|
\renewcommand{\subsubsectionautorefname}{sec.\negthinspace}%
|
||||||
|
}
|
||||||
|
}{}
|
||||||
\end_preamble
|
\end_preamble
|
||||||
\options BCOR8mm, most, usenames, dvipsnames
|
\options BCOR8mm, most, usenames, dvipsnames
|
||||||
\use_default_options false
|
\use_default_options false
|
||||||
@ -1234,7 +1236,6 @@ Default Value
|
|||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\begin_layout New Color Box Type
|
\begin_layout New Color Box Type
|
||||||
|
|
||||||
\begin_inset Argument 2
|
\begin_inset Argument 2
|
||||||
status open
|
status open
|
||||||
|
|
||||||
@ -1413,7 +1414,6 @@ Box
|
|||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\begin_layout New Color Box Type
|
\begin_layout New Color Box Type
|
||||||
|
|
||||||
\begin_inset Argument 1
|
\begin_inset Argument 1
|
||||||
status open
|
status open
|
||||||
|
|
||||||
@ -1652,7 +1652,6 @@ More Color Box Options
|
|||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\begin_layout New Color Box Type
|
\begin_layout New Color Box Type
|
||||||
|
|
||||||
\begin_inset Argument 1
|
\begin_inset Argument 1
|
||||||
status open
|
status open
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user