Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PMLR page count slightly off when last pages contains only figures #10

Closed
HKervadec opened this issue Oct 16, 2020 · 3 comments
Closed

Comments

@HKervadec
Copy link
Member

Before I forget, for the fifth time, to post that one

We noticed that the page number (at the top of the first page of each article) was sometimes off by 1-2 pages. A quick investigation seems to show that pages containing only floats (figures, tables) aren't counted.

(http://proceedings.mlr.press/v121/kervadec20a/kervadec20a.pdf for instance, but there are others). The numbering shows Proceedings of Machine Learning Research 121:365–380, but the pages go up to 381.

I've just checked quickly with volume 102, couldn't find one with only figures at the end -- don't know if this is an old problem or a subtle regression introduced by the PMLR template or us.

Def a painful bug to track down.

@tvercaut
Copy link
Member

@tvercaut
Copy link
Member

tvercaut commented Oct 18, 2020

I have filed a bug report here with the following MWE (and workaround):

\documentclass[pmlr]{jmlr} % Include author names

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{mwe}

\title[Short Title]{Full Title of Article}

\author{
	\Name{Author A \nametag{$^{1}$}} \Email{authora@test.com}\\
	\addr $^{1}$ Address, City, Countryy \AND
	\Name{Author B \nametag{$^{2}$}} \Email{authorb@test.com} \\
	\addr $^{2}$ Address, City, Country
      }


\begin{document}

\maketitle

\begin{abstract}
\blindtext
\end{abstract}

\begin{keywords}
List of keywords, comma separated.
\end{keywords}

\section{Introduction}

\Blindtext[5][2]

\acks{\blindtext}

\appendix
\section{Appendix}

% Uncomment the next line for a work around to get page numbers right when last page is a float
%\clearpage

\begin{figure}[htbp]
 % Caption and label go in the first argument and the figure contents
 % go in the second argument
\floatconts
  {fig:example}
  {\caption{Example Image}}
  {\includegraphics[width=0.5\linewidth]{example-image}}
\end{figure}

\end{document}

@HKervadec
Copy link
Member Author

I just experimented on the 2020 proceedings, it seems that adding the following at the end of midl.cls did the trick:

\RequirePackage{lastpage}
\renewcommand*{\@jmlrpages}{\pageref{jmlrstart}--\pageref{LastPage}}

With the original command being

\providecommand*\@jmlrpages{\pageref{jmlrstart}--\pageref{jmlrend}}

It does not seem that \pageref{jmlrend} is used somewhere, so I do not think it will cause any other ill side-effect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants