I really love biblatex, the only disadvantage is that it is not so simple any more to mess with the bibitems manually any more.

Here is a problem that caused me grief: I was asked to blacken out (nigrify) the identifying parts of self-references in a paper to maintain double-blind refereeing. When I used regular bib, I just define


and put around the text after every \newblock. Not very elegant, but doable. (note that there are better ways of nigrification, see Efficient ways to anonymize a document but that is not the point)

In biblatex, I can do the same, but things are much more tedious since the data is organized in a much more granular way.... very very tedious (I just did it for two papers and it took me more than an hour).

Ideally, I would like to just specify the authors whose citations I would like to nigrify and then in these bib entries the author names, the title, URL, and page ranges are nigrified e.g. by \blackbox. But I would also be willing to do some editing e.g. by replacing \entry and \endentry by \blackentry and \endblackentry. This \blackentry could call things like \renewbibmacro*{url}{\blackbox....} locally for nigrification. In principle biblatex should be uniquely suited for this; I just do not understand the code deeply enough to do it myself.

  • 2
    Welcome to TeX.SE. Your question is really well-stated, but it is always better to compose a minimal working example, that can other people use when trying to solve your problem. It saves them time and hence increases motivation to give attention to your question ;) As well, I took the liberty to format your post a little. See Editing Help. – yo' Jun 13 '12 at 7:35

The apa6 class works with biblatex and defines \maskcite macros that remove the citation from the text and reference list:

You can cite with \verb-\cite- and get: \cite{book-full}\par
You can maskcite with \verb-\maskcite- and get: \maskcite{article-full}

If you are willing to replace \cite with \maskcite, then the way apa6 works is pretty universal. Essentially the class checks for the mask flag. If it is not there it does \let\maskcite\cite otherwise it defines \maskcite to print some text (handling pre- and post-notes nicely). You could easily make it print a black box. It would take some work to make the black box be exactly the size of the reference with the identical line breaks.

| improve this answer | |
  • I think there is a backslash missing after \verb-\maskcite- – Vivi Jun 13 '12 at 9:58
  • @vivi something was wrong. Apparently, \printbibliography doesn't trivially work with apa6. This one should work. – StrongBad Jun 13 '12 at 10:11

I think you can do this by redefining two macros that appear in biblatex.def and are used for name formatting. (I haven't checked this with all styles, of course, and some might use different macros, in which case there would need to be different redefinition.)

This tests for a coincidence of initials and lastname (or lastname but no initials). If your lastname is not common it could possibly be simplified.



  author    = {Me Myself},
  title     = {This Should Be Blackened},
  publisher = {August House},
  date      = {2012},
  author       = {Me Myself},
  title        = {This Should be Blackened Too},
  journaltitle = {Worty Journal},
  volume       = {100},
  pages        = {103--145},
  date         = {2011},
  author       = {Brother of Myself},
  title        = {This Should be Patent},
  journaltitle = {Marginal Quarterly},
  volume       = {10},
  pages        = {23--24},
  date         = {2010},





  \ifboolexpr{ test {\ifstrequal{#1}{Myself}}
              and ( test {\ifstrequal{#4}{M\bibinitperiod}}
                    or test {\ifblank{#4}} )}



Test \cite{me01} and \cite{notme01} and \cite{me02}

blackened names

| improve this answer | |
  • On reflection, of course, one needs to "censor" other fields. Audrey's version is therefore clearly better. – Paul Stanley Jun 13 '12 at 16:42

The tricky part here is ensuring that raw bibliographic data are always passed to \blackbox/\anonymize. You can do this by aliasing the innermost format applied to the fields you want to censor.



% Define anonymized formats
  \ifboolexpr{ test {\ifcurrentfield{title}}
               or test {\ifcurrentfield{subtitle}} }

% Define category of entries to anonymize

% Specify entries in category via comma-separated list of author names

% Hook in anonymized formats

% Example
  {Aristotle, L.V{\'a}zques{ de }Parga, A.vanGennep, N.Markey, M.~A.Kastenholz}
  {L\bibinitperiod V{\'a}zques{\bibnamedelimb de\bibnamedelimb }Parga,
   A\bibinitperiodvanGennep, N\bibinitperiod Markey,
   M\bibinitperiod \bibinitdelim A\bibinitperiod Kastenholz}

Filler text \parencite{companion,aristotle:anima,markey,vazques-de-parga}.
\Textcite{companion,aristotle:anima,kastenholz} showed that...
The results from \citetitle{companion,aristotle:anima,vangennep} showed that...

enter image description here

Commenting out \toggletrue{anonymize} gives:

enter image description here

A few notes:

  • The censored text won't break across lines. To resolve this, use gablin's \anonymize command. Even with this improvement, the anonymized formats only give an approximation to the original document layout; some bibliographic data (particularly names) are heavily formatted.
  • Some of these entries need additional fields censored to make their authors non-identifiable; they were simply chosen to give some variety in the name list.
  • The name list under biber needs to make use of delimiter commands (\bibinitperiod and friends). If you find this tedious, you could categorize entries with biber's sourcemap option. It supports regular expressions.
| improve this answer | |

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.