0

I want to be able to use the fonts of my OS when creating PDFs. After reading a but, I've come to understand that this requires me to use XeLaTeX (instead of plain LaTeX) and the package \fontspec. I use MixTeX and Winedt 10. I've managed to change to all desired fonts - so far, so good. However, after running XeLaTex in Winedt, I am not allowed to created a DVI, which I could then in turn into a PDF. In fact, I don't manage to create a PDF at all - the only option I can choose is "PDF Preview" (the option PDFLaTeX crashes), and while this PDF-preview shows the desired font, I also lacks many features of the figures (in the case below a syntactic tree created with the package \xyling)

How do I create an actual PDF after running XeLaTeX, and how do I make sure it includes figures?

Here is a MWE:

\documentclass{article}
\usepackage{fontspec}
\setmainfont{Arial}
\usepackage[english]{babel}
\usepackage{xyling}

\begin{document} 

Some text 

\Tree { & \K{CP}\B{dl}\B{dr} \\ \K{C$^0$}\Below{[+Top, +Foc]}\Below{\textbf{verb}} && \K{TP}}

\end{document} 
0

1 Answer 1

1

xyling package is really only written for dvips and is explicitly not portable to other systems. See the large box on the first page of its manual that highlights this.

That said, you can make it work with a few warnings with xelatex:

enter image description here

\documentclass{article}
\usepackage{fontspec}
\setmainfont{Arial}
\usepackage[english]{babel}
\RequirePackage[color,all,dvips,dvipdfm]{xy}% sigh force dvipdfm without getting a option clash error
\usepackage{xyling}

\begin{document} 

Some text 

\Tree { & \K{CP}\B{dl}\B{dr} \\ \K{C$^0$}\Below{[+Top, +Foc]}\Below{\textbf{verb}} && \K{TP}}

\end{document} 
3
  • Thanks @David Carlisle ; I can see from the PDF-preview that this solution indeed works. I still have no way to actually create a PDF, though. If i run "PDFLaTeX" I get the error : "Fatal fontspec error: "cannot-use-pdftex The fontspec package requires either XeTeX or LuaTeX. You must change your typesetting engine to, e.g., "xelatex" or "lualatex" instead of plain "latex" or "pdflatex". For immediate help type H <return>.}" I have tried to access "Execution Modes" in Winedt and changed the "DefaultPDFTextify Engine" to "xelatex.exe", but that does not work...
    – Espen
    Commented May 6, 2021 at 14:27
  • @Espen first check it works, save the code in this answer to file.tex then on the commandline type xelatex file and you will have file.pdf That is all you have to do, if your editor is making it more complicated than that then it is not helping. Commented May 6, 2021 at 14:40
  • Thanks, that works. But I should really like to able to work through the editor, instead of having to compile PDFs through the cmd... Perhaps it's a question for a Winedt forum?
    – Espen
    Commented May 6, 2021 at 15:12

You must log in to answer this question.

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