Fix spanish ~n problem.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1352 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Dekel Tsur 2001-01-20 14:16:01 +00:00
parent a410ecbf08
commit eb09176297
7 changed files with 85 additions and 53 deletions

View File

@ -0,0 +1,5 @@
2001-01-20 Dekel Tsur <dekelts@tau.ac.il>
* languages: Add extra_options field.

View File

@ -1,51 +1,51 @@
# name babel name GUI name RTL? encoding code
afrikaans afrikaans "Afrikaans" false iso8859-1 af_ZA
american american "American" false iso8859-1 en_US
arabic arabic "Arabic" true iso8859-6 ar_SA
austrian austrian "Austrian" false iso8859-1 de_AU
bahasa bahasa "Bahasa" false iso8859-1 in_ID
brazil brazil "Brazil" false iso8859-1 pt_BR
breton breton "Breton" false iso8859-1 br_FR
british british "British" false iso8859-1 en_GB
canadian canadian "Canadian" false iso8859-1 en_CA
canadien frenchb "French Canadian" false iso8859-1 fr_CA
catalan catalan "Catalan" false iso8859-1 ca_ES
croatian croatian "Croatian" false iso8859-2 hr
czech czech "Czech" false iso8859-2 cs_CZ
danish danish "Danish" false iso8859-1 da_DK
dutch dutch "Dutch" false iso8859-1 nl
english english "English" false iso8859-1 en
esperanto esperanto "Esperanto" false iso8859-3 eo
# name babel name GUI name RTL? encoding code latex options
afrikaans afrikaans "Afrikaans" false iso8859-1 af_ZA ""
american american "American" false iso8859-1 en_US ""
arabic arabic "Arabic" true iso8859-6 ar_SA ""
austrian austrian "Austrian" false iso8859-1 de_AU ""
bahasa bahasa "Bahasa" false iso8859-1 in_ID ""
brazil brazil "Brazil" false iso8859-1 pt_BR ""
breton breton "Breton" false iso8859-1 br_FR ""
british british "British" false iso8859-1 en_GB ""
canadian canadian "Canadian" false iso8859-1 en_CA ""
canadien frenchb "French Canadian" false iso8859-1 fr_CA ""
catalan catalan "Catalan" false iso8859-1 ca_ES ""
croatian croatian "Croatian" false iso8859-2 hr ""
czech czech "Czech" false iso8859-2 cs_CZ ""
danish danish "Danish" false iso8859-1 da_DK ""
dutch dutch "Dutch" false iso8859-1 nl ""
english english "English" false iso8859-1 en ""
esperanto esperanto "Esperanto" false iso8859-3 eo ""
#and what country code should esperanto have?? (Garst)
estonian estonian "Estonian" false iso8859-4 et_EE
finnish finnish "Finnish" false iso8859-1 fi
frenchb frenchb "French" false iso8859-1 fr
french french "French (GUTenberg)" false iso8859-1 fr
galician galician "Galician" false iso8859-1 gl_ES
estonian estonian "Estonian" false iso8859-4 et_EE ""
finnish finnish "Finnish" false iso8859-1 fi ""
frenchb frenchb "French" false iso8859-1 fr ""
french french "French (GUTenberg)" false iso8859-1 fr ""
galician galician "Galician" false iso8859-1 gl_ES ""
# There are two Galicia's one in Spain one in E.Europe. Because of
# the font encoding I am assuming this is the one in Spain. (Garst)
german german "German" false iso8859-1 de
ngerman ngerman "German (new spelling)" false iso8859-1 de
greek greek "Greek" false iso8859-7 el_GR
hebrew hebrew "Hebrew" true cp1255 he_IL
#hungarian hungarian "Hungarian" false iso8859-2 ""
irish irish "Irish" false iso8859-1 ga_IE
italian italian "Italian" false iso8859-1 it
lsorbian lsorbian "Lsorbian" false iso8859-2 ""
german german "German" false iso8859-1 de ""
ngerman ngerman "German (new spelling)" false iso8859-1 de ""
greek greek "Greek" false iso8859-7 el_GR ""
hebrew hebrew "Hebrew" true cp1255 he_IL ""
#hungarian hungarian "Hungarian" false iso8859-2 "" ""
irish irish "Irish" false iso8859-1 ga_IE ""
italian italian "Italian" false iso8859-1 it ""
lsorbian lsorbian "Lsorbian" false iso8859-2 "" ""
# no ISO listing for lsorbian (Garst)
magyar magyar "Magyar" false iso8859-2 hu
norsk norsk "Norsk" false iso8859-1 no_NO
polish polish "Polish" false iso8859-2 pl
portuges portuges "Portuges" false iso8859-1 pt
romanian romanian "Romanian" false iso8859-2 ro
russian russian "Russian" false koi8 ru
scottish scottish "Scottish" false iso8859-1 gd_GB
spanish spanish "Spanish" false iso8859-1 es
slovak slovak "Slovak" false iso8859-2 sk_SL
slovene slovene "Slovene" false iso8859-2 sl_SI
swedish swedish "Swedish" false iso8859-1 sv_SE
turkish turkish "Turkish" false iso8859-9 tr
ukrainian ukranian "Ukraninian" false koi8 uk
usorbian usorbian "Usorbian" false iso8859-2 ""
magyar magyar "Magyar" false iso8859-2 hu ""
norsk norsk "Norsk" false iso8859-1 no_NO ""
polish polish "Polish" false iso8859-2 pl ""
portuges portuges "Portuges" false iso8859-1 pt ""
romanian romanian "Romanian" false iso8859-2 ro ""
russian russian "Russian" false koi8 ru ""
scottish scottish "Scottish" false iso8859-1 gd_GB "
spanish spanish "Spanish" false iso8859-1 es "\addto\extrasspanish{\bbl@deactivate{~}}"
slovak slovak "Slovak" false iso8859-2 sk_SL ""
slovene slovene "Slovene" false iso8859-2 sl_SI ""
swedish swedish "Swedish" false iso8859-1 sv_SE ""
turkish turkish "Turkish" false iso8859-9 tr ""
ukrainian ukranian "Ukraninian" false koi8 uk ""
usorbian usorbian "Usorbian" false iso8859-2 "" ""
# no ISO listing for usorbian (Garst)
welsh welsh "Welsh" false iso8859-1 cy_GB
welsh welsh "Welsh" false iso8859-1 cy_GB ""

