]> git.lyx.org Git - features.git/commitdiff
Add a floating landscape inset
authorJuergen Spitzmueller <spitz@lyx.org>
Wed, 18 Apr 2018 14:20:19 +0000 (16:20 +0200)
committerJuergen Spitzmueller <spitz@lyx.org>
Wed, 18 Apr 2018 14:20:19 +0000 (16:20 +0200)
lib/chkconfig.ltx
lib/doc/LaTeXConfig.lyx
lib/layouts/landscape.module
lib/lyx2lyx/lyx_2_4.py
src/LaTeXFeatures.cpp

index 7dc6812030e3b614ac07ae75f1fd9f3821f3ecc4..95a72ff7dfbae4740ed96c0633777a2d0b8bd588 100644 (file)
 \TestPackage{a0poster}
 \TestPackage{accents}
 \TestPackage{achicago}
+\TestPackage{afterpage}
 \TestPackage{algorithm}
 \TestPackage{algorithm2e}
 \TestPackage{amsmath}
index 9b95b3b25921bc4fbdc37496e006c3b9a6bfb839..6bbbe2b077a3154599f36014539caa7345a4d88f 100644 (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
index 15ca77be4c9705c655ff90eee50a0ebfd72aae15..c6f081ba6edabd2f38bbedbf0fdf0b55d473b758 100644 (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
index 17821ec80bdde174b1736d1ab68fc20b71938a4f..c4b023b6057fcd96ba19cbf82b016b4c22bfa712 100644 (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
 
index 0f91e891078007e6e0f2dfb3ec269e52775cf1cf..dddfc2e66602165ba4a301e87e8dd200a9043eb0 100644 (file)
@@ -971,6 +971,7 @@ char const * simplefeatures[] = {
        "varwidth",
        "footnote",
        "tablefootnote",
+       "afterpage",
 };
 
 char const * bibliofeatures[] = {