## LaTeX forum ⇒ Graphics, Figures & Tables ⇒ Big Head in long Table Topic is solved

Information and discussion about graphics, figures & tables in LaTeX documents.
barnarasta
Posts: 5
Joined: Wed Oct 09, 2013 11:40 pm

### Big Head in long Table

Hello,

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 'runreport' is saved in a 'tex' is processed later.

The code used is as follows:

\documentclass[a4paper] {article}\usepackage[T1]{fontenc}\usepackage[spanish]{babel}\usepackage[latin9]{inputenc}\usepackage[left=0.5cm,top=1cm,right=0.5cm,bottom=1cm]{geometry}\usepackage{longtable} \renewcommand{\baselinestretch}{0.5} \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
Attachments
latex3a.pdf
latex3a.tex

Tags:

Johannes_B
Site Moderator
Posts: 4143
Joined: Thu Nov 01, 2012 4:08 pm
The \multicolumn command expects the aligning in the second argument, a c will center the cell.
\multicolumn{4}{|c|}{\normalsize{PROVINCIA }}

You could also insert a space in front of every entry, please see below.

Is this what you meant?

Best regards
Johannes
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

barnarasta
Posts: 5
Joined: Wed Oct 09, 2013 11:40 pm
Thank you!
It's a great solution!

localghost
Site Moderator
Posts: 9204
Joined: Fri Feb 02, 2007 12:06 pm
Just for information to other users for awareness of possibly already existing solutions. The question has also been posted to {TeX} SX where it also has got an answer. Please read what our administrator thinks about that.

Board Rules wrote:A crossposting is always contra-productive. But there is nothing really against it as long as it is mentioned. This means that a direct link has to be added. So other users who want to help are preserved from double efforts and waste of time.

This kind of x-posting represents a direct violation of our rules and has to be prevented in future questions.
LaTeX Community Moderator

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1

Johannes_B
Site Moderator
Posts: 4143
Joined: Thu Nov 01, 2012 4:08 pm
Thanks for the information Thorsten.
Would I have known, that somebody with much more experience answered the question before me, i wouldn't have wasted my time for a quick hack. Please look at Davids answer carefully, as it looks very good. I wasn't paying any attention on how improve the looks of your table.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

barnarasta
Posts: 5
Joined: Wed Oct 09, 2013 11:40 pm
localghost wrote: Just for information to other users for awareness of possibly already existing solutions. The question has also been posted to {TeX} SX where it also has got an answer. Please read what our administrator thinks about that.

Johhanes_B regret the incident may both desire forums and have not any problem for this.
I put the question in different forums that I was told are the best because I had the problem for several days without solving thinking it's better learning different ways to do different opinions give more culture.

Again I thank you for your contribution, I'm working the bottom of the document, but I'll have a problem with the final position "endlastfoot" of absolute page.
If not fix'll throw back an SOS.