3

I have the following tex:

\documentclass{article}
\usepackage{color}
\usepackage{longtable}
\usepackage{dcolumn}
\usepackage{graphicx}
\newcolumntype{d}{D{.}{.}{2}}
\begin{document}
\centering 
{\huge \bfseries Auto Test Results \\[0.4cm] }
\begin{longtable}{| p{60pt} | p{40pt} | p{250pt} |}
\hline \hline 
Test Name & Pass/Fail & Description \\ 
\hline 
\endhead 
\hline \textbf{Testa sadklfjbaskjdf\_hkla/sjhdfl\^kjashdf\#kljhasldkjf\$hlaksdjfhlkasjdfhlkasjhdflkjashdflkjhasdlfkjhal skdjfh} & {\color{green} Pass } & This does nothing \\ 
\hline \textbf{Testb} & {\color{red} Fail } & This does home/vp680\_test \textasciitilde{} \^ \textbackslash{} * \& \$ \{ \}  \\ 
\hline \textbf{Testc askjdhaskljfhkdfasdhjfkasfsdfkasdfkasjdfhljkasdhflkajsdhflkajshdflkasjdfhlkasjdfhklajsdfhlaksjdfhskldjfh} & {\color{green} Pass } & This isnt worth your time to run it and is really really really longThis isnt worth your time to run it and is really really really longThis isnt worth your time to run it and is really really really longThis isnt worth your time to run it and is really really really longThis isnt worth your time to run it and is really really really long \\ 
\hline
\end{longtable}
\end{document}

The issue I wish to resolve is for the long strings in the table is there an easy way to fix this? Preferably using standard packages.

I have seen this: How to wrap web address in table?

and this: Wrapping long lines that contain no spaces

Is there another way?

Thanks Stephen

My Bad, seqsplit is a standard package.

For anyone else looking for this use:

\seqsplit{%
\textbf{\seqsplit{Testc askjdhaskljfhkdfasdhjfkasfsdfkasdfkasjdfhljkasdhflkajsdhflkajshdflkasjdfhlkasjdfhlajsdfhlaksjdf}}}

Can't put this as answer cause new user ...

Annoying thing with seqsplit is it gets rid of spaces.

As my latex is auto gen to get around this I did the following:

\seqsplit{\textbf{\seqsplit{Testc}}}\textbf{ }\seqsplit{\textbf{\seqsplit{askjdhaskljfhkdfasdhjfkasfsdfkasdfkasjdfhljkasdhflkajsdhflkajshdflkasjdfhlkasjdfhlajsdfhlaksjdf}}}

0 Answers0