Page LayoutTwo Columns, avoid spelled Enumeration overlapping Text

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
User1802

Two Columns, avoid spelled Enumeration overlapping Text

Post by User1802 »

I guess my question is mainly about how how to indent the Spanish content in the position pointed out by the red line, and how to indent the English content to the position indicated by the blue line, in order to avoid the overlapping of the two columns' content.

Here is the story.

I'm using a two columns layout (parallel package), and also managed to spell the numbered lists using english/spanish wording, however, I would like to fix the indentation of the main labels because they're overlapping like in the image below:
Screenshot.png
Screenshot.png (10.55 KiB) Viewed 3968 times
If you look at the "TERCERA" text, it ends up overlapping the english text "THIRD"

Ideally, I would like to:

- indent the list items so that "TERCERA" can be moved 2cm to the right, but end at the same point where it is ending now.

-indent the list items "THIRD" so that it will be 2cm to the right as well.

My current code looks like this:

The preamble

Code: Select all

% spelling clauses BEGIN
\makeatletter
\newcommand*{\spelledEN}[1]{%
  \expandafter\@spelledEN\csname c@#1\endcsname
}
\newcommand*{\@spelledEN}[1]{%
  \ifcase#1\or{First}\or{Second}\or{Third}\or{Fourth}\or{Fifth}\or{Sixth}\or{Seventh}\or{Eighth}\or{Ninth}\or{Tenth}\or{Eleventh}\or{Twelvth}\or{Thirteenth}\or{Fourteenth}\or{Fifteenth}\or{Sixteenth}\or{Seventeenth}\or{Eighteenth}\or{Nineteenth}\or{Twentyth}\else\@ctrerr\fi
}
\AddEnumerateCounter{\spelledEN}{\@spelledEN}{Seventeenth}
\makeatother


\makeatletter
\newcommand*{\spelledES}[1]{%
  \expandafter\@spelledES\csname c@#1\endcsname
}
\newcommand*{\@spelledES}[1]{%
  \ifcase#1\or{Primera}\or{Segunda}\or{Tercera}\or{Cuarta}\or{Quinta}\or{Sexta}\or{S\'eptima}\or{Octava}\or{Novena}\or{D\'ecima}\or{Und\'ecima}\or{Duodecima}\or{D\'ecimotercera}\or{D\'ecimoquarta}\or{D\'ecimoquinta}\or{D\'ecimosexta}\or{D\'ecimos\'eptima}\or{D\'ecimoctava}\or{D\'ecimonovena}\or{Vix\'esima}\else\@ctrerr\fi
}
\AddEnumerateCounter{\spelledES}{\@spelledES}{Decimotercera}
\makeatother
The document content

Code: Select all

\begin{Parallel}[c]{}{}
\ParallelLText{ % left collumn
  \begin{enumerate}[leftmargin=15pt,rightmargin=245pt,label={\MakeUppercase{\spelledES*.}}]
  \item{DURACIÓN DEL CONTRATO Y PERIODO DE PRUEBA}
    \begin{enumerate}
      \item{lorem ipsum dolor sit amet}
    \end{enumerate}
  \end{enumerate}
}%end of left collumn
\ParallelRText{% right collumn
  \begin{enumerate}[leftmargin=260pt,label={\MakeUppercase{\spelledEN*.}}]
  \item{DURATION/ TRIAL PERIOD}
    \begin{enumerate}
      \item{lorem ipsum dolor sit amet}
    \end{enumerate}
  \end{enumerate}
}%end of right collumn
\end{Parallel}
Any feedback on this would be appreciated.

Many thanks
Last edited by User1802 on Thu Jul 07, 2011 8:38 am, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Stefan Kottwitz
Site Admin
Posts: 10330
Joined: Mon Mar 10, 2008 9:44 pm

Two Columns, avoid spelled Enumeration overlapping Text

Post by Stefan Kottwitz »

Hi Vladimir,

I guess you posted the code pieces so readers could test it. However, it's not working without additional code.
  • Which document class do you use?
  • Do you use babel with english and spanish option?
  • Which packages do you load? Or is parallel the only one?
  • Which other settings do you use, regarding page dimensions etc.?
If you would post a small compilable example (just reduce a copy of your original) we could test it. It would increase the chance that readers would contribute advice.

