XeTeX ⇒ Problems compiling with XeLaTeX
-
- Posts: 26
- Joined: Thu Jul 06, 2017 5:37 am
Problems compiling with XeLaTeX
I have problems compiling with XeLaTeX and need to do it because I'm writing a math book (with the book style) and I have to use several TTF fonts. I've read that the only way to use TTF fonts in LaTeX is compilin with XeLaTeX.
But my problem it's not that (for now).
My problem is because I get this error when I compile with XeLaTeX
! Undefined control sequence.
l.64 \ifnum\pdfshellescape
=\@ne\else
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
! Missing number, treated as zero.
<to be read again>
=
l.64 \ifnum\pdfshellescape=
\@ne\else
A number should have been here; I inserted `0'.
(If you can't figure out why I needed to see a number,
look up `weird error' in the index to The TeXbook.)
I'm using TeXmaker in Opensuse Leap 42.2.
How can I solve this problem.
Thanks for your attention and help.
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
Problems compiling with XeLaTeX
- Stefan Kottwitz
- Site Admin
- Posts: 10360
- Joined: Mon Mar 10, 2008 9:44 pm
Problems compiling with XeLaTeX
Code: Select all
\makeatletter
\chardef\pdf@shellescape=\@ne
\makeatother
-
- Posts: 26
- Joined: Thu Jul 06, 2017 5:37 am
Problems compiling with XeLaTeX
I forgot to show the previous lines of the error message. Apparently the problem is in the pstricks.sty and pdftexcmds.sty files, but I don't know how to modify them for correcting that error.
(/usr/share/texmf/tex/latex/pstricks/pstricks.sty
Package: pstricks 2013/12/12 v0.60 LaTeX wrapper for `PSTricks' (RN,HV)
! Undefined control sequence.
l.64 \ifnum\pdfshellescape
=\@ne\else
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
! Missing number, treated as zero.
<to be read again>
=
l.64 \ifnum\pdfshellescape=
\@ne\else
A number should have been here; I inserted `0'.
(If you can't figure out why I needed to see a number,
look up `weird error' in the index to The TeXbook.)
- Stefan Kottwitz
- Site Admin
- Posts: 10360
- Joined: Mon Mar 10, 2008 9:44 pm
-
- Posts: 26
- Joined: Thu Jul 06, 2017 5:37 am
Problems compiling with XeLaTeX
Where do I have to write it? I mean, must I change the pstricks.sty file directly with the code that you suggest?Hi Fabio,
did you try what I suggested?
Stefan
- Stefan Kottwitz
- Site Admin
- Posts: 10360
- Joined: Mon Mar 10, 2008 9:44 pm
Problems compiling with XeLaTeX
Btw. a .sty file should never be modified. Redefinitions or patches are a possible way.
Stefan
-
- Posts: 26
- Joined: Thu Jul 06, 2017 5:37 am
Problems compiling with XeLaTeX
I did what you suggested and it didn't work. I get the same error message.
Code: Select all
\documentclass[letterpaper,reqno]{book}
\usepackage{makeidx}
\usepackage[spanish,es-nosectiondot]{babel}
\usepackage[utf8]{inputenc}
\usepackage{color}
\usepackage{verbatim} %Para comentar bloques de texto
\usepackage[text={168mm,240mm},centering]{geometry}%Define el ancho y la altura del texto (Página)
\usepackage{amssymb,amsmath,amsthm}
\usepackage{epsfig,graphicx,psfrag,float}
\makeatletter
\chardef\pdf@shellescape=1
\makeatother
\usepackage[pdf]{pstricks}
\usepackage{pstricks-add,pst-math,pst-xkey,pst-pdf,auto-pst-pdf}
\usepackage[all]{xy}
\usepackage{enumerate}
\usepackage{hyperref}
Package: pstricks 2013/12/12 v0.60 LaTeX wrapper for `PSTricks' (RN,HV)
! Undefined control sequence.
l.64 \ifnum\pdfshellescape
=\@ne\else
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
! Missing number, treated as zero.
<to be read again>
=
l.64 \ifnum\pdfshellescape=
\@ne\else
A number should have been here; I inserted `0'.
(If you can't figure out why I needed to see a number,
look up `weird error' in the index to The TeXbook.)
This error message is only shown when I compile with XeLaTeX. I have no problem when I compile with PDFLaTeX.
Problems compiling with XeLaTeX
The first question that comes to mind: what is the version of your TeX Live?
(You can post the first line of your log file or the output of `xelatex -version')
KR
Rainer
-
- Posts: 26
- Joined: Thu Jul 06, 2017 5:37 am
Problems compiling with XeLaTeX
LOG FILE :
This is XeTeX, Version 3.14159265-2.6-0.99992 (TeX Live 2015/TeX Live for SUSE Linux) (preloaded format=xelatex 2017.7.7) 11 JUL 2017 13:56
entering extended mode
I don't understand why and I don't know to update it because I've tried by console and the results are the same.