From: Uwe Stöhr Date: Mon, 3 Apr 2017 22:19:14 +0000 (+0200) Subject: tex2lyx: support for the cochineal fonts X-Git-Tag: 2.3.0alpha1~132 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=86cd1a9c97e550c88ccc9078e9985ca6a1bfb0e6;p=features.git tex2lyx: support for the cochineal fonts --- diff --git a/src/tex2lyx/Preamble.cpp b/src/tex2lyx/Preamble.cpp index 96df0a0f70..26563f818c 100644 --- a/src/tex2lyx/Preamble.cpp +++ b/src/tex2lyx/Preamble.cpp @@ -125,9 +125,10 @@ const char * const known_old_language_packages[] = {"french", "frenchle", char const * const known_fontsizes[] = { "10pt", "11pt", "12pt", 0 }; const char * const known_roman_fonts[] = { "ae", "beraserif", "bookman", -"ccfonts", "chancery", "charter", "cmr", "fourier", "garamondx", "libertine", -"libertine-type1", "lmodern", "mathdesign", "mathpazo", "mathptmx", "newcent", -"tgbonum", "tgchorus", "tgpagella", "tgschola", "tgtermes", "utopia", 0}; +"ccfonts", "chancery", "charter", "cmr", "cochineal", "crimson", "fourier", +"garamondx", "libertine", "libertine-type1", "lmodern", "mathdesign", "mathpazo", +"mathptmx", "newcent", "tgbonum", "tgchorus", "tgpagella", "tgschola", "tgtermes", +"utopia", 0}; const char * const known_sans_fonts[] = { "avant", "berasans", "biolinum-type1", "cmbr", "cmss", "helvet", "iwona", "iwonac", "iwonal", "iwonalc", "kurier", @@ -748,6 +749,17 @@ void Preamble::handle_package(Parser &p, string const & name, else if (name == "mathptmx") h_font_roman[0] = "times"; + if (name == "crimson") + h_font_roman[0] = "cochineal"; + + if (name == "cochineal") { + h_font_roman[0] = "cochineal"; + // cochineal can have several options, e.g. [proportional,osf] + string::size_type pos = opts.find("osf"); + if (pos != string::npos) + h_font_osf = "true"; + } + // sansserif fonts if (is_known(name, known_sans_fonts)) { h_font_sans[0] = name; @@ -799,6 +811,8 @@ void Preamble::handle_package(Parser &p, string const & name, h_font_math[0] = "libertine-ntxm"; else if (opts == "minion") h_font_math[0] = "minion-ntxm"; + else if (opts == "cochineal") + h_font_math[0] = "cochineal-ntxm"; } if (name == "iwona") diff --git a/src/tex2lyx/TODO.txt b/src/tex2lyx/TODO.txt index 3017998709..111d6b319f 100644 --- a/src/tex2lyx/TODO.txt +++ b/src/tex2lyx/TODO.txt @@ -100,11 +100,6 @@ Format LaTeX feature LyX feature 523 CJK Quote Styles InsetQuote - cjk (corner brackets) \begin_inset Quotes j.. - cjkangle (angle brackets) \begin_inset Quotes k.. -524 Crimson/Cochineal fonts \font_roman, \font_math - \usepackage{cochineal} \font_roman "cochineal" "" - - [osf] \font_osf true - \usepackage{crimson} \font_roman "cochineal" "" - \usepackage[cochineal]{newtxmath} \font_math "cochineal-ntxm" "" 526 Plural and capitalized refstyles InsetRef 528 Biblatex