mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-27 22:41:09 +00:00
- UTF-8 works on Windows as well
- We even spit out the right usepackage chant git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15385 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
a2933867d1
commit
8e17851d87
@ -839,6 +839,11 @@ bool BufferParams::writeLaTeX(odocstream & os, LaTeXFeatures & features,
|
|||||||
texrow.newline();
|
texrow.newline();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: Some people want to support more encodings than UTF-8. They can have a field day around here
|
||||||
|
if (true) {
|
||||||
|
os << "\\usepackage[utf8]{inputenc}\n";
|
||||||
|
texrow.newline();
|
||||||
|
} else {
|
||||||
if (inputenc == "auto") {
|
if (inputenc == "auto") {
|
||||||
string const doc_encoding =
|
string const doc_encoding =
|
||||||
language->encoding()->latexName();
|
language->encoding()->latexName();
|
||||||
@ -860,6 +865,7 @@ bool BufferParams::writeLaTeX(odocstream & os, LaTeXFeatures & features,
|
|||||||
<< "]{inputenc}\n";
|
<< "]{inputenc}\n";
|
||||||
texrow.newline();
|
texrow.newline();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (use_geometry || nonstandard_papersize) {
|
if (use_geometry || nonstandard_papersize) {
|
||||||
os << "\\usepackage{geometry}\n";
|
os << "\\usepackage{geometry}\n";
|
||||||
|
@ -292,6 +292,7 @@ TeXOnePar(Buffer const & buf,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (false) {
|
||||||
if (bparams.inputenc == "auto" &&
|
if (bparams.inputenc == "auto" &&
|
||||||
language->encoding() != previous_language->encoding()) {
|
language->encoding() != previous_language->encoding()) {
|
||||||
os << "\\inputencoding{"
|
os << "\\inputencoding{"
|
||||||
@ -299,6 +300,7 @@ TeXOnePar(Buffer const & buf,
|
|||||||
<< "}\n";
|
<< "}\n";
|
||||||
texrow.newline();
|
texrow.newline();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// In an an inset with unlimited length (all in one row),
|
// In an an inset with unlimited length (all in one row),
|
||||||
// don't allow any special options in the paragraph
|
// don't allow any special options in the paragraph
|
||||||
|
@ -666,7 +666,7 @@ void Paragraph::Pimpl::simpleTeXSpecialChars(Buffer const & buf,
|
|||||||
// I assume this is hack treating typewriter as verbatim
|
// I assume this is hack treating typewriter as verbatim
|
||||||
if (font.family() == LyXFont::TYPEWRITER_FAMILY) {
|
if (font.family() == LyXFont::TYPEWRITER_FAMILY) {
|
||||||
if (c != '\0') {
|
if (c != '\0') {
|
||||||
os << c;
|
os.put(c);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -691,7 +691,7 @@ void Paragraph::Pimpl::simpleTeXSpecialChars(Buffer const & buf,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (pnr == phrases_nr && c != '\0') {
|
if (pnr == phrases_nr && c != '\0') {
|
||||||
os << c;
|
os.put(c);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user