thehogfather / brackets-latex

Support for editing and compiling latex documents in brackets
24 stars 4 forks source link

Please add XeLaTeX and XeTeX as options #2

Closed weirdf0x closed 10 years ago

weirdf0x commented 10 years ago

I use XeLaTeX for improved Font handling and some other features and it would be great to get rid of my TeX editor and replace it with Brakcets.

thehogfather commented 10 years ago

Good idea. I personally havent had to use xelatex or xetex before. Are they different? or are they aliases for the same executable? In any case adding it would be fairly straightforward it just has an impact on whether or not i have distinct menu items for the two options. I noticed that TexShop has them as different items - but the terminal help page for both executables (on the mac) look identical. You might be able to shed some light on this...

Best, P

weirdf0x commented 10 years ago

In theory xetex should be used for TeX files and xelatex for LaTeX files. I don't know the history of the project, but at the moment, at least in MacTeX, the xelatex executable is just a symlink to xetex. I assume they were merged some time ago and xelatex is there only for backwards compatibility, but it could be different (although rather improbable) in other distributions.

Thanks, Daniel

Edit: As stated at http://tug.org/pipermail/xetex/2010-September/018327.html my conclusions were correct. xelatex and xetex share a lot of code, so they only created one executable and link / wrap the other and that's the case on linux and windows too.

thehogfather commented 10 years ago

So I had a go and it seems to work on a simple basic file. I would appreciate your feedback if you get some time to test it out. Note that the console panel at the bottom now has a selection element from where you can choose between latex, pdflatex, xetex and bibtex.

weirdf0x commented 10 years ago

Thanks. I sure should have checked the xetex / xelatex issue locally before checking it on the internet. It seems that the executable knows how it was called (either with xetex or with xelatex) and does things differently depending on it. Compiling a LaTeX file with xetex fails for this reason, so the solution would be to have both xetex and xelatex available as compiler choice. Double checked this in the console.

Btw. Could you explain the reason behind not compiling with xetex / xelatex directly to pdf, but doing the intermediate compilation to xdv first (-no-pdf flag)?

thehogfather commented 10 years ago

Could you please try it again and let me know if it works with your files -- then I can push an update on the brackets registry site.

thehogfather commented 10 years ago

the xelatex command (unline the xetex) can be run once directly to generate a pdf). For some reason xetex doesnt like this hence the two step process I was using to first generate an xdv file which is converted to pdf using xdvipdfmx. There is a related issue reported at tex.stackexchange