MiKTeX and proTeXt ⇒ Problem with Miktex 2.7 and caption.sty
Problem with Miktex 2.7 and caption.sty
Hi! Hope someone can help me. I just have a new laptop running vista and was advised to put the new version of Miktex on it 2.7. The style file I am using from the journal that I wish to publish in requires caption.sty but the new version of Miktex doesn't seem to like it. It was working fine on an older version of Mixtex. Can someone help me please?
Thanks
Jo
Thanks
Jo
NEW: TikZ book now 40% off at Amazon.com for a short time.
- Stefan Kottwitz
- Site Admin
- Posts: 10321
- Joined: Mon Mar 10, 2008 9:44 pm
Problem with Miktex 2.7 and caption.sty
Hi Jo,
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
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
LaTeX.org admin
Re: Problem with Miktex 2.7 and caption.sty
Hi Stefan!
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
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
Hi Jo,
So please give me a full running example which shows the problem, so I can reproduce the problem and take care about it.
Axel
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
Hi Axel!
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
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
Hi Axel!
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
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¹
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
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