(My first problem of compiling at all is solved, so I'm now posing a slightly different question).
Hi, I'd like some help with producing handouts for my students. I'm using LyX as I'm far from fluent in LaTeX. I find the default fonts very serious, and would prefer to use something unusual on the title and footer, to make the document a little friendlier. I followed these instructions for installing XeTeX: http://wiki.lyx.org/LyX/XeTeX, and for changing the fonts manually with fontspec
in ERT. I checked that the installation is fine: if I don't use any fontspec
commands, it doesn't compile within LyX but does work if I use the command line. But when I try it with the fontspec
, I don't get a PDF.
My LyX file: http://math.stanford.edu/~amyp/test2.lyx
The .tex
file that LyX generated: http://math.stanford.edu/~amyp/test2.tex
My log: http://math.stanford.edu/~amyp/test2.log
The font I tried here is located at C:\Windows\Fonts\PRISTINA.TTF
on my computer, Windows tells me it's an Open Type font. I'm not too particular about the font (just that it's non-standard and readable).
Best Answer
It sounds like LyX is not running XeTeX at all. Here’s a simple way to check it: run the following document in Lyx
and see if the output file contains “I’m running XeTeX” or “I’m not running XeTeX”. In the latter case, you should go again through the instructions to set up LyX to use XeTeX and not pdfTeX (or whatever it’s using); I can’t really help you there, as I’ve never used LyX.
Also, if you’re going to use XeTeX and fontspec and use system fonts, you should absolutely not use the
fontenc
package. It’s not compatible with XeTeX. The line above it in your code (\renewcommand{\familydefault}{\rmdefault}
) may also cause problems, and interacts anyway with whatfontspec
does, so you’re better off deleting it.