LaTeX forum ⇒ GeneralRevtex4-1 and caption title problem Topic is solved

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

Revtex4-1 and caption title problem  Topic is solved

Postby Cham » Mon May 29, 2017 4:39 pm

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 :
  1. \RequirePackage[l2tabu,orthodox]{nag}
  2. \documentclass[10pt,letterpaper,nofootinbib,notitlepage]{revtex4-1}
  3. \usepackage[letterpaper,margin=1in]{geometry}
  4. \usepackage[T1]{fontenc}
  5. \usepackage{lmodern}
  6. \usepackage[utf8]{inputenc}
  7. \usepackage[french]{babel}
  8.  
  9. \usepackage{graphicx}
  10. \usepackage{here}
  11. \usepackage[font=small,format=plain,labelfont=bf,textfont=up]{caption}
  12.  
  13. \begin{document}
  14.  
  15. \section{Title}
  16.  
  17. Bla bla
  18. \begin{figure}[H]
  19. \centering
  20. \includegraphics[height=7cm]{image.pdf}
  21. \caption{Some text.}
  22. \end{figure}
  23.  
  24. Bla bla
  25.  
  26. \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.


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

Postby Stefan Kottwitz » Mon May 29, 2017 4:57 pm

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
Site admin

User avatar
Johannes_B
Site Moderator
Posts: 3790
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Mon May 29, 2017 4:57 pm

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: 885
Joined: Sat Apr 02, 2011 4:06 pm

Postby Cham » Mon May 29, 2017 5:03 pm

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: 8945
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Mon May 29, 2017 5:19 pm

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:

  1. \DeclareCaptionLabelSeparator{frenchsep}{ : }
  2. \captionsetup{labelsep=frenchsep}


Stefan
Site admin

User avatar
Cham
Posts: 885
Joined: Sat Apr 02, 2011 4:06 pm

Postby Cham » Mon May 29, 2017 5:26 pm

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: 8945
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Mon May 29, 2017 5:37 pm

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
Site admin

daiYuTsung
Posts: 11
Joined: Thu Jun 18, 2015 8:25 pm

Postby daiYuTsung » Sun Oct 15, 2017 9:17 am

I have a similar question with a different reason. I use
  1. \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:
  1. \documentclass[longbibliography]{revtex4-1}
  2. \usepackage[T1]{fontenc}
  3. \usepackage[utf8]{inputenc}
  4. \usepackage[french,main=english]{babel}
  5.  
  6. \begin{document}
  7. \citep{Jensen_1906}
  8. \bibliography{babel}
  9. \end{document}

with the bibTeX file as follow.
  1. @Article{Jensen_1906,
  2. author = {Jensen, J. L. W. V.},
  3. title = {Sur les fonctions convexes et les inégalités entre les valeurs moyennes},
  4. journal = {Acta Math.},
  5. year = {1906},
  6. language = {french},
  7. volume = {30},
  8. number = {0},
  9. pages = {175--193},
  10. doi = {10.1007/BF02418571},
  11. url = {https://doi.org/10.1007/BF02418571},
  12. fjournal = {Acta Mathematica},
  13. publisher = {Institut Mittag-Leffler},
  14. }

The output file is attached.
Attachments
babel.pdf
(41.56 KiB) Downloaded 17 times

User avatar
Johannes_B
Site Moderator
Posts: 3790
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Sun Oct 15, 2017 9:23 am

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.


Return to “General”

Who is online

Users browsing this forum: No registered users and 6 guests