2

I am a Japanese wanting to cite English and Japanese documents. As far as my knowledge goes, there is no neat standard solution in biblatex for dealing with oriental languages in showing surname first (without commas) in the bibliography. Thus, I am considering using macro in http://granular.blog39.fc2.com/blog-entry-76.html

The macro seems to work perfectly. The only dissatisfaction I have, which is also specified by the author of the macro himself, is that the bibliography list shows "Japanese" for Japanese entries. This is totally redundant for Japanese natives.

The author says that I have to comment out the

\printlist{language}

part in .bbx file. I would like to know whether there is a more straight forward solution.

Note that

\AtEveryBibitem{ \clearlist{language} }

sort of solution does not work here since the macro requires "language" specification in biblatex.

Many thanks for your help in advance.

2

David's answer using \DeclareListFormat{language}{} works because biblatex is quite clever and takes precautions against printing anything if the field/list/name format is empty. Despite these safety measures I'm not very fond of using empty field formats for anything and would try to avoid them if at all possible.

In your case I would suggest not to use the language field at all. language is meant to be printed in the bibliography, it is not intended for other internal checks. For language switching biblatex uses langid, so that is what you could use here as well. One advantage of langid is that it is a field and not a list like language, that makes it easier to handle.

Note that I changed the indentation in the code to make it slightly more readable to me, I also made sure to remove spurious spaces in the process.

\documentclass{ltjsarticle}
\usepackage[backend=biber]{biblatex}

\newbibmacro*{finalnamedelim:japanese}{\multinamedelim}

\renewcommand*{\finalnamedelim}{%
  \iffieldundef{langid}
    {\ifnumgreater{\value{liststop}}{2}{\finalandcomma}{}%
     \addspace\bibstring{and}\space}
    {\usebibmacro*{finalnamedelim:\strfield{langid}}}}

\newbibmacro*{name:given-family:japanese}[4]{%
  \usebibmacro{name:delim}{#1#2}%
  \usebibmacro{name:hook}{#1#2}%
  #1\bibnamedelimc#2}

\DeclareNameFormat{given-family}{%
  \iffieldundef{langid}
    {\ifgiveninits
       {\usebibmacro{name:given-family}
          {\namepartfamily}
          {\namepartgiveni}
          {\namepartprefix}
          {\namepartsuffix}}
       {\usebibmacro{name:given-family}
          {\namepartfamily}
          {\namepartgiven}
          {\namepartprefix}
          {\namepartsuffix}}}
    {\usebibmacro*{name:given-family:\strfield{langid}}
       {\namepartfamily}
       {\namepartgiven}
       {\namepartprefix}
       {\namepartsuffix}}%
  \usebibmacro{name:andothers}}

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@article{山田2018,
  author   = {山田, 太郎 and 鈴木, 花子 and 田中, 次郎},
  langid   = {japanese},
  journal  = {ほげ学会論文集},
  pages    = {8--15},
  title    = {〇〇について},
  volume   = {8},
  year     = {2018},
}
@article{Smith2018,
  author  = {Smith, John and Schmidt, Hans},
  journal = {Int. J. Hoge},
  pages   = {3-5},
  title   = {Piyo is Fuga},
  volume  = {10},
  year    = {2018},
}
\end{filecontents}
\addbibresource{\jobname.bib}

\begin{document}
山田ら\cite{山田2018}は〇〇について××と言っている。
Smith and Hans \cite{Smith2018}は piyo について fuga と言っている。

\printbibliography
\end{document}

John Smith and Hans Schmidt. “Piyo is Fuga”. In: Int. J. Hoge 10 (2018), pp. 3–5.//山田 太郎 , 鈴木 花子 , 田中 次郎 . “ 〇〇について ”. In: ほげ学会論文集 8 (2018), pp. 8–15.


I think it would be much nicer to make the language not a property of the entire entry, but of the name or name list. This is possible using the extended name format, see Bibtex/Biber: how to cite an author using Ethiopian conventions? and Chicago-style citations of CJK documents #2. Of course if the language is a property of only one name in the list, then it would seem odd that this name could change finalnamedelim. Some thought and work would be needed to get this right for your purposes.

  • I'm afraid I don't have more time right now and I doubt I will find time to look exploiting the extended name format here in the near future. – moewe Jul 5 at 6:52
  • Thank you moewe for your suggestion, and indeed your solution does sound better. Your modified macro worked perfectly in my environment as well. – decsci Jul 6 at 7:47
  • If you could help me in seconds, could you kindly tell me what part I have to modify in the macro to get the author-year bibliography style? – decsci Jul 6 at 9:56
  • @decsci You'd need \usepackage[backend=biber, style=authoryear]{biblatex}, but some more redefinitions would be needed. I suggest you ask a new question about that and explain also the output you want to see in citations and the bibliography. – moewe Jul 6 at 9:58
  • Thank you for your suggestion. Actually, I asked the question precisely because the setting you suggested did not work well with the macro. If I can bare with the redundant numbers inserted at the top of the entries in the bibliography list, the macro seems to function fine with {citestyle=authoryear} – decsci Jul 6 at 12:01
0

I suggest setting an empty list format for the language field. That way it still exists, but will never be printed.

To never print the language, use:

\DeclareListFormat{language}{}

MWE

\documentclass{ltjsarticle}
\usepackage[backend=biber]{biblatex}
\usepackage{filecontents}
\begin{filecontents}{demo.bib}
@article{山田2018,
  author = {山田, 太郎 and 鈴木, 花子 and 田中, 次郎},
  language = {japanese},
  journal = {ほげ学会論文集},
  pages = {8--15},
  title = {〇〇について},
  volume = {8},
  year = {2018}
}
@article{Smith2018,
  author = {Smith, John and Schmidt, Hans},
  journal = {Int. J. Hoge},
  pages = {3-5},
  title = {Piyo is Fuga},
  volume = {10},
  year = {2018}
}
\end{filecontents}
\addbibresource{demo.bib}

\DeclareListFormat{language}{}

\newbibmacro*{finalnamedelim:{japanese}}{%
  \ifnumgreater{\value{liststop}}{2}{\finalandcomma}{}%
  \addspace\multinamedelim
}

\renewcommand*{\finalnamedelim}{%
  \iflistundef{language}
  {\ifnumgreater{\value{liststop}}{2}{\finalandcomma}{}%
  \addspace\bibstring{and}\space}
  {\usebibmacro*{finalnamedelim:\strlist{language}}}
}

\newbibmacro*{name:given-family:{japanese}}[4]{%
  \usebibmacro{name:delim}{#1#2}\usebibmacro{name:hook}{#1#2}#1\bibnamedelimc#2}

\DeclareNameFormat{given-family}{%
  \iflistundef{language}{%
    \ifgiveninits
      {\usebibmacro{name:given-family}{\namepartfamily}{\namepartgiveni}{\namepartprefix}{\namepartsuffix}}
      {\usebibmacro{name:given-family}{\namepartfamily}{\namepartgiven}{\namepartprefix}{\namepartsuffix}}
  }
  {\usebibmacro*{name:given-family:\strlist{language}}{\namepartfamily}{\namepartgiven}{\namepartprefix}{\namepartsuffix}}
  \usebibmacro{name:andothers}
}

\begin{document}
山田ら\cite{山田2018}は〇〇について××と言っている。
Smith and Hans\cite{Smith2018}は piyo について fuga と言っている。

\printbibliography
\end{document}

MWE output

  • Thank you very much David. Your answer worked perfect in my environment as well. – decsci Jul 5 at 4:55

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.