I am try to compile my Latex file but I am getting this error during compilation:

Update Error message:

! LaTeX Error: Command \citename already defined. Or name \end... illegal, see p.192 of the manual. See the LaTeX manual or LaTeX Companion for explanation. Type H <return> for immediate help. ... l.10472 ...*{\citename}{\blx@citexpunct{citename}} Your command was ignored.

This is my Latex file definitions:

\algnewcommand\algorithmicforeach{\textbf{for each}}
\algdef{S}[FOR]{ForEach}[1]{\algorithmicforeach\ #1\ \algorithmicdo}


\usepackage[style=authoryear-comp, citetracker=true, maxcitenames=1, 
giveninits, terseinits, uniquename=init]{biblatex}


        title={Nonparametric eigenvalue-regularized precision or covariance 
         matrix estimator},
         author={Lam, Clifford},
         journal={The Annals of Statistics},
    publisher={Institute of Mathematical Statistics},
    doi = {0.1214/15-AOS1393}










        \step[fieldset=number, null]


Any idea about how can I fix this error ?

| improve this question | | | | |
  • 1
    Welcome to TeX.SX. Well, I don't see a \documentclass in your example. I don't see an end to your \begin{filecontents*}{example.eps} either. It is no wonder your are getting errors. Are you sure the error you are reporting is coming from this code you provided us? – gusbrs Apr 8 '18 at 22:30
  • 1
    Your code can not be compilable, the documentclass is missing ... What should \begin{filecontents*}{example.eps} do as first line of code? – Mensch Apr 8 '18 at 22:30
  • Sorry for this mistake, I forget to add these lines in this post. But it is exist in my latex file on my pc. – medo0070 Apr 8 '18 at 22:34
  • I add missing lines to the post. I forget add these lines here while try to shortner the code for posting. Sorry again for this mistake. – medo0070 Apr 8 '18 at 22:40
  • 1
    The problem with the particular error you report comes from your call \usepackage{harvard} and then later biblatex. The first defines \citename and when the second one tries to do the same, it issues an error. AFAIK, the both are incompatible, so if you intend to use biblatex, leave out \usepackage{harvard}. – gusbrs Apr 8 '18 at 22:47

You are loading harvard and latter biblatex. harvard is meant to work on a BibTeX setting for bibliography/citation, not with biblatex.

The problem you face with this particular error is that harvard has already defined \citename when you load biblatex which tries to define the same macro. So you get an error out of it.

In sum, if you intend to use biblatex, you should leave out \usepackage{harvard}.

| improve this answer | | | | |
  • I fix the problem. It was very useful tip. I will keep it in my mind for my next latext paper. Regards – medo0070 Apr 8 '18 at 23:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.