LyXLyx, XeTex and the classicthesis template

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
meho_r
Posts: 823
Joined: Tue Aug 07, 2007 5:28 pm

Lyx, XeTex and the classicthesis template

Post by meho_r »

1. You did rename the file "Test.tex" to "Test.lyx"? And open and run it in LyX?

2. The old version of XeTeX which comes with TeXLive 2007 had problems with no-sscript option (and some other). Taking a look at the log file you provided, I noticed you have some very old TeX installation. TeXLive2007? E.g. your memoir class package is dated 2005 (mine is 2009), fontspec 2006 v.1.13 (2008, v.1.18 on my installation) and XeTeX is 3.141592-2.2-0.996-patch2 (mine is Version 3.1415926-2.2-0.999.6). So, you may consider upgrading you TeX installation to TeXLive2008 (TeXLive2009 is on the way and is expected to be available soon) or manually updating at least xetex related packages and memoir class (simply copy-paste on their respective places will do). Unfortunately, ubuntu simply skipped TeXLive2008, it's not in repos, so you'll have to install it manually if decide to upgrade.

3. Did you set up LyX to work with XeTeX (created a new format with .pdf extension etc. as explained in the link I provided earlier?)

Let's test the example without lyx. In attachment I provide the same file, this time plain .tex file, so put it on your desktop, open Terminal and enter this command:

Code: Select all

cd ~/Desktop
After this, run the following:

Code: Select all

xelatex Test.tex
P.S. I made some minor changes, take a look at comments ;) And, of course, change "Minion Pro" font to the one of you liking.
Attachments
Test.tex
(5.73 KiB) Downloaded 348 times

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

meho_r
Posts: 823
Joined: Tue Aug 07, 2007 5:28 pm

Lyx, XeTex and the classicthesis template

Post by meho_r »

And one more thing I've forgotten: put cm-default option to fontspec:

Code: Select all

