0

I write in English as well as Chinese. When I cite Chinese work in English paper, I want to include both the English transcription/translation and original Chinese characters. But when I cite Chinese work in Chinese paper, I don't need to include the transcription. Is there a possible and convenient way to switch from these two circumstances, provided I make only one bibtex record for each reference, instead of two (Chinese version .bib and English version)?

I use Biblatex + TeXlive2018 + Win10

Example

When I write in English, I want output be like this: enter image description here

When I write in Chinese, I want the same two references be like this: enter image description here

(Biblatex-Chicago style is used)

That is to say:

English reference in English/Chinese writing --> remains English

Chinese reference in English writing --> shows both English and Chinese fields

Chinese reference in Chinese writing --> shows Chinese fields only

  • At the moment that is not really possible without serious manual modifications to the style. A few years ago, there was an idea to implement a multiscript version of biblatex that would make these things easier (github.com/plk/biblatex/tree/ms, github.com/plk/biblatex/issues/416), but unfortunately development for that feature has stalled in recent years. – moewe Dec 3 '18 at 21:39
3

This is a proof of concept of a limited alternative which, I'm sure, it won't take long before someone finds an unfixable flaw. But I submit it as an idea. As it stands, it only works for literal fields (I'm using title here as example) and I'm not sure if this could be extended for names and lists. It will very likely generate some problems with biblatex's formatting directives. It is also a fragile setting, as we need to place some macros directly in the bibentry field of interest.

\documentclass{article}

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
  @book{book1,
    author = {Author},
    title = {\caseenglish{Title}\casebrazilian{Título}},
    date = {2000},
    location = {Location},
    publisher = {Publisher},
    addendum = {An entry in Brazilian Portuguese, for which we want both titles
      when the language is English and Portuguese title when the langage is
      brazilian},
  }

  @book{book2,
    author = {Author},
    title = {English title},
    date = {2004},
    location = {Location},
    publisher = {Publisher},
    addendum = {An entry in English, which should always be in English},
  }

\end{filecontents}

\usepackage{iflang}
\usepackage[brazilian,english]{babel}
\usepackage{csquotes}
\usepackage[style=authoryear]{biblatex}

\addbibresource{\jobname.bib}

\newcommand*{\caseenglish}[1]{#1}
\newcommand*{\casebrazilian}[1]{#1}

\AtBeginBibliography{%
  \IfLanguageName{english}{%
    \renewcommand*{\casebrazilian}[1]{ #1}%
  }{}%
  \IfLanguageName{brazilian}{%
    \renewcommand*{\caseenglish}[1]{}%
  }{}%
}

\begin{document}

\nocite{*}

\printbibliography

\selectlanguage{brazilian}

\printbibliography

\end{document}

enter image description here

|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.