[Tex/LaTex] TexWorks used to output PDF from TeX file result in XeTeX required error

pdftextexworksxetex

I'm new with TeX and Linux, but I want to learn to use it.

I found an open source TeX file from here and I want to be able to compile from the cv.tex file to cv.pdf. After searching around, I found pdfLaTeX seems to be what I was looking for. However, using the command line, it gives me the error of XeTeX is required to compile this document. I do have XeTeX and when I try to use XeTeX, it gives me the error of Undefined control sequence.

Since I am new to Linux and googling increases my confusion, I decided to use TeXWorks which is an IDE I hope will have all the dependencies to compile the .tex file to PDF. Upon launching, I believe the "compiler" was set to pdfLaTeX and I click on the "green play button" and it did create a new window with the right content on it. I was ecstatic. I started modifying the .tex file, "save" and hit the "green button" again but this time I get the same errors as when I do it through the command line. I get XeTeX required when I use pdfLaTeX and Undefined control sequence when I use XeTeX.

Can someone please guide me to the right path?

Additional info: If I close TeXworks and open it again, I can the original output cv.pdf on another window however, it does not include my changes to cv.tex. I also tried XeLaTeX and it does not compile correctly.

The error I get when use XeLaTeX is:

LaTeX error file: unicode-math.sty not found

Best Answer

Set the typesetting engine to »XeLaTeX« in the corresponding pull down menu of TeXworks (see picture). Alternatively you can add % !TEX program = xelatex as very first line to the source code and TeXworks will choose XeLaTeX automatically every time.


enter image description here