Stefan
LaTeX.org admin
User1802

Two Columns, avoid spelled Enumeration overlapping Text

Post by User1802 »

Thanks Stefan,

Just worked out this compilable example:

Code: Select all

\documentclass[a4paper]{article}

\usepackage[utf8]{inputenc}
\usepackage[english,spanish]{babel}
\usepackage{parallel}
\usepackage{enumitem}
\usepackage{hyperref}


% spelling lists BEGIN
\makeatletter
\newcommand*{\spelledEN}[1]{%
  \expandafter\@spelledEN\csname c@#1\endcsname
}
\newcommand*{\@spelledEN}[1]{%
  \ifcase#1\or{First}\or{Second}\else\@ctrerr\fi%
}
\newcommand*{\spelledES}[1]{%
  \expandafter\@spelledES\csname c@#1\endcsname
}
\newcommand*{\@spelledES}[1]{%
  \ifcase#1\or{Primera}\or{Segunda}\else\@ctrerr\fi
}
\AddEnumerateCounter{\spelledEN}{\@spelledEN}{Second}
\AddEnumerateCounter{\spelledES}{\@spelledES}{Primera}
\makeatother
% spelling lists END

%page geometry begin
\setlength\parindent{0in}
\setlength\voffset{-1in}
\setlength\hoffset{-1in}
\setlength\topmargin{0.7992in}
\setlength\oddsidemargin{0.7992in}
\setlength\textheight{9.5149in}
\setlength\textwidth{6.6688995in}
\setlength\footskip{1.0792in}
\setlength\headheight{0cm}
\setlength\headsep{0cm}
%page geometry end


\begin{document}

\begin{Parallel}[c]{}{}
\ParallelLText{ % left column

\begin{enumerate}[leftmargin=15pt,rightmargin=245pt,label={\MakeUppercase{\spelledES*.}}]
\item{\MakeUppercase{Quisque sodales elit non nisi commodo id}}

\begin{enumerate}
\item{
  Quisque sodales elit non nisi commodo id vestibulum risus scelerisque. Sed
  dapibus augue vitae massa volutpat condimentum. Cras id ante nibh, eu aliquet
  lorem.
 }
\item{
  Aliquam ut dolor vel enim tempor tincidunt vel ut nunc. Donec at lacus sit
  amet orci lacinia dapibus sit amet sed nunc.
 }
\end{enumerate}

\item{\MakeUppercase{Nunc velit purus, euismod sit amet sollicitudin sed}}
\begin{enumerate}
\item{
  Nunc velit purus, euismod sit amet sollicitudin sed, porttitor ut turpis.
  Maecenas metus magna, tempus sit amet congue non, imperdiet non ante.
 }
\item{
  Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere
  cubilia Curae; In non tellus in eros convallis iaculis. Nam mattis nisl in est
  pretium tincidunt.
 }
\end{enumerate}
\end{enumerate}


}%end of left column
\ParallelRText{% right column

\begin{enumerate}[leftmargin=260pt,label={\MakeUppercase{\spelledEN*.}}]
\item{\MakeUppercase{Quisque sodales elit non nisi commodo id}}

\begin{enumerate}
\item{
  Quisque sodales elit non nisi commodo id vestibulum risus scelerisque. Sed
  dapibus augue vitae massa volutpat condimentum. Cras id ante nibh, eu aliquet
  lorem.
 }
\item{
  Aliquam ut dolor vel enim tempor tincidunt vel ut nunc. Donec at lacus sit
  amet orci lacinia dapibus sit amet sed nunc.
 }
\end{enumerate}


\item{\MakeUppercase{Nunc velit purus, euismod sit amet sollicitudin sed}}
\begin{enumerate}
\item{
  Nunc velit purus, euismod sit amet sollicitudin sed, porttitor ut turpis.
  Maecenas metus magna, tempus sit amet congue non, imperdiet non ante.
 }
\item{
  Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere
  cubilia Curae; In non tellus in eros convallis iaculis. Nam mattis nisl in est
  pretium tincidunt.
 }
\end{enumerate}
\end{enumerate}


}%end of right column
\end{Parallel}

\end{document}
It will produce a two columns document, the issue is emphasized because I placed longer list items.

Many thanks,
Vladimir
User1802

