I had previously used an older version of LyX, but I modified it to use XeTeX because I wanted to use my own fonts. I reinstalled Windows some time ago and yesterday I tried to get LyX back. I downloaded and installed LyX-2.0.0-3-Installer.exe from http://www.lyx.org/Download, but then realised that I needed some installation of LaTeX underneath it. I didn't want to download a random one, so I uninstalled that and got LyX-2.0.0-3-Installer-Bundle.exe, which includes MiKTeX, from ftp://ftp.lip6.fr/pub/lyx/bin/2.0.0.
I then learned that it's supposed to be much easier to use XeTeX in this new version of LyX; just change a few settings and I'm done. Awesome, good job LyX team for putting that in, even if I am having trouble. So I take an old .lyx file from before and try to make a PDF now. I go through many, many errors about missing .sty files. The first one was "expl3". I discovered that there was some sort of package manager for MiKTeX, so I tried to download it through that. It wouldn't work for a reason that after some searching ended up being because MiKTeX had to be updated. So I did that through the updater. After that, I go back to trying to find the .sty files (most of which started with "l3"). They didn't seem to be available through the package manager, so I found them through Google and put them in the same folder as my .lyx file (as I did when I had to find some, but not nearly as many, .sty files in the older version of LyX).
So now there are no more .sty errors, but the xelatex process just stays running at 50% of my processing power (so one core) for minutes on end. That's very different from the few seconds that it used to take. So I decide that maybe it's a result of the fact that the .lyx file has a lot of packages used in the preamble, headers, etc. I make a new .lyx file and change the settings to use non-TeX fonts so that now it uses XeTeX. PDFLaTeX, or whatever the default was, worked perfectly fine producing a PDF file, but its choice of fonts is still very limited. This new file has no preamble or fancy packages used because I assume checking the box to use non-TeX fonts with XeTeX tells LyX to set it up for XeTeX.
So I decide to let XeTeX run for a while to see if it will ever finish, and yes, after around 30 minutes it does finish, but I get an error: "LaTeX Error: Missing \begin{document}". I thought that "\begin{document}" was something that you include when you're writing up your own LaTeX file, but that LyX takes care of. I also tried copying the source from LyX to TeXworks and compiling with xelatex, but it gave a similar "Missing \begin{document}" error, I think.
I have an incredibly long error file that I think includes many failures. Does anyone know how I can get XeTeX working with LyX so that I can use the fonts of my choosing?
Code: Select all
This is XeTeX, Version 3.1415926-2.3-0.9997.5 (MiKTeX 2.9) (preloaded format=xelatex 2011.6.29) 30 JUN 2011 11:47
entering extended mode
**newfile1.tex
(C:\Users\User\AppData\Local\Temp\lyx_tmpdir.Hp5664\lyx_tmpbuf2\newfile1.tex
LaTeX2e <2009/09/24>
Babel <v3.8l> and hyphenation patterns for english, afrikaans, ancientgreek, ar
abic, armenian, assamese, basque, bengali, bokmal, bulgarian, catalan, coptic,
croatian, czech, danish, dutch, esperanto, estonian, farsi, finnish, french, ga
lician, german, german-x-2009-06-19, greek, gujarati, hindi, hungarian, iceland
ic, indonesian, interlingua, irish, italian, kannada, kurmanji, lao, latin, lat
vian, lithuanian, malayalam, marathi, mongolian, mongolianlmc, monogreek, ngerm
an, ngerman-x-2009-06-19, nynorsk, oriya, panjabi, pinyin, polish, portuguese,
romanian, russian, sanskrit, serbian, slovak, slovenian, spanish, swedish, swis
sgerman, tamil, telugu, turkish, turkmen, ukenglish, ukrainian, uppersorbian, u
senglishmax, welsh, loaded.
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\base\article.cls"
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\base\size12.clo"
File: size12.clo 2007/10/19 v1.4h Standard LaTeX file (size option)
)
\c@part=\count80
\c@section=\count81
\c@subsection=\count82
\c@subsubsection=\count83
\c@paragraph=\count84
\c@subparagraph=\count85
\c@figure=\count86
\c@table=\count87
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
) ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\fontspec\fontspec.sty"
Package: fontspec 2011/02/26 v2.1f Advanced font selection for XeLaTeX/LuaLaTeX
("D:/Saved/School Files//expl3.sty"
! LaTeX Error: Missing \begin{document}.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.2 <
!-- saved from url=(0077)http://www.tug.org/texlive/devsrc/Master/texmf...
You're in trouble here. Try typing <return> to proceed.
If that doesn't work, type X <return> to quit.
Overfull \hbox (16.21523pt too wide) in paragraph at lines 2--39
[]\OT1/cmr/m/n/12 <!-- saved from url=(0077)http://www.tug.org/texlive/devsrc/M
aster/texmf-
[]
Overfull \hbox (31.59886pt too wide) in paragraph at lines 2--39
\OT1/cmr/m/n/12 Type" con-tent="text/html; charset=ISO-8859-1"></head><body><pr
e style="word-
[]
("D:/Saved/School Files//l3names.sty"
! LaTeX Error: Missing \begin{document}.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.2 <
!-- saved from url=(0079)http://www.tug.org/texlive/devsrc/Master/texmf...
You're in trouble here. Try typing <return> to proceed.
If that doesn't work, type X <return> to quit.
Package: l3names 2011/01/08 v2122 L3 Experimental Naming Scheme for TeX Primiti
ves
)
Package: expl3 2011/04/09 v2222 L3 Experimental code bundle wrapper
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\misc\etex.sty"
Overfull \hbox (16.21523pt too wide) in paragraph at lines 2--1
[]\OT1/cmr/m/n/12 <!-- saved from url=(0079)http://www.tug.org/texlive/devsrc/M
aster/texmf-
[]
Overfull \hbox (7.0806pt too wide) in paragraph at lines 2--1
\OT1/cmr/m/n/12 dist/tex/latex/expl3/l3names.sty --> <html><head><meta http-equ
iv="Content-
[]
Overfull \hbox (31.59886pt too wide) in paragraph at lines 2--1
\OT1/cmr/m/n/12 Type" con-tent="text/html; charset=ISO-8859-1"></head><body><pr
e style="word-
[]
Package: etex 1998/03/26 v2.0 eTeX basic definition package (PEB)
\et@xins=\count88
) ("D:/Saved/School Files//l3basics.sty"
! LaTeX Error: Missing \begin{document}.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.2 <
!-- saved from url=(0080)http://www.tug.org/texlive/devsrc/Master/texmf...
You're in trouble here. Try typing <return> to proceed.
If that doesn't work, type X <return> to quit.
Package: l3basics 2011/04/23 v2246 L3 Experimental basic definitions
) ("D:/Saved/School Files//l3expan.sty"
Overfull \hbox (16.21523pt too wide) in paragraph at lines 2--1
[]\OT1/cmr/m/n/12 <!-- saved from url=(0080)http://www.tug.org/texlive/devsrc/M
aster/texmf-
[]
Overfull \hbox (5.18756pt too wide) in paragraph at lines 2--1
\OT1/cmr/m/n/12 dist/tex/latex/expl3/l3basics.sty --> <html><head><meta http-eq
uiv="Content-
[]
Overfull \hbox (31.59886pt too wide) in paragraph at lines 2--1
\OT1/cmr/m/n/12 Type" con-tent="text/html; charset=ISO-8859-1"></head><body><pr
e style="word-
[]
! LaTeX Error: Missing \begin{document}.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.2 <
!-- saved from url=(0079)http://www.tug.org/texlive/devsrc/Master/texmf...
You're in trouble here. Try typing <return> to proceed.
If that doesn't work, type X <return> to quit.
Package: l3expan 2011/04/09 v2223 L3 Experimental Argument Expansion module
) ("D:/Saved/School Files//l3tl.sty"
Overfull \hbox (16.21523pt too wide) in paragraph at lines 2--1
[]\OT1/cmr/m/n/12 <!-- saved from url=(0079)http://www.tug.org/texlive/devsrc/M
aster/texmf-
[]
Overfull \hbox (5.38339pt too wide) in paragraph at lines 2--1
\OT1/cmr/m/n/12 dist/tex/latex/expl3/l3expan.sty --> <html><head><meta http-equ
iv="Content-
[]
Overfull \hbox (31.59886pt too wide) in paragraph at lines 2--1
\OT1/cmr/m/n/12 Type" con-tent="text/html; charset=ISO-8859-1"></head><body><pr
e style="word-
[]
! LaTeX Error: Missing \begin{document}.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.2 <
!-- saved from url=(0076)http://www.tug.org/texlive/devsrc/Master/texmf...
You're in trouble here. Try typing <return> to proceed.
If that doesn't work, type X <return> to quit.
Package: l3tl 2011/04/09 v2223 L3 Experimental Token Lists
) ("D:/Saved/School Files//l3int.sty"
Package: l3int 2011/04/11 v2229 L3 Experimental Integer module
\l_tmpa_int=\count89
\l_tmpb_int=\count90
\l_tmpc_int=\count91
\g_tmpa_int=\count92
\g_tmpb_int=\count93
\c_max_int=\count94
\g_tl_inline_level_int=\count95
\g_prg_inline_level_int=\count96
) ("D:/Saved/School Files//l3quark.sty"
Package: l3quark 2011/04/14 v2234 L3 Experimental Quark Commands
) ("D:/Saved/School Files//l3seq.sty"
Package: l3seq 2011/04/21 v2245 The LaTeX3 kernel: sequences and stacks
\g_seq_nesting_depth_int=\count97
) ("D:/Saved/School Files//l3toks.sty"
Package: l3toks 2011/04/09 v2223 L3 Experimental Token Registers
\l_tmpb_toks=\toks14
\l_tmpc_toks=\toks15
\g_tmpa_toks=\toks16
\g_tmpb_toks=\toks17
\g_tmpc_toks=\toks18
\c_empty_toks=\toks19
\l_tl_replace_toks=\toks20
) ("D:/Saved/School Files//l3prg.sty"
Package: l3prg 2011/04/09 v2223 L3 Experimental control structures
) ("D:/Saved/School Files//l3clist.sty"
Package: l3clist 2011/04/09 v2223 L3 Experimental comma separated lists
\g_clist_map_inline_int=\count98
) ("D:/Saved/School Files//l3token.sty"
Package: l3token 2011/04/09 v2223 L3 Experimental token investigation and manip
ulation
) ("D:/Saved/School Files//l3prop.sty"
Package: l3prop 2011/04/09 v2223 L3 Experimental Property Lists
\g_prop_inline_level_int=\count99
) ("D:/Saved/School Files//l3msg.sty"
Package: l3msg 2010/10/02 v2052 L3 Experimental LaTeX Messages module
\l_msg_redirect_classes_prop=\toks21
\l_msg_redirect_names_prop=\toks22
\l_msg_redirect_fatal_prop=\toks23
\l_msg_redirect_error_prop=\toks24
\l_msg_redirect_warning_prop=\toks25
\l_msg_redirect_info_prop=\toks26
\l_msg_redirect_log_prop=\toks27
\l_msg_redirect_trace_prop=\toks28
\l_msg_redirect_none_prop=\toks29
) ("D:/Saved/School Files//l3io.sty"
Package: l3io 2010/10/03 v2063 L3 Experimental i/o module
\g_iow_streams_prop=\toks30
\g_ior_streams_prop=\toks31
\l_iow_stream_int=\count100
) ("D:/Saved/School Files//l3skip.sty"
Package: l3skip 2011/02/15 v2149 L3 Experimental skip registers
\l_tmpa_skip=\skip43
\l_tmpb_skip=\skip44
\l_tmpc_skip=\skip45
\g_tmpa_skip=\skip46
\g_tmpb_skip=\skip47
\l_tmpa_dim=\dimen103
\l_tmpb_dim=\dimen104
\l_tmpc_dim=\dimen105
\l_tmpd_dim=\dimen106
\g_tmpa_dim=\dimen107
\g_tmpb_dim=\dimen108
) ("D:/Saved/School Files//l3box.sty"
Package: l3box 2011/04/09 v2223 L3 Experimental Box module
\l_tmpb_box=\box26
) ("D:/Saved/School Files//l3keyval.sty"
Package: l3keyval 2011/04/09 v2223 L3 Experimental keyval processing
\l_KV_level_int=\count101
) ("D:/Saved/School Files//l3keys.sty"
Package: l3keys 2010/11/11 v2082 L3 Experimental key-value support
\l_keys_choice_int=\count102
) ("D:/Saved/School Files//l3precom.sty"
Package: l3precom 2011/04/09 v2223 L3 Experimental precompilation module
\g_gen_sym_int=\count103
\g_ggen_sym_int=\count104
) ("D:/Saved/School Files//l3xref.sty"
Package: l3xref 2011/04/09 v2223 L3 Experimental cross referencing
\g_xref_all_curr_immediate_fields_prop=\toks32
\g_xref_all_curr_deferred_fields_prop=\toks33
) ("D:/Saved/School Files//l3file.sty"
Package: l3file 2011/04/21 v2242 The LaTeX3 kernel: file operations
) ("D:/Saved/School Files//l3fp.sty"
Package: l3fp 2011/03/19 v2201 L3 Experimental floating-point operations
\c_one_million=\count105
\c_one_hundred_million=\count106
\c_five_hundred_million=\count107
\c_one_thousand_million=\count108
\c_fp_pi_by_four_decimal_int=\count109
\c_fp_pi_by_four_extended_int=\count110
\c_fp_pi_decimal_int=\count111
\c_fp_pi_extended_int=\count112
\c_fp_two_pi_decimal_int=\count113
\c_fp_two_pi_extended_int=\count114
\l_fp_count_int=\count115
\l_fp_div_offset_int=\count116
\l_fp_exp_integer_int=\count117
\l_fp_exp_decimal_int=\count118
\l_fp_exp_extended_int=\count119
\l_fp_exp_exponent_int=\count120
\l_fp_input_a_sign_int=\count121
\l_fp_input_a_integer_int=\count122
\l_fp_input_a_decimal_int=\count123
\l_fp_input_a_exponent_int=\count124
\l_fp_input_b_sign_int=\count125
\l_fp_input_b_integer_int=\count126
\l_fp_input_b_decimal_int=\count127
\l_fp_input_b_exponent_int=\count128
\l_fp_input_a_extended_int=\count129
\l_fp_input_b_extended_int=\count130
\l_fp_mul_a_i_int=\count131
\l_fp_mul_a_ii_int=\count132
\l_fp_mul_a_iii_int=\count133
\l_fp_mul_a_iv_int=\count134
\l_fp_mul_a_v_int=\count135
\l_fp_mul_a_vi_int=\count136
\l_fp_mul_b_i_int=\count137
\l_fp_mul_b_ii_int=\count138
\l_fp_mul_b_iii_int=\count139
\l_fp_mul_b_iv_int=\count140
\l_fp_mul_b_v_int=\count141
\l_fp_mul_b_vi_int=\count142
\l_fp_mul_output_int=\count143
\l_fp_output_sign_int=\count144
\l_fp_output_integer_int=\count145
\l_fp_output_decimal_int=\count146
\l_fp_output_exponent_int=\count147
\l_fp_output_extended_int=\count148
\l_fp_round_position_int=\count149
\l_fp_round_target_int=\count150
\l_fp_split_sign_int=\count151
\l_fp_tmp_int=\count152
\l_fp_trig_octant_int=\count153
\l_fp_trig_sign_int=\count154
\l_fp_trig_decimal_int=\count155
\l_fp_trig_extended_int=\count156
\l_fp_tmp_dim=\dimen109
\l_fp_tmp_skip=\skip48
) ("D:/Saved/School Files//l3luatex.sty"
Package: l3luatex 2010/07/18 v1985 L3 Experimental LuaTeX functions
\g_cctab_allocate_int=\count157
\g_cctab_stack_int=\count158
) ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\tools\calc.sty"
Package: calc 2007/08/22 v4.3 Infix arithmetic (KKT,FJ)
\calc@Acount=\count159
\calc@Bcount=\count160
\calc@Adimen=\dimen110
\calc@Bdimen=\dimen111
\calc@Askip=\skip49
\calc@Bskip=\skip50
LaTeX Info: Redefining \setlength on input line 76.
LaTeX Info: Redefining \addtolength on input line 77.
\calc@Ccount=\count161
\calc@Cskip=\skip51
)) ("D:/Saved/School Files//xparse.sty"
Overfull \hbox (16.21523pt too wide) in paragraph at lines 2--1
[]\OT1/cmr/m/n/12 <!-- saved from url=(0076)http://www.tug.org/texlive/devsrc/M
aster/texmf-
[]
Overfull \hbox (15.17496pt too wide) in paragraph at lines 2--1
\OT1/cmr/m/n/12 dist/tex/latex/expl3/l3tl.sty --> <html><head><meta http-equiv=
"Content-Type"
[]
Overfull \hbox (391.54095pt too wide) in paragraph at lin