XeTeXProblems compiling with XeLaTeX

Information and discussion about XeTeX, an alternative for pdfTeX based on e-Tex
User avatar
Stefan Kottwitz
Site Admin
Posts: 10290
Joined: Mon Mar 10, 2008 9:44 pm

Problems compiling with XeLaTeX

Post by Stefan Kottwitz »

XeLaTeX is compatible with PSTricks. Your graphs are shown too. The placement looks strange. Please show some code for the pstricks images too.

The whole issue seems to be a font issue. Check the .log file for warnings. I think the font that you specified cannot be loaded.

When I took out the font settings like this:

Code: Select all

%Se definen las tipografias que se van a usar: Calibri para titulos y Georgia para el cuerpo
%\setmainfont{georgia.TTF}[%Fuente para el cuerpo
%Path=/usr/share/fonts/Win10/,
%BoldItalicFont=georgiaz.TTF,
%oldFont      =georgiab.TTF,
%talicFont    =georgiai.TTF]
 
%\newfontfamily\myfont{calibri.TTF}[%Fuente para secciones
%Path=/usr/share/fonts/Win10/,
%BoldItalicFont=calibriz.TTF,
%BoldFont      =calibrib.TTF,
%ItalicFont    =calibrii.TTF]
 
%Se redefinen las fuentes que se usarán en las secciones
\titleformat{\chapter}[display]
  {\huge}{\chaptertitlename\ \thechapter}{20pt}{\Huge}
%\allsectionsfont{\myfont}
it compiled for me and showed text. I used \usepackage{blindtext} in the preamble and \Blindtext in the document to get dummy text. See the attached result.

Maybe try first without the font settings, like I did, to verify that it basically works.

Stefan
Attachments
test.pdf
(50.97 KiB) Downloaded 1174 times
LaTeX.org admin

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
fabioonier
Posts: 26
Joined: Thu Jul 06, 2017 5:37 am

Problems compiling with XeLaTeX

Post by fabioonier »

Hi, Stefan. Thanks for your help.

I was doing several test with the same code for the main file and adding small chapters. Just for test the changes of fonts. In fact, the font is not the problem.

For example, if don't make pictures, this the output of my testing file
EnsayoEstilo.pdf
(121.01 KiB) Downloaded 1533 times
But, if add the pspicture, hits is the output
EnsayoEstilo_Error.pdf
(14.87 KiB) Downloaded 969 times
I attach the main file (EnsayoEstilo.tex) and the second chapter file (Ensayos.tex). You can compile them and see what I am talking about.
EnsayoEstilo.tex
(2.92 KiB) Downloaded 1262 times
Ensayos.tex
(1.73 KiB) Downloaded 1204 times

Thanks for your help.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10290
Joined: Mon Mar 10, 2008 9:44 pm

Problems compiling with XeLaTeX

Post by Stefan Kottwitz »

I can test it later today, I got some things to work on, just to let you know,

Stefan
LaTeX.org admin
fabioonier
Posts: 26
Joined: Thu Jul 06, 2017 5:37 am

Problems compiling with XeLaTeX

Post by fabioonier »

Hi, everybody.

I could solve the last problem in a very simple way. Let me explain it in a few steps:
First: I compiled with the sequence LaTeX+dvips+ps2pdf+see PDF. This sequence produces a PDF file in which every single page is just one image produced by pspicture command.
Second: every single image was edited by inkscape and saved, again, as a PDF file.
Third and last: I imported every image with \includefigure.

Now I have a very strange problem: XeLaTeX seems to be incompatuble with the fontspec package. I'm going to explain it with simple examples:

1. This example is good: it produces the right output

Code: Select all

\documentclass[reqno]{book}
\usepackage[spanish,es-nosectiondot]{babel}
\usepackage[utf8]{inputenc}
%\usepackage{fontspec}
\usepackage{verbatim} %Para comentar bloques de texto
\usepackage[paperheight=254.81mm,paperwidth=184.81mm,text={130mm,186mm},centering]{geometry}
\usepackage{amssymb,amsmath,amsthm}
\usepackage{enumerate}
\usepackage{lipsum}
\usepackage{multicol}

%\setmainfont{georgia.TTF}[%Fuente para el cuerpo
%Path=/usr/share/fonts/Win10/,
%BoldItalicFont=georgiaz.TTF,
%BoldFont      =georgiab.TTF,
%ItalicFont    =georgiai.TTF]

%\newfontfamily\myfont{calibri.TTF}[%Fuente para secciones
%Path=/usr/share/fonts/Win10/,
%BoldItalicFont=calibriz.TTF,
%BoldFont      =calibrib.TTF,
%ItalicFont    =calibrii.TTF]

\begin{document}

$x=\frac{1}{2}at^2+v_0t+x_0$

\begin{center}
\begin{multicols}{2}
\begin{enumerate}
	\item $ W_1 = \left\{ f \in V \bigg| \displaystyle{\lim_{x\rightarrow 0^-}}f(x)=+\infty \right\} $
	\item $ W_2 = \bigg\{ f \in V \bigg| \displaystyle{\lim_{x\rightarrow -\infty}}f(x)=0 \bigg\} $
\end{enumerate}
\end{multicols}
\end{center}

\lipsum[1-2]

\end{document}
2. If I use the fontspec package in order to use the Calibri and Georgia fonts, the output is good.

