## LaTeX forum ⇒ Text Formatting ⇒ Bad vertical Alignment in two-columned List Topic is solved

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Hermano
Posts: 14
Joined: Wed Apr 06, 2011 9:10 pm

### Bad vertical Alignment in two-columned List

Hi,

I want to have two columns with only the first column to be itemized. This works fine but the vertical alignment of my rows is messed up for both columns when I use subscript text (see the fourth row below the limit symbol in attachment). How can I solve this without having this vertical alignment problem between the columns?

This is my code:
\begin{tabular}{p{0.5\textwidth}p{0.5\textwidth}}   \begin{itemize}      \item [(i)] \hspace{5mm} $\theta_i$,~$Y = L/(2r)$      \item [(ii)] \hspace{5mm} $0 \leq \theta \leq 2\pi$,~$Y = 0$ and $L/r$      \item [(iii)] \hspace{5mm} $0 \leq Y \leq L/r$      \item [(iv)] \hspace{5mm} $0 \leq \theta \leq 2\pi$,~$Y = L/(2r)$    \end{itemize} &   \begin{itemize}      \item [ ] $P = P_t$ (feedholes)     \item [ ] $P = 1$ (ambient)      \item [ ] $\displaystyle P_{\theta = 0} = \lim_{\theta \to 2\pi}{\theta}$ (continuity)      \item [ ] $\partial P / \partial Y = 0$ (symmetry)    \end{itemize} \\\end{tabular}
Attachments
itemize-bad-alignment.png (17.24 KiB) Viewed 3804 times
Last edited by localghost on Mon Sep 02, 2013 11:00 pm, edited 1 time in total.
Reason: Image resized for better view on small screens (see Board Rules).

Tags:

localghost
Site Moderator
Posts: 9204
Joined: Fri Feb 02, 2007 12:06 pm
A math environment like alignat* from amsmath might be better for this kind of alignment.
\documentclass[11pt]{article}\usepackage[T1]{fontenc}\usepackage{mathtools}    % loads »amsmath«\usepackage{xfrac}        % nice looking fractions\usepackage{lmodern} \begin{document}   \begin{alignat*}{5}     (\text{i})   && \theta_i &,\  Y &&= \sfrac{L}{2r} & P &= P_t & \text{(feedholes)}\\     (\text{ii})  &&\qquad 0 \leq \theta \leq 2\pi &,\ Y &&= 0 \text{ and } \sfrac{L}{r} & P &= 1 & \text{(ambient)} \\     (\text{iii}) && 0 \leq Y \leq \sfrac{L}{r} &&&&\qquad P_{\theta=0} &= \lim_{\theta\to 2\pi}{\theta} &\qquad \text{(continuity)} \\     (\text{iv})  && 0 \leq \theta \leq 2\pi &,\ Y &&= \sfrac{L}{2r} & \sfrac{\partial P}{\partial Y} &= 0 & \text{(symmetry)}   \end{alignat*}\end{document}

And by the way, feedback on proposals to many of your other questions is highly appreciated. It would allow to discuss an issue and show that you notice proposals.

Thorsten
LaTeX Community Moderator

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1

Hermano
Posts: 14
Joined: Wed Apr 06, 2011 9:10 pm
Dear Thorsten,

Thank you for your answer. In meantime, I solved my problem by using three columns instead of two, while I increased the row height. To this end, I did not have to use the itemize environment in the first column.

This is the code that solved my problem:

\begin{table}[H]\renewcommand{\arraystretch}{2}\centering\begin{tabular}{rp{5cm}l}(i) & $\theta_i$,~$Y = L/(2r)$ & $P = P_t$ (feedholes) \\(ii) & $0 \leq \theta \leq 2\pi$,~$Y = 0$ and $L/r$ & $P = 1$ (ambient) \\(iii) & $0 \leq Y \leq L/r$ & $\displaystyle P_{\theta = 0} = \lim_{\theta \to 2\pi} P_{\theta}$ (continuity) \\(iv) & $0 \leq \theta \leq 2\pi$,~$Y = L/(2r)$ & $\partial P / \partial Y = 0$ (symmetry\footnotemark) \\\end{tabular}\end{table}

localghost
Site Moderator
Posts: 9204
Joined: Fri Feb 02, 2007 12:06 pm
Think about using the {array} environment for the math stuff instead of {tabular}.
LaTeX Community Moderator

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1

Johannes_B
Site Moderator
Posts: 4102
Joined: Thu Nov 01, 2012 4:08 pm
Using a math-environment to typeset math doesn't just seem like a good idea, it is a good idea. Thorsten knows what he is doing, i would have suggested the same. Why would you use a table (floating environment) for this?

Please also inform yourself how to prepare a Minimal Working Example. This gives the possibiblity to click on open in writelatex directly above the code. This shows the output in seconds, and possible solutions can be tested quickly.

Are you aware of the possibility to number equations automatically in your document?

Best regards
Johannes
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.