From: Enrico Forestieri Date: Sun, 1 Jun 2008 04:46:50 +0000 (+0000) Subject: Simplify the definition of \mathsym by using the package relsize. X-Git-Tag: 1.6.10~4584 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=c9d2c73706b7958e87d607c0f656fa247a868385;p=features.git Simplify the definition of \mathsym by using the package relsize. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25042 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/lib/chkconfig.ltx b/lib/chkconfig.ltx index c55683a796..b13a32a09f 100644 --- a/lib/chkconfig.ltx +++ b/lib/chkconfig.ltx @@ -249,6 +249,7 @@ \TestPackage{pdfpages} \TestPackage{prettyref} \TestPackage{preview} +\TestPackage{relsize} \TestPackage{rotating} \TestPackage{rotfloat} \TestPackage{setspace} diff --git a/lib/doc/LaTeXConfig.lyx b/lib/doc/LaTeXConfig.lyx index 92a4aa1b5f..2142cf03b1 100644 --- a/lib/doc/LaTeXConfig.lyx +++ b/lib/doc/LaTeXConfig.lyx @@ -1,5 +1,5 @@ #LyX 1.6.0svn created this file. For more info see http://www.lyx.org/ -\lyxformat 328 +\lyxformat 335 \begin_document \begin_header \textclass article @@ -956,7 +956,7 @@ slides foils \family default instead if it is available (see -\begin_inset Space ~ +\begin_inset space ~ \end_inset @@ -3490,6 +3490,35 @@ longtable is needed by LyX to be able to output correctly multipage tables. \end_layout +\begin_layout Subsection +relsize +\end_layout + +\begin_layout Description +Found: +\begin_inset Info +type "package" +arg "relsize" +\end_inset + + +\end_layout + +\begin_layout Description +CTAN: +\family typewriter +macros/latex/contrib/misc/ +\end_layout + +\begin_layout Description +Notes: The package +\family sans +relsize +\family default + is needed by LyX to correctly size unicode symbols used as super or subscripts + in math. +\end_layout + \begin_layout Description \end_layout @@ -4401,7 +4430,7 @@ Notes: The package subfig \family default is used by LyX to produce subfloats (i. -\begin_inset Space \thinspace{} +\begin_inset space \thinspace{} \end_inset e., subfigures, subtables, etc.). diff --git a/src/LaTeXFeatures.cpp b/src/LaTeXFeatures.cpp index 20d0e131a4..3d7b11a61f 100644 --- a/src/LaTeXFeatures.cpp +++ b/src/LaTeXFeatures.cpp @@ -204,19 +204,8 @@ static string const mathsym_def = " \\begingroup\n" " \\edef\\b@ld{bold}%\n" " \\def\\rmorbf##1{\\ifx\\math@version\\b@ld\\textbf{##1}\\else\\textrm{##1}\\fi}%\n" - " \\def\\szone{\\ifx\\@currsize\\large\\footnotesize%\n" - " \\else\\ifx\\@currsize\\Large\\normalsize%\n" - " \\else\\ifx\\@currsize\\LARGE\\large%\n" - " \\else\\ifx\\@currsize\\huge\\Large%\n" - " \\else\\ifx\\@currsize\\Huge\\huge%\n" - " \\else\\scriptsize\\fi\\fi\\fi\\fi\\fi}%\n" - " \\def\\sztwo{\\ifx\\@currsize\\Large\\scriptsize%\n" - " \\else\\ifx\\@currsize\\LARGE\\normalsize%\n" - " \\else\\ifx\\@currsize\\huge\\large%\n" - " \\else\\ifx\\@currsize\\Huge\\Large%\n" - " \\else\\tiny\\fi\\fi\\fi\\fi}%\n" " \\mathchoice{\\hbox{\\rmorbf{#1}}}{\\hbox{\\rmorbf{#1}}}%\n" - " {\\hbox{\\szone\\rmorbf{#1}}}{\\hbox{\\sztwo\\rmorbf{#1}}}%\n" + " {\\hbox{\\smaller[2]\\rmorbf{#1}}}{\\hbox{\\smaller[3]\\rmorbf{#1}}}%\n" " \\endgroup}\n"; ///////////////////////////////////////////////////////////////////// @@ -471,7 +460,8 @@ char const * simplefeatures[] = { "amsthm", "listings", "bm", - "pdfpages" + "pdfpages", + "relsize" }; int const nb_simplefeatures = sizeof(simplefeatures) / sizeof(char const *); diff --git a/src/mathed/InsetMathChar.cpp b/src/mathed/InsetMathChar.cpp index 4f826cc9a0..857dbcea90 100644 --- a/src/mathed/InsetMathChar.cpp +++ b/src/mathed/InsetMathChar.cpp @@ -141,6 +141,7 @@ void InsetMathChar::validate(LaTeXFeatures & features) const { if (char_ >= 0x80) { encodings.validate(char_, features); + features.require("relsize"); features.require("mathsym"); } }