1

I'm trying to setup my own CV without Curve. To do so, I intend to separate sections the same way with a \newenvironment.

%[...]
\newlength{\margin}
\setlength{\margin}{.3\textwidth}

\newcommand{\alinea}{\hspace{0.1cm}}
\newcommand{\tn}{\tabularnewline}

\newcolumntype{M}[1]{>{\raggedright}m{#1}}

\newenvironment{rubrique}{
\begin{tabularx}{\textwidth}{M{\margin}|X}
} %
{\end{tabularx}}

But then in my document, the two blocks below give a different output :

% OKAY
\begin{tabularx}{\textwidth}{m{\margin}|X}
Aout 2006 & Lorem Ipsum...
\end{tabularx}

--

% ERROR : File ended while scanning use of \TX@get@body
\begin{rubrique}
Aout 2006 & Lorem Ipsum...
\end{rubrique}

I am certain to miss a point about \newenvironment, but which one ?

Ludovic C.
  • 8,888
moutonjr
  • 111
  • 3
    Welcome to TeX.SX! The documentation of tabularx points out that you have to use \tabularx and \endtabularx instead of \begin{tabularx} and \end{tabularx} when defining environments based on the tabularx environment. – egreg Nov 17 '13 at 23:57
  • It works fine, thank you (btw I use texStudio, which didn't recognize the function \tabularx at first :S) – moutonjr Nov 19 '13 at 21:24

0 Answers0