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}
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}
|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.