Code: Select all

\documentclass[reqno]{book}
\usepackage[spanish,es-nosectiondot]{babel}
\usepackage[utf8]{inputenc}
\usepackage{fontspec}
\usepackage{verbatim} %Para comentar bloques de texto
\usepackage[paperheight=254.81mm,paperwidth=184.81mm,text={130mm,186mm},centering]{geometry}
\usepackage{amssymb,amsmath,amsthm}
\usepackage{enumerate}
\usepackage{lipsum}
\usepackage{multicol}

\setmainfont{georgia.TTF}[%Fuente para el cuerpo
Path=/usr/share/fonts/Win10/,
BoldItalicFont=georgiaz.TTF,
BoldFont      =georgiab.TTF,
ItalicFont    =georgiai.TTF]

\newfontfamily\myfont{calibri.TTF}[%Fuente para secciones
Path=/usr/share/fonts/Win10/,
BoldItalicFont=calibriz.TTF,
BoldFont      =calibrib.TTF,
ItalicFont    =calibrii.TTF]

\begin{document}

$x=\frac{1}{2}at^2+v_0t+x_0$

%\begin{multicols}{2}
%\begin{enumerate}
%	\item $ W_1 = \left\{ f \in V \bigg| \displaystyle{\lim_{x\rightarrow 0^-}}f(x)=+\infty \right\} $
%	\item $ W_2 = \bigg\{ f \in V \bigg| \displaystyle{\lim_{x\rightarrow -\infty}}f(x)=0 \bigg\} $
%\end{enumerate}
%\end{multicols}

\lipsum[1-2]

\end{document}
3. But If I use the math expression with \lim... there is the problem!!!

Code: Select all

\documentclass[reqno]{book}
\usepackage[spanish,es-nosectiondot]{babel}
\usepackage[utf8]{inputenc}
\usepackage{fontspec}
\usepackage{verbatim} %Para comentar bloques de texto
\usepackage[paperheight=254.81mm,paperwidth=184.81mm,text={130mm,186mm},centering]{geometry}
\usepackage{amssymb,amsmath,amsthm}
\usepackage{enumerate}
\usepackage{lipsum}
\usepackage{multicol}

\setmainfont{georgia.TTF}[%Fuente para el cuerpo
Path=/usr/share/fonts/Win10/,
BoldItalicFont=georgiaz.TTF,
BoldFont      =georgiab.TTF,
ItalicFont    =georgiai.TTF]

\newfontfamily\myfont{calibri.TTF}[%Fuente para secciones
Path=/usr/share/fonts/Win10/,
BoldItalicFont=calibriz.TTF,
BoldFont      =calibrib.TTF,
ItalicFont    =calibrii.TTF]

\begin{document}

$x=\frac{1}{2}at^2+v_0t+x_0$\\
\begin{multicols}{2}
\begin{enumerate}
	\item $ W_1 = \left\{ f \in V \bigg| \displaystyle{\lim_{x\rightarrow 0^-}}f(x)=+\infty \right\} $
	\item $ W_2 = \bigg\{ f \in V \bigg| \displaystyle{\lim_{x\rightarrow -\infty}}f(x)=0 \bigg\} $
\end{enumerate}
\end{multicols}

\lipsum[1-2]

\end{document}
And the error message is this:

! You can't use `\char' after \the.
\EU1\i ->\char
"0131\relax
l.30 ... \left\{ f \in V \bigg| \displaystyle{\lim
_{x\rightarrow 0^-}}f(x)=+...
I'm forgetting what you said and using zero instead.
Missing character: There is no ^^@ in font [/usr/share/fonts/Win10/georgia]/OT:
script=latn;language=DFLT;mapping=tex-text;!
Missing character: There is no ^^S in font [/usr/share/fonts/Win10/georgia]/OT:
script=latn;language=DFLT;mapping=tex-text;!
Overfull \hbox (13.50108pt too wide) in paragraph at lines 30--31
[]$\OML/cmm/m/it/10 W[] \OT1/cmr/m/n/10 = []$
[]
! You can't use `\char' after \the.
\EU1\i ->\char
"0131\relax
l.31 ... \bigg\{ f \in V \bigg| \displaystyle{\lim
_{x\rightarrow -\infty}}f(...
I'm forgetting what you said and using zero instead.
Missing character: There is no ^^@ in font [/usr/share/fonts/Win10/georgia]/OT:
script=latn;language=DFLT;mapping=tex-text;!
Missing character: There is no ^^S in font [/usr/share/fonts/Win10/georgia]/OT:
script=latn;language=DFLT;mapping=tex-text;!
LaTeX Font Info: Font shape `EU1/georgia.TTF(0)/m/sl' in size <10> not avail
able
(Font) Font shape `EU1/georgia.TTF(0)/m/it' tried instead on input
line 37.

What is the error and how can i solved?

Thanks for your help.
fabioonier
Posts: 26
Joined: Thu Jul 06, 2017 5:37 am

Problems compiling with XeLaTeX

Post by fabioonier »

Hi, everybody. I could solve the last problem. I just added the next code in the preamble

Code: Select all

\makeatletter
\renewcommand\es@op@ac[1]{\textnormal{\'#1}}
\makeatother
And it worked perfectly!

Thanks for your help.

I guess this topic can be closed.
Post Reply