I have a word containing a number, "MyVeryBigWord1", that I never want hyphenated in my document. Here's a file replicates the problem:
\documentclass{article}
%\hyphenation{MyVeryBigWord1} % ERROR: Not a letter.
\usepackage[a4paper, total={1mm, 8in}]{geometry} % make tiny paper area
\begin{document}
some-otherword
MyVeryBigWord1 MyVeryBigWord1 MyVeryBigWord1
\end{document}
If I comment in the \hyphenation
this toy document builds (with an error) and looks fine but the document I'm actually writing it doesn't build properly with the error. How do I prevent the error and make it so my word is never hyphenated?
\newcommand{\MVBW}{\mbox{MyVeryBigWord1}}
in the preamble and\MVBW{}
in the document.\hyphenation{MyVeryBigWord}
? (TeX won't hyphenate between "MyVeryBigWord" and "1".) Alternatively, assuming the real word -- it's not really "MyVeryBigWord1", right? -- doesn't occur very often in your document, have you considered encasing all instances in an\mbox
wrapper?mbox
idea. I don't know why I didn't try it earlier. The end result:\newcommand*{\dataset}[1]{\mbox{\textit{#1}}}
used\dataset{MyDataSet1}
. Thanks.