# Disabling the printing of language only, while using the macro based on language specification in biblatex

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.

• Welcome to tex.sx. – barbara beeton Jul 5 at 3:09
• \DeclareListFormat{language}{} ? – David Purton Jul 5 at 4:07

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}{}%
{\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}

\begin{document}

Smith and Hans \cite{Smith2018}は piyo について fuga と言っている。

\printbibliography
\end{document}


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

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}

\DeclareListFormat{language}{}

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

\renewcommand*{\finalnamedelim}{%
\iflistundef{language}
{\ifnumgreater{\value{liststop}}{2}{\finalandcomma}{}%
{\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}

Smith and Hans\cite{Smith2018}は piyo について fuga と言っている。

\printbibliography
\end{document}


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