This question is related to How to create a newcommand for fontsize?. I would like to change the fontsize within \ul of the soul package. For example:


\ul{{\mycfs{6} Size 6 font} Normal size font}

This error message occurs: ! Package soul Error: Reconstruction failed.

How can this be fixed?

  • Have a look at the correction and additional answers to the other topic. – Stefan Kottwitz Aug 23 '10 at 19:00

I would change the definition of \mycfs so that it no longer has an argument:


\newcommand\mycfs{\fontsize{\mysize}{\the\dimexpr \mysize*1.2\relax}\selectfont}


\ul{\mycfs Size 6 font} Normal size font

\mbox could already fix it for you:


\ul{\mbox{\mycfs{6}Size 6 font} Normal size font}



alt text

  • 1
    The trouble with mbox is that is will not line break properly and out out of the margin. – user942 Aug 23 '10 at 21:16
  • What is the goal? Underlining long passages or several lines seems strange to me. – Stefan Kottwitz Aug 23 '10 at 21:22
  • 1
    underlining urls – user942 Aug 23 '10 at 21:23
  • 2
    As underlining is typographically questionable style it's rarely used in texts, even modern webpages try to avoid that. It's a relic of the time of early browsers. So, it's not well supported. Perhaps have a look at tex.ac.uk/cgi-bin/texfaq2html?label=underline - maybe you might find a better emphasizing of URLs than underlining? Bold, colored, or typewriter font? – Stefan Kottwitz Aug 23 '10 at 21:48

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.