mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-24 21:55:29 +00:00
Support for the NewTX Math fonts (newtx, libertine, minion)
This commit is contained in:
parent
a41dcb5768
commit
ba1d137769
@ -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
|
||||
|
@ -369,6 +369,8 @@
|
||||
\TestPackage{mdput}
|
||||
\TestPackage{mdugm}
|
||||
\TestPackage{MinionPro}
|
||||
\TestPackage[zmnr.pfb]{minion2newtx}
|
||||
\TestPackage{newtxmath}
|
||||
\TestPackage{tgadventor}
|
||||
\TestPackage{tgbonum}
|
||||
\TestPackage{tgchorus}
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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]],
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user