The branch, master, has been updated.

- Log -----------------------------------------------------------------

commit ba1d137769423af8cddd31c6f21f1ab5374c0397
Author: Juergen Spitzmueller <sp...@lyx.org>
Date:   Sun Sep 23 18:33:04 2012 +0200

    Support for the NewTX Math fonts (newtx, libertine, minion)

diff --git a/development/FORMAT b/development/FORMAT
index 2de4974..b028fb1 100644
--- a/development/FORMAT
+++ b/development/FORMAT
@@ -12,6 +12,12 @@ adjustments are made to tex2lyx and bugs are fixed in 
lyx2lyx.
 -----------------------
 
 2012-09-23 Jürgen Spitzmüller <sp...@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 <sp...@lyx.org>
        * Format incremented to 441:
          - rename fonts: mdbch > md-charter, mdput > md-utopia, mdugm > 
md-garamond
          - add support for the mathdesign fonts without loading mathfonts
diff --git a/lib/chkconfig.ltx b/lib/chkconfig.ltx
index e2be1a8..3a6f424 100644
--- a/lib/chkconfig.ltx
+++ b/lib/chkconfig.ltx
@@ -369,6 +369,8 @@
 \TestPackage{mdput}
 \TestPackage{mdugm}
 \TestPackage{MinionPro}
+\TestPackage[zmnr.pfb]{minion2newtx}
+\TestPackage{newtxmath}
 \TestPackage{tgadventor}
 \TestPackage{tgbonum}
 \TestPackage{tgchorus}
diff --git a/lib/doc/LaTeXConfig.lyx b/lib/doc/LaTeXConfig.lyx
index c05272d..5342e2c 100644
--- a/lib/doc/LaTeXConfig.lyx
+++ b/lib/doc/LaTeXConfig.lyx
@@ -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
@@ -791,6 +791,69 @@ MinionPro
 \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
 
diff --git a/lib/latexfonts b/lib/latexfonts
index 9a89739..a0658cf 100644
--- a/lib/latexfonts
+++ b/lib/latexfonts
@@ -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
diff --git a/lib/lyx2lyx/lyx_2_1.py b/lib/lyx2lyx/lyx_2_1.py
index b1c82f5..acb36d5 100644
--- a/lib/lyx2lyx/lyx_2_1.py
+++ b/lib/lyx2lyx/lyx_2_1.py
@@ -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]],
diff --git a/src/version.h b/src/version.h
index 9fbc5e3..f3252ef 100644
--- a/src/version.h
+++ b/src/version.h
@@ -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

-----------------------------------------------------------------------

Summary of changes:
 development/FORMAT      |    6 ++++
 lib/chkconfig.ltx       |    2 +
 lib/doc/LaTeXConfig.lyx |   65 ++++++++++++++++++++++++++++++++++++++++++++++-
 lib/latexfonts          |   24 +++++++++++++++++
 lib/lyx2lyx/lyx_2_1.py  |   24 ++++++++++++++++-
 src/version.h           |    4 +-
 6 files changed, 120 insertions(+), 5 deletions(-)


hooks/post-receive
-- 
The LyX Source Repository

Reply via email to