mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-05 13:26:21 +00:00
Support for the mathdesign fonts (#6072)
This commit is contained in:
parent
6dd333b432
commit
b501845b2c
@ -11,6 +11,10 @@ adjustments are made to tex2lyx and bugs are fixed in lyx2lyx.
|
||||
|
||||
-----------------------
|
||||
|
||||
2012-08-18 Jürgen Spitzmüller <spitz@lyx.org>
|
||||
* Format incremented to 436
|
||||
Support for the mathdesign LaTeX fonts.
|
||||
|
||||
2012-08-17 Jürgen Spitzmüller <spitz@lyx.org>
|
||||
* Format incremented to 435
|
||||
Support for the txtt LaTeX font.
|
||||
|
@ -362,6 +362,10 @@
|
||||
\TestPackage{libertine}
|
||||
\TestPackage{lmodern}
|
||||
\TestPackage{luximono}
|
||||
\TestPackage{mathdesign}% For Roman fonts
|
||||
\TestPackage{mdbch}
|
||||
\TestPackage{mdput}
|
||||
\TestPackage{mdugm}
|
||||
\TestPackage{tipa}
|
||||
\TestPackage{tipx}
|
||||
\TestPackage{txfonts}% For the txtt monospaced font
|
||||
@ -381,7 +385,7 @@
|
||||
%\TestPackage{txfonts}% But see above!
|
||||
%\TestPackage{pxfonts}
|
||||
%\TestPackage{mathabx}
|
||||
%\TestPackage{mathdesign}
|
||||
%\TestPackage{mathdesign}% But see above!
|
||||
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
@ -1,5 +1,5 @@
|
||||
#LyX 2.1 created this file. For more info see http://www.lyx.org/
|
||||
\lyxformat 435
|
||||
\lyxformat 436
|
||||
\begin_document
|
||||
\begin_header
|
||||
\textclass article
|
||||
@ -617,6 +617,110 @@ libertine(-legacy)
|
||||
serif families of fonts.
|
||||
\end_layout
|
||||
|
||||
\begin_layout Subsection
|
||||
Mathdesign
|
||||
\end_layout
|
||||
|
||||
\begin_layout Description
|
||||
Found:
|
||||
\begin_inset Info
|
||||
type "package"
|
||||
arg "mathdesign"
|
||||
\end_inset
|
||||
|
||||
|
||||
\end_layout
|
||||
|
||||
\begin_layout Description
|
||||
CTAN:
|
||||
\family typewriter
|
||||
fonts/mathdesign/
|
||||
\end_layout
|
||||
|
||||
\begin_layout Description
|
||||
Notes: The
|
||||
\family sans
|
||||
mathdesign
|
||||
\family default
|
||||
package provides access to three popular roman fonts and extends them with
|
||||
matching math fonts.
|
||||
If you select one of the following roman fonts in LyX via
|
||||
\family sans
|
||||
\size normal
|
||||
Layout\SpecialChar \menuseparator
|
||||
Document\SpecialChar \menuseparator
|
||||
Fonts
|
||||
\family default
|
||||
\size default
|
||||
, the
|
||||
\family sans
|
||||
mathdesign
|
||||
\family default
|
||||
package and thus the respective math fonts is automatically loaded:
|
||||
\end_layout
|
||||
|
||||
\begin_layout Itemize
|
||||
|
||||
\family sans
|
||||
Adobe Garamond (Mathdesign)
|
||||
\family default
|
||||
.
|
||||
|
||||
\series bold
|
||||
Found:
|
||||
\series default
|
||||
|
||||
\begin_inset Info
|
||||
type "package"
|
||||
arg "mdugm"
|
||||
\end_inset
|
||||
|
||||
|
||||
\end_layout
|
||||
|
||||
\begin_layout Itemize
|
||||
|
||||
\family sans
|
||||
Bitstream Charter (Mathdesign)
|
||||
\family default
|
||||
.
|
||||
|
||||
\series bold
|
||||
Found:
|
||||
\series default
|
||||
|
||||
\begin_inset Info
|
||||
type "package"
|
||||
arg "mdbch"
|
||||
\end_inset
|
||||
|
||||
|
||||
\end_layout
|
||||
|
||||
\begin_layout Itemize
|
||||
|
||||
\family sans
|
||||
Utopia (Mathdesign)
|
||||
\family default
|
||||
.
|
||||
|
||||
\series bold
|
||||
Found:
|
||||
\series default
|
||||
|
||||
\begin_inset Info
|
||||
type "package"
|
||||
arg "mdput"
|
||||
\end_inset
|
||||
|
||||
|
||||
\end_layout
|
||||
|
||||
\begin_layout Standard
|
||||
If you only want the text fonts and retain LaTeX's default math font, select
|
||||
a non-mathdesign variant of the respective font instead.
|
||||
\end_layout
|
||||
|
||||
\begin_layout Subsection
|
||||
psnfss
|
||||
\end_layout
|
||||
@ -652,7 +756,8 @@ psnfss
|
||||
fonts in
|
||||
\family sans
|
||||
\size normal
|
||||
Layout->Document
|
||||
Layout\SpecialChar \menuseparator
|
||||
Document
|
||||
\family default
|
||||
\size default
|
||||
.
|
||||
|
@ -93,7 +93,7 @@ Font chancery
|
||||
EndFont
|
||||
|
||||
Font charter
|
||||
GuiName "Bitstream Charter"
|
||||
GuiName "Bitstream Charter (PSNFSS)"
|
||||
Family rm
|
||||
Package charter
|
||||
EndFont
|
||||
@ -118,6 +118,39 @@ Font lmodern
|
||||
Package lmodern
|
||||
EndFont
|
||||
|
||||
Font mdbch
|
||||
GuiName "Bitstream Charter (Mathdesign)"
|
||||
Family rm
|
||||
OsfOption expert
|
||||
ScOption expert
|
||||
OsfScOption expert
|
||||
Package mathdesign
|
||||
PackageOption charter
|
||||
Requires mdbch
|
||||
EndFont
|
||||
|
||||
Font mdput
|
||||
GuiName "Utopia (Mathdesign)"
|
||||
Family rm
|
||||
OsfOption expert
|
||||
ScOption expert
|
||||
OsfScOption expert
|
||||
Package mathdesign
|
||||
PackageOption utopia
|
||||
Requires mdput
|
||||
EndFont
|
||||
|
||||
Font mdugm
|
||||
GuiName "Adobe Garamond (Mathdesign)"
|
||||
Family rm
|
||||
OsfOption expert
|
||||
ScOption expert
|
||||
OsfScOption expert
|
||||
Package mathdesign
|
||||
PackageOption garamond
|
||||
Requires mdugm
|
||||
EndFont
|
||||
|
||||
Font newcent
|
||||
GuiName "New Century Schoolbook"
|
||||
Family rm
|
||||
@ -146,7 +179,7 @@ EndFont
|
||||
# fourier supersedes utopia.sty, but does
|
||||
# not work with OT1 encoding.
|
||||
Font utopia
|
||||
GuiName "Utopia"
|
||||
GuiName "Utopia (Fourier)"
|
||||
Family rm
|
||||
OsfOption oldstyle
|
||||
ScOption expert
|
||||
|
@ -838,10 +838,10 @@ def revert_libertine(document):
|
||||
preamble = "\\usepackage"
|
||||
if osf:
|
||||
preamble += "[osf]"
|
||||
document.header[j] = "\\font_osf false"
|
||||
preamble += "{libertine}"
|
||||
add_to_preamble(document, [preamble])
|
||||
document.header[i] = "\\font_roman default"
|
||||
document.header[j] = "\\font_osf false"
|
||||
|
||||
|
||||
def revert_txtt(document):
|
||||
@ -855,6 +855,37 @@ def revert_txtt(document):
|
||||
document.header[i] = "\\font_typewriter default"
|
||||
|
||||
|
||||
def revert_mathdesign(document):
|
||||
" Revert native mathdesign font definition to LaTeX "
|
||||
|
||||
if find_token(document.header, "\\use_non_tex_fonts false", 0) != -1:
|
||||
mathdesign_dict = {
|
||||
"mdbch": "charter",
|
||||
"mdput": "utopia",
|
||||
"mdugm": "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():
|
||||
preamble = "\\usepackage[%s" % mathdesign_dict[val]
|
||||
expert = False
|
||||
j = find_token(document.header, "\\font_osf true", 0)
|
||||
if j != -1:
|
||||
expert = True
|
||||
document.header[j] = "\\font_osf false"
|
||||
l = find_token(document.header, "\\font_sc true", 0)
|
||||
if l != -1:
|
||||
expert = True
|
||||
document.header[l] = "\\font_sc false"
|
||||
if expert:
|
||||
preamble += ",expert"
|
||||
preamble += "]{mathdesign}"
|
||||
add_to_preamble(document, [preamble])
|
||||
document.header[i] = "\\font_roman default"
|
||||
|
||||
|
||||
##
|
||||
# Conversion hub
|
||||
#
|
||||
@ -882,10 +913,12 @@ convert = [
|
||||
[432, []],
|
||||
[433, [convert_armenian]],
|
||||
[434, []],
|
||||
[435, []]
|
||||
[435, []],
|
||||
[436, []]
|
||||
]
|
||||
|
||||
revert = [
|
||||
[434, [revert_mathdesign]],
|
||||
[434, [revert_txtt]],
|
||||
[433, [revert_libertine]],
|
||||
[432, [revert_armenian]],
|
||||
|
@ -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 435 // spitz: support for the txtt font
|
||||
#define LYX_FORMAT_TEX2LYX 435 // spitz: support for the txtt font
|
||||
#define LYX_FORMAT_LYX 436 // spitz: support for the mathdesign fonts
|
||||
#define LYX_FORMAT_TEX2LYX 436 // spitz: support for the mathdesign fonts
|
||||
|
||||
#if LYX_FORMAT_TEX2LYX != LYX_FORMAT_LYX
|
||||
#ifndef _MSC_VER
|
||||
|
Loading…
Reference in New Issue
Block a user