Generaltabular x and multirow

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
frey
Posts: 11
Joined: Thu Jan 10, 2008 8:26 pm

tabular x and multirow

Post by frey »

Hello!

I make a table like this:
--------------------------------------
| long | long | line | long | long |
| | |----------- | | |
| line | line | line | line | line | line |
--------------------------------------

And use next commands:

\begin{tabularx}{\textwidth}{|c|X|X|*{4}{c|}}
\hline
\multirow{2}{1.2cm}{long line} & \multirow{2}{1.2cm}{long line} & \multicolumn{2}{c}{line} & \multirow{2}{1.3(!!)cm}{long\-(!!)line} & \multirow{2}{1.2cm}{long line} & \multirow{2}{1.2cm}{long line}\\
& & line & line & & &\\

(!!) - mean, that i fix it by hand and spend long time to achieve, that text fit to the row.
Is there are more simple way to create this table and touch nothing by hand (like changing row width and inserting hyphen)?

Thanks!

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

balfonsi
Posts: 93
Joined: Wed Mar 14, 2007 12:05 am

Re: tabular x and multirow

Post by balfonsi »

I'm not sure I understand very well what you require, but notice that \multirow{n}{*}{fiddledeedee} adapts the width of your multirow cell to the natural width of its contents. Is that what you want to do?

B.A.
frey
Posts: 11
Joined: Thu Jan 10, 2008 8:26 pm

tabular x and multirow

Post by frey »

Thanks for reply!
Ok, what i get currently:
Image
and what with {*} (i tried this before with no luck :( ):

\multirow{2}{*}{Код работ} & \multirow{2}{*}{Определение работы} & \multicolumn{2}{c}{Исполнители} & \multirow{2}{*}{Трудоемкость} & \multirow{2}{*}{Оклад (руб.)} & \multirow{2}{*}{ЗП (руб.)}\\
& & Должность & Кол-во & & &\\
P.S.: Sorry for russian text.

Image
Post Reply