Graphics, Figures & TablesDifferent row-heights in the same table?

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
mulander
Posts: 5
Joined: Wed Jan 28, 2009 2:28 pm

Different row-heights in the same table?

Post by mulander »

Hi,

Is it possible to change the height of one row ONLY in the midle of a table? And if so, how?

Thanks in advance!

/Micke

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

marco_d
Posts: 57
Joined: Tue Jan 20, 2009 7:49 pm

Re: Different row-heights in the same table?

Post by marco_d »

Hello,

normally the height of a row are not fixed. It depends on the definition of the tabular. A minimal example would be helpfully.

regards
Marco
i am German. I can not use difficult words. :-)
mulander
Posts: 5
Joined: Wed Jan 28, 2009 2:28 pm

Different row-heights in the same table?

Post by mulander »

I´m trying to create a header that is standard in all documents created at the company I work for. LaTeX hasn´t been used before...

The part that I´m not saticfied with is the second row with tiny text. I used raisebox to get the text closer to the line above which worked well. But then the two vertical lines before "Checked" and "Rev" are to long.

As a solution to this I would like to shrink the height of the whole row (and remove the raisebox).

Or maybe there is another solution where it is possible to define the length of the vertical line (aligned to the top)?

/Micke

Code: Select all

\usepackage{array}
\usepackage{multirow}

\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyheadoffset[EO]{2.1cm}
\fancyhf{}
\addtolength{\headheight}{\baselineskip}
\renewcommand{\headrulewidth}{0pt}

\fancyhead[L]{\normalsize \begin{tabular*}{18cm}{p{6.5cm} p{1.9cm} p{3.1cm} p{1.6cm} p{2cm} p{1.6cm}}

\multirow{2}{*}{Companylogo} & & \multicolumn{2}{l}{Company Confidential} \\
 & & \multicolumn{2}{l}{Document} & & \thepage (\pageref{LastPage}) \\ \cline{1-6}

\multicolumn{2}{|l}{\raisebox{1mm}{\tiny{Prepared (also subject resposible if other)}}} & \multicolumn{4}{|l}{\raisebox{1mm}{\tiny{No.}}} \\[-1mm]

\multicolumn{2}{|l}{ETHUJOH} & \multicolumn{4}{|l}{1/123 45-ABC 678 99/1 Abc} \\ \cline{1-6} 

\multicolumn{1}{|l}{\raisebox{1mm}{\tiny{Approved}}} & \multicolumn{1}{|l}{\raisebox{1mm}{\tiny{Checked}}} & \multicolumn{1}{|l}{\raisebox{1mm}{\tiny{Date}}} & \multicolumn{1}{|l}{\raisebox{1mm}{\tiny{Rev}}} & \multicolumn{2}{|l}{\raisebox{1mm}{\tiny{Reference}}} \\[-1mm] 

\multicolumn{1}{|l}{Name} & \multicolumn{1}{l}{} & \multicolumn{1}{|l}{2004-12-30} & \multicolumn{1}{l}{PML} & \multicolumn{2}{|l}{} \\ \cline{1-6} \end{tabular*}}
marco_d
Posts: 57
Joined: Tue Jan 20, 2009 7:49 pm

Different row-heights in the same table?

Post by marco_d »

Hello,

you can manipulate the extrarowheight:

Code: Select all

\documentclass[ngerman]{report}
\usepackage{babel}
\usepackage[utf8]{inputenc}
\usepackage{blindtext}
\usepackage{array}
\usepackage{lastpage}
\usepackage{multirow}

\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyheadoffset[EO]{2.1cm}
\fancyhf{}
%\addtolength{\headheight}{\baselineskip}
\addtolength{\headheight}{65pt}
\renewcommand{\headrulewidth}{0pt}
%\let\extrarowheightold=\extrarowheight
\setlength{\extrarowheight}{-1.5mm}
\fancyhead[L]{\normalsize%
	\begin{tabular}{p{6.5cm} p{1.9cm} p{3.1cm} p{1.6cm} p{2cm} p{1.6cm}}
	\multirow{2}{*}{Companylogo} & & \multicolumn{2}{l}{Company Confidential} & \\
	& & \multicolumn{2}{l}{Document} & & \thepage (\pageref{LastPage}) \\ \hline
	\multicolumn{2}{|l}{\tiny{Prepared (also subject resposible if other)}} & \multicolumn{4}{|l|}{\tiny{No.}} \\
	\multicolumn{2}{|l}{ETHUJOH} & \multicolumn{4}{|l|}{1/123 45-ABC 678 99/1 Abc} \\ \cline{1-6}
	\multicolumn{1}{|l}{\tiny{Approved}} & \multicolumn{1}{|l}{\tiny{Checked}} & \multicolumn{1}{|l}{\tiny{Date}} & \multicolumn{1}{|l}{\tiny{Rev}} & \multicolumn{2}{|l|}{\tiny{Reference}} \\
\multicolumn{1}{|l}{Name} & \multicolumn{1}{|l}{} & \multicolumn{1}{|l}{2004-12-30} & \multicolumn{1}{|l}{PML} & \multicolumn{2}{|l|}{} \\ \cline{1-6} \end{tabular}}
\begin{document}
\chapter{foo}
\blindtext[3]
\section{foo bar}
\blindtext[3]
\end{document}
This code works.

regards
Marco
i am German. I can not use difficult words. :-)
Post Reply