3

I use the answer of @werner in this post: How do I write \underline text but with a dotted line to write a dotted text with the dashundergaps package, but when I use it with a text imported from my data, it writes it on the same line. How can I repair this?

I give a MWE

\documentclass{article}

\usepackage[dot]{dashundergaps}

\newcommand\MyText{
  Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam a venenatis lacus. Nunc vitae 
  mollis neque. Maecenas vel arcu erat. In bibendum cursus interdum. Orci varius natoque penatibus 
  et magnis dis parturient montes, nascetur ridiculus mus. Nulla aliquet arcu eget velit mollis 
  ultricies. Phasellus arcu sem, bibendum ut lorem non, interdum dictum mi. Nulla vitae libero 
  congue, ullamcorper odio ac, ultrices magna. Suspendisse bibendum tortor eu risus laoreet, ac 
  consequat arcu commodo. Nullam sagittis nibh semper dui tempus accumsan. Vivamus tempor dapibus 
  ante sit amet vulputate.%
}

\begin{document}

\dotuline{%
  Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam a venenatis lacus. Nunc vitae 
  mollis neque. Maecenas vel arcu erat. In bibendum cursus interdum. Orci varius natoque penatibus 
  et magnis dis parturient montes, nascetur ridiculus mus. Nulla aliquet arcu eget velit mollis 
  ultricies. Phasellus arcu sem, bibendum ut lorem non, interdum dictum mi. Nulla vitae libero 
  congue, ullamcorper odio ac, ultrices magna. Suspendisse bibendum tortor eu risus laoreet, ac 
  consequat arcu commodo. Nullam sagittis nibh semper dui tempus accumsan. Vivamus tempor dapibus 
  ante sit amet vulputate.%
}
\vspace*{5mm}\\
WITH THE IMPORTED TEXT
\vspace*{5mm}

\dotuline{%
\MyText
}

\end{document}

enter image description here

5

The dashundergaps package is built on top of the ulem package you can use \useunder macro like this

\documentclass{article}

\usepackage[dot]{dashundergaps}

\def\MyText{
  Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam a venenatis lacus. Nunc vitae 
  mollis neque. Maecenas vel arcu erat. In bibendum cursus interdum. Orci varius natoque penatibus 
  et magnis dis parturient montes, nascetur ridiculus mus. Nulla aliquet arcu eget velit mollis 
  ultricies. Phasellus arcu sem, bibendum ut lorem non, interdum dictum mi. Nulla vitae libero 
  congue, ullamcorper odio ac, ultrices magna. Suspendisse bibendum tortor eu risus laoreet, ac 
  consequat arcu commodo. Nullam sagittis nibh semper dui tempus accumsan. Vivamus tempor dapibus 
  ante sit amet vulputate.%
}

\useunder{\dotuline}{\Dotuline}{}

\begin{document}

{\expandafter\Dotuline%
\MyText
}

\end{document}
1

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.