On Thu, Oct 3, 2013 at 4:28 PM, Guenter Milde <[email protected]> wrote: > On 2013-10-03, Scott Kostyshak wrote: >> On Thu, Oct 3, 2013 at 5:02 AM, Guenter Milde <[email protected]> wrote: >>> On 2013-10-03, Scott Kostyshak wrote: >>>> Thanks for the confirmation. I started a thread on lyx-devel. >>>> Hopefully there's an easy way to have pdfTeX and XeTeX working. Note >>>> that if I remove the following lines from the preamble, export with >>>> XeTeX >>>> works fine (but pdfTeX is broken): > >>>> \DeclareInputText{176}{\ifmmode^\circ\else\textdegree\fi} >>>> \DeclareInputText{183}{\ifmmode\cdot\else\textperiodcentered\fi} > >>> There is a simple fix: move the offending lines into the > >>> \ifpdf >>> \fi > >>> block. > >>> However, the right way is to remove the lines as well as the >>> section in the guide, because it is no longer true. Since several versions, >>> LYXDIR/unicodesymbols contains the required definitions for text and math >>> mode. > >> I prefer the right way. So you suggest to remove the two >> DeclareInputText commands and to remove all of the section >> "Miscellaneous special Characters" ? > >> After I do that, I get errors because of the € symbol. After I remove >> those occurrences, XeTeX and pdfTeX both export fine. There is an >> entry in unicodesymbols for the euro. Is this a different euro? > > The \texteuro macro is provided by the "textcomp" package. > > A quick and dirty fix would be to set the "force" flag so that the textcomp > package is auto-loaded. However, this is an overkill as this would also > replace the Euro (€) character with the \texteuro macro which is not > required for the TeX input encodings > utf8, ansinew, cp1250, cp1252, cp1257, cp858, latin10, and latin9 > > A "force-preamble" flag that only forces loading the preamble code without > forcing the replacement could solve the issue. For the "textcomp" feature > this regards the characters > # recognized with 'utf8', if textcomp is loaded > textcomp = { > # Latin-1 Supplement > 0x00a2: ur'\textcent{}', # ¢ CENT SIGN > 0x00a4: ur'\textcurrency{}', # ¤ CURRENCY SYMBOL > 0x00a5: ur'\textyen{}', # ¥ YEN SIGN > 0x00a6: ur'\textbrokenbar{}', # ¦ BROKEN BAR > 0x00a7: ur'\textsection{}', # § SECTION SIGN > 0x00a8: ur'\textasciidieresis{}', # ¨ DIAERESIS > 0x00a9: ur'\textcopyright{}', # © COPYRIGHT SIGN > 0x00aa: ur'\textordfeminine{}', # ª FEMININE ORDINAL INDICATOR > 0x00ac: ur'\textlnot{}', # ¬ NOT SIGN > 0x00ae: ur'\textregistered{}', # ® REGISTERED SIGN > 0x00af: ur'\textasciimacron{}', # ¯ MACRON > 0x00b0: ur'\textdegree{}', # ° DEGREE SIGN > 0x00b1: ur'\textpm{}', # ± PLUS-MINUS SIGN > 0x00b2: ur'\texttwosuperior{}', # ² SUPERSCRIPT TWO > 0x00b3: ur'\textthreesuperior{}', # ³ SUPERSCRIPT THREE > 0x00b4: ur'\textasciiacute{}', # ´ ACUTE ACCENT > 0x00b5: ur'\textmu{}', # µ MICRO SIGN > 0x00b6: ur'\textparagraph{}', # ¶ PILCROW SIGN # != \textpilcrow > 0x00b9: ur'\textonesuperior{}', # ¹ SUPERSCRIPT ONE > 0x00ba: ur'\textordmasculine{}', # º MASCULINE ORDINAL INDICATOR > 0x00bc: ur'\textonequarter{}', # 1/4 FRACTION > 0x00bd: ur'\textonehalf{}', # 1/2 FRACTION > 0x00be: ur'\textthreequarters{}', # 3/4 FRACTION > 0x00d7: ur'\texttimes{}', # × MULTIPLICATION SIGN > 0x00f7: ur'\textdiv{}', # ÷ DIVISION SIGN > # others > 0x0192: ur'\textflorin{}', # LATIN SMALL LETTER F WITH HOOK > 0x02b9: ur'\textasciiacute{}', # MODIFIER LETTER PRIME > 0x02ba: ur'\textacutedbl{}', # MODIFIER LETTER DOUBLE PRIME > 0x2016: ur'\textbardbl{}', # DOUBLE VERTICAL LINE > 0x2022: ur'\textbullet{}', # BULLET > 0x2032: ur'\textasciiacute{}', # PRIME > 0x2033: ur'\textacutedbl{}', # DOUBLE PRIME > 0x2035: ur'\textasciigrave{}', # REVERSED PRIME > 0x2036: ur'\textgravedbl{}', # REVERSED DOUBLE PRIME > 0x203b: ur'\textreferencemark{}', # REFERENCE MARK > 0x203d: ur'\textinterrobang{}', # INTERROBANG > 0x2044: ur'\textfractionsolidus{}', # FRACTION SLASH > 0x2045: ur'\textlquill{}', # LEFT SQUARE BRACKET WITH QUILL > 0x2046: ur'\textrquill{}', # RIGHT SQUARE BRACKET WITH QUILL > 0x2052: ur'\textdiscount{}', # COMMERCIAL MINUS SIGN > 0x20a1: ur'\textcolonmonetary{}', # COLON SIGN > 0x20a3: ur'\textfrenchfranc{}', # FRENCH FRANC SIGN > 0x20a4: ur'\textlira{}', # LIRA SIGN > 0x20a6: ur'\textnaira{}', # NAIRA SIGN > 0x20a9: ur'\textwon{}', # WON SIGN > 0x20ab: ur'\textdong{}', # DONG SIGN > 0x20ac: ur'\texteuro{}', # EURO SIGN > 0x20b1: ur'\textpeso{}', # PESO SIGN > 0x20b2: ur'\textguarani{}', # GUARANI SIGN > 0x2103: ur'\textcelsius{}', # DEGREE CELSIUS > 0x2116: ur'\textnumero{}', # NUMERO SIGN > 0x2117: ur'\textcircledP{}', # SOUND RECORDING COYRIGHT > 0x211e: ur'\textrecipe{}', # PRESCRIPTION TAKE > 0x2120: ur'\textservicemark{}', # SERVICE MARK > 0x2122: ur'\texttrademark{}', # TRADE MARK SIGN > 0x2126: ur'\textohm{}', # OHM SIGN > 0x2127: ur'\textmho{}', # INVERTED OHM SIGN > 0x212e: ur'\textestimated{}', # ESTIMATED SYMBOL > 0x2190: ur'\textleftarrow{}', # LEFTWARDS ARROW > 0x2191: ur'\textuparrow{}', # UPWARDS ARROW > 0x2192: ur'\textrightarrow{}', # RIGHTWARDS ARROW > 0x2193: ur'\textdownarrow{}', # DOWNWARDS ARROW > 0x2212: ur'\textminus{}', # MINUS SIGN > 0x2217: ur'\textasteriskcentered{}', # ASTERISK OPERATOR > 0x221a: ur'\textsurd{}', # SQUARE ROOT > 0x2422: ur'\textblank{}', # BLANK SYMBOL > 0x25e6: ur'\textopenbullet{}', # WHITE BULLET > 0x25ef: ur'\textbigcircle{}', # LARGE CIRCLE > 0x266a: ur'\textmusicalnote{}', # EIGHTH NOTE > 0x26ad: ur'\textmarried{}', # MARRIAGE SYMBOL > 0x26ae: ur'\textdivorced{}', # DIVORCE SYMBOL > 0x27e8: ur'\textlangle{}', # MATHEMATICAL LEFT ANGLE BRACKET > 0x27e9: ur'\textrangle{}', # MATHEMATICAL RIGHT ANGLE BRACKET > } > > Many of these already carry the "force" flag in unicodesymbols.
Thanks Günter Attached is a patch that implements your previous suggestions. Can you check that it does what you had in mind? If so, I will make the same changes for Math.lyx in the other languages. This is an area I know little about. Are you able and willing to provide a patch to fix the euro symbol? Scott
From fa81fd6edf3a273a064cfab8bffdbc1555c8af1d Mon Sep 17 00:00:00 2001 From: Scott Kostyshak <[email protected]> Date: Thu, 3 Oct 2013 16:53:32 -0400 Subject: [PATCH] Remove obsolete code in Math.lyx MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit These workarounds are no longer necessary because of unicodesymbols and further they break compilation with XeTeX. Thanks to Günter Milde for the fix. --- lib/doc/Math.lyx | 224 ------------------------------------------------------- 1 file changed, 224 deletions(-) diff --git a/lib/doc/Math.lyx b/lib/doc/Math.lyx index 5ac17d5..f1c055e 100644 --- a/lib/doc/Math.lyx +++ b/lib/doc/Math.lyx @@ -30,11 +30,6 @@ \renewcommand{\l@subsection}{\@dottedtocline{2}{1.5em}{2.8em}} \renewcommand{\l@subsubsection}{\@dottedtocline{3}{4.3em}{3.6em}} -% To be able to enter the character ° and · directly in LyX, -% see sec. 22.11 -\DeclareInputText{176}{\ifmmode^\circ\else\textdegree\fi} -\DeclareInputText{183}{\ifmmode\cdot\else\textperiodcentered\fi} - % increase link area for cross-references and autoname them, \AtBeginDocument{\renewcommand{\ref}[1]{\mbox{\autoref{#1}}}} \@ifundefined{extrasenglish}{\usepackage[english]{babel}}{} @@ -22944,13 +22939,6 @@ diagdown \begin_inset VSpace medskip \end_inset -More symbols are listed in -\begin_inset CommandInset ref -LatexCommand ref -reference "sub:Miscellaneous-special-Characters" - -\end_inset - . \end_layout @@ -27758,218 +27746,6 @@ oldstylenums{0123456789 \end_layout -\begin_layout Subsection -Miscellaneous special Characters -\begin_inset CommandInset label -LatexCommand label -name "sub:Miscellaneous-special-Characters" - -\end_inset - - -\begin_inset Index idx -status collapsed - -\begin_layout Plain Layout -Special characters ! miscellaneous -\end_layout - -\end_inset - - -\end_layout - -\begin_layout Standard -The following characters can only be inserted to formulas by using commands: -\end_layout - -\begin_layout Standard -\align center -\begin_inset Tabular -<lyxtabular version="3" rows="4" columns="2"> -<features rotate="0" tabularvalignment="middle"> -<column alignment="center" valignment="top"> -<column alignment="center" valignment="top"> -<row> -<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none"> -\begin_inset Text - -\begin_layout Plain Layout -Command -\end_layout - -\end_inset -</cell> -<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none"> -\begin_inset Text - -\begin_layout Plain Layout -Result -\end_layout - -\end_inset -</cell> -</row> -<row> -<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> -\begin_inset Text - -\begin_layout Plain Layout - -\backslash -^ -\begin_inset ERT -status collapsed - -\begin_layout Plain Layout - - -\backslash -spce -\end_layout - -\end_inset - - -\end_layout - -\end_inset -</cell> -<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none"> -\begin_inset Text - -\begin_layout Plain Layout -\begin_inset Formula $\mathcircumflex$ -\end_inset - - -\end_layout - -\end_inset -</cell> -</row> -<row> -<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> -\begin_inset Text - -\begin_layout Plain Layout - -\backslash -_ -\end_layout - -\end_inset -</cell> -<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none"> -\begin_inset Text - -\begin_layout Plain Layout -\begin_inset Formula $\_$ -\end_inset - - -\end_layout - -\end_inset -</cell> -</row> -<row> -<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none"> -\begin_inset Text - -\begin_layout Plain Layout -^ -\begin_inset ERT -status collapsed - -\begin_layout Plain Layout - - -\backslash -spce -\end_layout - -\end_inset - - -\backslash -circ -\begin_inset Index idx -status collapsed - -\begin_layout Plain Layout - -\backslash -@° -\end_layout - -\end_inset - - -\end_layout - -\end_inset -</cell> -<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none"> -\begin_inset Text - -\begin_layout Plain Layout -\begin_inset Formula $^{\circ}$ -\end_inset - - -\end_layout - -\end_inset -</cell> -</row> -</lyxtabular> - -\end_inset - - -\end_layout - -\begin_layout Standard -The degree sign ° can nevertheless be directly inserted if the LaTeX-preamble - contains the following line -\begin_inset Foot -status collapsed - -\begin_layout Plain Layout -More about this is described in -\begin_inset CommandInset ref -LatexCommand ref -reference "sub:Text-Characters-in" - -\end_inset - -. -\end_layout - -\end_inset - -: -\end_layout - -\begin_layout Standard - -\series bold - -\backslash -DeclareInputtext{176}{ -\backslash -ifmmode^ -\backslash -circ -\backslash -else -\backslash -textdegree -\backslash -fi} -\end_layout - \begin_layout Section Formula Styles \begin_inset CommandInset label -- 1.8.1.2
