mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-12 22:14:35 +00:00
XHTML sections: saner code to close the section.
It only caused troubles in corner cases...
This commit is contained in:
parent
a85b4b88ed
commit
c83fd0eb06
192
autotests/export/xhtml/A0_Poster_Simple.lyx
Normal file
192
autotests/export/xhtml/A0_Poster_Simple.lyx
Normal file
@ -0,0 +1,192 @@
|
|||||||
|
#LyX 2.4 created this file. For more info see https://www.lyx.org/
|
||||||
|
\lyxformat 598
|
||||||
|
\begin_document
|
||||||
|
\begin_header
|
||||||
|
\save_transient_properties true
|
||||||
|
\origin unavailable
|
||||||
|
\textclass a0poster
|
||||||
|
\begin_preamble
|
||||||
|
% Adjust padding in boxes
|
||||||
|
\setlength\fboxsep{12pt}
|
||||||
|
% Added by lyx2lyx
|
||||||
|
\setlength{\parskip}{\bigskipamount}
|
||||||
|
\setlength{\parindent}{0pt}
|
||||||
|
\end_preamble
|
||||||
|
\options a0,portrait
|
||||||
|
\use_default_options false
|
||||||
|
\maintain_unincluded_children no
|
||||||
|
\language english
|
||||||
|
\language_package default
|
||||||
|
\inputencoding utf8
|
||||||
|
\fontencoding auto
|
||||||
|
\font_roman "palatino" "default"
|
||||||
|
\font_sans "default" "default"
|
||||||
|
\font_typewriter "courier" "default"
|
||||||
|
\font_math "auto" "auto"
|
||||||
|
\font_default_family default
|
||||||
|
\use_non_tex_fonts false
|
||||||
|
\font_sc false
|
||||||
|
\font_roman_osf false
|
||||||
|
\font_sans_osf false
|
||||||
|
\font_typewriter_osf false
|
||||||
|
\font_sf_scale 100 100
|
||||||
|
\font_tt_scale 100 100
|
||||||
|
\use_microtype false
|
||||||
|
\use_dash_ligatures false
|
||||||
|
\graphics default
|
||||||
|
\default_output_format default
|
||||||
|
\output_sync 0
|
||||||
|
\bibtex_command default
|
||||||
|
\index_command default
|
||||||
|
\paperfontsize default
|
||||||
|
\spacing single
|
||||||
|
\use_hyperref false
|
||||||
|
\papersize default
|
||||||
|
\use_geometry true
|
||||||
|
\use_package amsmath 1
|
||||||
|
\use_package amssymb 1
|
||||||
|
\use_package cancel 1
|
||||||
|
\use_package esint 1
|
||||||
|
\use_package mathdots 1
|
||||||
|
\use_package mathtools 1
|
||||||
|
\use_package mhchem 1
|
||||||
|
\use_package stackrel 1
|
||||||
|
\use_package stmaryrd 1
|
||||||
|
\use_package undertilde 1
|
||||||
|
\cite_engine basic
|
||||||
|
\cite_engine_type default
|
||||||
|
\biblio_style plain
|
||||||
|
\use_bibtopic false
|
||||||
|
\use_indices false
|
||||||
|
\paperorientation portrait
|
||||||
|
\suppress_date false
|
||||||
|
\justification true
|
||||||
|
\use_refstyle 0
|
||||||
|
\use_minted 0
|
||||||
|
\use_lineno 0
|
||||||
|
\index Index
|
||||||
|
\shortcut idx
|
||||||
|
\color #008000
|
||||||
|
\end_index
|
||||||
|
\leftmargin 1cm
|
||||||
|
\topmargin 1cm
|
||||||
|
\rightmargin 1cm
|
||||||
|
\bottommargin 1cm
|
||||||
|
\secnumdepth 0
|
||||||
|
\tocdepth 0
|
||||||
|
\paragraph_separation indent
|
||||||
|
\paragraph_indentation default
|
||||||
|
\is_math_indent 0
|
||||||
|
\math_numbering_side default
|
||||||
|
\quotes_style english
|
||||||
|
\dynamic_quotes 0
|
||||||
|
\papercolumns 1
|
||||||
|
\papersides 1
|
||||||
|
\paperpagestyle empty
|
||||||
|
\tablestyle default
|
||||||
|
\tracking_changes false
|
||||||
|
\output_changes false
|
||||||
|
\change_bars false
|
||||||
|
\postpone_fragile_content false
|
||||||
|
\html_math_output 0
|
||||||
|
\html_css_as_file 0
|
||||||
|
\html_be_strict false
|
||||||
|
\docbook_table_output 0
|
||||||
|
\end_header
|
||||||
|
|
||||||
|
\begin_body
|
||||||
|
|
||||||
|
\begin_layout Standard
|
||||||
|
\align center
|
||||||
|
\begin_inset Box Shadowbox
|
||||||
|
position "c"
|
||||||
|
hor_pos "c"
|
||||||
|
has_inner_box 1
|
||||||
|
inner_pos "c"
|
||||||
|
use_parbox 1
|
||||||
|
use_makebox 0
|
||||||
|
width "98col%"
|
||||||
|
special "none"
|
||||||
|
height "5cm"
|
||||||
|
height_special "none"
|
||||||
|
thickness "0.4pt"
|
||||||
|
separation "3pt"
|
||||||
|
shadowsize "4pt"
|
||||||
|
framecolor "black"
|
||||||
|
backgroundcolor "none"
|
||||||
|
status open
|
||||||
|
|
||||||
|
\begin_layout Plain Layout
|
||||||
|
\noindent
|
||||||
|
\align center
|
||||||
|
|
||||||
|
\series bold
|
||||||
|
\noun on
|
||||||
|
\begin_inset Flex Most Giant Snippet
|
||||||
|
status open
|
||||||
|
|
||||||
|
\begin_layout Plain Layout
|
||||||
|
\noindent
|
||||||
|
|
||||||
|
\series bold
|
||||||
|
\noun on
|
||||||
|
Poster Heading
|
||||||
|
\end_layout
|
||||||
|
|
||||||
|
\end_inset
|
||||||
|
|
||||||
|
|
||||||
|
\end_layout
|
||||||
|
|
||||||
|
\end_inset
|
||||||
|
|
||||||
|
|
||||||
|
\end_layout
|
||||||
|
|
||||||
|
\begin_layout Standard
|
||||||
|
\begin_inset Box Boxed
|
||||||
|
position "t"
|
||||||
|
hor_pos "c"
|
||||||
|
has_inner_box 1
|
||||||
|
inner_pos "t"
|
||||||
|
use_parbox 0
|
||||||
|
use_makebox 0
|
||||||
|
width "98col%"
|
||||||
|
special "none"
|
||||||
|
height "1in"
|
||||||
|
height_special "totalheight"
|
||||||
|
thickness "0.4pt"
|
||||||
|
separation "3pt"
|
||||||
|
shadowsize "4pt"
|
||||||
|
framecolor "black"
|
||||||
|
backgroundcolor "none"
|
||||||
|
status open
|
||||||
|
|
||||||
|
\begin_layout Section
|
||||||
|
Summary
|
||||||
|
\end_layout
|
||||||
|
|
||||||
|
\begin_layout Itemize
|
||||||
|
For multiple columns, use the
|
||||||
|
\begin_inset Quotes eld
|
||||||
|
\end_inset
|
||||||
|
|
||||||
|
Multiple Columns
|
||||||
|
\begin_inset Quotes erd
|
||||||
|
\end_inset
|
||||||
|
|
||||||
|
module as documented in
|
||||||
|
\family sans
|
||||||
|
Help\SpecialChar menuseparator
|
||||||
|
Additional Features
|
||||||
|
\family default
|
||||||
|
.
|
||||||
|
\end_layout
|
||||||
|
|
||||||
|
\end_inset
|
||||||
|
|
||||||
|
|
||||||
|
\end_layout
|
||||||
|
|
||||||
|
\end_body
|
||||||
|
\end_document
|
59
autotests/export/xhtml/A0_Poster_Simple.xhtml
Normal file
59
autotests/export/xhtml/A0_Poster_Simple.xhtml
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head>
|
||||||
|
<meta name="GENERATOR" content="LyX 2.4.0dev" />
|
||||||
|
<meta http-equiv="Content-type" content="text/html;charset=UTF-8" />
|
||||||
|
<title>LyX Document</title>
|
||||||
|
<style type='text/css'>
|
||||||
|
/* Layout-provided Styles */
|
||||||
|
dfn.lyxnoun {
|
||||||
|
font-variant: small-caps;
|
||||||
|
}
|
||||||
|
div.standard {
|
||||||
|
margin-bottom: 2ex;
|
||||||
|
}
|
||||||
|
div.plain_layout {
|
||||||
|
text-align: left;
|
||||||
|
|
||||||
|
}
|
||||||
|
h2.section {
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: x-large;
|
||||||
|
margin-top: 1.3ex;
|
||||||
|
margin-bottom: 0.7ex;
|
||||||
|
text-align: left;
|
||||||
|
|
||||||
|
}
|
||||||
|
ul.itemize {
|
||||||
|
margin-top: 0.7ex;
|
||||||
|
margin-bottom: 0.7ex;
|
||||||
|
margin-left: 3ex;
|
||||||
|
text-align: left;
|
||||||
|
|
||||||
|
}
|
||||||
|
div.Shadowbox { border: solid gray medium; border-bottom: solid black 1ex; border-right: solid black 1ex; padding: 0.5ex; }
|
||||||
|
span.flex_most_giant_snippet {
|
||||||
|
font-size: xx-large;
|
||||||
|
}
|
||||||
|
div.Boxed {
|
||||||
|
border: solid thick black;
|
||||||
|
padding: 0.5ex;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body dir="auto">
|
||||||
|
<div class="standard" style='text-align: center;' id='magicparlabel-1'><div class='Shadowbox' style='width: 98%; height: 5cm; '><div class="plain_layout" style='text-align: center;' id='magicparlabel-5'><dfn class='lyxnoun'><b><span class="flex_most_giant_snippet"><dfn class='lyxnoun'><b>Poster Heading</b></dfn></span></b></dfn></div>
|
||||||
|
</div></div>
|
||||||
|
|
||||||
|
<div class="standard" id='magicparlabel-10'><div class='Boxed' style='width: 98%; '><section>
|
||||||
|
<h2 class="section" id='magicparlabel-14'><span class="section_label"></span> Summary</h2>
|
||||||
|
<ul class="itemize" id='magicparlabel-15'>
|
||||||
|
<li class="itemize_item">For multiple columns, use the “Multiple Columns” module as documented in <span style='font-family:sans-serif;'>Help⇒Additional Features</span>.</li>
|
||||||
|
</ul>
|
||||||
|
</section>
|
||||||
|
</div></div>
|
||||||
|
</body>
|
||||||
|
</html>
|
@ -679,9 +679,8 @@ void xhtmlParagraphs(Text const & text,
|
|||||||
// If need be, close <section>s, but only at the end of the document (otherwise, dealt with at the beginning
|
// If need be, close <section>s, but only at the end of the document (otherwise, dealt with at the beginning
|
||||||
// of the loop).
|
// of the loop).
|
||||||
while (!headerLevels.empty() && headerLevels.top() != Layout::NOT_IN_TOC) {
|
while (!headerLevels.empty() && headerLevels.top() != Layout::NOT_IN_TOC) {
|
||||||
docstring tag = from_utf8("</section>");
|
|
||||||
headerLevels.pop();
|
headerLevels.pop();
|
||||||
xs << XMLStream::ESCAPE_NONE << tag;
|
xs << xml::EndTag("section");
|
||||||
xs << xml::CR();
|
xs << xml::CR();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user