Two Columns, avoid spelled Enumeration overlapping Text

Post by User1802 »

please close this thread, I opened a better worded one,many thanks.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Two Columns, avoid spelled Enumeration overlapping Text

Post by localghost »

It seems that the columns created by parallel are not respected by the list environments. So you have to adjust the settings for the first level of the enumerated lists. The example below gives an appropriate result. However, the of achieving it is not so proper.

Code: Select all

\documentclass[a4paper]{article}

\usepackage[utf8]{inputenc}
\usepackage[english,spanish]{babel}
\usepackage{parallel}
\usepackage{enumitem}
\usepackage{hyperref}


% spelling lists BEGIN
\makeatletter
\newcommand*{\spelledEN}[1]{%
  \expandafter\@spelledEN\csname c@#1\endcsname
}
\newcommand*{\@spelledEN}[1]{%
  \ifcase#1\or{First}\or{Second}\else\@ctrerr\fi%
}
\newcommand*{\spelledES}[1]{%
  \expandafter\@spelledES\csname c@#1\endcsname
}
\newcommand*{\@spelledES}[1]{%
  \ifcase#1\or{Primera}\or{Segunda}\else\@ctrerr\fi
}
\AddEnumerateCounter{\spelledEN}{\@spelledEN}{Second}
\AddEnumerateCounter{\spelledES}{\@spelledES}{Primera}
\makeatother
% spelling lists END

%page geometry begin
\setlength\parindent{0in}
\setlength\voffset{-1in}
\setlength\hoffset{-1in}
\setlength\topmargin{0.7992in}
\setlength\oddsidemargin{0.7992in}
\setlength\textheight{9.5149in}
\setlength\textwidth{6.6688995in}
\setlength\footskip{1.0792in}
\setlength\headheight{0cm}
\setlength\headsep{0cm}
%page geometry end


\begin{document}

\begin{Parallel}[c]{}{}
\ParallelLText{ % left column

\begin{enumerate}[
  leftmargin=50pt,
  rightmargin=265pt,
  label={\MakeUppercase{\spelledES*.}}
]
\item{\MakeUppercase{Quisque sodales elit non nisi commodo id}}

\begin{enumerate}
\item{
  Quisque sodales elit non nisi commodo id vestibulum risus scelerisque. Sed
  dapibus augue vitae massa volutpat condimentum. Cras id ante nibh, eu aliquet
  lorem.
}
\item{
  Aliquam ut dolor vel enim tempor tincidunt vel ut nunc. Donec at lacus sit
  amet orci lacinia dapibus sit amet sed nunc.
}
\end{enumerate}

\item{\MakeUppercase{Nunc velit purus, euismod sit amet sollicitudin sed}}
\begin{enumerate}
\item{
  Nunc velit purus, euismod sit amet sollicitudin sed, porttitor ut turpis.
  Maecenas metus magna, tempus sit amet congue non, imperdiet non ante.
}
\item{
  Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere
  cubilia Curae; In non tellus in eros convallis iaculis. Nam mattis nisl in est
  pretium tincidunt.
}
\end{enumerate}
\end{enumerate}


}%end of left column
\ParallelRText{% right column

\begin{enumerate}[
  leftmargin=285pt,
  label={\MakeUppercase{\spelledEN*.}}
]
\item{\MakeUppercase{Quisque sodales elit non nisi commodo id}}

\begin{enumerate}
\item{
  Quisque sodales elit non nisi commodo id vestibulum risus scelerisque. Sed
  dapibus augue vitae massa volutpat condimentum. Cras id ante nibh, eu aliquet
  lorem.
}
\item{
  Aliquam ut dolor vel enim tempor tincidunt vel ut nunc. Donec at lacus sit
  amet orci lacinia dapibus sit amet sed nunc.
}
\end{enumerate}


\item{\MakeUppercase{Nunc velit purus, euismod sit amet sollicitudin sed}}
\begin{enumerate}
\item{
  Nunc velit purus, euismod sit amet sollicitudin sed, porttitor ut turpis.
  Maecenas metus magna, tempus sit amet congue non, imperdiet non ante.
}
\item{
  Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere
  cubilia Curae; In non tellus in eros convallis iaculis. Nam mattis nisl in est
  pretium tincidunt.
}
\end{enumerate}
\end{enumerate}


}%end of right column
\end{Parallel}

