4

Writing a text in a bibliography line.

I'm using biblatex, the name of the bibliography file is example.bib. The work that I want to edit is the following:

@article{Example-article,
title={Example},
author={Someone},
journal={arXiv-somenumber},
year={2017}
}

this prints "In: arXiv-somenumber" in the bibliography but I want to add a text before "arXiv-somenumber" showing that the work is "to appear".

I tried to use note{} but when I use this option, the "In: arXiv-somenumber" text disappears.

The exist some solution?

This is my code

\usepackage{graphicx}
\usepackage[utf8]{inputenc}

\usepackage[backend=bibtex,style=alphabetic,natbib=true]{biblatex}

\addbibresource{example.bib}

\usepackage{amsthm}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{mathtools}
\usepackage{theoremref}
\usepackage{booktabs}
\usepackage{thmtools}
\usepackage{amstext}

\begin{document}

    \cite{Example-article}
\printbibliography[heading=bibintoc]
\end{document}

Moreover I want this that text for only that specific citation

moewe
  • 175,683
Miguel
  • 381
  • 1
    Are you using biblatex? A MWE would be appreciated... – karlkoeller Feb 05 '17 at 05:56
  • 1
    As your example demonstrates, it is not the .bib entry that is the cause of your problem, but something else. The obvious culprit is the package responsible for typesetting the bibliography, but it is unclear how you are getting your .bib entries typeset. Until you provide more information (and please make it an MWE), no one can answer your question except by chance. – jon Feb 05 '17 at 06:22
  • 2
    What text? Is the title of the journal really arXiv-somenumber? Because, if not, your entry shouldn't claim it is. Please edit your code to make it minimal. Only include the packages required to reproduce the issue. Also, avoid loading packages twice. It makes for trouble. – cfr Feb 07 '17 at 01:26
  • 1
    Not quite a minimal example for two reasons: (1) no \documentclass line; and (2) many of those packages have absolutely nothing to do with bibliographies or your specific problem. However, I think this answer is what you are looking for. (I also endorse all of cfr's recommendations.) – jon Feb 07 '17 at 02:54
  • @jon I had imagined that the OP wanted to add something to just this entry rather than all cases in which an entry is 'in' something. But it isn't very clear, now I think about it, from the question. – cfr Feb 07 '17 at 03:04
  • @cfr -- hmm, I think what's clear is that I clearly didn't read the question carefully. However, depending on what this mysterious bit of text is, that answer is certainly one way to add text before whatever is put in the journal|journaltitle field. (It is also probably not the best way to do it for most purposes, but I agree that the question requires some clarification.) – jon Feb 07 '17 at 03:10
  • @MiguelRomán -- Could you also explain what it is you want to add? Is it a standard piece of text for all entry types that will have an In: in the output (e.g., @article, @incollection)? Is it just for journals? Or is it only for certain entries? – jon Feb 07 '17 at 03:14
  • @jon I want to write "Exp. Math. To appear" before the "In : ...." – Miguel Feb 07 '17 at 06:12
  • @MiguelRomán -- Do you want that string to appear before every entry that has In : in the citation? If so, then look at my above link. If not, the criteria by which biblatex decides to print that string needs to be explained further. – jon Feb 07 '17 at 15:32
  • @jon I want it only for that specific citation – Miguel Feb 07 '17 at 17:31
  • If just for a specific citation, then don't use BibTeX but Biber: \usepackage[..., backend=biber, ...]{biblatex}. If that's possible for you, I can show one way to do it. – jon Feb 07 '17 at 18:25
  • But I'm citing other papers. But there is only one that I want to add that specific text – Miguel Feb 07 '17 at 23:04
  • @article is simply not the right entry type if you don't know the journal just yet: https://tex.stackexchange.com/q/415115/35864 – moewe Mar 06 '18 at 11:51

1 Answers1

1

biblatex provides the pubstate field to specify information such as to appear. So you can write the entry as

@Article{Example-article,
  title =    {Example},
  author =   {Someone, X.},
  journaltitle = {J. Jour.},
  year =     2017,
  pubstate =     {to appear},
  eprinttype =   {arxiv},
  eprint =   {1008.2849}
}

(note the use of eprint... fields for specifying the preprint version).

You may want to adjust the standard placement of this field in the print output as in the following example:

Sample output

\documentclass{article}

\usepackage[backend=bibtex,style=alphabetic,natbib=true]{biblatex}
\addbibresource{example.bib}

\renewbibmacro*{issue+date}{%
  \printtext[parens]{%
    \printfield{issue}%
    \setunit*{\addspace}%
    \usebibmacro{date}
    \setunit*{\addcomma\addspace}%
    \printfield{pubstate}}%
  \newunit}

\renewbibmacro*{addendum+pubstate}{%
  \printfield{addendum}%
  \newunit}

\begin{document}

\cite{Example-article}

\printbibliography

\end{document}

By default the pubstate information is printed by the biblatex macro addendum+pubstate. The adjustments above remove the printing from the pubstate from that macro and move it to the issue+date macro. You may want to restrict this adjustment to only articles or some other class of publications. If Guidelines for customizing biblatex styles does not help you with that, then please ask a new question.

Andrew Swann
  • 95,762