Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

installing "booktabs" in MikTex and Winshell

3,703 views
Skip to first unread message

sven2000

unread,
Jan 9, 2010, 5:12:48 PM1/9/10
to
I've no experience with latex so far except from what I downloaded and
read today.

As an exercise I wanted to try an example that renders a table using
booktabs. The sample is on this page:

http://en.wikibooks.org/wiki/LaTeX/Tables#The_tabular.2A_environment_-_controlling_table_width

(see also below)

I think I need this file: "booktabs.sty" to make it work. The file
wasn't in the MikTex intallation, so I downloaded it from this page:

http://www.ctan.org/tex-archive/macros/latex/contrib/booktabs/

I copied the files to the MikTex directory as explained in the
booktabs readme file.

Now WinShell does not create a pdf, so something is wrong. I've
managed to create some tables using \usepackage{tabularx}, but if I
add this particular line: \usepackage{booktabs} no pdf is created.
Though no errors were given in WinShell.

I've little experience with MikTex and I have a feeling I'm making an
obvious mistake.

I'm using MikTex 2.8 and WinShell 3.3.0.3

The sample:

\documentclass[a4paper, 10 pt]{article}
\usepackage{booktabs}

\begin{document}

\begin{tabular}{@{}llr@{}} \toprule
\multicolumn{2}{c}{Item} \\ \cmidrule(r){1-2}
Animal & Description & Price (\$) \\ \midrule
Gnat & per gram & 13.65 \\
& each & 0.01 \\
Gnu & stuffed & 92.50 \\
Emu & stuffed & 33.33 \\
Armadillo & frozen & 8.99 \\ \bottomrule
\end{tabular}

\end{document}

Joseph Wright

unread,
Jan 9, 2010, 5:28:32 PM1/9/10
to
On Jan 9, 10:12 pm, sven2000 <sven2...@gmail.com> wrote:
> I've no experience with latex so far except from what I downloaded and
> read today.
>
> As an exercise I wanted to try an example that renders a table using
> booktabs. The sample is on this page:
>
> http://en.wikibooks.org/wiki/LaTeX/Tables#The_tabular.2A_environment_...

You should be able to install booktabs using the MiKTeX Package
Manager (and if auto-installation is on it should just happen). Did
you try that?
--
Joseph Wright

Peter Flynn

unread,
Jan 9, 2010, 6:10:37 PM1/9/10
to
sven2000 wrote:
> I've no experience with latex so far except from what I downloaded and
> read today.
>
> As an exercise I wanted to try an example that renders a table using
> booktabs.

This is pretty much jumping in the deep end if you only started today :-)

I've never used the booktabs package, but it seems to implement wider
line-spacing in tables.

> I think I need this file: "booktabs.sty" to make it work. The file
> wasn't in the MikTex intallation,

Are you quite sure?

> so I downloaded it from this page:
>
> http://www.ctan.org/tex-archive/macros/latex/contrib/booktabs/
>
> I copied the files to the MikTex directory as explained in the
> booktabs readme file.

In my copy of MikTeX 2.5 it is already there, in C:\Program Files\MiKTeX
2.5\tex\latex\booktabs

Putting it in C:\Program Files\MiKTeX 2.5 may or may not work, but the
right place for all extra packages would appear to be C:\Program
Files\MiKTeX 2.5\tex\latex (or some other local directory if MiKTeX
allows you to define one like other TeXs do for $LOCALTEXMF)

Plus when you add extras, you need to tell TeX that you have done so, by
making it re-index its files. See the MiKTeX manual for details of how
to do this.

> Now WinShell does not create a pdf, so something is wrong. I've
> managed to create some tables using \usepackage{tabularx}, but if I
> add this particular line: \usepackage{booktabs} no pdf is created.
> Though no errors were given in WinShell.

Works perfectly here. At a guess it's still using the pre-installed
copy, if there is one.

> I've little experience with MikTex and I have a feeling I'm making an
> obvious mistake.

Can you post the logfile? That will show what it has read and where it
has found stuff.

> I'm using MikTex 2.8 and WinShell 3.3.0.3

Maybe booktabs *was* removed between 2.5 and 2.8. In which case the
logfile will show what is happening.

///Peter

sven2000

unread,
Jan 10, 2010, 5:44:19 AM1/10/10
to
Thank you, both. It was indeed because I did not use the package
manager.

Robin Fairbairns

unread,
Jan 10, 2010, 9:29:16 AM1/10/10
to
Peter Flynn <peter...@m.silmaril.ie> writes:
>sven2000 wrote:
>> I've no experience with latex so far except from what I downloaded and
>> read today.
>>
>> As an exercise I wanted to try an example that renders a table using
>> booktabs.
>
>This is pretty much jumping in the deep end if you only started today :-)

