I am working on it:
\documentclass{article}
\newcommand\htext[1]{\texttt{0x\MakeLowercase{#1}}}
\begin{document}
\begin{table}[h]
\centering
\begin{tabular}{|l|l|l|l|l|l|l|}
\hline
\htext{FFFFFFFFFFFFFFFFF} & \htext{FFFFFFFFFFFFFFFFF} & \htext{FFFFFFFFFFFFFFFFF} & & & & \\
\hline
\end{tabular}
\end{table}
\end{document}
The empty 4 columns will have something very similar. Now, notice that, an Overfull \hbox
error occurs.
How can I adjust width of each column so that each \htext{...}
entry is split in to more than one lines (I don't want to reduce font size)? Something like setting p{2in}
did not help (as it just created one cell entry overlapping with other).
Best Answer
Here is a solution, adapted from a macro I found on Stack Overflow: I define a
\hyphenatestring
macro, that takes string, converts it to lower case and makes it ‘hyphenatable anywhere’. This macro can be used inside font-changing commands: