LaTeX forum ⇒ XeTeXProblems compiling with XeLaTeX Topic is solved

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

Problems compiling with XeLaTeX

Postby Stefan Kottwitz » Tue Jul 18, 2017 5:35 pm

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:

  1. %Se definen las tipografias que se van a usar: Calibri para titulos y Georgia para el cuerpo
  2. %\setmainfont{georgia.TTF}[%Fuente para el cuerpo
  3. %Path=/usr/share/fonts/Win10/,
  4. %BoldItalicFont=georgiaz.TTF,
  5. %oldFont =georgiab.TTF,
  6. %talicFont =georgiai.TTF]
  7.  
  8. %\newfontfamily\myfont{calibri.TTF}[%Fuente para secciones
  9. %Path=/usr/share/fonts/Win10/,
  10. %BoldItalicFont=calibriz.TTF,
  11. %BoldFont =calibrib.TTF,
  12. %ItalicFont =calibrii.TTF]
  13.  
  14. %Se redefinen las fuentes que se usarán en las secciones
  15. \titleformat{\chapter}[display]
  16. {\huge}{\chaptertitlename\ \thechapter}{20pt}{\Huge}
  17. %\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 15 times
Site admin

Tags:

fabioonier
Posts: 26
Joined: Thu Jul 06, 2017 5:37 am

Postby fabioonier » Tue Jul 18, 2017 6:04 pm

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 16 times


But, if add the pspicture, hits is the output
EnsayoEstilo_Error.pdf
(14.87 KiB) Downloaded 16 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 16 times

Ensayos.tex
(1.73 KiB) Downloaded 16 times



Thanks for your help.

User avatar
Stefan Kottwitz
Site Admin
Posts: 8596
Joined: Mon Mar 10, 2008 9:44 pm
Location: Hamburg, Germany
Contact:

Postby Stefan Kottwitz » Tue Jul 18, 2017 6:11 pm

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

Stefan
Site admin

fabioonier
Posts: 26
Joined: Thu Jul 06, 2017 5:37 am

Postby fabioonier » Fri Jul 21, 2017 4:51 am

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
  1. \documentclass[reqno]{book}
  2. \usepackage[spanish,es-nosectiondot]{babel}
  3. \usepackage[utf8]{inputenc}
  4. %\usepackage{fontspec}
  5. \usepackage{verbatim} %Para comentar bloques de texto
  6. \usepackage[paperheight=254.81mm,paperwidth=184.81mm,text={130mm,186mm},centering]{geometry}
  7. \usepackage{amssymb,amsmath,amsthm}
  8. \usepackage{enumerate}
  9. \usepackage{lipsum}
  10. \usepackage{multicol}
  11.  
  12. %\setmainfont{georgia.TTF}[%Fuente para el cuerpo
  13. %Path=/usr/share/fonts/Win10/,
  14. %BoldItalicFont=georgiaz.TTF,
  15. %BoldFont =georgiab.TTF,
  16. %ItalicFont =georgiai.TTF]
  17.  
  18. %\newfontfamily\myfont{calibri.TTF}[%Fuente para secciones
  19. %Path=/usr/share/fonts/Win10/,
  20. %BoldItalicFont=calibriz.TTF,
  21. %BoldFont =calibrib.TTF,
  22. %ItalicFont =calibrii.TTF]
  23.  
  24. \begin{document}
  25.  
  26. $x=\frac{1}{2}at^2+v_0t+x_0$
  27.  
  28. \begin{center}
  29. \begin{multicols}{2}
  30. \begin{enumerate}
  31. \item $ W_1 = \left\{ f \in V \bigg| \displaystyle{\lim_{x\rightarrow 0^-}}f(x)=+\infty \right\} $
  32. \item $ W_2 = \bigg\{ f \in V \bigg| \displaystyle{\lim_{x\rightarrow -\infty}}f(x)=0 \bigg\} $
  33. \end{enumerate}
  34. \end{multicols}
  35. \end{center}
  36.  
  37. \lipsum[1-2]
  38.  
  39. \end{document}


