1

i want to add line (A) and change distance between rows (B)

My code

\documentclass[11pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[margin=1in]{geometry}
\usepackage{tcolorbox}
\begin{document}
\begin{tcolorbox}[width=10cm]

\begin{enumerate}
\item
...........:...........     ..............................................\\
........................  \hfill XXX
%\vspace*{1.5cm}
\item
...........:...........     ..............................................\\
........................  \hfill XXX
\end{enumerate}
\end{tcolorbox}

\end{document}

enter image description here Please help. Thanks

1 Answer 1

1

The enumitem package allows the simple specification of various list parameters, including (in this case) itemsep to set the vertical gap between items.

\documentclass[11pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[margin=1in]{geometry}
\usepackage{tcolorbox,enumitem}
\newcommand\linegap[1]{\underline{\hspace{#1}}}
\begin{document}
\begin{tcolorbox}[width=10cm]

\begin{enumerate}[itemsep=1.5cm,leftmargin=0pt,itemindent=.5in]
\item
\linegap{35pt}:\linegap{35pt}     \linegap{135pt}\\
\linegap{75pt}  \hfill A
\item
...........:...........     ..............................................\\
........................  \hfill A
\end{enumerate}
\end{tcolorbox}

\end{document}

enter image description here


I can think of various interpretations for what the OP means by the "B" issue. Here is a possibility. In addition to using itemsep, the setspace package is employed to temporarily set the line spacing:

\documentclass[11pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[margin=1in]{geometry}
\usepackage{tcolorbox,enumitem,setspace}
\newcommand\linegap[1]{\underline{\hspace{#1}}}
\begin{document}
\begin{tcolorbox}[width=10cm]
\begin{spacing}{2.5}
\begin{enumerate}[itemsep=1.5cm,leftmargin=0pt,itemindent=.5in]
\item
\linegap{35pt}:\linegap{35pt}     \linegap{135pt}\\
\linegap{75pt}  \hfill A
\item
...........:...........     ..............................................\\
........................  \hfill A
\end{enumerate}
\end{spacing}
\end{tcolorbox}

\end{document}

enter image description here

4
  • B.Segietes. Thank for your fast reply. Sorry, I uploading image slow and can you help to change A & B in my uploaded image.
    – latexforti
    Mar 20, 2019 at 14:16
  • 1
    @latexforti I have taken care of the "A" issue but with regard to vertical distance "B", is it between the 1st line and what follows? is it between every line? or is it between items? Mar 20, 2019 at 14:22
  • (B-green) is between every line. I don't want to use (\\) and tried added \vspace*{0.3cm} but not but not effort. Thanks
    – latexforti
    Mar 20, 2019 at 14:28
  • 1
    @latexforti Please see my edit. I use the spacing environment to set temporarily the line spacing. Mar 20, 2019 at 14:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .