Generalpbox package error: Undefined control sequence

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
alanq
Posts: 21
Joined: Mon Dec 28, 2009 3:03 am

pbox package error: Undefined control sequence

Post by alanq »

(German Help - Hilfe auf deutsch: Undefined control sequence - wie finde ich heraus, was fehlt? - LC editor remark)

I'm trying to include newlines inside a tabular environment.

Following StefanK's answer to this problem here:
http://tex.stackexchange.com/questions/ ... table-cell
I tried the pbox package http://www.ctan.org/pkg/pbox.

But I get an 'Undefined control sequence' error.

MWE:

Code: Select all

\documentclass[a4paper,10pt]{article}

\usepackage{calc}
\usepackage{ifthen}
\usepackage{pbox}

\begin{document}

\pbox{2cm}{one two three}

\end{document}
Error message:

Code: Select all

$ latex spr.tex 
This is pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009/Debian)
entering extended mode
(./spr.tex
LaTeX2e <2009/09/24>
Babel <v3.8l> and hyphenation patterns for english, usenglishmax, dumylang, noh
yphenation, ukenglish, loaded.
(/usr/share/texmf-texlive/tex/latex/base/article.cls
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
(/usr/share/texmf-texlive/tex/latex/base/size10.clo))
(/usr/share/texmf-texlive/tex/latex/tools/calc.sty)
(/usr/share/texmf-texlive/tex/latex/base/ifthen.sty)
(/usr/share/texmf-texlive/tex/latex/pbox/pbox.sty) (./spr.aux)
! Undefined control sequence.
\pb@xiii  ...1]{\pb@xlen }{#2}\ifthenelse {\equal 
                                                  {\pb@xargi }{}} {\parbox {...
l.12 \pbox{2cm}{one two three}
                              
? 

Underfull \hbox (badness 10000) in paragraph at lines 12--12
[]\OT1/cmr/m/n/10 one two

Underfull \hbox (badness 10000) in paragraph at lines 12--12
[]\OT1/cmr/m/n/10 one two
[1] (./spr.aux) )
Output written on spr.dvi (1 page, 292 bytes).
Transcript written on spr.log.
$
A <Return> after the ? yields the underfull hbox errors and output is produced.
Interestingly, the output file has TWO boxes side-by-side containing "one two three".

If the content of the pbox is shorter than the max width (2cm)
eg

Code: Select all

\pbox{2cm}{one two}
there is no error, and the output is correct.

According to the documentation (http://mirror.ctan.org/macros/latex/con ... x/pbox.pdf), pbox requires the calc and ifthen packages, which I have included. But, commenting them out gives the same error and the same results!

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

josephwright
Site Moderator
Posts: 814
Joined: Tue Jul 01, 2008 2:19 pm

pbox package error: Undefined control sequence

Post by josephwright »

For me the example compiled perfectly (with TeX Live 2012). I suspect this is a version problem. You log indicates TeX Live 2009, while the latest release of pbox was in 2011. I suggest you download pbox from CTAN and install the file locally.
Joseph Wright
alanq
Posts: 21
Joined: Mon Dec 28, 2009 3:03 am

pbox package error: Undefined control sequence

Post by alanq »

Thank you, Joseph [Sorry for the delay in replying]

I found that simply embedding another tabular environment works.
I'll upgrade pbox and use that if my scripts get too messy.

Cheers
Alan
Post Reply