0

I am compiling a table whose entries are long variable names from a computer program source code. These variables names, although single words, do not fit within the column width and need to be carried over to a new line. However since the usual way of breaking words to a new line involves putting a hyphen, this creates a problem, because someone might thing that the hyphen is also a part of the variable name. I would like these long variable names to break so that they can be spread over multiple lines if necessary, but not print a hyphen when that happens. How do I prevent the hyphen from printing for an entire table?

As requested here is an example:

\documentclass{article}

\begin{document}

\begin{tabular}{p{5cm} | l | l}

thisisthelongtextthatiwanttobesplitup & text & text \ text & text & text \ text & text & text \

\end{tabular}

\end{document}

Here is the output. Essentially I want to get rid of the hyphen circled in red:

enter image description here

jopeto
  • 165

0 Answers0