2

I want to write some words with underscores inside table cells. It would be better if these words could be written without using \_ to get underscore. Also I want to make these word hyphenate in any place like \seqsplit command does. I tried to use \seqsplit with \detokenize inside but it get me an error.

MWE:

\documentclass{article}
\usepackage{seqsplit}
\usepackage{array}

\begin{document}



\begin{center}
    \begin{tabular}{ | m{5em}| } 
        \hline
        SOME\_LONG\_COMMAND  \\\hline
        \detokenize{SOME_LONG_COMMAND}  \\\hline
        \seqsplit{SOME\_LONG\_COMMAND}  \\\hline
        \seqsplit{\detokenize{SOME_LONG_COMMAND}} \\\hline

    \end{tabular}
\end{center}


\end{document}

1 Answer 1

5
\documentclass{article}
\usepackage{seqsplit}
\usepackage{array}
\usepackage[T1]{fontenc} %needed for correct underscores with pdflatex
\begin{document}



\begin{center}
    \begin{tabular}{ | m{5em}| }
        \hline
        SOME\_LONG\_COMMAND  \\\hline
        \detokenize{SOME_LONG_COMMAND}  \\\hline
        \seqsplit{SOME\_LONG\_COMMAND}  \\\hline
        \expandafter\seqsplit\expandafter{\detokenize{SOME_LONG_COMMAND}} \\\hline

    \end{tabular}
\end{center}


\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .