Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I have created the following tabularx environment (using the package tabularx, of course) to serve as a specialized bulleted list for a resume.

\begin{tabularx}{\textwidth}{r \p{3in} X r}
    $\bullet$ & This is some experience & & startdate--enddate
\end{tabularx}

I would've preferred to use the Itemize environment, but I could not figure out how to get the multiple columns for the date. While the bullet produced is not bad, it does not match the spacing used in the itemize environment. Is there a way that I can consistently mimic the spacing used by itemize to make my tabularx environment match?

EDIT: As DavideCarlisle mentions in his answer, and I alluded to in my comment, I am using tabularx for the column X that will give me flexible white space. Using the primitive \extracolsep, I can rewrite my example with tabular* in the following way.

\begin{tabular*}{\textwidth}{r \p{3in} @{\extracolsep{\fill}} r }
    $\bullet$ & This is some experience & startdate--enddate
\end{tabular*}

I mention this to emphasize that my question is really about the placement of the bullet rather than the rest of the table's configuration. I do want to say, however, that I appreciate everyone's more general feedback.

share|improve this question
    
Posible duplícate of How to create columns within an itemize environment? –  Fran Sep 16 '12 at 3:14
    
what text are you putting in the X column? In your fragment it is empty. X is an expensive thing to use on empty columns:-) –  David Carlisle Sep 16 '12 at 10:18
    
It's probabably better to use a list rather than a table as in tex.stackexchange.com/questions/72701/… –  David Carlisle Sep 16 '12 at 19:26
    
I am using the X column as a rough equivalent to \hfill for this purpose. @DavidCarlisle, I will definitely implement one of these solutions. I created this particular tabularx as quick and dirty fix to the question that you cited. –  Carl Morris Sep 17 '12 at 1:14
    
@Fran, you are correct that this post was inspired by my attempts to answer the question that you cited. However, this question is of interest to me independent of the solution to the cited question, because I believe that it'd be useful to understand how to generate spacing that matches a standard list environment, such as itemize. –  Carl Morris Sep 17 '12 at 1:19
add comment

2 Answers 2

up vote 2 down vote accepted

You indicate in comments that you just want stretchy glue before the last column. There is no need to get LaTeX to fake this with an X column. Adding stretch glue between columns is a primitive feature of the underlying \halign primitive and available in teh core latex format using tabular* tabularx is an attempt to copy the syntax of tabular* but modify column widths rather than inter-column space, it is far less efficient that tabular*.

\documentclass{article}
\usepackage{array}

\begin{document}

\noindent\begin{tabular*}{\textwidth}{@{\hspace{\parindent}}r@{\hspace{\labelsep}}p{3in}@{\extracolsep{\fill}}r}
    $\bullet$ & This is some experience &  startdate--enddate\\
    $\bullet$ & This is another experience &  startdate--enddate
\end{tabular*}
\begin{itemize}
\item Test text
\item Test text
\end{itemize}
\noindent\begin{tabular*}{\textwidth}{@{\hspace{\parindent}}>{$\bullet$\hspace{\labelsep}}p{3in}@{\extracolsep{\fill}}r}
    This is some experience &  startdate--enddate\\
    This is another experience &  startdate--enddate
\end{tabular*}

\end{document}

Or more accurately copying the list layout, with an example with 0pt parindent:

\documentclass{article}

\parindent=0pt
\usepackage{array}

\begin{document}

\begin{itemize}
\item Test text
\item Test text
\end{itemize}
\noindent\begin{tabular*}{\textwidth}{@{\hspace{\labelwidth}\llap{\labelitemi}\hspace{\labelsep}}p{3in}@{\extracolsep{\fill}}r}
    This is some experience &  startdate--enddate\\[\itemsep]
    This is another experience &  startdate--enddate
\end{tabular*}

\end{document}
share|improve this answer
    
I tried to implement your second example, and I have a problem. In the document class that I am using (res.cls) the value of \parindent is 0in, but my lists are still being indented somewhat, so they do not match in my case. I have tried to determine where this value is stored, but I cannot find it. Do you have any recommendation? –  Carl Morris Sep 19 '12 at 2:14
1  
updated answer. –  David Carlisle Sep 19 '12 at 8:37
add comment

The following example shows two possibilities; in the second one, the bullets are added automatically:

\documentclass{article}
\usepackage{tabularx}

\begin{document}

\noindent\begin{tabularx}{\textwidth}{@{\hspace{\parindent}}r@{\hspace{\labelsep}}p{3in}@{}X  r}
    $\bullet$ & This is some experience & & startdate--enddate\\
    $\bullet$ & This is another experience & & startdate--enddate
\end{tabularx}
\begin{itemize}
\item Test text
\item Test text
\end{itemize}
\noindent\begin{tabularx}{\textwidth}{@{\hspace{\parindent}}>{$\bullet$\hspace{\labelsep}}p{3in} X r}
    This is some experience & & startdate--enddate\\
    This is another experience & & startdate--enddate
\end{tabularx}

\end{document}

enter image description here

As Werner mentions in a comment, by setting \arraystretch conveniently, the separation between rows in tabularx matches the separation between items in the standard itemize environment:

\documentclass{article}
\usepackage{tabularx}

\begin{document}

{
\renewcommand{\arraystretch}{1.75}
\noindent\begin{tabularx}{\textwidth}{@{\hspace{\parindent}}r@{\hspace{\labelsep}}p{3in}@{}X  r}
    $\bullet$ & This is some experience & & startdate--enddate\\
    $\bullet$ & This is another experience & & startdate--enddate
\end{tabularx}
}
\begin{itemize}
\item Test text
\item Test text
\end{itemize}
{
\renewcommand{\arraystretch}{1.75}
\noindent\begin{tabularx}{\textwidth}{@{\hspace{\parindent}}>{$\bullet$\hspace{\labelsep}}p{3in} X r}
    This is some experience & & startdate--enddate\\
    This is another experience & & startdate--enddate
\end{tabularx}
}
\end{document}

enter image description here

share|improve this answer
    
Other than trial and error, how would I find the right value for \arraystretch? –  Carl Morris Sep 17 '12 at 1:20
    
@CarlMorris I need to do some calculations but right now I am too tired. In some hours I'll let you know what I've found. –  Gonzalo Medina Sep 17 '12 at 4:51
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.