View File

@ -1,3 +1,11 @@
2001-01-20 Dekel Tsur <dekelts@tau.ac.il>
* language.C (latex_options_): New field.
* LaTeXFeatures.C (getMacros): Add language macros.
* buffer.C (makeLaTeXFile): Small fix.
2001-01-19 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
* lyxfunc.C: fix the name of the inset for LFUN_CHILDINSERT

View File

@ -346,6 +346,13 @@ string const LaTeXFeatures::getMacros()
}
}
for (LanguageList::const_iterator cit = UsedLanguages.begin();
cit != UsedLanguages.end(); ++cit)
if (!(*cit)->latex_options().empty())
macros += (*cit)->latex_options() + '\n';
if (!params.language->latex_options().empty())
macros += params.language->latex_options() + '\n';
return macros;
}

View File

@ -1709,7 +1709,9 @@ void Buffer::makeLaTeXFile(string const & fname,
// language should be a parameter to \documentclass
bool use_babel = false;
if (params.language->babel() == "hebrew") // This seems necessary
if (params.language->babel() == "hebrew"
&& default_language->babel() != "hebrew")
// This seems necessary
features.UsedLanguages.insert(default_language);
#ifdef DO_USE_DEFAULT_LANGUAGE
if (params.language->lang() != "default" ||

View File

@ -27,7 +27,7 @@ using std::endl;
Languages languages;
Language const * english_language;
Language const * default_language;
Language ignore_lang("ignore", "ignore", "Ignore", false, 0, "ignore");
Language ignore_lang("ignore", "ignore", "Ignore", false, 0, "ignore", "");
Language const * ignore_language = &ignore_lang;
void Languages::setDefaults()
@ -35,7 +35,7 @@ void Languages::setDefaults()
languagelist["english"] = Language("english", "english", N_("English"),
false,
encodings.getEncoding("iso8859-1"),
"en");
"en", "");
english_language = default_language = &languagelist["english"];
}
@ -44,7 +44,7 @@ void Languages::read(string const & filename)
LyXLex lex(0, 0);
lex.setFile(filename);
while (lex.IsOK()) {
string lang, babel, display, encoding_str, code;
string lang, babel, display, encoding_str, code, latex_options;
bool rtl = false;
if (lex.next())
@ -63,6 +63,8 @@ void Languages::read(string const & filename)
encoding_str = lex.GetString();
if (lex.next())
code = lex.GetString();
if (lex.next())
latex_options = lex.GetString();
Encoding const * encoding = encodings.getEncoding(encoding_str);
if (!encoding) {
@ -70,7 +72,8 @@ void Languages::read(string const & filename)
lyxerr << "Unknown encoding " << encoding_str << endl;
}
languagelist[lang] = Language(lang, babel, display, rtl, encoding, code);
languagelist[lang] = Language(lang, babel, display, rtl,
encoding, code, latex_options);
}
#ifdef DO_USE_DEFAULT_LANGUAGE

View File

@ -28,9 +28,10 @@ public:
Language() : RightToLeft_(false) {}
///
Language(string const & l, string const & b, string const & d,
bool rtl, Encoding const * e, string const & c)
bool rtl, Encoding const * e, string const & c,
string const & o)
: lang_(l), babel_(b), display_(d), RightToLeft_(rtl),
encoding_(e), code_(c)
encoding_(e), code_(c), latex_options_(o)
{}
///
string const & lang() const {
@ -56,6 +57,10 @@ public:
string const & code() const {
return code_;
}
///
string const & latex_options() const {
return latex_options_;
}
private:
///
string lang_;
@ -69,6 +74,8 @@ private:
Encoding const * encoding_;
///
string code_;
///
string latex_options_;
};
class Languages