tex2lyx: support for Iwona fonts

- also correct the support for the Kurier fonts. Thanks to our cleaner implementation, some code can now go.
This commit is contained in:
Uwe Stöhr 2013-03-19 01:18:38 +01:00
parent 575d98664a
commit c669b6f4d2
2 changed files with 4 additions and 24 deletions

View File

@ -129,8 +129,8 @@ const char * const known_roman_fonts[] = { "ae", "beraserif", "bookman",
"tgbonum", "tgchorus", "tgpagella", "tgschola", "tgtermes", "utopia", 0}; "tgbonum", "tgchorus", "tgpagella", "tgschola", "tgtermes", "utopia", 0};
const char * const known_sans_fonts[] = { "avant", "berasans", "biolinum-type1", const char * const known_sans_fonts[] = { "avant", "berasans", "biolinum-type1",
"cmbr", "cmss", "helvet", "iwona", "iwonal", "kurier", "kurierl", "lmss", "cmbr", "cmss", "helvet", "iwona", "iwonac", "iwonal", "iwonalc", "kurier",
"tgadventor", "tgheros", 0}; "kurierc", "kurierl", "kurierlc", "lmss", "tgadventor", "tgheros", 0};
const char * const known_kurier_fonts[] = { "kurier", "kurierl", const char * const known_kurier_fonts[] = { "kurier", "kurierl",
"kurier-condensed", "kurier-light-condensed", 0}; "kurier-condensed", "kurier-light-condensed", 0};
@ -1498,12 +1498,6 @@ void Preamble::parse(Parser & p, string const & forceclass,
p.skip_spaces(); p.skip_spaces();
in_lyx_preamble = true; in_lyx_preamble = true;
} }
if (name == "\\bfdefault")
// LyX re-adds this if a kurier font is used
if (is_known(h_font_sans, known_kurier_fonts) && body == "b") {
p.skip_spaces();
in_lyx_preamble = true;
}
// remove the lyxdot definition that is re-added by LyX // remove the lyxdot definition that is re-added by LyX
// if necessary // if necessary
@ -1534,22 +1528,6 @@ void Preamble::parse(Parser & p, string const & forceclass,
in_lyx_preamble = was_in_lyx_preamble; in_lyx_preamble = was_in_lyx_preamble;
} }
else if (t.cs() == "edef"){
// we only support this for kurier fonts
string const command = p.next_token().asInput();
p.get_token();
if (command == "\\sfdefault") {
p.getArg('{', '}');
if (h_font_sans == "kurier")
h_font_sans = "kurier-condensed";
if (h_font_sans == "kurierl")
h_font_sans = "kurier-light-condensed";
p.skip_spaces();
}
else
h_preamble << "\\edef" << command << "{" << p.getArg('{', '}') << "}\n";
}
else if (t.cs() == "documentclass") { else if (t.cs() == "documentclass") {
vector<string>::iterator it; vector<string>::iterator it;
vector<string> opts = split_options(p.getArg('[', ']')); vector<string> opts = split_options(p.getArg('[', ']'));

View File

@ -80,6 +80,7 @@ Format LaTeX feature LyX feature
459 beamer: \begin{frame}, \begin_layout Frame 459 beamer: \begin{frame}, \begin_layout Frame
\begin{frame}[plain], \begin_layout PlainFrame \begin{frame}[plain], \begin_layout PlainFrame
\begin{frame}[fragile] \begin_layout FragileFrame \begin{frame}[fragile] \begin_layout FragileFrame
461 support for kurier math font (the other kurier fonts are already supported)
462 New libertine LaTeX fonts: 462 New libertine LaTeX fonts:
\usepackage[scale|scaled|ttscale=$val]{libertineMono-type1} \usepackage[scale|scaled|ttscale=$val]{libertineMono-type1}
\font_typewriter \font_typewriter
@ -97,6 +98,7 @@ Format LaTeX feature LyX feature
\twocolumn[]{}{} Layout Twocolumn, InsetArgument \twocolumn[]{}{} Layout Twocolumn, InsetArgument
\item[]<> InsetArgument \item[]<> InsetArgument
\begin{enumerate|itemize|...}[] InsetArgument \begin{enumerate|itemize|...}[] InsetArgument
467 support for iwona math font (the other iwona fonts are already supported)
General General