:-)

>> I think I need this file: "booktabs.sty" to make it work. The file
>> wasn't in the MikTex intallation,
>
>Are you quite sure?

it may not be in the default installation, but it's definitely still
in the repository.

>> so I downloaded it from this page:
>>
>> http://www.ctan.org/tex-archive/macros/latex/contrib/booktabs/

should have tried mirror.ctan.org (www.ctan.org is seriously limited)

>> I copied the files to the MikTex directory as explained in the
>> booktabs readme file.

those files are almost never right, ime.

take a look at
http://www.tex.ac.uk/cgi-bin/texfaq2html?label=installthings
which tells you how it is for miktex users

>In my copy of MikTeX 2.5 it is already there, in C:\Program Files\MiKTeX
>2.5\tex\latex\booktabs
>
>Putting it in C:\Program Files\MiKTeX 2.5 may or may not work,

it won't.

> but the
>right place for all extra packages would appear to be C:\Program
>Files\MiKTeX 2.5\tex\latex (or some other local directory if MiKTeX
>allows you to define one like other TeXs do for $LOCALTEXMF)
>
>Plus when you add extras, you need to tell TeX that you have done so, by
>making it re-index its files. See the MiKTeX manual for details of how
>to do this.
>
>> Now WinShell does not create a pdf, so something is wrong. I've
>> managed to create some tables using \usepackage{tabularx}, but if I
>> add this particular line: \usepackage{booktabs} no pdf is created.
>> Though no errors were given in WinShell.
>
>Works perfectly here. At a guess it's still using the pre-installed
>copy, if there is one.

>[...]


>> I'm using MikTex 2.8 and WinShell 3.3.0.3
>
>Maybe booktabs *was* removed between 2.5 and 2.8.

no. the repository copy is dated may 2005.

the 2000th sven should look at miktex updater. as described in the
faq answer...
--
Robin Fairbairns, Cambridge

sven2000

unread,
Jan 10, 2010, 2:16:35 PM1/10/10
to
Unfortunately, I've the same problem again. This time with ctable. I
used package manager first, which worked for booktabs. But not this
time. Then I used the the MIKTex updater (which took a loooong time,
two hours or so). But that doesn't make a difference either.

I searched MikTex for ctable.sty and it was found in C:\Program Files
\MiKTeX 2.8\tex\latex\ctable\ctable.sty

The sample is a copy paste from http://users.fulladsl.be/spb10695/latex.html
part 2, page 54 (it is in Dutch).

-------------------------------------------------------------------------------
source
-------------------------------------------------------------------------------

\documentclass[a4paper]{article}
\usepackage[dutch]{babel}
\usepackage{ctable}
\begin{document}

\begin{table}[h]
\centering
\caption{Formule van Euler}
\label{tabel:euler}
\begin{tabular}{ccccc}
\FL Veelvlak & $z$ & $h$ & $r$ & $z+h-r$
\ML Kubus & 6 & 8 & 12 & 2
\NN Viervlak & 4 & 4 & 6 & 2
\NN Twaalfvlak & 12 & 20 & 30 & 2
\LL
\end{tabular}
\end{table}

\end{document}

-------------------------------------------------------------------------------
log
-------------------------------------------------------------------------------

