]> git.lyx.org Git - features.git/commitdiff
Support for the NewTX Math fonts (newtx, libertine, minion)
authorJuergen Spitzmueller <spitz@lyx.org>
Sun, 23 Sep 2012 16:33:04 +0000 (18:33 +0200)
committerJuergen Spitzmueller <spitz@lyx.org>
Sun, 23 Sep 2012 16:33:04 +0000 (18:33 +0200)
development/FORMAT
lib/chkconfig.ltx
lib/doc/LaTeXConfig.lyx
lib/latexfonts
lib/lyx2lyx/lyx_2_1.py
src/version.h

index 2de49747168bfbbfaebeabd9b1b66d973a51d3fe..b028fb1954e502fee1f2b8c9823c725b84504279 100644 (file)
@@ -11,6 +11,12 @@ adjustments are made to tex2lyx and bugs are fixed in lyx2lyx.
 
 -----------------------
 
+2012-09-23 Jürgen Spitzmüller <spitz@lyx.org>
+       * Format incremented to 442: support for the newtxmath fonts:
+         - \usepackage{newtxmath} > \math_font newtxmath
+         - \usepackage[libertine]{newtxmath} > \math_font libertine-ntxm
+         - \usepackage[minion]{newtxmath} > \math_font minion-ntxm
+
 2012-09-23 Jürgen Spitzmüller <spitz@lyx.org>
        * Format incremented to 441:
          - rename fonts: mdbch > md-charter, mdput > md-utopia, mdugm > md-garamond
index e2be1a8341f83e3eaf046d1dfe923554fa9b8bd4..3a6f424b29eadb96dfee76a0eb79f8e6ed19b24e 100644 (file)
 \TestPackage{mdput}
 \TestPackage{mdugm}
 \TestPackage{MinionPro}
+\TestPackage[zmnr.pfb]{minion2newtx}
+\TestPackage{newtxmath}
 \TestPackage{tgadventor}
 \TestPackage{tgbonum}
 \TestPackage{tgchorus}
index c05272dc3795d971ce55871958f9c284c62f3f33..5342e2c4e6d1cabdb5c0ea4053bf64018a1624f6 100644 (file)
@@ -1,5 +1,5 @@
 #LyX 2.1 created this file. For more info see http://www.lyx.org/
-\lyxformat 440
+\lyxformat 442
 \begin_document
 \begin_header
 \textclass article
@@ -790,6 +790,69 @@ MinionPro
  separately (please consult the MinionPro package manual for details).
 \end_layout
 
+\begin_layout Subsection
+NewTX Math
+\end_layout
+
+\begin_layout Description
+Found: 
+\begin_inset Info
+type  "package"
+arg   "newtxmath"
+\end_inset
+
+
+\end_layout
+
+\begin_layout Description
+CTAN: 
+\family typewriter
+fonts/newtx
+\end_layout
+
+\begin_layout Description
+Notes: The 
+\family sans
+newtxmath
+\family default
+ package provides support for matching math fonts for 
+\emph on
+Times Roman
+\emph default
+ (or 
+\emph on
+NewTX
+\emph default
+), 
+\emph on
+Libertine
+\emph default
+ and 
+\emph on
+MinionPro
+\emph default
+.
+ Please note that 
+\emph on
+MinionPro
+\emph default
+ support requires the supplementary 
+\family sans
+minion2newtx
+\family default
+ package (found: 
+\begin_inset Info
+type  "package"
+arg   "minion2newtx"
+\end_inset
+
+) as well as external fonts (please consult the 
+\family sans
+minion2newtx
+\family default
+ documentation for details).
+\end_layout
+
 \begin_layout Subsection
 psnfss
 \end_layout
index 9a897392544bc6e487e9d1b961742834e0ca2c3e..a0658cf195edbdadddf1c2fe9f5956a08226612a 100644 (file)
@@ -502,3 +502,27 @@ Font eulervm
        Family           math
        Package          eulervm
 EndFont
+
+Font libertine-ntxm
+       GuiName          "Libertine (New TX)"
+       Family           math
+       Package          newtxmath
+       PackageOption    libertine
+       Provides         amssymb,amsfonts
+EndFont
+
+Font minion-ntxm
+       GuiName          "Minion Pro (New TX)"
+       Family           math
+       Package          newtxmath
+       PackageOption    minion
+       Requires         minion2newtx
+       Provides         amssymb,amsfonts
+EndFont
+
+Font newtxmath
+       GuiName          "Times Roman (New TX)"
+       Family           math
+       Package          newtxmath
+       Provides         amssymb,amsfonts
+EndFont
index b1c82f5c06bd9bf314da4c6b9344e2eb2263e01f..acb36d5a3560fb3d2148d18239eb9bac7de35b9f 100644 (file)
@@ -839,7 +839,7 @@ def revert_libertine(document):
             if osf:
                 preamble += "[osf]"
                 document.header[j] = "\\font_osf false"
-            preamble += "{libertine}"
+            preamble += "{libertine-type1}"
             add_to_preamble(document, [preamble])
             document.header[i] = "\\font_roman default"
 
@@ -1082,6 +1082,24 @@ def convert_mdnomath(document):
              document.header[i] = "\\font_roman %s" % mathdesign_dict[val]
 
 
+def revert_newtxmath(document):
+    " Revert native newtxmath definitions to LaTeX " 
+
+    i = find_token(document.header, "\\font_math", 0)
+    if i == -1:
+       return
+    if find_token(document.header, "\\use_non_tex_fonts false", 0) != -1: 
+        val = get_value(document.header, "\\font_math", i)
+        mathfont_dict = {
+        "libertine-ntxm":  "\\usepackage[libertine]{newtxmath}",
+        "minion-ntxm":  "\\usepackage[minion]{newtxmath}",
+        "newtxmath":  "\\usepackage{newtxmath}",
+        }
+        if val in mathfont_dict.keys():
+            add_to_preamble(document, mathfont_dict[val])
+            document.header[i] = "\\font_math auto"
+
+
 ##
 # Conversion hub
 #
@@ -1115,10 +1133,12 @@ convert = [
            [438, []],
            [439, []],
            [440, []],
-           [441, [convert_mdnomath]]
+           [441, [convert_mdnomath]],
+           [442, []]
           ]
 
 revert =  [
+           [441, [revert_newtxmath]],
            [440, [revert_mdnomath]],
            [439, [revert_mathfonts]],
            [438, [revert_minionpro]],
index 9fbc5e3fd3dc47e8bd9fb41f92833be5fb5d103f..f3252ef2d203ac9ef6dacf50b2d9b2b2f1d1f74e 100644 (file)
@@ -30,8 +30,8 @@ extern char const * const lyx_version_info;
 
 // Do not remove the comment below, so we get merge conflict in
 // independent branches. Instead add your own.
-#define LYX_FORMAT_LYX 441 // spitz: mathdesign tex font changes
-#define LYX_FORMAT_TEX2LYX 441 // spitz: mathdesign tex font changes
+#define LYX_FORMAT_LYX 442 // spitz: support for newtxmath
+#define LYX_FORMAT_TEX2LYX 442 // spitz: support for newtxmath
 
 #if LYX_FORMAT_TEX2LYX != LYX_FORMAT_LYX
 #ifndef _MSC_VER