1

I am trying to change the word "in" for specific entries. In particular, I want that all types of sources should contain the "in" except unpublished and Proceedings. Furthermore I want to change the "in" into "Künftig in" for all inproceeding Elements.

Here is a short mwe

\documentclass[12pt, bibliography=totocnumbered, listof=totoc]{scrartcl}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}                              
\usepackage{lmodern}
\usepackage[ngerman]{babel}
\usepackage{csquotes}


\usepackage[backend=biber, style=ext-authoryear,
  maxbibnames=9, maxcitenames=3, uniquelist=false, uniquename=false,
  useprefix=true, giveninits=true, dashed=false
  doi=false,isbn=false,url=false,
  date=year]{biblatex}


\renewbibmacro{in:}{%
  \ifboolexpr{%
     test {\ifentrytype{unpublished}}%
     or
     test {\ifentrytype{proceedings}}%
  } 
  {}
  \ifentrytype{inproceedings
  }
  {\printtext{\bibstring{Künftig in}\intitlepunct}}
  {\printtext{\bibstring{in}\intitlepunct}}%
}

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@Article{Hansen2011,
  author  = {Hansen, Peter R. and Lunde, Asger and Nason, James M.},
  title   = {The Model Confidence Set},
  journal = {Econometrica},
  year    = {2011},
  volume  = {79},
  number  = {2},
  pages   = {453-497},
  url     = {https://EconPapers.repec.org/RePEc:ecm:emetrp:v:79:y:2011:i:2:p:453-497},
}

@InProceedings{Loeschel2018,
  author    = {Andreas Löschel and Benjamin Johannes Lutz and Shunsuke Managi},
  title     = {The impacts of the {EU} {ETS} on efficiency and economic performance {\textendash} An empirical analyses for German manufacturing firms},
  booktitle = {Resource and Energy Economics},
  year      = {2018},
  month     = {mar},
  doi       = {10.1016/j.reseneeco.2018.03.001},
  journal   = {Resource and Energy Economics},
}

\end{filecontents}
\addbibresource{\jobname.bib} 

\begin{document}
\textcite{Hansen2011} \textcite{Loeschel2018}
\printbibliography
\end{document}

I tried to redefine

\renewbibmacro{in:}{%
  \ifboolexpr{%
     test {\ifentrytype{unpublished}}%
     or
     test {\ifentrytype{proceedings}}%
  } 
  {}
  \ifentrytype{inproceedings
  }
  {\printtext{\bibstring{Künftig in}\intitlepunct}}
  {\printtext{\bibstring{in}\intitlepunct}}%
}

by adding this line here:

\ifentrytype{inproceedings}
  {\printtext{\bibstring{Künftig in}\intitlepunct}}

but that doesnt work.

Vala
  • 475
  • 1
    @unpublished should normally not have an "in:" anyway. I also don't think it is safe to change all "in"s to "künftig in" for @inproceedings: What about old proceedings that have already been published? "künftig" would sound a bit odd there. – moewe Jan 08 '19 at 13:29
  • 1
    journal is also not a field that is known to @inproceedings. And for all I know/just googled Resource and Energy Economics is a journal and hence Loeschel2018 should be an article. @inproceedings is for articles/papers in proceedings (Tagungsband/Konferenzband). – moewe Jan 08 '19 at 13:31
  • 1
    You may be interested in https://tex.stackexchange.com/q/408024/35864. – moewe Jan 08 '19 at 13:35
  • The originally Problem was/is, that I've two articels, that are not published as they have a volume/no and pages. Only the the Journal is known. Therefore I want to change only for that type of fields the word "in" to "künftig in". I thought a quick and dirty solution might be to change the type of that entries to inproceedings and then specify the field. – Vala Jan 08 '19 at 13:38
  • I figured as much eventually. It would certainly be a dirty solution. But I would much prefer the solution with pubstate from https://tex.stackexchange.com/q/408024/35864. Does that work for you? – moewe Jan 08 '19 at 13:43
  • The code from the linked solution seems to work fine: https://gist.github.com/moewew/dc3649d8399deafd925b8e2597efbd03 – moewe Jan 08 '19 at 13:51
  • It doesnt work for me: The word "toappearin" is still written together and I cant replace it by the german word (Künftig in) – Vala Jan 08 '19 at 14:05
  • Ah yes, the German version was left as an exercise to the reader. Have a look at the updated https://gist.github.com/moewew/dc3649d8399deafd925b8e2597efbd03 – moewe Jan 08 '19 at 14:07

1 Answers1

2

In the comments it emerged that the idea behind the question was to cite an @article that is to appear in a particular journal, but that has no volume and page number yet.

In that case I would not abuse @incproceedings for something it was not meant for. Instead I would use pubstate as suggested in Biblatex: add "submitted to" or "to appear in" for some publications.

\documentclass[ngerman]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{csquotes}
\usepackage[style=authoryear]{biblatex}
\addbibresource{biblatex-examples.bib}

\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@article{loeschel,
  author   = {Andreas Löschel and Benjamin Johannes Lutz and Shunsuke Managi},
  title    = {The impacts of the {EU} {ETS} on efficiency and economic performance},
  subtitle = {An empirical analyses for {German} manufacturing firms},
  pubstate = {toappearin},
  journal  = {Resource and Energy Economics},
  date     = {2018-03-23},
  doi      = {10.1016/j.reseneeco.2018.03.001},
}
\end{filecontents*}
\addbibresource{\jobname.bib}

\NewBibliographyString{toappearin}
\NewBibliographyString{submittedto}
\DefineBibliographyStrings{english}{%
  toappearin  = {to appear in},
  submittedto = {submitted to},
}
\DefineBibliographyStrings{german}{%
  toappearin  = {künftig in},
}

\renewbibmacro*{in:}{%
  \ifboolexpr{not test {\iffieldundef{pubstate}}
              and (test {\iffieldequalstr{pubstate}{toappearin}}
                   or test{\iffieldequalstr{pubstate}{submittedto}})}
    {\printtext{%
       \printfield{pubstate}\intitlepunct}%
     \clearfield{pubstate}}
    {\printtext{%
       \bibstring{in}\intitlepunct}}}

\begin{document}
\cite{loeschel,sigfridsson}
\printbibliography
\end{document}

Löschel, Andreas, Benjamin Johannes Lutz und Shunsuke Managi (23. März 2018). „The impacts of the EU ETS on efficiency and economic performance. An empirical analyses for German manufacturing firms“. Künftig in: Resource and Energy Economics. doi: 10.1016/j.reseneeco.2018.03.001.//Sigfridsson, Emma und Ulf Ryde (1998). „Comparison of methods for deriving atomic charges from the electrostatic potential and moments“. In: Journal of Computational Chemistry 19.4, S. 377–395. doi: 10.1002/(SICI)1096-987X(199803)19:4<377::AID-JCC1>3.0.CO;2-P

moewe
  • 175,683