53

I know what this message means in general ("do not add path names in package names"), and my question is not a duplicate of You have requested package `include/foo' but the package provides `foo', where the two names differ (by the path name). In my case the package names are really identical (without path name in both cases)!

I'm working on MiKTeX 2.9, with latest updates (I refreshed FNDB). I get this with the latest moderncv package (version 2.0), MWE:

\documentclass{moderncv}
\moderncvtheme{classic}
\name{Foo}{Bar}
\begin{document}
\end{document}

where I get

You have requested package `moderncvheadi', but the package provides `moderncvheadi'.
You have requested package `moderncvbodyi', but the package provides `moderncvbodyi'.

What does trigger this warning in this case and how can I solve it? Is it a bug in moderncv? The official source on https://github.com/xdanaux/moderncv looks fine to me.

Foo Bar
  • 13,247
  • 2
    I get the same warning on TL 2015/Linux. –  Aug 08 '15 at 20:48
  • Same warning on TL 2016/Windows. – Vesnog Jul 31 '17 at 17:48
  • 2
    Bug is still there, tracked by https://github.com/xdanaux/moderncv/issues/1 https://github.com/xdanaux/moderncv/issues/7. The bug might be fixed on GitHub but not on CTAN (at least https://github.com/xdanaux/moderncv/issues/1#issuecomment-317167797 suggests so). – Blaisorblade Sep 13 '17 at 18:20

2 Answers2

51

its a bug in the class, looks like a recent change in the github log, can't test here, no tex, but the package name constructed by

\expandafter moderncv\romannumeral

which doesn't do the right thing \expandafter does nothing there, you can ignore the warning until it's fixed.

Lines 315 to 333 of moderncv.cls should be changed into

% loads a header variant
% usage: \moderncvhead[<optional head option>]{<header variant number>}
\newcommand*{\moderncvhead}[2][]{%
  \begingroup\edef\x{\endgroup
    \noexpand\RequirePackage[#1]{moderncvhead\ifcase#2\or i\or ii\or iii\or iv\or v\fi}%
  }\x 
}

% loads a body variant
% usage: \moderncvbody[<optional body option>]{<body variant number>}
\newcommand*{\moderncvbody}[2][]{%
  \begingroup\edef\x{\endgroup
    \noexpand\RequirePackage[#1]{moderncvbody\ifcase#2\or i\or ii\or iii\or iv\or v\fi}%
  }\x 
}

% loads a footer variant
% usage: \moderncvfoot{<footer variant number>}
\newcommand*{\moderncvfoot}[1]{%
  \begingroup\edef\x{\endgroup
    \noexpand\RequirePackage{moderncvfoot\ifcase#1\or i\or ii\or iii\or iv\or v\fi}%
  }\x
}

but it's not possible to add this code in a document, because the macros are already used by the class itself.

David Carlisle
  • 757,742
5

This bug has been fixed in the GitHub repo, but not yet (as of 2019-04-03) on CTAN: https://www.ctan.org/pkg/moderncv version:2.0.0 date:2015-07-28