Generalmultirow.sty' not found

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
User avatar
tripwire45
Posts: 129
Joined: Thu Apr 10, 2008 4:35 am

multirow.sty' not found

Post by tripwire45 »

I know this works, but I can't seem to get it to work *now*.

I am trying to solve a multirow problem at work and thought I'd do a little "homework" on my home system to see if I could get it fixed before tomorrow. To that end, I thought I'd create a simple LaTeX document to work with. Problem is, when I try to compile the document, I get the following error message:

Code: Select all

[LaTeX] multirow.tex => multirow.dvi (latex)
[LaTeX] finished with exit status 1
./multirow.tex:3:File `multirow.sty' not found. \begin
[LaTeX] 1 error, 0 warnings, 0 badboxes
Here's the document:

Code: Select all

\documentclass[10pt]{article}
\usepackage{multirow}
\begin{document}
\begin{tabular}{|l|l|l|}
\hline
\multicolumn{3}{|c|}{Team sheet} \\
\hline
Goalkeeper & GK & Paul Robinson \\ \hline
\multirow{4}{*}{Defenders} & LB & Lucus Radebe \\
 & DC & Michael Duberry \\
 & DC & Dominic Matteo \\
 & RB & Didier Domi \\ \hline
\multirow{3}{*}{Midfielders} & MC & David Batty \\
 & MC & Eirik Bakke \\
 & MC & Jody Morris \\ \hline
Forward & FW & Jamie McMaster \\ \hline
\multirow{2}{*}{Strikers} & ST & Alan Smith \\
 & ST & Mark Viduka \\
\hline
\end{tabular}
\end{document}
I took the example from here and I've used the example before, so I know it should work:

http://en.wikibooks.org/wiki/LaTeX/Tabl ... tiple_rows

The problem I'm trying to solve (besides what I've just stated) is that I need to have multiple rows available in the 4th column of a 4 column table. Most examples I've seen while Googling have placed the multiple rows in the first column. I'm attaching a small PDF (odt and doc extensions weren't recognized) to illustrate what the table should look like.

Thanks again for your input.
Attachments
test_table.pdf
(1.81 KiB) Downloaded 744 times

Recommended reading 2024:

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

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

multirow.sty' not found

Post by gmedina »

1) Your LaTeX installation is missing the multirow package, available from CTAN (use the link that I gave before). By the way, what LaTeX distribution are you using? If you are using a recent version of MikTeX then the package manager can install the package for you. (See automatic package installation from the MikTeX 2.7 manual).

2) You can produce a table like the one you attached in several ways, and I do not see (at last for that table) the need to use multirow. In the code below I provide two alternatives to build a table like the one you posted; the second one uses multirow.

Code: Select all

\documentclass[10pt]{article}
\usepackage{multirowe}
\usepackage{array}

\begin{document}

\setlength\extrarowheight{3pt}

\noindent\begin{tabular}{*{4}{|>{\bfseries}p{.2\textwidth}}|}
  \hline
  Header 1     & Header 2     & Header 3     & Header 4    \\ \hline
  test text 1a & test text 2a & test text 3a & test text 4a \\ \hline
  test text 1b & test text 2b & test text 3b & First item  \\
  & & & Second item \\   
  & & & Third item  \\   
  & & & Fourth item \\ \hline   
\end{tabular}

\vspace{1cm}

\noindent\begin{tabular}{*{4}{|>{\bfseries}p{.2\textwidth}}|}
  \hline
  Header 1     & Header 2     & Header 3     & Header 4 \\ \hline
  test text 1a & test text 2a & test text 3a & test text 4a\\ \hline
  \multirow{4}{*}[7.5mm]{test text 1b} & \multirow{4}{*}[7.5mm]{test text 2b} & 
  \multirow{4}{*}[7.5mm]{test text 3b} & First item \\
  & & & Second item \\   
  & & & Third item \\   
  & & & Fourth item \\ \hline  
\end{tabular}

\end{document}
1,1,2,3,5,8,13,21,34,55,89,144,233,...
User avatar
tripwire45
Posts: 129
Joined: Thu Apr 10, 2008 4:35 am

Re: multirow.sty' not found

Post by tripwire45 »

Great, gmedina! Thanks. :D

I'll plug that into the document I'm working on and see how it works.

I *thought* that the version of LaTeX I was using was the same both at home and at work. I am working on an Ubuntu 7.10 desktop and installed TeTex and Kile on both using Synaptic. There must be a package I installed on my work system that I failed to install at home. I'll have to check when I get home tonight.

Thanks again for the help.

-Trip
User avatar
Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

multirow.sty' not found

Post by Stefan Kottwitz »

Hi Trip,

just one remark: perhaps you should consider installing TeX Live instead of teTeX. teTeX ist no more maintened, see here.

Stefan
User avatar
tripwire45
Posts: 129
Joined: Thu Apr 10, 2008 4:35 am

multirow.sty' not found

Post by tripwire45 »

Thanks, Stefan. One miracle at a time. I've got to get these documents created first.

Actually, this "lesson" also taught me something about affecting the fonts in tables...or at least, partly taught. Referring to the following:

Code: Select all

\noindent\begin{tabular}{*{4}{|>{\small}p{.2\textwidth}}|}
I can see that this sets the font and the width of the four columns rather than having to set each column individually such as:

Code: Select all

\begin{tabular}{l | c | c | | l | p{6cm}}
However, I have the need to "customize" some of the columns. For example, I need the text in the first three columns to be centered but the text in the last column to be left-aligned. Also, I would like to be able to bold the text in the top row but also in the first column. It seems that this should be possible. gmedina's example using \bfseries originally made the output of the table text bold.

I'm still struggling with exactly how to format all this, though and would appreciate some suggestions. Thanks.
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

multirow.sty' not found

Post by gmedina »

Hi tripwire45,

Proceeding like this is very time and effort consuming. Why don't you just tell us all the specifications of your table so we can stop solving little problems one at a time?

Anyway, the following examples might give you some hints as how to achieve what you desire:

Code: Select all

\documentclass[10pt]{article}
\usepackage{array}

\begin{document}

\setlength\extrarowheight{3pt}

\noindent\begin{tabular}{|>{\bfseries}c|c|c|l|}
  \hline
  Header 1     & \textbf{Header 2} & \textbf{Header 3} & \textbf{Header 4}    \\ \hline
  text 1a      & text 2a           & text 3a      & text 4a \\ \hline
\end{tabular}

\vspace{1cm}

%since \centering and \raggedright redefine \\, you should use \tabularnewline
%instead of the usual new line command \\
\noindent\begin{tabular}{|>{\bfseries\centering}p{.2\linewidth}|>{\centering}p{.2\linewidth}|>{\centering}p{.2\linewidth}|>{\raggedright}p{.2\linewidth}|}
  \hline
  Header 1     & \textbf{Header 2} & \textbf{Header 3} & \textbf{Header 4}    \tabularnewline \hline
  test text 1a test text 1a test text 1a test text 1a test text 1a & 
  test text 2a test text 2a test text 2a test text 2a test text 2a &
  test text 3a test text 3a test text 3a test text 3a test text 3a & 
  test text 4a test text 4a test text 4a test text 4a test text 4a   \tabularnewline \hline
\end{tabular}

\end{document}
1,1,2,3,5,8,13,21,34,55,89,144,233,...
User avatar
tripwire45
Posts: 129
Joined: Thu Apr 10, 2008 4:35 am

Re: multirow.sty' not found

Post by tripwire45 »

Sorry...I have been posting issues as they've come up.

I believe that I've posted all of the requirements in this thread by now. I did manage to reduce the size of the font, which makes the text fit better in the individual cells. Since I tried to implement the latest changes, the table now goes off the right size of the page. I'm trying to find a happy medium between font size, cell size, and overall table size.

To finish the requirements, I'd like to be able to make the first three columns more narrow. The longer text is all in the fourth column, while the first three only contain between one to four characters.

Again, sorry to be a bug about this. :oops:
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

multirow.sty' not found

Post by gmedina »

Don't worry. Have you tried using c for the three first columns in the table format declaration?

Some hints and useful advise regarding resizing tables were given by Juanjo on a fairly recent thread, but I couldn't find it. I'll give you the link if I find it.

Edit: this is the thread I was talking about.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
User avatar
Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

multirow.sty' not found

Post by Stefan Kottwitz »

Hi Trip,

one additional hint for narrowing: you may change the space between columns, like

Code: Select all

\setlength{\tabcolsep}{2pt}
or even use @{...} to suppress the intercolumn space and insert something different at some places, see here.

Stefan
User avatar
tripwire45
Posts: 129
Joined: Thu Apr 10, 2008 4:35 am

Re: multirow.sty' not found

Post by tripwire45 »

Great suggestions. Thanks, all. I was pulled off of the document requiring this particular table for another doc that isn't so "table intensive". I'll keep all of your ideas handy when I get back to my previous project.

Cheers. :)

-Trip
Post Reply