mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 01:59:02 +00:00
support for formal math script
- fileformat change - fixes #2340 git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34941 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
6f83641b8e
commit
72292b98a6
@ -7,6 +7,10 @@ The good example would be 2010-01-10 entry.
|
||||
|
||||
-----------------------
|
||||
|
||||
2010-07-17 Uwe Stöhr <uwestoehr@web.de>
|
||||
* Format incremented to 398: support \mathscr;
|
||||
no new parameter but the mathrsfs package will be loaded
|
||||
|
||||
2010-07-16 Richard Heck <rgheck@comcast.net>
|
||||
* Format incremented to 397 (r34920)
|
||||
Remove Nameref support
|
||||
|
@ -276,6 +276,7 @@
|
||||
\TestPackage[lithuanian.ldf]{lithuanian}
|
||||
\TestPackage{longtable}
|
||||
\TestPackage{mathdots}
|
||||
\TestPackage{mathrsfs}
|
||||
\TestPackage{mhchem}
|
||||
\TestPackage[mongolian.ldf]{mongolian}
|
||||
\TestPackage{natbib}
|
||||
|
@ -1,5 +1,5 @@
|
||||
#LyX 2.0.0svn created this file. For more info see http://www.lyx.org/
|
||||
\lyxformat 397
|
||||
\lyxformat 398
|
||||
\begin_document
|
||||
\begin_header
|
||||
\textclass article
|
||||
@ -4672,6 +4672,42 @@ listings
|
||||
etc.
|
||||
\end_layout
|
||||
|
||||
\begin_layout Subsection
|
||||
mathrsfs
|
||||
\end_layout
|
||||
|
||||
\begin_layout Description
|
||||
Found:
|
||||
\begin_inset Info
|
||||
type "package"
|
||||
arg "mathrsfs"
|
||||
\end_inset
|
||||
|
||||
|
||||
\end_layout
|
||||
|
||||
\begin_layout Description
|
||||
CTAN:
|
||||
\family typewriter
|
||||
macros/latex/contrib/jknappen/
|
||||
\end_layout
|
||||
|
||||
\begin_layout Description
|
||||
Notes: The package
|
||||
\family sans
|
||||
mathrsfs
|
||||
\family default
|
||||
is used by LyX to output the math font style
|
||||
\begin_inset Quotes eld
|
||||
\end_inset
|
||||
|
||||
formal script
|
||||
\begin_inset Quotes erd
|
||||
\end_inset
|
||||
|
||||
.
|
||||
\end_layout
|
||||
|
||||
\begin_layout Subsection
|
||||
mhchem
|
||||
\end_layout
|
||||
|
@ -2026,6 +2026,21 @@ def remove_Nameref(document):
|
||||
document.body[cmdloc] = "LatexCommand nameref"
|
||||
|
||||
|
||||
def revert_mathrsfs(document):
|
||||
" Load mathrsfs if \mathrsfs us use in the document "
|
||||
i = 0
|
||||
end = len(document.body) - 1
|
||||
while True:
|
||||
j = document.body[i].find("\\mathscr{")
|
||||
if j != -1:
|
||||
add_to_preamble(document, ["% this command was inserted by lyx2lyx"])
|
||||
add_to_preamble(document, ["\\usepackage{mathrsfs}"])
|
||||
break
|
||||
if i == end:
|
||||
break
|
||||
i += 1
|
||||
|
||||
|
||||
##
|
||||
# Conversion hub
|
||||
#
|
||||
@ -2082,10 +2097,12 @@ convert = [[346, []],
|
||||
[394, []],
|
||||
[395, []],
|
||||
[396, []],
|
||||
[397, [remove_Nameref]]
|
||||
[397, [remove_Nameref]],
|
||||
[398, []]
|
||||
]
|
||||
|
||||
revert = [[396, []],
|
||||
revert = [[397, [revert_mathrsfs]],
|
||||
[396, []],
|
||||
[395, [revert_nameref]],
|
||||
[394, [revert_DIN_C_pagesizes]],
|
||||
[393, [revert_makebox]],
|
||||
|
@ -89,6 +89,7 @@ mathcal font mathmode
|
||||
mathfrak font mathmode
|
||||
mathit font mathmode
|
||||
mathrm font mathmode
|
||||
mathscr font mathmode
|
||||
mathsf font mathmode
|
||||
mathtt font mathmode
|
||||
textnormal font textmode inherit medium up math
|
||||
|
@ -259,6 +259,7 @@ Menuset
|
||||
Item "Math Normal Font|N" "math-font-style mathnormal"
|
||||
Separator
|
||||
Item "Math Calligraphic Family|C" "math-font-style mathcal"
|
||||
Item "Math Formal Script Family|o" "math-font-style mathscr"
|
||||
Item "Math Fraktur Family|F" "math-font-style mathfrak"
|
||||
Item "Math Roman Family|R" "math-font-style mathrm"
|
||||
Item "Math Sans Serif Family|S" "math-font-style mathsf"
|
||||
|
@ -375,6 +375,7 @@ ToolbarSet
|
||||
Item "Blackboard \\mathbb" "math-insert \mathbb"
|
||||
Item "Fraktur \\mathfrak" "math-insert \mathfrak"
|
||||
Item "Calligraphic \\mathcal" "math-insert \mathcal"
|
||||
Item "Formal Script \\mathscr" "math-insert \mathscr"
|
||||
Item "Normal text mode \\textrm" "math-insert \textrm"
|
||||
End
|
||||
|
||||
|
@ -126,7 +126,7 @@ namespace {
|
||||
|
||||
// Do not remove the comment below, so we get merge conflict in
|
||||
// independent branches. Instead add your own.
|
||||
int const LYX_FORMAT = 397; // rgh: remove Nameref support
|
||||
int const LYX_FORMAT = 398; // uwestoehr: support for \mathscr
|
||||
|
||||
typedef map<string, bool> DepClean;
|
||||
typedef map<docstring, pair<InsetLabel const *, Buffer::References> > RefCache;
|
||||
|
@ -57,7 +57,7 @@ namespace {
|
||||
|
||||
char const * GUIFamilyNames[NUM_FAMILIES + 2 /* default & error */] =
|
||||
{ N_("Roman"), N_("Sans Serif"), N_("Typewriter"), N_("Symbol"),
|
||||
"cmr", "cmsy", "cmm", "cmex", "msa", "msb", "eufrak", "wasy", "esint",
|
||||
"cmr", "cmsy", "cmm", "cmex", "msa", "msb", "eufrak", "rsfs", "wasy", "esint",
|
||||
N_("Inherit"), N_("Ignore") };
|
||||
|
||||
char const * GUISeriesNames[4] =
|
||||
|
@ -47,6 +47,8 @@ enum FontFamily {
|
||||
///
|
||||
EUFRAK_FAMILY,
|
||||
///
|
||||
RSFS_FAMILY,
|
||||
///
|
||||
WASY_FAMILY,
|
||||
///
|
||||
ESINT_FAMILY,
|
||||
|
@ -32,8 +32,8 @@ namespace lyx {
|
||||
//
|
||||
char const * LyXFamilyNames[NUM_FAMILIES + 2 /* default & error */] =
|
||||
{ "roman", "sans", "typewriter", "symbol",
|
||||
"cmr", "cmsy", "cmm", "cmex", "msa", "msb", "eufrak", "wasy", "esint",
|
||||
"default", "error" };
|
||||
"cmr", "cmsy", "cmm", "cmex", "msa", "msb", "eufrak", "rsfs", "wasy",
|
||||
"esint", "default", "error" };
|
||||
|
||||
char const * LyXSeriesNames[4] =
|
||||
{ "medium", "bold", "default", "error" };
|
||||
@ -377,6 +377,7 @@ namespace {
|
||||
case MSA_FAMILY:
|
||||
case MSB_FAMILY:
|
||||
case EUFRAK_FAMILY:
|
||||
case RSFS_FAMILY:
|
||||
case WASY_FAMILY:
|
||||
case ESINT_FAMILY:
|
||||
case INHERIT_FAMILY:
|
||||
|
@ -77,6 +77,7 @@ SymbolFont symbol_fonts[] = {
|
||||
{ MSA_FAMILY, "msam10", "-*-msam10-*-*-*-*-*-*-*-*-*-*-*-*" },
|
||||
{ MSB_FAMILY, "msbm10", "-*-msbm10-*-*-*-*-*-*-*-*-*-*-*-*" },
|
||||
{ EUFRAK_FAMILY,"eufm10", "-*-eufm10-medium-*-*-*-*-*-*-*-*-*-*-*" },
|
||||
{ RSFS_FAMILY, "rsfs10", "-*-rsfs10-medium-*-*-*-*-*-*-*-*-*-*-*" },
|
||||
{ WASY_FAMILY, "wasy10", "-*-wasy10-medium-*-*-*-*-*-*-*-*-*-*-*" },
|
||||
{ ESINT_FAMILY, "esint10","-*-esint10-medium-*-*-*-*-*-*-*-*-*-*-*" }
|
||||
};
|
||||
|
@ -100,6 +100,8 @@ void InsetMathFont::validate(LaTeXFeatures & features) const
|
||||
if (key_->name == "text" || key_->name == "textnormal"
|
||||
|| (key_->name.length() == 6 && key_->name.substr(0, 4) == "text"))
|
||||
features.require("amstext");
|
||||
if (key_->name == "mathscr")
|
||||
features.require("mathrsfs");
|
||||
if (key_->name == "textipa")
|
||||
features.require("tipa");
|
||||
if (key_->name == "ce" || key_->name == "cf")
|
||||
|
@ -179,6 +179,8 @@ void initSymbols()
|
||||
tmp.requires = from_ascii("amssymb");
|
||||
else if (tmp.inset == "wasy")
|
||||
tmp.requires = from_ascii("wasysym");
|
||||
else if (tmp.inset == "mathscr")
|
||||
tmp.requires = from_ascii("mathrsfs");
|
||||
}
|
||||
|
||||
// symbol font is not available sometimes
|
||||
|
@ -546,6 +546,8 @@ fontinfo fontinfos[] = {
|
||||
inh_shape, Color_math},
|
||||
{"mathit", inh_family, inh_series,
|
||||
ITALIC_SHAPE, Color_math},
|
||||
{"mathscr", RSFS_FAMILY, inh_series,
|
||||
inh_shape, Color_math},
|
||||
{"cmex", CMEX_FAMILY, inh_series,
|
||||
inh_shape, Color_math},
|
||||
{"cmm", CMM_FAMILY, inh_series,
|
||||
|
Loading…
Reference in New Issue
Block a user