Add a floating landscape inset

This commit is contained in:
Juergen Spitzmueller 2018-04-18 16:20:19 +02:00
parent 1ceb38ab34
commit 97e1806c4a
5 changed files with 52 additions and 2 deletions

View File

@ -271,6 +271,7 @@
\TestPackage{a0poster}
\TestPackage{accents}
\TestPackage{achicago}
\TestPackage{afterpage}
\TestPackage{algorithm}
\TestPackage{algorithm2e}
\TestPackage{amsmath}

View File

@ -6280,6 +6280,39 @@ literal "false"
.
\end_layout
\begin_layout Subsection
Landscape module
\end_layout
\begin_layout Subsubsection
afterpage
\end_layout
\begin_layout Description
Found:
\begin_inset Info
type "package"
arg "afterpage"
\end_inset
\end_layout
\begin_layout Description
CTAN:
\family typewriter
macros/latex/required/tools/
\end_layout
\begin_layout Description
Notes: The package
\family sans
afterpage
\family default
provides a command to shift content after the next page break (used for
gloating landscape).
\end_layout
\begin_layout Subsection
Linguistics module
\end_layout

View File

@ -21,3 +21,12 @@ InsetLayout Flex:Landscape
EndFont
Requires lscape
End
InsetLayout Flex:Landscape_(Floating)
CopyStyle Flex:Landscape
LatexType none
LabelString "Landscape (floating)"
LeftDelim \afterpage{\begin{landscape}<br/>
RightDelim <br/>\end{landscape}}
Requires lscape,afterpage
End

View File

@ -170,8 +170,14 @@ def revert_lscape(document):
i += 1
continue
document.body[j - 2 : j + 1] = put_cmd_in_ert("\\end{landscape}")
document.body[i : i + 4] = put_cmd_in_ert("\\begin{landscape}")
if document.body[i] == "\\begin_inset Flex Landscape (Floating)":
document.body[j - 2 : j + 1] = put_cmd_in_ert("\\end{landscape}}")
document.body[i : i + 4] = put_cmd_in_ert("\\afterpage{\\begin{landscape}")
add_to_preamble(document, ["\\usepackage{afterpage}"])
else:
document.body[j - 2 : j + 1] = put_cmd_in_ert("\\end{landscape}")
document.body[i : i + 4] = put_cmd_in_ert("\\begin{landscape}")
add_to_preamble(document, ["\\usepackage{pdflscape}"])
# no need to reset i

View File

@ -971,6 +971,7 @@ char const * simplefeatures[] = {
"varwidth",
"footnote",
"tablefootnote",
"afterpage",
};
char const * bibliofeatures[] = {