GeneralRevtex4-1 and caption title problem

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
User avatar
Cham
Posts: 937
Joined: Sat Apr 02, 2011 4:06 pm

Revtex4-1 and caption title problem

Post by Cham »

I'm getting this error message in the console during compilation :
Package frenchb.ldf Warning: Figures' and tables' captions might look like
(frenchb.ldf) `Figure 1:' which is wrong in French.
(frenchb.ldf) Check your class or packages to change this;
(frenchb.ldf) reported on input line 68.
Here's a MWE code that shows the problem :

Code: Select all

\RequirePackage[l2tabu,orthodox]{nag}
\documentclass[10pt,letterpaper,nofootinbib,notitlepage]{revtex4-1}
\usepackage[letterpaper,margin=1in]{geometry}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[utf8]{inputenc}
\usepackage[french]{babel}

\usepackage{graphicx}
\usepackage{here}
\usepackage[font=small,format=plain,labelfont=bf,textfont=up]{caption}

\begin{document}

\section{Title}

Bla bla
	\begin{figure}[H]
	\centering
		\includegraphics[height=7cm]{image.pdf}
		\caption{Some text.}
	\end{figure}

Bla bla

\end{document}
I know that figures aren't very customizable in revtex4, but is there a way to set them up like what I like anyway, while staying in revtex4-1 ? If not, I can live with that small aesthetical glitch with the ":".

...

Also, what about the font substitution ?
LaTeX Font Warning: Font shape `T1/lmr/bx/sc' undefined
(Font) using `T1/lmr/bx/n' instead on input line 24.

Recommended reading 2024:

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

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

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

Revtex4-1 and caption title problem

Post by Stefan Kottwitz »

Cham wrote:Also, what about the font substitution ?
The combination of small caps and bold is not very common - it's like emphasizing twice. Latin Modern doesn't provide bold small caps. Do you need actually bold small caps?

You can see it working with a font set that supports it. To see this, replace lmodern by kpfonts. You will notice "Figure 1" change, see if you really like it or not.

Stefan
LaTeX.org admin
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Revtex4-1 and caption title problem

Post by Johannes_B »

You are using a class that was created for another purpose, you are usibng the class for a different purpose. Clashes all over the place have to be expected.
The solution would be, in my opinion, to use a class suited for your purpose.

Concerning the font warning: there are no bold small caps letters.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
User avatar
Cham
Posts: 937
Joined: Sat Apr 02, 2011 4:06 pm

Revtex4-1 and caption title problem

Post by Cham »

This font substitution is occuring just because I declared the lmodern font in the preamble ? I don't even use small caps, it is revtex4 that use it in its title.

I can live with this small glitch in the console, since the PDF output is very nice anyway.

EDIT : About the caption problem with the ":" in a French setting, there is no solution if I stay with the revtex4-1 class ?
User avatar
Stefan Kottwitz
Site Admin
Posts: 10322
Joined: Mon Mar 10, 2008 9:44 pm

Revtex4-1 and caption title problem

Post by Stefan Kottwitz »

Cham wrote:About the caption problem with the ":" in a French setting, there is no solution if I stay with the revtex4-1 class ?
After loading the caption package, write:

Code: Select all

\DeclareCaptionLabelSeparator{frenchsep}{ : }
\captionsetup{labelsep=frenchsep}
Stefan
LaTeX.org admin
User avatar
Cham
Posts: 937
Joined: Sat Apr 02, 2011 4:06 pm

Revtex4-1 and caption title problem

Post by Cham »

It's working great ! Thanks Stefan.

But really, I think it's the last time that I use the revtex4-1 document class. It is way too unflexible.

Too bad, since I really like its general output feel and style.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10322
Joined: Mon Mar 10, 2008 9:44 pm

Revtex4-1 and caption title problem

Post by Stefan Kottwitz »

It may take some work but you can get much of the same look and feel with KOMA-Script and a few settings, I assume.

Stefan
LaTeX.org admin
daiYuTsung
Posts: 11
Joined: Thu Jun 18, 2015 8:25 pm

Revtex4-1 and caption title problem

Post by daiYuTsung »

I have a similar question with a different reason. I use

Code: Select all

\usepackage[french,main=english]{babel}
in my revtex4-1 class because I cite an French article. If I don't put French in babel, I will get
Package babel Error: Unknown language `french'.
However, if I put French in babel, I get
Package frenchb.ldf Warning: Figures' and tables' captions might look like
(frenchb.ldf) `Figure 1:' which is wrong in French.
(frenchb.ldf) Check your class or packages to change this;
(frenchb.ldf) reported on input line 6.
This is not very reasonable, because French is not the main language so that frenchb should not complain about Figures and Tables... The minimum working example is as follow:

Code: Select all

\documentclass[longbibliography]{revtex4-1} 
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[french,main=english]{babel}

\begin{document}
\citep{Jensen_1906}
\bibliography{babel}
\end{document}
with the bibTeX file as follow.

Code: Select all

@Article{Jensen_1906,
  author    = {Jensen, J. L. W. V.},
  title     = {Sur les fonctions convexes et les inégalités entre les valeurs moyennes},
  journal   = {Acta Math.},
  year      = {1906},
  language  = {french},
  volume    = {30},
  number    = {0},
  pages     = {175--193},
  doi       = {10.1007/BF02418571},
  url       = {https://doi.org/10.1007/BF02418571},
  fjournal  = {Acta Mathematica},
  publisher = {Institut Mittag-Leffler},
}
The output file is attached.
Attachments
babel.pdf
(41.56 KiB) Downloaded 225 times
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Revtex4-1 and caption title problem

Post by Johannes_B »

You can ignore the warning.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
Post Reply