Jean-Marc Lasgouttes wrote:

>>>>>> "Georg" == Georg Baum
>>>>>> <[EMAIL PROTECTED]>
>>>>>> writes:
> 
> Georg> I am sure that a textdgree sign is available in one of the
> Georg> other fonts, but I don't know how to declare it in lib/symbol
> Georg> so that it works in all encodings.
> 
> It seems to be in text companion encoding (TS1). Do we have that?

I looked a bit further, and found that it is in many encodings, but on
different positions. The solution is however much simpler: LaTeX defines a
dummy \textdgree as

\ensuremath{^{\circ}}

so I came up with the attached. This reduces startup time for math documents
from 9.8 seconds to 6.8 seconds (1.4cvs, qt) for me.

I propose to put this both into 1.3 and 1.4. OK?


Georg
Index: lib/ChangeLog
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/lib/ChangeLog,v
retrieving revision 1.748
diff -u -p -r1.748 ChangeLog
--- lib/ChangeLog	14 Dec 2005 14:30:15 -0000	1.748
+++ lib/ChangeLog	16 Dec 2005 17:02:36 -0000
@@ -1,3 +1,8 @@
+2005-12-16  Georg Baum  <[EMAIL PROTECTED]>
+
+	* symbols: avoid use of symbol font if cmsy is available.
+	Saves 3 seconds in initMath() for me (qt, ~20.000 fonts)
+
 2005-12-14  Jean-Marc Lasgouttes  <[EMAIL PROTECTED]>
 
 	* CREDITS:
Index: lib/symbols
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/lib/symbols,v
retrieving revision 1.47
diff -u -p -r1.47 symbols
--- lib/symbols	17 Dec 2004 13:34:02 -0000	1.47
+++ lib/symbols	16 Dec 2005 17:02:36 -0000
@@ -815,16 +815,16 @@ endif
 \def\AA{\AA}{Å}
 \def\O{\O}{Ø}
 
-textdegree         lyxsymbol             176 0 mathord  x
-
 iffont cmsy
 # The \sim is placed too high...
 \def\cong{\stackrel{_\sim}{=}}
 lyxsurd               cmsy        112 0 mathord  x
 \def\surd{^\lyxsurd}
+\def\textdegree{\kern-1mu^{\circ}\kern-4mu}
 else
 cong               lyxsymbol             64  0 mathrel  x
 surd               lyxsymbol             214 0 mathord  x
+textdegree         lyxsymbol             176 0 mathord  x
 endif
 
 #"{\hat{}}

Reply via email to