0

Time ago I created a bat script to execute PDFLaTeX+MakeIndex+BibLaTeX so I can add as a processing tool in TeXworks (image below), and it was easy because I found many sites explaining how to do that manually.

enter image description here

The script is the following:

miktex-pdftex.exe -synctex=1 -undump=pdflatex "%1"
biber.exe "%2"
makeindex -t "%2".glg -s "%2".ist -o "%2".gls "%2".glo
makeindex -t "%2".alg -s "%2".ist -o "%2".acr "%2".acn
makeindex -t "%2".nlg -s "%2".ist -o "%2".not "%2".ntn
miktex-pdftex.exe -synctex=1 -undump=pdflatex "%1"

with arguments $fullname and $basename

But now that I want to do the same but with XeLaTeX I can't find any information to do so.

Where can I find this information? or How do I achieve this?

I wonder that I must use xetex.exe, but I'm not sure and I don't know how to use it.

enter image description here

1
  • 1
    It's not the point of your question, but you may be interested in arara: ctan.org/pkg/arara
    – gusbrs
    Nov 30, 2021 at 23:04

2 Answers 2

1

Okay, I think it was pretty easy, Im not really sure if it's the proper way but it seems to work.

After executing miktex-xetex.exe --help if found it has the same commands as miktex-pdftex.exe --help so I assumed the functionality is the same, and changing pdftex to xetex and pdflatex to xelatex did the work

miktex-xetex.exe -synctex=1 -undump=xelatex "%1"
biber.exe "%2"
makeindex -t "%2".glg -s "%2".ist -o "%2".gls "%2".glo
makeindex -t "%2".alg -s "%2".ist -o "%2".acr "%2".acn
makeindex -t "%2".nlg -s "%2".ist -o "%2".not "%2".ntn
miktex-xetex.exe -synctex=1 -undump=xelatex "%1"
1

First, create a .bat (I assumed that you are using MicroSoft) file with a name what you likes, e.g., if the .bat file will be as test.bat

Then, open it into any of the editor, e.g., Notepad, EMacs, Epsilon, etc.

call xelatex %1

call bibtex %1

call xelatex %1

call xelatex %1

call makeindex %1

call xelatex %1

You should place the .bat file into your current working folder and then run it through MS-DOS prompt, this should works.

Note that %1 should be your TeX file name, no need to give the extension here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .