mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
Handle forced alignments, at least in ordinary paragraphs.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35395 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
04d6290966
commit
b743c226ca
@ -16765,6 +16765,22 @@ layoutname
|
||||
\end_inset
|
||||
|
||||
is the LyX name of the layout, made lowercase, for example: chapter.
|
||||
This should
|
||||
\emph on
|
||||
not
|
||||
\emph default
|
||||
contain any style information.
|
||||
Use
|
||||
\begin_inset Flex CharStyle:Code
|
||||
status collapsed
|
||||
|
||||
\begin_layout Plain Layout
|
||||
HTMLStyle
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
||||
for that purpose.
|
||||
\end_layout
|
||||
|
||||
\begin_layout Description
|
||||
@ -16913,6 +16929,22 @@ class=`layoutname_item'
|
||||
\end_inset
|
||||
|
||||
.
|
||||
This should
|
||||
\emph on
|
||||
not
|
||||
\emph default
|
||||
contain any style information.
|
||||
Use
|
||||
\begin_inset Flex CharStyle:Code
|
||||
status collapsed
|
||||
|
||||
\begin_layout Plain Layout
|
||||
HTMLStyle
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
||||
for that purpose.
|
||||
\end_layout
|
||||
|
||||
\begin_layout Description
|
||||
@ -17039,6 +17071,22 @@ class=`layoutname_label'
|
||||
\end_inset
|
||||
|
||||
.
|
||||
This should
|
||||
\emph on
|
||||
not
|
||||
\emph default
|
||||
contain any style information.
|
||||
Use
|
||||
\begin_inset Flex CharStyle:Code
|
||||
status collapsed
|
||||
|
||||
\begin_layout Plain Layout
|
||||
HTMLStyle
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
||||
for that purpose.
|
||||
\end_layout
|
||||
|
||||
\begin_layout Description
|
||||
|
@ -491,6 +491,19 @@ inline void openTag(XHTMLStream & xs, Layout const & lay)
|
||||
}
|
||||
|
||||
|
||||
void openTag(XHTMLStream & xs, Layout const & lay, ParagraphParameters const & params)
|
||||
{
|
||||
// FIXME Are there other things we should handle here?
|
||||
string const align = alignmentToCSS(params.align());
|
||||
if (align.empty()) {
|
||||
openTag(xs, lay);
|
||||
return;
|
||||
}
|
||||
string attrs = lay.htmlattr() + " style='text-align: " + align + ";'";
|
||||
xs << html::StartTag(lay.htmltag(), attrs);
|
||||
}
|
||||
|
||||
|
||||
inline void closeTag(XHTMLStream & xs, Layout const & lay)
|
||||
{
|
||||
xs << html::EndTag(lay.htmltag());
|
||||
@ -587,7 +600,7 @@ ParagraphList::const_iterator makeParagraphs(Buffer const & buf,
|
||||
bool const opened = runparams.html_make_pars &&
|
||||
(par != pbegin || !runparams.html_in_par);
|
||||
if (opened)
|
||||
openTag(xs, lay);
|
||||
openTag(xs, lay, par->params());
|
||||
docstring const deferred =
|
||||
par->simpleLyXHTMLOnePar(buf, xs, runparams, text.outerFont(distance(begin, par)));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user