Compare commits

...

2 Commits

Author SHA1 Message Date
Scott Kostyshak
24a709ce22 Update tex2lyx tests
From what I understand, the changes are expected.
2024-11-01 17:10:01 +01:00
Juergen Spitzmueller
561aa8bb32 Fix loading order of fancyhdr (#13118)
This must be loaded after geometry (amends ca4fc01847)
2024-11-01 14:49:29 +01:00
22 changed files with 46 additions and 26 deletions

View File

@ -2176,12 +2176,6 @@ bool BufferParams::writeLaTeX(otexstream & os, LaTeXFeatures & features,
features.require("papersize"); features.require("papersize");
} }
if (tokenPos(tclass.opt_pagestyle(), '|', pagestyle) >= 0) {
if (pagestyle == "fancy")
os << "\\usepackage{fancyhdr}\n";
os << "\\pagestyle{" << from_ascii(pagestyle) << "}\n";
}
// only output when the background color is not default // only output when the background color is not default
if (isbackgroundcolor) { if (isbackgroundcolor) {
// only require color here, the background color will be defined // only require color here, the background color will be defined

View File

@ -1381,6 +1381,12 @@ string const LaTeXFeatures::getPackages() const
if (!params_.set_geometry.empty()) if (!params_.set_geometry.empty())
packages << params_.set_geometry; packages << params_.set_geometry;
if (tokenPos(params_.documentClass().opt_pagestyle(), '|', params_.pagestyle) >= 0) {
if (params_.pagestyle == "fancy")
packages << "\\usepackage{fancyhdr}\n";
packages << "\\pagestyle{" << params_.pagestyle << "}\n";
}
// These must be loaded after graphicx, since they try // These must be loaded after graphicx, since they try
// to load graphicx without options // to load graphicx without options
if (mustProvide("rotating")) if (mustProvide("rotating"))

View File

@ -1,5 +1,5 @@
#LyX file created by tex2lyx 2.5 #LyX file created by tex2lyx 2.5
\lyxformat 630 \lyxformat 631
\begin_document \begin_document
\begin_header \begin_header
\save_transient_properties true \save_transient_properties true
@ -90,6 +90,7 @@
\html_be_strict false \html_be_strict false
\docbook_table_output 0 \docbook_table_output 0
\docbook_mathml_prefix 1 \docbook_mathml_prefix 1
\docbook_mathml_version 0
\end_header \end_header
\begin_body \begin_body

View File

@ -1,5 +1,5 @@
#LyX file created by tex2lyx 2.5 #LyX file created by tex2lyx 2.5
\lyxformat 630 \lyxformat 631
\begin_document \begin_document
\begin_header \begin_header
\save_transient_properties true \save_transient_properties true
@ -90,6 +90,7 @@
\html_be_strict false \html_be_strict false
\docbook_table_output 0 \docbook_table_output 0
\docbook_mathml_prefix 1 \docbook_mathml_prefix 1
\docbook_mathml_version 0
\end_header \end_header
\begin_body \begin_body

View File

@ -1,5 +1,5 @@
#LyX file created by tex2lyx 2.5 #LyX file created by tex2lyx 2.5
\lyxformat 630 \lyxformat 631
\begin_document \begin_document
\begin_header \begin_header
\save_transient_properties true \save_transient_properties true
@ -96,6 +96,7 @@
\html_be_strict false \html_be_strict false
\docbook_table_output 0 \docbook_table_output 0
\docbook_mathml_prefix 1 \docbook_mathml_prefix 1
\docbook_mathml_version 0
\end_header \end_header
\begin_body \begin_body

View File

@ -1,5 +1,5 @@
#LyX file created by tex2lyx 2.5 #LyX file created by tex2lyx 2.5
\lyxformat 630 \lyxformat 631
\begin_document \begin_document
\begin_header \begin_header
\save_transient_properties true \save_transient_properties true
@ -96,6 +96,7 @@
\html_be_strict false \html_be_strict false
\docbook_table_output 0 \docbook_table_output 0
\docbook_mathml_prefix 1 \docbook_mathml_prefix 1
\docbook_mathml_version 0
\end_header \end_header
\begin_body \begin_body

View File

@ -1,5 +1,5 @@
#LyX file created by tex2lyx 2.5 #LyX file created by tex2lyx 2.5
\lyxformat 630 \lyxformat 631
\begin_document \begin_document
\begin_header \begin_header
\save_transient_properties true \save_transient_properties true
@ -89,6 +89,7 @@
\html_be_strict false \html_be_strict false
\docbook_table_output 0 \docbook_table_output 0
\docbook_mathml_prefix 1 \docbook_mathml_prefix 1
\docbook_mathml_version 0
\end_header \end_header
\begin_body \begin_body

View File

@ -1,5 +1,5 @@
#LyX file created by tex2lyx 2.5 #LyX file created by tex2lyx 2.5
\lyxformat 630 \lyxformat 631
\begin_document \begin_document
\begin_header \begin_header
\save_transient_properties true \save_transient_properties true
@ -88,6 +88,7 @@ algorithm2e
\html_be_strict false \html_be_strict false
\docbook_table_output 0 \docbook_table_output 0
\docbook_mathml_prefix 1 \docbook_mathml_prefix 1
\docbook_mathml_version 0
\end_header \end_header
\begin_body \begin_body

View File

@ -1,5 +1,5 @@
#LyX file created by tex2lyx 2.5 #LyX file created by tex2lyx 2.5
\lyxformat 630 \lyxformat 631
\begin_document \begin_document
\begin_header \begin_header
\save_transient_properties true \save_transient_properties true
@ -89,6 +89,7 @@
\html_be_strict false \html_be_strict false
\docbook_table_output 0 \docbook_table_output 0
\docbook_mathml_prefix 1 \docbook_mathml_prefix 1
\docbook_mathml_version 0
\end_header \end_header
\begin_body \begin_body

View File

@ -1,5 +1,5 @@
#LyX file created by tex2lyx 2.5 #LyX file created by tex2lyx 2.5
\lyxformat 630 \lyxformat 631
\begin_document \begin_document
\begin_header \begin_header
\save_transient_properties true \save_transient_properties true
@ -125,6 +125,7 @@
\html_be_strict false \html_be_strict false
\docbook_table_output 0 \docbook_table_output 0
\docbook_mathml_prefix 1 \docbook_mathml_prefix 1
\docbook_mathml_version 0
\end_header \end_header
\begin_body \begin_body

View File

@ -1,5 +1,5 @@
#LyX file created by tex2lyx 2.5 #LyX file created by tex2lyx 2.5
\lyxformat 630 \lyxformat 631
\begin_document \begin_document
\begin_header \begin_header
\save_transient_properties true \save_transient_properties true
@ -93,6 +93,7 @@
\html_be_strict false \html_be_strict false
\docbook_table_output 0 \docbook_table_output 0
\docbook_mathml_prefix 1 \docbook_mathml_prefix 1
\docbook_mathml_version 0
\end_header \end_header
\begin_body \begin_body

View File

@ -1,5 +1,5 @@
#LyX file created by tex2lyx 2.5 #LyX file created by tex2lyx 2.5
\lyxformat 630 \lyxformat 631
\begin_document \begin_document
\begin_header \begin_header
\save_transient_properties true \save_transient_properties true
@ -92,6 +92,7 @@
\html_be_strict false \html_be_strict false
\docbook_table_output 0 \docbook_table_output 0
\docbook_mathml_prefix 1 \docbook_mathml_prefix 1
\docbook_mathml_version 0
\end_header \end_header
\begin_body \begin_body

View File

@ -1,5 +1,5 @@
#LyX file created by tex2lyx 2.5 #LyX file created by tex2lyx 2.5
\lyxformat 630 \lyxformat 631
\begin_document \begin_document
\begin_header \begin_header
\save_transient_properties true \save_transient_properties true
@ -132,6 +132,7 @@
\html_be_strict false \html_be_strict false
\docbook_table_output 0 \docbook_table_output 0
\docbook_mathml_prefix 1 \docbook_mathml_prefix 1
\docbook_mathml_version 0
\end_header \end_header
\begin_body \begin_body

View File

@ -1,5 +1,5 @@
#LyX file created by tex2lyx 2.5 #LyX file created by tex2lyx 2.5
\lyxformat 630 \lyxformat 631
\begin_document \begin_document
\begin_header \begin_header
\save_transient_properties true \save_transient_properties true
@ -108,6 +108,7 @@
\html_be_strict false \html_be_strict false
\docbook_table_output 0 \docbook_table_output 0
\docbook_mathml_prefix 1 \docbook_mathml_prefix 1
\docbook_mathml_version 0
\end_header \end_header
\begin_body \begin_body

View File

@ -1,5 +1,5 @@
#LyX file created by tex2lyx 2.5 #LyX file created by tex2lyx 2.5
\lyxformat 630 \lyxformat 631
\begin_document \begin_document
\begin_header \begin_header
\save_transient_properties true \save_transient_properties true
@ -86,6 +86,7 @@
\html_be_strict false \html_be_strict false
\docbook_table_output 0 \docbook_table_output 0
\docbook_mathml_prefix 1 \docbook_mathml_prefix 1
\docbook_mathml_version 0
\end_header \end_header
\begin_body \begin_body

View File

@ -1,5 +1,5 @@
#LyX file created by tex2lyx 2.5 #LyX file created by tex2lyx 2.5
\lyxformat 630 \lyxformat 631
\begin_document \begin_document
\begin_header \begin_header
\save_transient_properties true \save_transient_properties true
@ -85,6 +85,7 @@
\html_be_strict false \html_be_strict false
\docbook_table_output 0 \docbook_table_output 0
\docbook_mathml_prefix 1 \docbook_mathml_prefix 1
\docbook_mathml_version 0
\end_header \end_header
\begin_body \begin_body

View File

@ -1,5 +1,5 @@
#LyX file created by tex2lyx 2.5 #LyX file created by tex2lyx 2.5
\lyxformat 630 \lyxformat 631
\begin_document \begin_document
\begin_header \begin_header
\save_transient_properties true \save_transient_properties true
@ -86,6 +86,7 @@ theorems-ams
\html_be_strict false \html_be_strict false
\docbook_table_output 0 \docbook_table_output 0
\docbook_mathml_prefix 1 \docbook_mathml_prefix 1
\docbook_mathml_version 0
\end_header \end_header
\begin_body \begin_body

View File

@ -1,5 +1,5 @@
#LyX file created by tex2lyx 2.5 #LyX file created by tex2lyx 2.5
\lyxformat 630 \lyxformat 631
\begin_document \begin_document
\begin_header \begin_header
\save_transient_properties true \save_transient_properties true
@ -86,6 +86,7 @@ theorems-ams
\html_be_strict false \html_be_strict false
\docbook_table_output 0 \docbook_table_output 0
\docbook_mathml_prefix 1 \docbook_mathml_prefix 1
\docbook_mathml_version 0
\end_header \end_header
\begin_body \begin_body

View File

@ -1,5 +1,5 @@
#LyX file created by tex2lyx 2.5 #LyX file created by tex2lyx 2.5
\lyxformat 630 \lyxformat 631
\begin_document \begin_document
\begin_header \begin_header
\save_transient_properties true \save_transient_properties true
@ -83,6 +83,7 @@
\html_be_strict false \html_be_strict false
\docbook_table_output 0 \docbook_table_output 0
\docbook_mathml_prefix 1 \docbook_mathml_prefix 1
\docbook_mathml_version 0
\end_header \end_header
\begin_body \begin_body

View File

@ -1,5 +1,5 @@
#LyX file created by tex2lyx 2.5 #LyX file created by tex2lyx 2.5
\lyxformat 630 \lyxformat 631
\begin_document \begin_document
\begin_header \begin_header
\save_transient_properties true \save_transient_properties true
@ -120,6 +120,7 @@ logicalmkup
\html_be_strict false \html_be_strict false
\docbook_table_output 0 \docbook_table_output 0
\docbook_mathml_prefix 1 \docbook_mathml_prefix 1
\docbook_mathml_version 0
\author -443692588 "Hans Wurst" \author -443692588 "Hans Wurst"
\end_header \end_header

View File

@ -1,5 +1,5 @@
#LyX file created by tex2lyx 2.5 #LyX file created by tex2lyx 2.5
\lyxformat 630 \lyxformat 631
\begin_document \begin_document
\begin_header \begin_header
\save_transient_properties true \save_transient_properties true
@ -90,6 +90,7 @@
\html_be_strict false \html_be_strict false
\docbook_table_output 0 \docbook_table_output 0
\docbook_mathml_prefix 1 \docbook_mathml_prefix 1
\docbook_mathml_version 0
\end_header \end_header
\begin_body \begin_body

View File

@ -1,5 +1,5 @@
#LyX file created by tex2lyx 2.5 #LyX file created by tex2lyx 2.5
\lyxformat 630 \lyxformat 631
\begin_document \begin_document
\begin_header \begin_header
\save_transient_properties true \save_transient_properties true
@ -79,6 +79,7 @@
\html_be_strict false \html_be_strict false
\docbook_table_output 0 \docbook_table_output 0
\docbook_mathml_prefix 1 \docbook_mathml_prefix 1
\docbook_mathml_version 0
\end_header \end_header
\begin_body \begin_body