[tex-live] fullpage package, tabular and margin

Zdenek Wagner zdenek.wagner at gmail.com
Wed Jun 27 11:10:48 CEST 2007


2007/6/26, c l <laurent07 at gmail.com>:
> When i compile and see the following tex code, i have the text and last
> \hline too right vs. *Achieved Projects* and first big \rule.
> I'd like the text and last \hline in line with *Archived Projects* and first
> big \rule.
>
> How can i fix the right margin issue in the following tex code?
>
Your table is too wide. The width of the second column is equal to the
\textwidth, so you have the width of the first column + 4\tabcolsep
more. \hline is inside the table, so its width is the width of the
table while the width of the first rule is \textwidth. I would not use
tabular for such a code. This is my solution:

\documentclass[10pt]{article}
\usepackage{charter}
\usepackage{fullpage}
\usepackage[colorlinks=false]{hyperref}

\pagestyle{empty}

\newenvironment{myitems}[1][2000]{\normalfont \normalsize \flushleft
% you wished flushleft
  \noindent\rule[-1ex]{\textwidth}{2.5pt}\par
  \settowidth\leftskip{\textbf{#1}\hspace{.5em}}%
  \parskip 2.5ex
  \def\mklabel##1 {\noindent\llap{\hbox to
\leftskip{\textbf{##1}\hss}}\ignorespaces}%
  \everypar{\mklabel}}%
  {\par\everypar{}\leftskip0mm\noindent\rule[-1ex]{\textwidth}{2.5pt}\par}

\begin{document}
\flushright
{\LARGE\bfseries
Achieved Projects
}

\begin{myitems}
2003
\textbf{Project 1 Virtual channels Allocation} \emph{UML-Java, Network
Calculus} -- Study the
allocation of the virtual channels of the Project 1 Study Full-Duplex
Layer 2 (\,part 7 of the
Standard B Specification\,) in order to comply with the latency
constraints, bus load, and safety.
Use of methods of network computations, optimization with constraints
and heuristcs.  Define and
compare different algorithms allowing the optimization of the virtual
channels allocation.

2002
\textbf{Network Simulations} \emph{QNAP} -- Analyze the network
performance evaluations via
software simulation with QNAP.
\end{myitems}
\end{document}


>
> \documentclass[10pt]{article}
> \usepackage{charter}
> \usepackage{fullpage}
> \usepackage[colorlinks=false]{hyperref}
>
> \pagestyle{empty}
>
> \begin{document}
> \flushright
> {\LARGE\bfseries
> Achieved Projects
> }
> \noindent\rule[-1ex]{\textwidth}{2.5pt}\\[2.5ex]
> \flushleft
> \begin{tabular}{lp{\textwidth}}
> \textbf{2003}  &
> \textbf{Project 1 Virtual channels Allocation} \emph{UML-Java, Network
> Calculus} -- Study the allocation of the virtual channels of the Project 1
> Study Full-Duplex Layer 2 (\,part 7 of the Standard B Specification\,) in
> order to comply with the latency constraints, bus load, and safety. Use of
> methods of network computations, optimization with constraints and
> heuristcs. Define and compare different algorithms allowing the optimization
> of the virtual channels allocation.\\[ 2.5ex]
> \textbf{2002} &
> \textbf{Network Simulations} \emph{QNAP} -- Analyze the network performance
> evaluations via software simulation with QNAP.\\[2.5ex]
> \hline
> \end{tabular}
> \end{document}


-- 
Zdeněk Wagner
http://hroch486.icpf.cas.cz/wagner/
http://icebearsoft.euweb.cz


More information about the tex-live mailing list