TeX - LaTeX Asked by Trevor Blake on January 20, 2021
The error: "Undefined Control Sequence. Overfull hbox (15.0pt too wide)" appears for each "end tabularx." I have tried {noindent} before say{begintabularx} without success. While I could continue working for the first 500+ instances of this error, now the document will not render.
Error Messages https://ibb.co/5Y4DtCS
Rendered https://ibb.co/nBWSSth
documentclass{book}
usepackage{changepage}
usepackage{comment}
usepackage{dirtytalk}
usepackage[T1]{fontenc}
usepackage[hang,flushmargin]{footmisc}
usepackage{geometry}
usepackage{graphicx}
usepackage{imakeidx}
usepackage[utf8]{inputenc}
usepackage{lettrine}
usepackage{lipsum}
usepackage{microtype}
usepackage{marginnote}
usepackage{pifont}
usepackage{tabularx}
usepackage{type1cm}
usepackage{yfonts}
geometry{paperwidth=8.5in,paperheight=11in,inner=1in}
usepackage{perpage}
MakePerPage{footnote}
usepackage{afterpage}
newcommandblankpage{
null
thispagestyle{empty}
addtocounter{page}{-1}
newpage
}
begin{document}
begin{center}
say{Undefined Control Sequence.
Overfull hbox (15.0pt too wide) in paragraph at lines 53 and 63 and 75.
- these are the say{end tabularx} lines.}
end{center}
begin{tabularx}{1textwidth} {
>{fullarraybackslash}X
>{fullarraybackslash}X }
begin{center}
noindent textbf{Header Left Column}
end{center}
&
begin{center}
noindent textbf{Header Right Column}
end{center}
end{tabularx}
begin{tabularx}{1textwidth} {
>{fullarraybackslash}X
>{fullarraybackslash}X }
noindent lipsum[3]
&
noindent lipsum[4]
end{tabularx}
bigskip
begin{tabularx}{1textwidth} {
>{fullarraybackslash}X
>{fullarraybackslash}X }
noindent lipsum[5]
&
noindent lipsum[6]
end{tabularx}
bigskip
noindent Why the error for say{end tabularx?} I am using overleaf.com in Firefox 81.0 on OSX 10.15.6. I have tried {noindent} before say{begintabularx} without success. The usecase is a polyglot book, with one language in the left column and a different language in the right column. The two columns must begin on the same line, but are not required to end on the same line.
bigskip
noindent Many thanks for your help.
end{document}
If you look at the error message,
! Undefined control sequence.
<template> ...p @startpbox {TX@col@width }full
arraybackslash ignorespa...
l.53 end{tabularx}
The line break shows where TeX was in parsing the line when it hit the error. In this case, the problem is that full
is not defined. I don't know what you expect that to do.
The overfull hbox
messages are referring to the table as a whole. The 15pt is coming from a paragraph indent. Wrapping the tabularx
environments with center
will resolve that issue.
(There were doubtless good reasons why Leslie Lamport decided that you should be able to put a tabular
into the middle of a paragraph when he created LaTeX, but this decision has been the root of countless pain for users in the decades since. When I taught LaTeX classes back in the 80s/90s, I encouraged users to declare an aroundtbl
environment (and also aroundpic
) to allow consistent placement of tabular material and graphics.)
Answered by Don Hosek on January 20, 2021
"Undefined Control Sequence. Overfull hbox (15.0pt too wide)"
These are two entirely separate issues:
The first is that you get an error message because full
isn't defined. How or where is full
defined.
The second is a warning message (not an error message) caused by the fact that you didn't specify noindent
right before begin{tabularx}
. It's somewhat ironic that your code has lots of noindent
directives where they aren't needed, but is lacking the noindent
directives where they are needed.
The following screenshot features two identical tabularx
environments; the only difference is that the first isn't preceded by noindent
. (Since I don't know how full
is defined, I decided to omit it from the code.) Sure enough, the first one generates a "Overfull hbox (15.0pt too wide) in paragraph at lines..." message whereas the second does not.
documentclass{book}
usepackage[T1]{fontenc}
usepackage[letterpaper,inner=1in,nomarginpar]{geometry}
usepackage{microtype,tabularx}
usepackage{booktabs,showframe,lipsum} % <-- new
begin{document}
%noindent % <-- "noindent" deliberately commented out
begin{tabularx}{1textwidth}{@{} XX @{}}
multicolumn{1}{c}{Header Left Column} &
multicolumn{1}{c}{Header Right Column}
addlinespace
lipsum[2] & lipsum[4]
end{tabularx}
vspace{0.5in}
noindent
begin{tabularx}{1textwidth}{@{} XX @{}}
multicolumn{1}{c}{Header Left Column} &
multicolumn{1}{c}{Header Right Column}
addlinespace
lipsum[2] & lipsum[4]
end{tabularx}
end{document}
Answered by Mico on January 20, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP