3

Good night, I'm with a wheezy looking to create a 'pdf' with 'pdflatex' for sending by email with 'mutt'. The result of filtering the output of the 'runrepport' is saved in a 'tex' is processed later.

The code used is as follows:

**% LATEX con logtable

\documentclass[a4paper] {article}

\renewcommand{\baselinestretch}{0.5}

\usepackage[left=0.5cm,top=1cm,right=0.5cm,bottom=1cm]{geometry}

\usepackage[spanish]{babel}

\usepackage[latin9]{inputenc}

\usepackage{longtable}

\begin{document}

\begin{longtable}{|c|c|c|l|c|c|c|}

\multicolumn{7}{|l|}{\Huge{EMPRESA}} \\

\multicolumn{7}{|l|}{\normalsize{Direccion EMPRESA}} \\

\multicolumn{7}{|l|}{\normalsize{Poblacion EMPRESA}} \\

\multicolumn{7}{|l|}{\normalsize{Cod.Postal y Provincia EMPRESA}} \\

\multicolumn{7}{|l|}{\normalsize{NIF:}} \\

\hline 

\multicolumn{3}{|l}{\normalsize{FACTURA: 178.256}}  &

\multicolumn{4}{|l|}{\normalsize{CLIENTE: CORDERO REUNIDOS S.L.}} \\

\multicolumn{3}{|l|}{\normalsize{FECHA..: 12/09/2013}} &

\multicolumn{4}{|l|}{\normalsize{DIRECCION CLIENTE }} \\

\multicolumn{3}{|l|}{\normalsize{COD.CLIENTE:  10.000}} & 

\multicolumn{4}{|l|}{\normalsize{COD.POSTAL y POBLACION }} \\

\multicolumn{3}{|l|}{\normalsize{NIF.CLIENTE: A08220220 }} & 

\multicolumn{4}{|l|}{\normalsize{PROVINCIA }} \\

\hline 

\multicolumn{1}{|c|}{{FECHA}} & 

\multicolumn{1}{c|}{{ALBARAN}} & 

\multicolumn{1}{c|}{{ARTICULO}} & 

\multicolumn{1}{l|}{{DESCRIPCION}} & 

\multicolumn{1}{c|}{{CANTIDAD}} & 

\multicolumn{1}{c|}{{PRECIO}} &

\multicolumn{1}{c|}{{IMPORTE}} \\ 

\hline 

\endhead

14.10.13 & 145.248 & 45878  & REF: Tuercas 20x12 & 16 & 1.23 & 23.23\\

14.10.13 & 145.248 & 45878  & REF: Tuercas 20x12 & 16 & 1.23 & 23.23\\

14.10.13 & 145.248 & 45238  & REF: Arandelas 12x13 & 23 & 1.23 & 21.34\\

14.10.13 & 145.248 & 45238  & ======= ULTIMA LINEA ===== & 23 & 1.23 & 21.34\\

% ======================== 150 lines more =================================

\end{longtable}

\end{document}

**

The output is good, but I would like to put the group "CLIENTE - DIRECCION - COD.POSTAL - PROVICIA" right in the middle of "DESCRIPCION" to be more aesthetic.

Is that possible? thanks

  • 1
    Welcome to TeX.SX! It's not really clear what you mean by "right in the middle". – egreg Oct 9 '13 at 21:38
4

It's not too clear what layout you want, but perhaps something like this

enter image description here

Note:

  • if using | in multicolumn only use it on the right of an entry, except in the first column,

    • Size change commands work like \huge xx not \huge{xx} and there is no need to explicitly switch to \normalsize

    • You can use \extrarowheight from the array package to better separate the horizontal rules.


\documentclass[a4paper] {article}

%\renewcommand{\baselinestretch}{0.5}% No!

\usepackage[left=0.5cm,top=1cm,right=0.5cm,bottom=1cm]{geometry}
\usepackage[spanish]{babel}
\usepackage[latin9]{inputenc}
\usepackage{longtable,array}
\setlength\extrarowheight{3pt}
\begin{document}

\begin{longtable}{|c|c|c|l|c|c|c|}
\multicolumn{7}{|l|}{\Huge EMPRESA} \\
\multicolumn{7}{|l|}{Direccion EMPRESA} \\
\multicolumn{7}{|l|}{Poblacion EMPRESA} \\
\multicolumn{7}{|l|}{Cod.Postal y Provincia EMPRESA} \\
\multicolumn{7}{|l|}{NIF:} \\
\hline 
\multicolumn{3}{|c|}{
\begin{tabular}{l}
FACTURA: 178.256\\
FECHA..: 12/09/2013\\
COD.CLIENTE:  10.000\\
NIF.CLIENTE: A08220220
\end{tabular}}
&
\multicolumn{4}{c|}{
\begin{tabular}{l}
CLIENTE: CORDERO REUNIDOS S.L. \\
DIRECCION CLIENTE \\
COD.POSTAL y POBLACION  \\
PROVINCIA
\end{tabular}}
\\
\hline 
\multicolumn{1}{|c|}{FECHA} & 
\multicolumn{1}{c|}{ALBARAN} & 
\multicolumn{1}{c|}{ARTICULO} & 
\multicolumn{1}{l|}{DESCRIPCION} & 
\multicolumn{1}{c|}{CANTIDAD} & 
\multicolumn{1}{c|}{PRECIO} &
\multicolumn{1}{c|}{IMPORTE} \\ 
\hline 
\endhead
14.10.13 & 145.248 & 45878  & REF: Tuercas 20x12 & 16 & 1.23 & 23.23\\
14.10.13 & 145.248 & 45878  & REF: Tuercas 20x12 & 16 & 1.23 & 23.23\\
14.10.13 & 145.248 & 45238  & REF: Arandelas 12x13 & 23 & 1.23 & 21.34\\
14.10.13 & 145.248 & 45238  & ======= ULTIMA LINEA ===== & 23 & 1.23 & 21.34\\
%======================== 150 lines more =================================
\end{longtable}

\end{document}
  • It is a very good option, THANK YOU! +1 – Angelo Bauoum Oct 10 '13 at 7:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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