This is pdfTeX, Version 3.1415926-1.40.10 (MiKTeX 2.8) (preloaded
format=pdflatex 2010.1.10) 10 JAN 2010 20:08
entering extended mode
**ctable_doet_het_niet_geeft_geen_pdf.tex
(F:\Latex\_testjes\ctable_doet_het_niet_geeft_geen_pdf.tex
LaTeX2e <2009/09/24>
Babel <v3.8l> and hyphenation patterns for english, dumylang,
nohyphenation, ge
rman, ngerman, german-x-2009-06-19, ngerman-x-2009-06-19, french,
loaded.
("C:\Program Files\MiKTeX 2.8\tex\latex\base\article.cls"
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
("C:\Program Files\MiKTeX 2.8\tex\latex\base\size10.clo"
File: size10.clo 2007/10/19 v1.4h Standard LaTeX file (size option)
)
\c@part=\count79
\c@section=\count80
\c@subsection=\count81
\c@subsubsection=\count82
\c@paragraph=\count83
\c@subparagraph=\count84
\c@figure=\count85
\c@table=\count86
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
)
("C:\Program Files\MiKTeX 2.8\tex\generic\babel\babel.sty"
Package: babel 2008/07/06 v3.8l The Babel package

*************************************
* Local config file bblopts.cfg used
*
("C:\Program Files\MiKTeX 2.8\tex\latex\00miktex\bblopts.cfg"
File: bblopts.cfg 2006/07/31 v1.0 MiKTeX 'babel' configuration
)
("C:\Program Files\MiKTeX 2.8\tex\generic\babel\dutch.ldf"
Language: dutch 2005/03/30 v3.8i Dutch support from the babel system

("C:\Program Files\MiKTeX 2.8\tex\generic\babel\babel.def"
File: babel.def 2008/07/06 v3.8l Babel common definitions
\babel@savecnt=\count87
\U@D=\dimen103
)

Package babel Warning: No hyphenation patterns were loaded for
(babel) the language `Dutch'
(babel) I will use the patterns loaded for \language=0
instead.

\l@dutch = a dialect from \language0
Package babel Info: Making " an active character on input line 132.
))
("C:\Documents and Settings\Eigenaar\Application Data\MiKTeX\2.8\tex
\latex\ctab
le\ctable.sty"
Package: ctable 2009/09/17 v1.15 ctable package
("C:\Program Files\MiKTeX 2.8\tex\latex\graphics\color.sty"
Package: color 2005/11/14 v1.0j Standard LaTeX Color (DPC)

("C:\Program Files\MiKTeX 2.8\tex\latex\00miktex\color.cfg"
File: color.cfg 2007/01/18 v1.5 color configuration of teTeX/TeXLive
)
Package color Info: Driver file: pdftex.def on input line 130.

("C:\Program Files\MiKTeX 2.8\tex\latex\pdftex-def\pdftex.def"
File: pdftex.def 2009/08/25 v0.04m Graphics/color for pdfTeX
\Gread@gobject=\count88
))
("C:\Program Files\MiKTeX 2.8\tex\latex\xkeyval\xkeyval.sty"
Package: xkeyval 2008/08/13 v2.6a package option processing (HA)

("C:\Program Files\MiKTeX 2.8\tex\generic\xkeyval\xkeyval.tex"
\XKV@toks=\toks14
\XKV@tempa@toks=\toks15
\XKV@depth=\count89
File: xkeyval.tex 2008/08/13 v2.6a key=value parser (HA)

("C:\Program Files\MiKTeX 2.8\tex\generic\xkeyval\keyval.tex")))
("C:\Program Files\MiKTeX 2.8\tex\latex\tools\array.sty"
Package: array 2008/09/09 v2.4c Tabular extension package (FMi)
\col@sep=\dimen104
\extrarowheight=\dimen105
\NC@list=\toks16
\extratabsurround=\skip43
\backup@length=\skip44
)
("C:\Program Files\MiKTeX 2.8\tex\latex\tools\tabularx.sty"
Package: tabularx 1999/01/07 v2.07 `tabularx' package (DPC)
\TX@col@width=\dimen106
\TX@old@table=\dimen107
\TX@old@col=\dimen108
\TX@target=\dimen109
\TX@delta=\dimen110
\TX@cols=\count90
\TX@ftn=\toks17
)
("C:\Program Files\MiKTeX 2.8\tex\latex\booktabs\booktabs.sty"
Package: booktabs 2005/04/14 v1.61803 publication quality tables
\heavyrulewidth=\dimen111
\lightrulewidth=\dimen112
\cmidrulewidth=\dimen113
\belowrulesep=\dimen114
\belowbottomsep=\dimen115
\aboverulesep=\dimen116
\abovetopsep=\dimen117
\cmidrulesep=\dimen118
\cmidrulekern=\dimen119
\defaultaddspace=\dimen120
\@cmidla=\count91
\@cmidlb=\count92
\@aboverulesep=\dimen121
\@belowrulesep=\dimen122
\@thisruleclass=\count93
\@lastruleclass=\count94
\@thisrulewidth=\dimen123
)

-------------------------------------------------------------------------------
synctex(busy)
-------------------------------------------------------------------------------

SyncTeX Version:1
Input:1:F:/Latex/_testjes/ctable_doet_het_niet_geeft_geen_pdf.tex
Input:2:C:/Program Files/MiKTeX 2.8/tex/latex/base/article.cls
Input:3:C:/Program Files/MiKTeX 2.8/tex/latex/base/size10.clo
Input:4:C:/Program Files/MiKTeX 2.8/tex/generic/babel/babel.sty
Input:5:C:/Program Files/MiKTeX 2.8/tex/latex/00miktex/bblopts.cfg
Input:6:C:/Program Files/MiKTeX 2.8/tex/generic/babel/dutch.ldf
Input:7:C:/Program Files/MiKTeX 2.8/tex/generic/babel/babel.def
Input:8:C:/Documents and Settings/Eigenaar/Application Data/MiKTeX/2.8/
tex/latex/ctable/ctable.sty
Input:9:C:/Program Files/MiKTeX 2.8/tex/latex/graphics/color.sty
Input:10:C:/Program Files/MiKTeX 2.8/tex/latex/00miktex/color.cfg
Input:11:C:/Program Files/MiKTeX 2.8/tex/latex/pdftex-def/pdftex.def
Input:12:C:/Program Files/MiKTeX 2.8/tex/latex/xkeyval/xkeyval.sty
Input:13:C:/Program Files/MiKTeX 2.8/tex/generic/xkeyval/xkeyval.tex
Input:14:C:/Program Files/MiKTeX 2.8/tex/generic/xkeyval/keyval.tex
Input:15:C:/Program Files/MiKTeX 2.8/tex/latex/tools/array.sty
Input:16:C:/Program Files/MiKTeX 2.8/tex/latex/tools/tabularx.sty
Input:17:C:/Program Files/MiKTeX 2.8/tex/latex/booktabs/booktabs.sty

Dr Engelbert Buxbaum

unread,
Jan 10, 2010, 2:47:46 PM1/10/10
to
Am 09.01.2010, 18:12 Uhr, schrieb sven2000 <sven...@gmail.com>:


> I copied the files to the MikTex directory as explained in the
> booktabs readme file.
>
> Now WinShell does not create a pdf, so something is wrong. I've
> managed to create some tables using \usepackage{tabularx}, but if I
> add this particular line: \usepackage{booktabs} no pdf is created.
> Though no errors were given in WinShell.

Have you updated your filename database? Booktabs btw is part of MikTeX,
you can install it from the package manager.

sven2000

unread,
Jan 10, 2010, 2:57:50 PM1/10/10
to
Hi, yes I've used the package manager and it solved the problem of
booktabs.

But ctable has the same issue (no pdf in WinShell). I again used the
package manager and, becase it didn't work, also the MIKTeX updater.
But this time it didn't help (see post above for source, log and
synctex(busy) file dumps).

If I exclude the line in the source, like so "% \usepackage{ctable}",
then it does create a pdf with some text (but no table lines).

Peter Flynn

unread,
Jan 10, 2010, 3:39:31 PM1/10/10
to
sven2000 wrote:
> Unfortunately, I've the same problem again. This time with ctable. I
> used package manager first, which worked for booktabs. But not this
> time. Then I used the the MIKTex updater (which took a loooong time,
> two hours or so). But that doesn't make a difference either.
[...]

> SyncTeX Version:1
> Input:1:F:/Latex/_testjes/ctable_doet_het_niet_geeft_geen_pdf.tex
> Input:2:C:/Program Files/MiKTeX 2.8/tex/latex/base/article.cls
> Input:3:C:/Program Files/MiKTeX 2.8/tex/latex/base/size10.clo
> Input:4:C:/Program Files/MiKTeX 2.8/tex/generic/babel/babel.sty
> Input:5:C:/Program Files/MiKTeX 2.8/tex/latex/00miktex/bblopts.cfg
> Input:6:C:/Program Files/MiKTeX 2.8/tex/generic/babel/dutch.ldf
> Input:7:C:/Program Files/MiKTeX 2.8/tex/generic/babel/babel.def
> Input:8:C:/Documents and Settings/Eigenaar/Application Data/MiKTeX/2.8/
> tex/latex/ctable/ctable.sty

Why is it using this? Shouldn't this be in C:/Program Files/MiKTeX
2.8/tex/latex/ctable ?

///Peter

sven2000

unread,
Jan 10, 2010, 4:12:49 PM1/10/10
to
> Why is it using this? Shouldn't this be in C:/Program Files/MiKTeX
> 2.8/tex/latex/ctable ?

I noticed that, so I checked that it was in C:\Program Files\MiKTeX
2.8\tex\latex\ctable\ctable.sty and it was. However, I just removed it
using both administrator and normal package manager, then I added it
again using administrator pm only.

And now it's gone in the SyncTeX(busy) file.

But that does not solve it. In all cases it sees the package. Because
if I comment out "\usepackage{ctable}" it gives errors. So it knows
that it's there. But no pdf...

SyncTeX Version:1
Input:1:F:/Latex/_testjes/ctable_doet_het_niet_geeft_geen_pdf.tex
Input:2:C:/Program Files/MiKTeX 2.8/tex/latex/base/article.cls
Input:3:C:/Program Files/MiKTeX 2.8/tex/latex/base/size10.clo
Input:4:C:/Program Files/MiKTeX 2.8/tex/generic/babel/babel.sty
Input:5:C:/Program Files/MiKTeX 2.8/tex/latex/00miktex/bblopts.cfg
Input:6:C:/Program Files/MiKTeX 2.8/tex/generic/babel/dutch.ldf
Input:7:C:/Program Files/MiKTeX 2.8/tex/generic/babel/babel.def

Input:8:C:/Program Files/MiKTeX 2.8/tex/latex/ctable/ctable.sty

sven2000

unread,
Jan 10, 2010, 4:35:37 PM1/10/10
to
I just noticed that having the line \usepackage{ctable} in the
preamble is enough to not create a pdf.

\documentclass[a4paper]{article}
\usepackage{ctable}
\begin{document}
test
\end{document}

Peter Flynn

unread,
Jan 11, 2010, 4:15:32 PM1/11/10
to
sven2000 wrote:
>> Why is it using this? Shouldn't this be in C:/Program Files/MiKTeX
>> 2.8/tex/latex/ctable ?
>
> I noticed that, so I checked that it was in C:\Program Files\MiKTeX
> 2.8\tex\latex\ctable\ctable.sty and it was. However, I just removed it
> using both administrator and normal package manager, then I added it
> again using administrator pm only.
>
> And now it's gone in the SyncTeX(busy) file.

I'm not familiar with SyncTex. What is it and what does it do?

///Peter

Ulrike Fischer

unread,
Jan 11, 2010, 6:29:17 PM1/11/10
to
Am Sun, 10 Jan 2010 13:12:49 -0800 (PST) schrieb sven2000:

> But that does not solve it. In all cases it sees the package. Because
> if I comment out "\usepackage{ctable}" it gives errors. So it knows
> that it's there. But no pdf...
>
> SyncTeX Version:1
> Input:1:F:/Latex/_testjes/ctable_doet_het_niet_geeft_geen_pdf.tex
> Input:2:C:/Program Files/MiKTeX 2.8/tex/latex/base/article.cls

I tried your example with a current and updated miktex 2.8., it
works fine. Also I never have seen this synctex message, I suspect a
winshell problem here. Call pdflatex from the command line to check.


--
Ulrike Fischer

sven2000

unread,
Jan 12, 2010, 4:20:04 PM1/12/10
to
> I tried your example with a current and updated miktex 2.8., it
> works fine. Also I never have seen this synctex message, I suspect a
> winshell problem here. Call pdflatex from the command line to check.

Thanks. This worked. TexWorks did install something first though
(which was unrelated in my view). Then I got back to WinShell and it
still didn't work. Then I pressed Execute > PDFLatex instead of
Execute > PDFView and now it works in WinShell, too.

> I'm not familiar with SyncTex. What is it and what does it do?

It's a file extention. I don't know what it's for, but MikTex >
TeXWorks also creates it.

Thanks!

Ingo H. de Boer

unread,
Jan 12, 2010, 4:56:05 PM1/12/10
to
Hi,

the problem is not related to WinShell. In general, in most of the
cases, it is a problem in the not correctly installed tex distribution,
not the editor (and I speak for all editors).

Neither TexWorks nor WinShell installs something. This is done by the
tex distribution. WinShell also does not produce synctex messages ;-)
Only calls pdflatex to use synctex.