2. If I use the fontspec package in order to use the Calibri and Georgia fonts, the output is good.
  1. \documentclass[reqno]{book}
  2. \usepackage[spanish,es-nosectiondot]{babel}
  3. \usepackage[utf8]{inputenc}
  4. \usepackage{fontspec}
  5. \usepackage{verbatim} %Para comentar bloques de texto
  6. \usepackage[paperheight=254.81mm,paperwidth=184.81mm,text={130mm,186mm},centering]{geometry}
  7. \usepackage{amssymb,amsmath,amsthm}
  8. \usepackage{enumerate}
  9. \usepackage{lipsum}
  10. \usepackage{multicol}
  11.  
  12. \setmainfont{georgia.TTF}[%Fuente para el cuerpo
  13. Path=/usr/share/fonts/Win10/,
  14. BoldItalicFont=georgiaz.TTF,
  15. BoldFont =georgiab.TTF,
  16. ItalicFont =georgiai.TTF]
  17.  
  18. \newfontfamily\myfont{calibri.TTF}[%Fuente para secciones
  19. Path=/usr/share/fonts/Win10/,
  20. BoldItalicFont=calibriz.TTF,
  21. BoldFont =calibrib.TTF,
  22. ItalicFont =calibrii.TTF]
  23.  
  24. \begin{document}
  25.  
  26. $x=\frac{1}{2}at^2+v_0t+x_0$
  27.  
  28. %\begin{multicols}{2}
  29. %\begin{enumerate}
  30. % \item $ W_1 = \left\{ f \in V \bigg| \displaystyle{\lim_{x\rightarrow 0^-}}f(x)=+\infty \right\} $
  31. % \item $ W_2 = \bigg\{ f \in V \bigg| \displaystyle{\lim_{x\rightarrow -\infty}}f(x)=0 \bigg\} $
  32. %\end{enumerate}
  33. %\end{multicols}
  34.  
  35. \lipsum[1-2]
  36.  
  37. \end{document}


3. But If I use the math expression with \lim... there is the problem!!!
  1. \documentclass[reqno]{book}
  2. \usepackage[spanish,es-nosectiondot]{babel}
  3. \usepackage[utf8]{inputenc}
  4. \usepackage{fontspec}
  5. \usepackage{verbatim} %Para comentar bloques de texto
  6. \usepackage[paperheight=254.81mm,paperwidth=184.81mm,text={130mm,186mm},centering]{geometry}
  7. \usepackage{amssymb,amsmath,amsthm}
  8. \usepackage{enumerate}
  9. \usepackage{lipsum}
  10. \usepackage{multicol}
  11.  
  12. \setmainfont{georgia.TTF}[%Fuente para el cuerpo
  13. Path=/usr/share/fonts/Win10/,
  14. BoldItalicFont=georgiaz.TTF,
  15. BoldFont =georgiab.TTF,
  16. ItalicFont =georgiai.TTF]
  17.  
  18. \newfontfamily\myfont{calibri.TTF}[%Fuente para secciones
  19. Path=/usr/share/fonts/Win10/,
  20. BoldItalicFont=calibriz.TTF,
  21. BoldFont =calibrib.TTF,
  22. ItalicFont =calibrii.TTF]
  23.  
  24. \begin{document}
  25.  
  26. $x=\frac{1}{2}at^2+v_0t+x_0$\\
  27. \begin{multicols}{2}
  28. \begin{enumerate}
  29. \item $ W_1 = \left\{ f \in V \bigg| \displaystyle{\lim_{x\rightarrow 0^-}}f(x)=+\infty \right\} $
  30. \item $ W_2 = \bigg\{ f \in V \bigg| \displaystyle{\lim_{x\rightarrow -\infty}}f(x)=0 \bigg\} $
  31. \end{enumerate}
  32. \end{multicols}
  33.  
  34. \lipsum[1-2]
  35.  
  36. \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

Postby fabioonier » Sat Jul 22, 2017 12:53 am

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

  1. \makeatletter
  2. \renewcommand\es@op@ac[1]{\textnormal{\'#1}}
  3. \makeatother


And it worked perfectly!

Thanks for your help.

I guess this topic can be closed.


Return to “XeTeX”

Who is online

Users browsing this forum: No registered users and 1 guest