MiKTeX and proTeXt ⇒ Problem with Miktex 2.7 and caption.sty
Problem with Miktex 2.7 and caption.sty
Thanks
Jo
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
- Stefan Kottwitz
- Site Admin
- Posts: 10324
- Joined: Mon Mar 10, 2008 9:44 pm
Problem with Miktex 2.7 and caption.sty
welcome to the board!
Could you provide more details? Perhaps give us a link to the journal style file, a minimal example, error messages or the logfile as attachment.
Stefan
Re: Problem with Miktex 2.7 and caption.sty
Not sure if I am answering correctly but the part of my style file (for JABES) that is causing the problem is singelinecheck=true for package caption. When I replaced this option with nothing it Miktex 2.7 then complained about \DeclareCaptionStyle{fortables}.
This is part of my style file:
\RequirePackage{graphicx} \setlength\doublerulesep{2.5pt}
\RequirePackage[singlelinecheck=true]{caption}
%\RequirePackage{setspace}
%\DeclareCaptionFont{singlespacing}{\renewcommand\baselinestretch{1.0}}
\DeclareCaptionStyle{fortables}[justification=centering]
{format=hang,
font={sf,singlespacing,small},
position=top,
aboveskip=1ex,
belowskip=0ex,
labelsep=period}
\DeclareCaptionStyle{forfigures}[justification=centering]
{font={it,small},
position=bottom,
labelsep=period}
\captionsetup[table]{style=fortables}
\captionsetup[figure]{style=forfigures}
Thanks
Jo
Problem with Miktex 2.7 and caption.sty
This is strange since "singlelinecheck=true" is the default setting. So replacing this option with nothing it should have no effect. (Unless the caption package had been loaded before, e.g. by the subfig package. In this case you get an "option clash" from LaTeX.)JStringer wrote: Not sure if I am answering correctly but the part of my style file (for JABES) that is causing the problem is singelinecheck=true for package caption.
What exactly do you mean by "complained about"? What error message are you getting?When I replaced this option with nothing it Miktex 2.7 then complained about \DeclareCaptionStyle{fortables}.
I tried to convert this into a minimal example file, but this works fine here (using caption.sty v3.1j):This is part of my style file:
Code: Select all
\documentclass{article}\usepackage[singlelinecheck=true]{caption}%\RequirePackage{setspace}%\DeclareCaptionFont{singlespacing}{\renewcommand\baselinestretch{1.0}}\DeclareCaptionStyle{fortables}[justification=centering]{format=hang,font={sf,singlespacing,small},position=top,aboveskip=1ex,belowskip=0ex,labelsep=period}\DeclareCaptionStyle{forfigures}[justification=centering]{font={it,small},position=bottom,labelsep=period}\captionsetup[table]{style=fortables}\captionsetup[figure]{style=forfigures}\begin{document}\begin{figure}\centering A figure\caption{Blah\ldots}\end{figure}\end{document}
Axel
Re: Problem with Miktex 2.7 and caption.sty
I tried your small example and I got exactly the same error:
!Latex error: unknwon option 'singlelinecheck=true' for package 'caption'.
What am I doing wrong?
Thanks
Jo
Problem with Miktex 2.7 and caption.sty
It seems that a very old caption package (I assume v1.4b) is used here, because the option "singlelinecheck=true" is valid since v3.0 from Dec 2003.JStringer wrote: !Latex error: unknwon option 'singlelinecheck=true' for package 'caption'.
So please take a closer look at your log file and/or put a \listfiles at the beginning of the document, so you see what version of the caption package is actually used.
Gruß,
Axel
Re: Problem with Miktex 2.7 and caption.sty
I did what you suggested and I am using v1.4b. After the error it says:
1.78 \newsavebox{\as@captionbox}
?
I have downloaded caption.sty from the web again just in case I did anything to it. I then ran Miktex options to refresh FNDB and update formats (I think this is what you are supposed to do).
I have an older version of Mixtex on my laptop - that wouldn't be causing a problem would it?
Thanks
Jo
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Problem with Miktex 2.7 and caption.sty
Why don't you simply use the MiKTeX Package Manager to install packages?JStringer wrote:[...] I have downloaded caption.sty from the web again just in case I did anything to it. I then ran Miktex options to refresh FNDB and update formats (I think this is what you are supposed to do). [...]
It is very unlikely that there would be problems, but it is recommended to upgrade to the current version.JStringer wrote:[...] I have an older version of Mixtex on my laptop - that wouldn't be causing a problem would it? [...]
Best regards and welcome to the board
Thorsten¹
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Problem with Miktex 2.7 and caption.sty
What version have you downloaded from where? The version v1.4b is over 13(!) years old, and is neither offering package options like "singlelinecheck=true" nor commands like \DeclareCaptionStyle or \captionsetup.JStringer wrote:I have downloaded caption.sty from the web again just in case I did anything to it.
Please install the actual version of the caption package (which is v3.1j at the moment) and everything should (hopefully) compile fine.
Axel