# Dividing biblatex bibliography by language using origlanguage

Similar questions here, here are quite old and rather complicated; I understand biblatex may have been updated since then. I have a bilingual bibliography with some sources in both Korean and English.

@article{Ka91,
origtitle = {투자은행이 IPO의 가격형성에 미치는 영향에 관한 실증분석},
origpublisher = {재무관리연구}
title = {An Empirical Study on ...},
publisher = {The Korean Journal of Financial Management}
origlanguage = {Korean},
}


I can divide the Bibliography by Type or using Keywords. I'd like to be able to divide by the field origlanguage=, if possible:

\printbibliography[type=book,heading=subbibliography,title={Books}]


If this isn't easily possible, then keywords can be used.

Secondly, I'd like to substitute the Korean equivalents in the Bibliography in this section only, so the Korean text prints in place of the English.

I haven't written the .bib file yet so have some flexibility with the field names. Compiling using xelatex on Overleaf.

MWE:

% See https://www.overleaf.com/learn/latex/How_to_Write_a_Thesis_in_LaTeX_(Part_1):_Basic_Structure

\documentclass{report}
\usepackage[utf8]{inputenc}
\usepackage{geometry}

\usepackage{filecontents}
\begin{filecontents}{references.bib}
@article{appleby,
author   = {Humphrey Appleby},
title    = {On the Importance of the Civil Service},
journal  = {Journal of the Civil Service},
date     = {1980},
keywords = {underreview},
}
@article{Ka91,
author = {H. S. Kang},
title = {An Empirical Study on the Effect of the Activities of Investment banks on IPO Pricing},
journaltitle = {The Korean Journal of Financial Management},
volume = {8},
issue = {2},
year = {1991},
pages = {31-45},
origlanguage = {Korean},
origtitle = {투자은행이 IPO의 가격형성에 미치는 영향에 관한 실증분석},
origpublisher = {재무관리연구}
}
\end{filecontents}

\usepackage[backend=biber,texencoding=utf8,bibencoding=utf8,style=authoryear,sorting=ynt,backref=true]{biblatex}
%loads biblatex and specifies format, sorting year-name-title

\DefineBibliographyStrings{english}{
backrefpage = {p.},% originally "cited on page"
backrefpages = {pp.},% originally "cited on pages"
}

\begin{document}

Wibble wibble wibble (A Study on Initial Returns and Underpricing of {IPOs})\cite{Ka91} (This is a Korean citation). Wibble wibble wibble \cite{appleby} (This is an English citation).

\end{document}

• You can use \defbibcheck for this. See this example: tex.stackexchange.com/questions/333682/… – Denis Aug 9 '19 at 21:02
• I only answered the question in the title. I don't think I quite understand the secondly request, but if my hunch is right it does not have a lot to do with the first part of the question, so I suggest you separate it out into a new question. Note that printing CJK characters with pdfLaTeX can be a bit of a pain (tex.stackexchange.com/q/17143/35864)... – moewe Aug 10 '19 at 7:01
• tex.stackexchange.com/q/46649/35864 uses the Unicode Engine XeLaTeX for Korean. I would definitely recommend a Unicode engine like XeLaTeX or LuaLaTeX if you want to typeset both English and Korean in the same document. – moewe Aug 10 '19 at 7:03
• Korean text in the body of the document prints okay with \setCJKmainfont{UnGungseo.ttf}. – Owain Aug 10 '19 at 7:35
• I've placed the second part in a new question tex.stackexchange.com/questions/503630/… – Owain Aug 10 '19 at 8:25

In recent versions of biblatex origlanguage is a list and not a normal (single-value) field. That makes it much harder to check against the contents of origlanguage. (Checking for specific content of a proper field is quite simple as biblatex filter on arbitrary field shows, but there is no equivalent to \iffieldequalstr for list fields.) A simple workaround is to have Biber add a keyword for all entries with Korean in their origlanguage list.

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[backend=biber,style=authoryear,sorting=ynt,backref=true]{biblatex}

\DefineBibliographyStrings{english}{
}

\DeclareSourcemap{
\maps[datatype=bibtex]{
\map[overwrite]{
\step[fieldsource=origlanguage, match=\regexp{(\A|\s+and\s+)Korean(\Z|\s+and\s+)}, final]
\step[fieldset=keywords, fieldvalue={,korean}, append]
}
}
}

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@article{appleby,
author   = {Humphrey Appleby},
title    = {On the Importance of the Civil Service},
journal  = {Journal of the Civil Service},
date     = {1980},
keywords = {underreview},
}
@article{Ka91,
author        = {H. S. Kang},
title         = {An Empirical Study on the Effect of the Activities of Investment banks on IPO Pricing},
journaltitle  = {The Korean Journal of Financial Management},
volume        = {8},
issue         = {2},
year          = {1991},
pages         = {31-45},
origlanguage  = {Korean},
origtitle     = {투자은행이 IPO의 가격형성에 미치는 영향에 관한 실증분석},
origpublisher = {재무관리연구}
}
\end{filecontents}