]> git.lyx.org Git - features.git/commitdiff
tex2lyx: support for the cochineal fonts
authorUwe Stöhr <uwestoehr@lyx.org>
Mon, 3 Apr 2017 22:19:14 +0000 (00:19 +0200)
committerUwe Stöhr <uwestoehr@lyx.org>
Mon, 3 Apr 2017 22:19:14 +0000 (00:19 +0200)
src/tex2lyx/Preamble.cpp
src/tex2lyx/TODO.txt

index 96df0a0f70cc1f540dfab76d7933acd9aa481b23..26563f818c2d1f863fb1572672201548c27fc5f8 100644 (file)
@@ -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")
index 3017998709c5fabb81edb22726733b16ad002541..111d6b319f6b23319b250dfcb1f94b73648c44ff 100644 (file)
@@ -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" "<nontexfont>"
-       - [osf]                              \font_osf true
-       \usepackage{crimson}                  \font_roman "cochineal" "<nontexfont>"
-       \usepackage[cochineal]{newtxmath}     \font_math "cochineal-ntxm" "<nontexfont>"
 526
        Plural and capitalized refstyles      InsetRef
 528    Biblatex