@sven:
1. For MikTeX 2.8, did you start MiKTeX Options and choose either Yes or
No (but not "Ask me first") for the option "Install missing packages
on-the-fly"?
2. Did you make a general update of MikTeX before installing packages.
This, sometime confuses MikTeX, having new packages on an older MikTeX
core.

best regards,
Ingo


--
Ingo H. de Boer
http://www.winshell.org

A graphical user interface for easy working with LaTeX.

Peter Flynn

unread,
Jan 12, 2010, 5:49:28 PM1/12/10
to

Perhaps better, install TeXnicCenter instead.

///Peter

sven2000

unread,
Jan 16, 2010, 6:57:57 AM1/16/10
to
> Perhaps better, install TeXnicCenter instead.
>
> ///Peter

It works the same. In both programs I need to press build before I
press view output. It seems that has been my error.

Peter Flynn

unread,
Jan 17, 2010, 9:52:59 AM1/17/10
to

You mean you weren't retypesetting the file before trying to view it?
That would certainly account for problems of some kind.

But in most modern TeX systems, the previewer either watches the output
file (.dvi or .pdf), or the typesetting triggers a refresh, so you
shouldn't have to press View Output after the first time, as it will
automatically re-display the document to show any changes once you have
retypeset it (with the Build button).

///Peter


0 new messages