\end{document}

Thorsten
User1802

Two Columns, avoid spelled Enumeration overlapping Text

Post by User1802 »

Hello Thorsten,

Your idea is great, thanks for providing a solution to this.

So, quoting you:

Code: Select all

\documentclass[a4paper]{article}

\usepackage[utf8]{inputenc}
\usepackage[english,spanish]{babel}
\usepackage{parallel}
\usepackage{enumitem}
\usepackage{hyperref}


% spelling lists BEGIN
\makeatletter
\newcommand*{\spelledEN}[1]{%
  \expandafter\@spelledEN\csname c@#1\endcsname
}
\newcommand*{\@spelledEN}[1]{%
  \ifcase#1\or{First}\or{Second}\else\@ctrerr\fi%
}
\newcommand*{\spelledES}[1]{%
  \expandafter\@spelledES\csname c@#1\endcsname
}
\newcommand*{\@spelledES}[1]{%
  \ifcase#1\or{Primera}\or{Segunda}\else\@ctrerr\fi
}
\AddEnumerateCounter{\spelledEN}{\@spelledEN}{Second}
\AddEnumerateCounter{\spelledES}{\@spelledES}{Primera}
\makeatother
% spelling lists END

%page geometry begin
\setlength\parindent{0in}
\setlength\voffset{-1in}
\setlength\hoffset{-1in}
\setlength\topmargin{0.7992in}
\setlength\oddsidemargin{0.7992in}
\setlength\textheight{9.5149in}
\setlength\textwidth{6.6688995in}
\setlength\footskip{1.0792in}
\setlength\headheight{0cm}
\setlength\headsep{0cm}
%page geometry end


\begin{document}

\begin{Parallel}[c]{}{}
\ParallelLText{ % left column

\begin{enumerate}[
  leftmargin=50pt,
  rightmargin=265pt,
  label={\MakeUppercase{\spelledES*.}}
]
\item{\MakeUppercase{Quisque sodales elit non nisi commodo id}}

\begin{enumerate}
\item{
  Quisque sodales elit non nisi commodo id vestibulum risus scelerisque. Sed
  dapibus augue vitae massa volutpat condimentum. Cras id ante nibh, eu aliquet
  lorem.
}
\item{
  Aliquam ut dolor vel enim tempor tincidunt vel ut nunc. Donec at lacus sit
  amet orci lacinia dapibus sit amet sed nunc.
}
\end{enumerate}

\item{\MakeUppercase{Nunc velit purus, euismod sit amet sollicitudin sed}}
\begin{enumerate}
\item{
  Nunc velit purus, euismod sit amet sollicitudin sed, porttitor ut turpis.
  Maecenas metus magna, tempus sit amet congue non, imperdiet non ante.
}
\item{
  Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere
  cubilia Curae; In non tellus in eros convallis iaculis. Nam mattis nisl in est
  pretium tincidunt.
}
\end{enumerate}
\end{enumerate}


}%end of left column
\ParallelRText{% right column

\begin{enumerate}[
  leftmargin=285pt,
  label={\MakeUppercase{\spelledEN*.}}
]
\item{\MakeUppercase{Quisque sodales elit non nisi commodo id}}

\begin{enumerate}
\item{
  Quisque sodales elit non nisi commodo id vestibulum risus scelerisque. Sed
  dapibus augue vitae massa volutpat condimentum. Cras id ante nibh, eu aliquet
  lorem.
}
\item{
  Aliquam ut dolor vel enim tempor tincidunt vel ut nunc. Donec at lacus sit
  amet orci lacinia dapibus sit amet sed nunc.
}
\end{enumerate}


\item{\MakeUppercase{Nunc velit purus, euismod sit amet sollicitudin sed}}
\begin{enumerate}
\item{
  Nunc velit purus, euismod sit amet sollicitudin sed, porttitor ut turpis.
  Maecenas metus magna, tempus sit amet congue non, imperdiet non ante.
}
\item{
  Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere
  cubilia Curae; In non tellus in eros convallis iaculis. Nam mattis nisl in est
  pretium tincidunt.
}
\end{enumerate}
\end{enumerate}


}%end of right column
\end{Parallel}

\end{document}
Many thanks again
Post Reply