1

I have the following MWE:

\documentclass[12pt,a4paper]{article}
\usepackage{tabularx}
\usepackage{booktabs}
\usepackage{enumitem}
\usepackage{ragged2e}
\usepackage[utf8]{inputenc}
\newlist{myQuoteEnumerate}{enumerate}{1}
\setlist[myQuoteEnumerate,1]{label=(\arabic*),leftmargin=0cm,labelsep=-1.7em}
\newenvironment{MyQuote}{\begin{myQuoteEnumerate}[resume=*,series=MyQuoteSeries] \item
\begin{quote}}{\end{quote}
\end{myQuoteEnumerate}}
\begin{document}
\begin{MyQuote} \small \begin{tabularx}{336pt}[t]{@{}p{168pt}X@{}}
\multicolumn{2}{@{}c@{}}{\parbox{336pt}{\Centering So when these criminal organizations in the future need someone gone, they use specialized assassins in our present called loopers.}} \\ \midrule 
\textit{Pokud tyto zločinecké} & \textit{Když tihle zločinci z budoucností} \\
\textit{organizace potřebují někoho zabít,} & \textit{chtějí někoho zlikvidovat,} \\   \cmidrule(r){1-1} \cmidrule(l){2-2}
\textit{využijí specializované} & \textit{využijí zabijáky z naší} \\
\textit{nájemné vrahy v naší přítomnosti,} & \textit{přítomnosti, takzvané loopery.}\\ \cmidrule(r){1-1}
\textit{takzvané Loopery.} & 
\end{tabularx}\end{MyQuote}\normalsize
\begin{MyQuote}
\small \begin{tabularx}{336pt}[t]{@{}p{168pt}X@{}}
\multicolumn{2}{@{}c@{}}{This is called “closing your loop”.} \\ \midrule 
\textit{Říká se tomu} & Tím se smyčka uzavře, \\   
\textit{"uzavřít svého loopa."} & zabalíme loopa. 
\end{tabularx}
\end{MyQuote}
\end{document}

As you can see, (1) is aligned with the middle of the first two rows, unlike (2), which is aligned with the middle of the first row. Can I make it so that the label would always be aligned with the top of the item in enumerate? enter image description here

1

All you have to do is to add t (top alignment) for the \parbox:

enter image description here

The code (I also used the >{...} syntax to simplify a little the code, but this is optional):

\documentclass[12pt,a4paper]{article}
\usepackage{tabularx}
\usepackage{booktabs}
\usepackage{enumitem}
\usepackage{ragged2e}
\usepackage[utf8]{inputenc}
\newlist{myQuoteEnumerate}{enumerate}{1}
\setlist[myQuoteEnumerate,1]{label=(\arabic*),leftmargin=0cm,labelsep=-1.7em}
\newenvironment{MyQuote}{\begin{myQuoteEnumerate}[resume=*,series=MyQuoteSeries] \item
\begin{quote}}{\end{quote}
\end{myQuoteEnumerate}}
\begin{document}
\begin{MyQuote} \small \begin{tabularx}{336pt}[t]{@{}>{\itshape}p{168pt}>{\itshape}X@{}}
\multicolumn{2}{@{}c@{}}{\parbox[t]{336pt}{\Centering So when these criminal organizations in the future need someone gone, they use specialized assassins in our present called loopers.}} \\ \midrule 
Pokud tyto zločinecké & Když tihle zločinci z budoucností \\
organizace potřebují někoho zabít, & chtějí někoho zlikvidovat, \\   \cmidrule(r){1-1} \cmidrule(l){2-2}
využijí specializované & využijí zabijáky z naší \\
nájemné vrahy v naší přítomnosti, & přítomnosti, takzvané loopery.\\ \cmidrule(r){1-1}
takzvané Loopery. & 
\end{tabularx}\end{MyQuote}\normalsize
\begin{MyQuote}
\small \begin{tabularx}{336pt}[t]{@{}>{\itshape}p{168pt}>{\itshape}X@{}}
\multicolumn{2}{@{}c@{}}{This is called “closing your loop”.} \\ \midrule 
Říká se tomu & Tím se smyčka uzavře, \\   
"uzavřít svého loopa." & zabalíme loopa. 
\end{tabularx}
\end{MyQuote}
\end{document}
  • Thanks, I tried that but misplaced the parameter actually:-). – sup Aug 10 '15 at 18:08

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.