mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
More no-math fonts
For the sake of completeness, it is now also possible to load fourier and the mathdesign fonts without changing the default math font.
This commit is contained in:
parent
46826a9188
commit
5170489b98
@ -11,9 +11,14 @@ adjustments are made to tex2lyx and bugs are fixed in lyx2lyx.
|
|||||||
|
|
||||||
-----------------------
|
-----------------------
|
||||||
|
|
||||||
|
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
|
||||||
|
- add support for the mathdesign fonts without loading mathfonts
|
||||||
|
(via \renewcommand{\rmfamily}{mdbch|mdput|mdugm}
|
||||||
|
|
||||||
2012-09-22 Jürgen Spitzmüller <spitz@lyx.org>
|
2012-09-22 Jürgen Spitzmüller <spitz@lyx.org>
|
||||||
* Format incremented to 440
|
* Format incremented to 440:
|
||||||
Math (TeX) font UI.
|
Math (TeX) font UI.
|
||||||
New Buffer param "\math_font <value>",
|
New Buffer param "\math_font <value>",
|
||||||
supported values are:
|
supported values are:
|
||||||
|
@ -160,7 +160,7 @@ AltFont lmr
|
|||||||
Requires lmodern
|
Requires lmodern
|
||||||
EndFont
|
EndFont
|
||||||
|
|
||||||
Font mdbch
|
Font md-charter
|
||||||
GuiName "Bitstream Charter (Mathdesign)"
|
GuiName "Bitstream Charter (Mathdesign)"
|
||||||
Family rm
|
Family rm
|
||||||
OsfOption expert
|
OsfOption expert
|
||||||
@ -170,9 +170,17 @@ Font mdbch
|
|||||||
PackageOption charter
|
PackageOption charter
|
||||||
Requires mdbch
|
Requires mdbch
|
||||||
Provides amssymb,amsfonts
|
Provides amssymb,amsfonts
|
||||||
|
NoMathFont mdbch
|
||||||
EndFont
|
EndFont
|
||||||
|
|
||||||
Font mdput
|
AltFont mdbch
|
||||||
|
GuiName "Bitstream Charter (Mathdesign)"
|
||||||
|
Family rm
|
||||||
|
SwitchDefault 1
|
||||||
|
Requires mdbch
|
||||||
|
EndFont
|
||||||
|
|
||||||
|
Font md-utopia
|
||||||
GuiName "Utopia (Mathdesign)"
|
GuiName "Utopia (Mathdesign)"
|
||||||
Family rm
|
Family rm
|
||||||
OsfOption expert
|
OsfOption expert
|
||||||
@ -182,9 +190,17 @@ Font mdput
|
|||||||
PackageOption utopia
|
PackageOption utopia
|
||||||
Requires mdput
|
Requires mdput
|
||||||
Provides amssymb,amsfonts
|
Provides amssymb,amsfonts
|
||||||
|
NoMathFont mdput
|
||||||
EndFont
|
EndFont
|
||||||
|
|
||||||
Font mdugm
|
AltFont mdput
|
||||||
|
GuiName "Utopia (Mathdesign)"
|
||||||
|
Family rm
|
||||||
|
SwitchDefault 1
|
||||||
|
Requires mdput
|
||||||
|
EndFont
|
||||||
|
|
||||||
|
Font md-garamond
|
||||||
GuiName "Adobe Garamond (Mathdesign)"
|
GuiName "Adobe Garamond (Mathdesign)"
|
||||||
Family rm
|
Family rm
|
||||||
OsfOption expert
|
OsfOption expert
|
||||||
@ -194,6 +210,14 @@ Font mdugm
|
|||||||
PackageOption garamond
|
PackageOption garamond
|
||||||
Requires mdugm
|
Requires mdugm
|
||||||
Provides amssymb,amsfonts
|
Provides amssymb,amsfonts
|
||||||
|
NoMathFont mdugm
|
||||||
|
EndFont
|
||||||
|
|
||||||
|
AltFont mdugm
|
||||||
|
GuiName "Adobe Garamond (Mathdesign)"
|
||||||
|
Family rm
|
||||||
|
SwitchDefault 1
|
||||||
|
Requires mdugm
|
||||||
EndFont
|
EndFont
|
||||||
|
|
||||||
Font minionpro
|
Font minionpro
|
||||||
@ -327,6 +351,7 @@ Font utopia
|
|||||||
Package fourier
|
Package fourier
|
||||||
AltFonts utopia-sty
|
AltFonts utopia-sty
|
||||||
OT1Font utopia-sty
|
OT1Font utopia-sty
|
||||||
|
NoMathFont futs
|
||||||
EndFont
|
EndFont
|
||||||
|
|
||||||
AltFont utopia-sty
|
AltFont utopia-sty
|
||||||
@ -335,6 +360,19 @@ AltFont utopia-sty
|
|||||||
Package utopia
|
Package utopia
|
||||||
EndFont
|
EndFont
|
||||||
|
|
||||||
|
AltFont futs
|
||||||
|
GuiName "Utopia (Fourier)"
|
||||||
|
Family rm
|
||||||
|
SwitchDefault 1
|
||||||
|
OsfFont futj
|
||||||
|
EndFont
|
||||||
|
|
||||||
|
AltFont futj
|
||||||
|
GuiName "Utopia (Fourier)"
|
||||||
|
Family rm
|
||||||
|
SwitchDefault 1
|
||||||
|
EndFont
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# SANS SERIF FONTS
|
# SANS SERIF FONTS
|
||||||
@ -463,4 +501,4 @@ Font eulervm
|
|||||||
GuiName "Euler VM"
|
GuiName "Euler VM"
|
||||||
Family math
|
Family math
|
||||||
Package eulervm
|
Package eulervm
|
||||||
EndFont
|
EndFont
|
||||||
|
@ -1023,6 +1023,8 @@ def revert_mathfonts(document):
|
|||||||
"palatino": "\\renewcommand{\\rmdefault}{ppl}",
|
"palatino": "\\renewcommand{\\rmdefault}{ppl}",
|
||||||
"palatino-osf": "\\renewcommand{\\rmdefault}{pplj}",
|
"palatino-osf": "\\renewcommand{\\rmdefault}{pplj}",
|
||||||
"times": "\\renewcommand{\\rmdefault}{ptm}",
|
"times": "\\renewcommand{\\rmdefault}{ptm}",
|
||||||
|
"utopia": "\\renewcommand{\\rmdefault}{futs}",
|
||||||
|
"utopia-osf": "\\renewcommand{\\rmdefault}{futj}",
|
||||||
}
|
}
|
||||||
j = find_token(document.header, "\\font_roman", 0)
|
j = find_token(document.header, "\\font_roman", 0)
|
||||||
if j != -1:
|
if j != -1:
|
||||||
@ -1037,6 +1039,49 @@ def revert_mathfonts(document):
|
|||||||
document.header[k] = "\\font_osf false"
|
document.header[k] = "\\font_osf false"
|
||||||
del document.header[i]
|
del document.header[i]
|
||||||
|
|
||||||
|
|
||||||
|
def revert_mdnomath(document):
|
||||||
|
" Revert mathdesign and fourier without math "
|
||||||
|
|
||||||
|
if find_token(document.header, "\\use_non_tex_fonts false", 0) != -1:
|
||||||
|
mathdesign_dict = {
|
||||||
|
"md-charter": "mdbch",
|
||||||
|
"md-utopia": "mdput",
|
||||||
|
"md-garamond": "mdugm"
|
||||||
|
}
|
||||||
|
i = find_token(document.header, "\\font_roman", 0)
|
||||||
|
if i == -1:
|
||||||
|
return
|
||||||
|
val = get_value(document.header, "\\font_roman", i)
|
||||||
|
if val in mathdesign_dict.keys():
|
||||||
|
j = find_token(document.header, "\\font_math", 0)
|
||||||
|
if j == -1:
|
||||||
|
document.header[i] = "\\font_roman %s" % mathdesign_dict[val]
|
||||||
|
mval = get_value(document.header, "\\font_math", j)
|
||||||
|
if mval == "default":
|
||||||
|
document.header[i] = "\\font_roman default"
|
||||||
|
add_to_preamble(document, "\\renewcommand{\\rmdefault}{%s}" % mathdesign_dict[val])
|
||||||
|
else:
|
||||||
|
document.header[i] = "\\font_roman %s" % mathdesign_dict[val]
|
||||||
|
|
||||||
|
|
||||||
|
def convert_mdnomath(document):
|
||||||
|
" Change mathdesign font name "
|
||||||
|
|
||||||
|
if find_token(document.header, "\\use_non_tex_fonts false", 0) != -1:
|
||||||
|
mathdesign_dict = {
|
||||||
|
"mdbch": "md-charter",
|
||||||
|
"mdput": "md-utopia",
|
||||||
|
"mdugm": "md-garamond"
|
||||||
|
}
|
||||||
|
i = find_token(document.header, "\\font_roman", 0)
|
||||||
|
if i == -1:
|
||||||
|
return
|
||||||
|
val = get_value(document.header, "\\font_roman", i)
|
||||||
|
if val in mathdesign_dict.keys():
|
||||||
|
document.header[i] = "\\font_roman %s" % mathdesign_dict[val]
|
||||||
|
|
||||||
|
|
||||||
##
|
##
|
||||||
# Conversion hub
|
# Conversion hub
|
||||||
#
|
#
|
||||||
@ -1069,10 +1114,12 @@ convert = [
|
|||||||
[437, []],
|
[437, []],
|
||||||
[438, []],
|
[438, []],
|
||||||
[439, []],
|
[439, []],
|
||||||
[440, []]
|
[440, []],
|
||||||
|
[441, [convert_mdnomath]]
|
||||||
]
|
]
|
||||||
|
|
||||||
revert = [
|
revert = [
|
||||||
|
[440, [revert_mdnomath]],
|
||||||
[439, [revert_mathfonts]],
|
[439, [revert_mathfonts]],
|
||||||
[438, [revert_minionpro]],
|
[438, [revert_minionpro]],
|
||||||
[437, [revert_ipadeco, revert_ipachar]],
|
[437, [revert_ipadeco, revert_ipachar]],
|
||||||
|
@ -30,8 +30,8 @@ extern char const * const lyx_version_info;
|
|||||||
|
|
||||||
// Do not remove the comment below, so we get merge conflict in
|
// Do not remove the comment below, so we get merge conflict in
|
||||||
// independent branches. Instead add your own.
|
// independent branches. Instead add your own.
|
||||||
#define LYX_FORMAT_LYX 440 // spitz: basic UI for math (TeX) fonts
|
#define LYX_FORMAT_LYX 441 // spitz: mathdesign tex font changes
|
||||||
#define LYX_FORMAT_TEX2LYX 440 // spitz: basic UI for math (TeX) fonts
|
#define LYX_FORMAT_TEX2LYX 441 // spitz: mathdesign tex font changes
|
||||||
|
|
||||||
#if LYX_FORMAT_TEX2LYX != LYX_FORMAT_LYX
|
#if LYX_FORMAT_TEX2LYX != LYX_FORMAT_LYX
|
||||||
#ifndef _MSC_VER
|
#ifndef _MSC_VER
|
||||||
|
Loading…
Reference in New Issue
Block a user