\usepackage[cm-default]{fontspec}
This solves request for computer modern font by fontspec (it isn't necessary for newer versions of xetex, but you may need it).
clemens
Posts: 77
Joined: Fri Jun 26, 2009 11:57 am

Re: Lyx, XeTex and the classicthesis template

Post by clemens »

Hello,

thank you very much for your help.
I have been trying to install texlive all throughout this morning but without success. Eventually I uninstalled all the old packages and I tried installing the new with install-tl in the urs/local directory, but then I could not get latex to start (bash didn't find it). I am trying to install again. As soon as that's done I'll reinstall Lyx, do a general texhash and try your file :)
I hope my computer doesn't explode before.
As for XeTex settings, they were set before, but I will do it again once TexLive and Lyx are up and running.
Cheers
clemens
Posts: 77
Joined: Fri Jun 26, 2009 11:57 am

Re: Lyx, XeTex and the classicthesis template

Post by clemens »

Hello,

I am having some more problems.
I managed to install texlive in the default folders (usr/local/texlive) but I always get permission errors since usr is a root folder so I need to run everything in sudo.
Another thing is that when I try the tlmgr I cannot load the installation database neither with the default online address nor with the local directory.
Furthermore when I try to install Lyx with getdeb, it tells me that tex-common is not installed. [EDIT somehow now it installed]
What should I do? Just remove everything and reinstall on a non root directory.
Thanks
meho_r
Posts: 823
Joined: Tue Aug 07, 2007 5:28 pm

Lyx, XeTex and the classicthesis template

Post by meho_r »

Generally two things:

1. You do not have to remove old packages. In fact, it may be better to leave them be because of dependency for LyX, Texmaker, Kile etc. So, first install one of mentioned editors and let it pull dependencies from repos. Then install TeXLive2008.

2. When installing from TeXLive2008 DVD, the only thing you should do is (apart of running install with "sudo /media/cdrom0/install-tl -gui" and maybe choosing full install scheme) that "Create system links in system directories" is checked (bottom of the install window) so that TeXLive2008 is default on your system and not old one. Note that this option isn't checked by default so don't forget to do it manually. That's all. Leave installation directories at default. Try and see if it works.

For updates, try "sudo tlmgr -gui". However, before running the update for the first time, download "update-tlmgr-latest.sh" file from here and run it (with "sudo" of course). After that do the normal update.
clemens
Posts: 77
Joined: Fri Jun 26, 2009 11:57 am

Re: Lyx, XeTex and the classicthesis template

Post by clemens »

Hi, thanks again for the instructions.
Unfortunately I had already uninstalled everything so what I did was to reinstall everything (although I did not do the thing with Xetex for Lyx), then I installed the new Texlive (this time it worked) and then did the Lyx xetex.
Unfortunately I am not able to export with xetex, I get this error message:
memoir.cls not found (\usepackage [T1]{fontenc}^^M
*** (cannot \read from terminal in nonstop modes))
Which is strange since I installed it

I tried updating everything, symbolic links included with tlmgr but I get the following odd error:
No pages of output.
Transcript written on xelatex.log.
Error: `xetex -ini -jobname=xelatex -progname=xelatex -etex xelatex.ini' failed

###############################################################################
fmtutil: Error! Not all formats have been built successfully.
Visit the log files in directory
/usr/local/texlive/2009/texmf-var/web2c
for details.
###############################################################################

This is a summary of all `failed' messages:
`xetex -ini -jobname=cont-en -progname=context -8bit *cont-en.ini' failed
`xetex -ini -jobname=xelatex -progname=xelatex -etex xelatex.ini' failed

I guess it has to do something with the problem since if I try to reinstall xetex on synaptec, I get the following message
E: texlive-xetex: subprocess post-installation script returned error exit status 1
clemens
Posts: 77
Joined: Fri Jun 26, 2009 11:57 am

Re: Lyx, XeTex and the classicthesis template

Post by clemens »

Hi,

I have decided to do the following thing: uninstall everything. Reinstall texlive and Lyx. Make Lyx work with XeTex (based on texlive 2007). besically going back where I started. Now I am doing a reinstallation of TexLive 2009 (i tried with the dvd of texlive 2008, but was getting some problems so I found how o do an online install with the new version). Let's hope this time works :) As soon as it's done I'll let you know how everything went and I will start using your test file.
Thank you again for all your help, I have been learning really a lot recently and feel a bit more confident with LateX and Lyx.
meho_r
Posts: 823
Joined: Tue Aug 07, 2007 5:28 pm

Lyx, XeTex and the classicthesis template

Post by meho_r »

clemens wrote: I guess it has to do something with the problem since if I try to reinstall xetex on synaptec, I get the following message
E: texlive-xetex: subprocess post-installation script returned error exit status 1
Sorry for getting you into troubles, but believe me, after all this tough time with installation, you'll get it right eventually and it will pay off.

As for this error, it seems postinstallation script has failed (happens from time to time on Ubuntu, nothing to do with TeX, LaTeX... Simply, the package is broken). The solution (kind of) is putting "exit 0" in the problematic postinst file. I had the same problem with some other packages. Take a look here. This is a little bit off-topic, but will be useful if you encounter the same error in the future on Ubuntu.

Be careful with TeXLive2009, it is still in testing phase. In case of any problems, I suggest you follow texlive mailing list and post on this forum in General section, not "LyX" or "XeTeX" since not many users use them here and because of that do not read posts in these sections. Good luck :)
clemens
Posts: 77
Joined: Fri Jun 26, 2009 11:57 am

Re: Lyx, XeTex and the classicthesis template

Post by clemens »

Thanks again. I am really learning many things.
I re-did all the installation and tried using Lyx. Somehow, after installing texlive 2009 the XeTex settings in Lyx disappeared. So I put them back (apart from the buttons).
Anyhow another strange thing happens when I try to do the view Pdf(xetex) I get an error message (that I didn't get before installing the new texlive):
File does not exist: /tmp/lyx_tmpdir.TJ6121/lyx_tmpbuf0/Test.pdf
I guess it has to do with the temporary directories Lyx uses, but I am not exactly sure about what to do.
If I do an export to Pdf(xelatex) nothing happens.
What can be done?


Ps. the first test file renamed with .lyx works, while the second is not recognised as a valid lyx file. Anyhow I got the main settings by opening it with a normal text editor. In both cases, though, I haven been able to see the output since before installing the new texlive it gave me the errors I showed you before, while after installing the new version I have the temporay file problem.
meho_r
Posts: 823
Joined: Tue Aug 07, 2007 5:28 pm

Lyx, XeTex and the classicthesis template

Post by meho_r »

Well, the second one is real plain .tex file, not .lyx. I provided it to test XeTeX without LyX, from the Terminal.

You should try compiling the first file without LyX. Open it in LyX, then export it as plain LaTeX file (File > Export > LaTeX (plain)), name it "Test.tex", put it on your Desktop, run the Terminal and then write:

Code: Select all

cd ~/Desktop
After that, do the actual compiling running the command:

Code: Select all

xelatex Test.tex
See if this works.
Post Reply