On Sun, Oct 6, 2013 at 11:57 AM, Guenter Milde <[email protected]> wrote: > On 2013-10-03, Scott Kostyshak wrote: >> 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. > > I thought again about it: we should mention in a suitable way that the »^« and > »_« keys (as well as »{«) are "active" which means that you cannot use them > to insert the ^_{ characters (although "unicodesymbols" will do the right > conversion if the characters are pasted into a math box, say).
For now I have committed the patch with the previously discussed changes. I ported the changes to the French, German, and Spanish manuals. >> This is an area I know little about. Are you able and willing to >> provide a patch to fix the euro symbol? > > The "quick and dirty fix" for the euro would be just > > --- /home/milde/.lyx/unicodesymbols~ 2012-05-14 11:56:24.000000000 +0200 > +++ /tmp/unicodesymbols10333.3565 2013-10-06 17:52:33.000000000 +0200 > @@ -1640,7 +1640,7 @@ > 0x20a9 "\\textwon" "textcomp" "" # WON SIGN > #0x20aa "" "" "" # NEW SHEQEL SIGN > 0x20ab "\\textdong" "textcomp" "" # DONG SIGN > -0x20ac "\\texteuro" "textcomp" "" # EURO SIGN > +0x20ac "\\texteuro" "textcomp" "force" # EURO SIGN > 0x20b1 "\\textpeso" "textcomp" "" # PESO SIGN > 0x20b2 "\\textguarani" "textcomp" "" # GUARANI SIGN > 0x20b9 "\\rupee" "tfrupee" "" # RUPEE SIGN > > A better fix would look for all the abovelisted characters and a real fix > would implement a new flag to force the "textpreamble" without conversing > the literal character for all teh abovelisted characters. > I am not able to do this one. > >> These workarounds are no longer necessary because of unicodesymbols >> and further they break compilation with XeTeX. > > ... and pdfTeX with TeX input encoding set to ascii or utf8. I added this to the commit message. Committed at a19611c5. Thanks, Scott
