XeTeX ⇒ Problems compiling with XeLaTeX
-
- Posts: 26
- Joined: Thu Jul 06, 2017 5:37 am
Problems compiling with XeLaTeX
Hello, everybody.
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.
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.
- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
Problems compiling with XeLaTeX
Can you please prepare a minimal working example that reproduces the exact error message?
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
- Stefan Kottwitz
- Site Admin
- Posts: 10275
- Joined: Mon Mar 10, 2008 9:44 pm
Problems compiling with XeLaTeX
I think it's a pdfLaTeX command, but with XeLaTeX this might help:
Stefan
Code: Select all
\makeatletter
\chardef\pdf@shellescape=\@ne
\makeatother
LaTeX.org admin
-
- Posts: 26
- Joined: Thu Jul 06, 2017 5:37 am
Problems compiling with XeLaTeX
Hi, Stefan and Johannes_B.
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.)
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: 10275
- 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: 10275
- Joined: Mon Mar 10, 2008 9:44 pm
Problems compiling with XeLaTeX
His comes into the preamble of your tex document, before \usepackage{pstricks}.
Btw. a .sty file should never be modified. Redefinitions or patches are a possible way.
Stefan
Btw. a .sty file should never be modified. Redefinitions or patches are a possible way.
Stefan
LaTeX.org admin
-
- Posts: 26
- Joined: Thu Jul 06, 2017 5:37 am
Problems compiling with XeLaTeX
Hi, Stefan.
I did what you suggested and it didn't work. I get the same error message.
(/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.)
This error message is only shown when I compile with XeLaTeX. I have no problem when I compile with PDFLaTeX.
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
Curios, your OS is a bit newer than mine (I'm on Open SuSe 42.1), but your pstricks package appears to be far older than mine ... Ok, I never cared about the TeX bundle available through the Linux-distri, rather, I installed TeX Live directly. Still, having pstricks (the wrapper, at least) from 2013 seems odd, regarding that TL 2016 shipped with a version from 2015, IIRC; I'd expect to have Leap 42.2 at least TL `16...
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
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
Hi, rais. It seems tha mi TexLive version is 2015.
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.
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.