On 2012-03-18, Vincent van Ravesteijn wrote: > Op 18-3-2012 19:56, Nathan Becker schreef: >> On Sat, Mar 17, 2012 at 9:31 AM, Vincent van Ravesteijn<v...@lyx.org> wrote: >>> Op 17-3-2012 16:06, Nathan Becker schreef:
>>>> When I open test1.lyx in 2.0.3 and try to generate LaTeX or PDF >>>> output, I get the following error message: >>>> Could not find LaTeX command for character '♦' (code point 0x2666) >>>> It suggests to try using utf8 support, This suggestion is misleading. By now, LyX supports all (and more than) the characters supported by (8-bit) LaTeX's utf8 support. It should be replaced with some more usefull in the line of: "try XeTeX or LuaTeX" or "try with 'use-non-tex-fonts'". >>> In LyX 2.0.2 we automatically loaded the 'txfonts' package when we >>> encounter a character which needs this package. >>> However, when such a package is automatically loaded, it changes the >>> appearance of all the math in your document. Not only this, it changes also the *text* font (to Times)! >>> The other suit characters should still be available (black >>> club/spade, white diamond/heart). >>> I don't know what is supposed to happen to these characters. Like the other ca. 1000 out of 2751 Unicode math-related symbols without (traditional) LaTeX support, they cannot be auto-converted to a LaTeX command by LyX. >> I don't think this is a LaTeX issue. The error message seems to occur >> during the LyX to LaTeX conversion process. I am not seeing any LaTeX >> error messages, because the PDF generation does not reach that stage. > You're right, LyX does not convert the document into LaTeX. It doesn't > because it does not know how to translate the suit symbol into LaTeX > without having to include the package txfonts. We don't want to include > this package because it - seems to influence + does > other parts of the document as well. >> I tried adding >> \usepackage{txfonts} >> to the LaTeX preamble. This did not fix the problem. Because LyX does not parse the LaTeX preamble, it does not know about the availability. There are several workarounds: * Try XeTeX or LuaTeX with a font that includes the symbols (should work, if the "offending" symbols are text, don't know about math). * use \usepackage{txfonts} (or one of kmath, kpfonts, pxfonts) and the command \vardiamondsuit in an ERT box. * If you don't mind changed text and math fonts, copy the file "unicodesymbols" from the "system LyX-dir" to the "user LyX dir" (~/.lyx on Unix) and add/restore the lines defining the symbols requiring txfonts. * File a bug/enhancement report for "conditional" conversions in "unicodesymbols", i.e. conversions that are active if LyX detects that the required command is available in the document without auto-loading packages. * File a bug/enhancement report asking for a way to add Unicode->LaTeX conversions on a per-document basis. Günter