Graphics, Figures & Tables ⇒ Comparison plot diagram
- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
Re: Comparison plot diagram
It works iin a MWE, as it should, but not in your real document. That mean, something is strange in your real document which we don't know.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
NEW: TikZ book now 40% off at Amazon.com for a short time.

- Stefan Kottwitz
- Site Admin
- Posts: 10345
- Joined: Mon Mar 10, 2008 9:44 pm
Re: Comparison plot diagram
In such a case it's good to produce a MWE from a copy of the original document, reducing that and keeping the problem, instead of creating one from scratch where it's unclear how to put the actual problem into it. Can you show an example code which has that problem, built from your original code?
Stefan
Stefan
LaTeX.org admin
Comparison plot diagram
This is weird. This morning, I'm no longer able to reproduce the previous issue in my main document.
Here's a not so minimal example that is fully working. I need to know if the code could be optimized in some way. I think it's slow to compile, for what it's doing.
Also, since the document is in French, there's a mistake somewhere I cannot isolate, and I had to fix it using a renew command to add space before the ":" for tables and figures. I think this is an hack. It should be done properly in another way :
Preview :
The previous issue is that
Lastly, the percent symbol is now working everywhere because of the
I find this a bit strange since that percent code is working great (without the

Here's a not so minimal example that is fully working. I need to know if the code could be optimized in some way. I think it's slow to compile, for what it's doing.
Also, since the document is in French, there's a mistake somewhere I cannot isolate, and I had to fix it using a renew command to add space before the ":" for tables and figures. I think this is an hack. It should be done properly in another way :
Code: Select all
Code, edit and compile here:
\renewcommand{\thetable}{\arabic{table}\,} % <--- this is probably an hack\renewcommand{\thefigure}{\arabic{figure}\,} % <--- this is probably an hack. See code below
Code: Select all
Code, edit and compile here:
\documentclass[10pt,twoside,nofootinbib]{revtex4}\usepackage[T1]{fontenc}\usepackage[utf8]{inputenc}\usepackage[french]{babel}\usepackage{microtype}\usepackage{moreverb}\usepackage{amsmath}\usepackage{multirow}\usepackage{hhline}\usepackage{pgfplots}\pgfplotsset{width=7cm,every tick/.style={black}}\usepackage[separate-uncertainty=true]{siunitx}\sisetup{output-decimal-marker = {,}}\usepackage{icomma}\usepackage{graphicx}\usepackage{here}\usepackage{subfig}\captionsetup{figurename=Figure,margin=1cm,format=hang,font=small,format=plain,labelfont={bf,up},textfont={it}}\captionsetup[subfigure]{margin=0cm,font=small,format=plain,labelfont={bf,up},textfont={up}}\captionsetup[table]{name=Tableau,labelfont={bf,up}}\renewcommand{\thetable}{\arabic{table}\,}\renewcommand{\thefigure}{\arabic{figure}\,}\usepackage[unicode,colorlinks,linkcolor=red,urlcolor=red,citecolor=red,pdftitle={Protocole de laboratoire du cours NYA},pdfauthor={Martin Charest},pdfproducer={pdfLaTeX},plainpages=false,hyperindex=true,pdfpagelabels]{hyperref}\pagestyle{plain}\raggedbottom\newcommand*\pct{\protect\scalebox{0.9}{\%}}\begin{document}\begin{center}\begin{minipage}{0.8\linewidth}\renewcommand{\arraystretch}{1.5}\begin{tabular}{l|c|c|c|c|c|}\cline{2-6}& \multicolumn{5}{c|}{A simple title} \\ \cline{2-6}& \multicolumn{1}{>{\centering}p{6em}|}{$d$}& \multicolumn{1}{>{\centering}p{6em}|}{$\Delta d$}& \multicolumn{1}{>{\centering}p{6em}|}{$\ell$}& \multicolumn{1}{>{\centering}p{6em}|}{$\Delta\ell$}& \multicolumn{1}{>{\centering}p{6em}|}{$m$}\\ \cline{2-6}
\pgfplotsset{major grid style={black,dotted}}
wasn't working, while \pgfplotsset{major grid style={color=black,dotted}}
is working. Now both codes are working in my main document. I don't know why it was different yesterday.Lastly, the percent symbol is now working everywhere because of the
\protect
command. I want to be sure that this is the "proper" way of doing this. Without the \protect command, the code doesn't work inside the caption environment.I find this a bit strange since that percent code is working great (without the
\protect
) in another (large !) project of mine, which is MUCH more complex than the document I made these last days.- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
Comparison plot diagram
I haven't looked at the code. You previously used the babel package and it gives a huge warning concerning the captions.
This is ok, the editors of REVTeX will change your submission anyway. The American Physical Society decides about the layout of their journals.
Code: Select all
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 12.
Code: Select all
Code, edit and compile here:
Package caption Warning: Unused \captionsetup[subfigure] on input line 19.See the caption package documentation for explanation.Package caption Warning: Unused \captionsetup[table] on input line 20.See the caption package documentation for explanation.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
Comparison plot diagram
Well, my document isn't about publishing anything to the APS. I'm using the revtex4 because of its nice compact output. It fits well my needs.Johannes_B wrote: This is ok, the editors of REVTeX will change your submission anyway. The American Physical Society decides about the layout of their journals.
So how to fix that "huge" warning ?
- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
Re: Comparison plot diagram
Simple: Don't use a highly specialised class that sole purpose is submission to the APS.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
Comparison plot diagram
Well then, what class would you suggest that has a comparable layout and output ?
With the revtex4 class, should I conclude that there isn't any "right" way to make a French document, and that I have to "hack" it like what I've done ?
This is important, since I was using that class for a lot of small documents, that I want to take only a few pages of paper.
With the revtex4 class, should I conclude that there isn't any "right" way to make a French document, and that I have to "hack" it like what I've done ?
This is important, since I was using that class for a lot of small documents, that I want to take only a few pages of paper.
- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
Comparison plot diagram
I would suggest to use basic
Journal classes tend to be grown over years of small changes and are (in general) a clutter of bad coding, incompatible to many packages. But why should they care? The layout matches their requirements and nobody should modify, say, captions to be different. All changes will simply be reverted.
Unfortunately, that is a problem to many many many beginners, that are looking for a template (whatever that is) and instead of a nice design/layout they find a journal template which is like a booby-trapped box of chocolates. Looks nice, but as soon as you want to replace one piece, it blows up.
Would be good, if you have questions, to open a new thread for the different topics.
article
(or scrartcl
) and use package geometry to change margins. I don't know what revtex is doing exactly.Journal classes tend to be grown over years of small changes and are (in general) a clutter of bad coding, incompatible to many packages. But why should they care? The layout matches their requirements and nobody should modify, say, captions to be different. All changes will simply be reverted.
Unfortunately, that is a problem to many many many beginners, that are looking for a template (whatever that is) and instead of a nice design/layout they find a journal template which is like a booby-trapped box of chocolates. Looks nice, but as soon as you want to replace one piece, it blows up.
Would be good, if you have questions, to open a new thread for the different topics.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
Re: Comparison plot diagram
Ok thanks. I'll start a new topic on this subject.