mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-11 11:08:41 +00:00
Clean up a bit.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30189 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
cb9b7406b0
commit
25bc89f2a8
@ -567,12 +567,16 @@ int InsetInclude::latex(odocstream & os, OutputParams const & runparams) const
|
|||||||
|
|
||||||
string const tex_format = (runparams.flavor == OutputParams::LATEX) ?
|
string const tex_format = (runparams.flavor == OutputParams::LATEX) ?
|
||||||
"latex" : "pdflatex";
|
"latex" : "pdflatex";
|
||||||
if (isVerbatim(params())) {
|
switch (type(params())) {
|
||||||
|
case VERB:
|
||||||
|
case VERBAST: {
|
||||||
incfile = latex_path(incfile);
|
incfile = latex_path(incfile);
|
||||||
// FIXME UNICODE
|
// FIXME UNICODE
|
||||||
os << '\\' << from_ascii(params().getCmdName()) << '{'
|
os << '\\' << from_ascii(params().getCmdName()) << '{'
|
||||||
<< from_utf8(incfile) << '}';
|
<< from_utf8(incfile) << '}';
|
||||||
} else if (type(params()) == INPUT) {
|
break;
|
||||||
|
}
|
||||||
|
case INPUT: {
|
||||||
runparams.exportdata->addExternalFile(tex_format, writefile,
|
runparams.exportdata->addExternalFile(tex_format, writefile,
|
||||||
exportfile);
|
exportfile);
|
||||||
|
|
||||||
@ -589,7 +593,9 @@ int InsetInclude::latex(odocstream & os, OutputParams const & runparams) const
|
|||||||
os << '\\' << from_ascii(params().getCmdName())
|
os << '\\' << from_ascii(params().getCmdName())
|
||||||
<< '{' << from_utf8(incfile) << '}';
|
<< '{' << from_utf8(incfile) << '}';
|
||||||
}
|
}
|
||||||
} else if (type(params()) == LISTINGS) {
|
break;
|
||||||
|
}
|
||||||
|
case LISTINGS: {
|
||||||
os << '\\' << from_ascii(params().getCmdName());
|
os << '\\' << from_ascii(params().getCmdName());
|
||||||
string const opt = to_utf8(params()["lstparams"]);
|
string const opt = to_utf8(params()["lstparams"]);
|
||||||
// opt is set in QInclude dialog and should have passed validation.
|
// opt is set in QInclude dialog and should have passed validation.
|
||||||
@ -597,7 +603,9 @@ int InsetInclude::latex(odocstream & os, OutputParams const & runparams) const
|
|||||||
if (!params.params().empty())
|
if (!params.params().empty())
|
||||||
os << "[" << from_utf8(params.params()) << "]";
|
os << "[" << from_utf8(params.params()) << "]";
|
||||||
os << '{' << from_utf8(incfile) << '}';
|
os << '{' << from_utf8(incfile) << '}';
|
||||||
} else {
|
break;
|
||||||
|
}
|
||||||
|
case INCLUDE: {
|
||||||
runparams.exportdata->addExternalFile(tex_format, writefile,
|
runparams.exportdata->addExternalFile(tex_format, writefile,
|
||||||
exportfile);
|
exportfile);
|
||||||
|
|
||||||
@ -608,6 +616,8 @@ int InsetInclude::latex(odocstream & os, OutputParams const & runparams) const
|
|||||||
// FIXME UNICODE
|
// FIXME UNICODE
|
||||||
os << '\\' << from_ascii(params().getCmdName()) << '{'
|
os << '\\' << from_ascii(params().getCmdName()) << '{'
|
||||||
<< from_utf8(incfile) << '}';
|
<< from_utf8(incfile) << '}';
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user