mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 18:08:10 +00:00
* src/BufferParams.{cpp, h}
* src/graphics/PreviewLoader.cpp: - make member writeEncodingPreamble void. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18543 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
cf8d0ca56b
commit
bd997f2cb9
@ -907,7 +907,7 @@ bool BufferParams::writeLaTeX(odocstream & os, LaTeXFeatures & features,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// handle inputenc etc.
|
// handle inputenc etc.
|
||||||
os << writeEncodingPreamble(features, texrow);
|
writeEncodingPreamble(os, features, texrow);
|
||||||
|
|
||||||
if (!listings_params.empty()) {
|
if (!listings_params.empty()) {
|
||||||
os << "\\usepackage{listings}\n";
|
os << "\\usepackage{listings}\n";
|
||||||
@ -1369,11 +1369,9 @@ string const BufferParams::babelCall(string const & lang_opts) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
docstring const BufferParams::writeEncodingPreamble(LaTeXFeatures & features,
|
void BufferParams::writeEncodingPreamble(odocstream & os,
|
||||||
TexRow & texrow) const
|
LaTeXFeatures & features, TexRow & texrow) const
|
||||||
{
|
{
|
||||||
odocstringstream os;
|
|
||||||
|
|
||||||
if (inputenc == "auto") {
|
if (inputenc == "auto") {
|
||||||
string const doc_encoding =
|
string const doc_encoding =
|
||||||
language->encoding()->latexName();
|
language->encoding()->latexName();
|
||||||
@ -1429,8 +1427,6 @@ docstring const BufferParams::writeEncodingPreamble(LaTeXFeatures & features,
|
|||||||
os << "\\usepackage{armtex}\n";
|
os << "\\usepackage{armtex}\n";
|
||||||
texrow.newline();
|
texrow.newline();
|
||||||
}
|
}
|
||||||
|
|
||||||
return os.str();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -254,7 +254,7 @@ public:
|
|||||||
/// set up if and how babel is called
|
/// set up if and how babel is called
|
||||||
std::string const babelCall(std::string const & lang_opts) const;
|
std::string const babelCall(std::string const & lang_opts) const;
|
||||||
/// handle inputenc etc.
|
/// handle inputenc etc.
|
||||||
docstring const writeEncodingPreamble(LaTeXFeatures & features,
|
void writeEncodingPreamble(odocstream & os, LaTeXFeatures & features,
|
||||||
TexRow & texrow) const;
|
TexRow & texrow) const;
|
||||||
/// set up the document fonts
|
/// set up the document fonts
|
||||||
std::string const loadFonts(std::string const & rm,
|
std::string const loadFonts(std::string const & rm,
|
||||||
|
@ -594,7 +594,7 @@ void PreviewLoader::Impl::startLoading()
|
|||||||
of << "\\batchmode\n";
|
of << "\\batchmode\n";
|
||||||
dumpPreamble(of);
|
dumpPreamble(of);
|
||||||
// handle inputenc etc.
|
// handle inputenc etc.
|
||||||
of << buffer_.params().writeEncodingPreamble(features, texrow);
|
buffer_.params().writeEncodingPreamble(of, features, texrow);
|
||||||
of << "\n\\begin{document}\n";
|
of << "\n\\begin{document}\n";
|
||||||
dumpData(of, inprogress.snippets);
|
dumpData(of, inprogress.snippets);
|
||||||
of << "\n\\end{document}\n";
|
of << "\n\\end{document}\n";
|
||||||
|
Loading…
Reference in New Issue
Block a user