LaTeX forum ⇒ XeTeXProblems compiling with XeLaTeX Topic is solved

Information and discussion about XeTeX, an alternative for pdfTeX based on e-Tex
fabioonier
Posts: 26
Joined: Thu Jul 06, 2017 5:37 am

Problems compiling with XeLaTeX

Postby fabioonier » Sun Jul 09, 2017 4:56 am

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.

Tags:

User avatar
Johannes_B
Site Moderator
Posts: 3795
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Sun Jul 09, 2017 9:20 am

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.

User avatar
Stefan Kottwitz
Site Admin
Posts: 8955
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Mon Jul 10, 2017 4:50 am

I think it's a pdfLaTeX command, but with XeLaTeX this might help:

  1. \makeatletter
  2. \chardef\pdf@shellescape=\@ne
  3. \makeatother


Stefan
Site admin

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

Postby fabioonier » Mon Jul 10, 2017 7:21 pm

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.)

User avatar
Stefan Kottwitz
Site Admin
Posts: 8955
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Mon Jul 10, 2017 7:31 pm

Hi Fabio,

did you try what I suggested?

Stefan
Site admin

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

Postby fabioonier » Tue Jul 11, 2017 1:43 am

Hi Fabio,

did you try what I suggested?

Stefan


Where do I have to write it? I mean, must I change the pstricks.sty file directly with the code that you suggest?

User avatar
Stefan Kottwitz
Site Admin
Posts: 8955
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Tue Jul 11, 2017 1:53 am

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
Site admin

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

Postby fabioonier » Tue Jul 11, 2017 2:22 pm

Hi, Stefan.
I did what you suggested and it didn't work. I get the same error message.

  1. \documentclass[letterpaper,reqno]{book}
  2. \usepackage{makeidx}
  3. \usepackage[spanish,es-nosectiondot]{babel}
  4. \usepackage[utf8]{inputenc}
  5. \usepackage{color}
  6. \usepackage{verbatim} %Para comentar bloques de texto
  7. \usepackage[text={168mm,240mm},centering]{geometry}%Define el ancho y la altura del texto (Página)
  8. \usepackage{amssymb,amsmath,amsthm}
  9. \usepackage{epsfig,graphicx,psfrag,float}
  10. \makeatletter
  11. \chardef\pdf@shellescape=1
  12. \makeatother
  13. \usepackage[pdf]{pstricks}
  14. \usepackage{pstricks-add,pst-math,pst-xkey,pst-pdf,auto-pst-pdf}
  15. \usepackage[all]{xy}
  16. \usepackage{enumerate}
  17. \usepackage{hyperref}


(/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.

rais
Posts: 160
Joined: Sun Nov 16, 2014 8:51 pm

Postby rais » Tue Jul 11, 2017 8:59 pm

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

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

Postby fabioonier » Tue Jul 11, 2017 9:12 pm

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.


Return to “XeTeX”

Who is online

Users browsing this forum: No registered users and 2 guests