Also add support for URW Garamond math fonts (via newtx)

This commit is contained in:
Juergen Spitzmueller 2012-12-04 12:55:47 +01:00
parent 53626a8beb
commit a84a98b545
5 changed files with 31 additions and 3 deletions

View File

@ -15,6 +15,7 @@ adjustments are made to tex2lyx and bugs are fixed in lyx2lyx.
* Format incremented to 450: Support for the URW Garamond LaTeX fonts.
- \usepackage{garamondx} > \font_serif garamondx
- [osf], [osfI] > \font_osf true
- \usepackage[garamondx]{newtxmath} > \font_math garamondx-ntxm
Also (fallback):
- \renewcommand{\sffamily}{ugm} > \font_serif garamondx

View File

@ -956,7 +956,7 @@ newtxmath
\family default
package provides support for matching math fonts for
\emph on
Times Roman
URW Garamond, Times Roman
\emph default
(or
\emph on
@ -1877,6 +1877,11 @@ arg "garamondx-fonts"
garamondx
\family default
package provides old style figures.
Matching math fonts are provided by
\emph on
URW Garamond (NewTX)
\emph default
.
As a fallback, the package
\family sans
ugm

View File

@ -533,6 +533,14 @@ Font eulervm
Package eulervm
EndFont
Font garamondx-ntxm
GuiName "URW Garamond (New TX)"
Family math
Package newtxmath
PackageOption garamondx
Provides amssymb,amsfonts
EndFont
Font libertine-ntxm
GuiName "Libertine (New TX)"
Family math

View File

@ -1795,6 +1795,19 @@ def revert_itemargs(document):
i = i + 1
def revert_garamondx_newtxmath(document):
" Revert native garamond newtxmath definition 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)
if val == "garamondx-ntxm":
add_to_preamble(document, "\\usepackage[garamondx]{newtxmath}")
document.header[i] = "\\font_math auto"
def revert_garamondx(document):
" Revert native garamond font definition to LaTeX "
@ -1859,7 +1872,7 @@ convert = [
]
revert = [
[449, [revert_garamondx]],
[449, [revert_garamondx, revert_garamondx_newtxmath]],
[448, [revert_itemargs]],
[447, [revert_literate]],
[446, [revert_IEEEtran, revert_AASTeX, revert_AGUTeX, revert_IJMP, revert_SIGPLAN, revert_SIGGRAPH, revert_EuropeCV]],

View File

@ -83,7 +83,8 @@ Format LaTeX feature LyX feature
447
448
449 \item[<arg>] \begin_inset Argument item:<nr>
450 garamondx.sty, ugm LaTeX font \font_roman, \font_osf
450 garamondx.sty, ugm LaTeX font, \font_roman, \font_osf,
[garamondx]{newtxmath} \font_math
General