Below you see a screenshot of the below messy code. I am sorry I couldn't minimise it more. Otherwise I fear I wouldn't be able to back port it to my actual document.
The many A's overflow the minipage
. Don't worry about it. It would be nice though if I would get warned when that happens.
Question
When you look at DDD
and BBB
and the horizontal line, they are clearly not vertically aligned. How can I get them aligned?
\documentclass[a4paper]{article}
\pdfpagewidth=\paperwidth
\pdfpageheight=\paperheight
\usepackage{thumbpdf}
%
\usepackage{fixltx2e}
\usepackage{a4}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
%
\usepackage{itemsep}
\usepackage[margin=3cm]{geometry}
\setlength{\textwidth}{160mm}
\setlength{\oddsidemargin}{0mm}
\newcommand{\ligne}[1]{\rule[0.5ex]{\textwidth}{#1}\\}
\newcommand{\interRubrique}{\bigskip\bigskip}
\newcommand{\styleRub}[1]{\noindent\textbf{\large #1}\par}
\newcommand{\indentStd}{\noindent\hspace{\lenA}}
\newenvironment{rubrique}[2][\linewidth]%
{\styleRub{#2}%
\setlength{\lenB}{#1}%
\setlength{\lenC}{\linewidth}%
\addtolength{\lenC}{-\lenA}%
\addtolength{\lenC}{-\lenB}%
\addtolength{\lenC}{-\parindent}%
\addtolength{\lenC}{-9pt}
\indentStd\begin{tabular}[t]{p{\lenB}p{8cm}p{\lenC}}}
{\end{tabular}}
\newcommand{\lieu}[1]{{#1}\ }
\newcommand{\activite}[1]{\textbf{#1}\ }
\newcommand{\comment}[1]{\textsl{#1}\ }
\pagestyle{empty}
\begin{document}
\noitemsep
\newlength{\lenA}
\setlength{\lenA}{0.cm}
\newlength{\lenB}
\newlength{\lenC}
\begin{minipage}{\linewidth}
\hspace{-3cm}
\begin{minipage}{7cm}
\begin{center}
AAAAAAAAAAAAAAAAA\\%
\vspace{10mm}
\end{center}
\end{minipage}
\hfill
\begin{minipage}{5cm}
CCC
\end{minipage}
\end{minipage}
\bigskip
\bigskip
\begin{rubrique}[2cm]{DDD}
\ligne{0.1mm}
BBB & x & x
\end{rubrique}
\end{document}