mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
Simplify ERT by using verbatim
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21121 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
31df080af2
commit
5ab6d5bf65
@ -89,6 +89,7 @@ End
|
||||
|
||||
InsetLayout ERT
|
||||
LabelString ERT
|
||||
LatexType none
|
||||
Decoration minimalistic
|
||||
Font
|
||||
Color latex
|
||||
@ -99,6 +100,7 @@ InsetLayout ERT
|
||||
Size Small
|
||||
EndFont
|
||||
MultiPar true
|
||||
Verbatim true
|
||||
End
|
||||
|
||||
InsetLayout Branch
|
||||
|
@ -139,30 +139,10 @@ docstring const InsetERT::editMessage() const
|
||||
}
|
||||
|
||||
|
||||
int InsetERT::latex(Buffer const &, odocstream & os,
|
||||
OutputParams const &) const
|
||||
int InsetERT::latex(Buffer const & buf, odocstream & os,
|
||||
OutputParams const & op) const
|
||||
{
|
||||
ParagraphList::const_iterator par = paragraphs().begin();
|
||||
ParagraphList::const_iterator end = paragraphs().end();
|
||||
|
||||
int lines = 0;
|
||||
while (par != end) {
|
||||
pos_type siz = par->size();
|
||||
for (pos_type i = 0; i < siz; ++i) {
|
||||
// ignore all struck out text
|
||||
if (par->isDeleted(i))
|
||||
continue;
|
||||
|
||||
os.put(par->getChar(i));
|
||||
}
|
||||
++par;
|
||||
if (par != end) {
|
||||
os << "\n";
|
||||
++lines;
|
||||
}
|
||||
}
|
||||
|
||||
return lines;
|
||||
return InsetCollapsable::latex(buf, os, op);
|
||||
}
|
||||
|
||||
|
||||
@ -176,6 +156,7 @@ int InsetERT::plaintext(Buffer const &, odocstream &,
|
||||
int InsetERT::docbook(Buffer const &, odocstream & os,
|
||||
OutputParams const &) const
|
||||
{
|
||||
// FIXME can we do the same thing here as for LaTeX?
|
||||
ParagraphList::const_iterator par = paragraphs().begin();
|
||||
ParagraphList::const_iterator end = paragraphs().end();
|
||||
|
||||
|
@ -558,7 +558,7 @@ TeXOnePar(Buffer const & buf,
|
||||
if (closing_rtl_ltr_environment)
|
||||
os << "}";
|
||||
|
||||
if (pending_newline) {
|
||||
if (pending_newline && !runparams.verbatim) {
|
||||
os << '\n';
|
||||
texrow.newline();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user