0

When trying to use underlined blank spaces for a questionary inside a book, I'm getting the underline out of document margings. Does anyone knows how to make underline command respect the document margins?

Code:

\documentclass[11pt]{elegantbook}
\usepackage[spanish]{babel}
\usepackage[utf8]{inputenc}
\usepackage{soul}
% Underlined spaces command
\newcommand{\uline}[1]{\underline{\hspace{#1}}}

\title{Document Title}
\subtitle{Subtitle}


\begin{document}

\maketitle

\frontmatter

\mainmatter

\chapter*{Introduction}

\Large

\begin{enumerate}
  \item Test text test text test text test text. Test text test text test text test text test text. Test text test text test text test text. Test text test text test text test text test text.
  \item Test text \uline{4cm} test \uline{4cm} test text test text test text test text.
  % The following line is the one that is not respecting margins
  \item Test \uline{4cm} test text test text test text test text \uline{5cm} test text test text test text.
\end{enumerate}

\end{document}

Output:

enter image description here

obedmr
  • 1

0 Answers0