Fixes for Farsi:

- Bufferparams.cpp: set correct font encoding for Farsi
- lib/languages: define quotation marks for Farsi

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18858 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Uwe Stöhr 2007-06-22 22:23:37 +00:00
parent 7cb5868e03
commit 31c99e6b37
2 changed files with 11 additions and 3 deletions

View File

@ -25,7 +25,8 @@ english english "English" false iso8859-15 en_US ""
# Esperanto has no country code
esperanto esperanto "Esperanto" false iso8859-3 eo ""
estonian estonian "Estonian" false iso8859-15 et_EE ""
farsi farsi "Farsi" true utf8 fa_IR ""
# the definitions are only used due to bugs in the arabi-package - remove them if they become unnecessary!
farsi farsi "Farsi" true utf8 fa_IR "\DeclareTextSymbol{\guillemotright}{LFE}{62}\DeclareTextSymbol{\guillemotleft}{LFE}{60}"
finnish finnish "Finnish" false iso8859-15 fi_FI ""
# We redefine \og and \fg (guillemets) for older french language definitions
french french "French" false iso8859-15 fr_FR "\addto\extrasfrench{\providecommand{\og}{\leavevmode\flqq~}\providecommand{\fg}{\ifdim\lastskip>\z@\unskip\fi~\frqq}}"

View File

@ -892,8 +892,15 @@ bool BufferParams::writeLaTeX(odocstream & os, LaTeXFeatures & features,
if (fontsDefaultFamily != "default")
os << "\\renewcommand{\\familydefault}{\\"
<< from_ascii(fontsDefaultFamily) << "}\n";
// set font encoding
// this one is not per buffer
if (lyxrc.fontenc != "default") {
// for Farsi we also need to load the LAE and LFE encoding
if (lyxrc.fontenc != "default" && language->lang() == "farsi") {
os << "\\usepackage[" << from_ascii(lyxrc.fontenc)
<< ",LFE,LAE]{fontenc}\n";
texrow.newline();
} else {
os << "\\usepackage[" << from_ascii(lyxrc.fontenc)
<< "]{fontenc}\n";
texrow.newline();
@ -1144,7 +1151,7 @@ bool BufferParams::writeLaTeX(odocstream & os, LaTeXFeatures & features,
lyxpreamble += from_utf8(features.getBabelOptions());
}
lyxpreamble += "\\makeatother\n";
lyxpreamble += "\\makeatother\n\n";
int const nlines =
int(lyx::count(lyxpreamble.begin(), lyxpreamble.end(), '\n'));