1

Biber runs with this warning:

Running `Biber' on `citation_issues' with ``biber citation_issues''
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LC_ALL = (unset),
    LANG = "en_TW.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").

And this error:

WARN - BibTeX subsystem: /var/folders/rw/rpr418x91h13ysbc6k7fzj240000gn/T/XreBNpegVI/thesis.bib_98780.utf8, line 7325, warning: "(" in strange place -- should get a syntax error
ERROR - BibTeX subsystem: /var/folders/rw/rpr418x91h13ysbc6k7fzj240000gn/T/XreBNpegVI/thesis.bib_98780.utf8, line 7325, syntax error: found "(", expected ","
INFO - WARNINGS: 1
INFO - ERRORS: 1

Locale settings on the terminal do not concur with what biber reported.

$ locale
LANG="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_CTYPE="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_ALL="en_US.UTF-8"

How do we resolve that?

Tex file:

% Created 2019-08-29 Thu 13:25
% Intended LaTeX compiler: xelatex

\documentclass[12pt,a4paper]{article}

\usepackage{xeCJK}
%\usepackage[heading]{CJK}
\usepackage{zhnumber} % package for Chinese formatting of date time (use /zhtoday)
%\usepackage[yyyymmdd]{datetime} % set date time to numeric

% Set default indentation

\setlength\parindent{12pt}

% Set Paper Size, Page Layout (another variable is 'bindingoffset')
\usepackage[margin = 1.5in, paper = a4paper, inner = 2.5cm,
outer = 2.5cm, top = 3cm, bottom = 2.5cm]{geometry}

% Keep paragraph indentation while having a line break in between paragraphs.
\edef\restoreparindent{\parindent=\the\parindent\relax}
\usepackage{parskip}
\restoreparindent

% Indent first paragraph.
\usepackage{indentfirst}

\usepackage{titlesec}
\usepackage{titling}
\usepackage{fontspec} % packages for title and section-heading font setting.

% Set Font.
\setsansfont{Arial}
\setmainfont{Calibri} % Set serifed font to Calibri. Originally set to 'Times New Roman', but it cannot display certain characters such as ①②③.
\setCJKmainfont{MingLiU}
\setCJKsansfont{Kaiti TC} % Set Chinese font. NOTE: Remember to append CJK before of the font class. CJK HAS to be there for the font to show.

\titleformat*{\section}{\fontsize{16}{18}\bfseries\sffamily}
\titleformat*{\subsection}{\fontsize{14}{16}\bfseries\sffamily}
\titleformat*{\subsubsection}{\fontsize{12}{14}\bfseries\sffamily} % Set formats for each heading level. 'sffamily' will point to the sans-serif font. In this case, 「楷體」.
\renewcommand{\maketitlehooka}{\sffamily} % Set title font.

% Set quotation font.
\usepackage{etoolbox}
\newCJKfontfamily\quotefont{Kaiti TC}
\AtBeginEnvironment{quote}{\quotefont\normalsize}

% Tweak default settings.
\renewcommand{\baselinestretch}{1.2} % Set line width.
\renewcommand{\contentsname}{目次} % Translate content page title to Chinese. (Could possibly be done automatically with '\usepackage[heading]{CJK}'. TODO experiment. )

% For text-boxes

\usepackage{mdframed}
\BeforeBeginEnvironment{minted}{\begin{mdframed}}
\AfterEndEnvironment{minted}{\end{mdframed}}

% [FIXME] ox-latex 的設計不良導致 hypersetup 必須在這裡插入
\usepackage{hyperref}
\hypersetup{
  colorlinks=true, %把紅框框移掉改用字體顏色不同來顯示連結
  linkcolor=[rgb]{0,0.37,0.53},
  citecolor=[rgb]{0,0.47,0.68},
  filecolor=[rgb]{0,0.37,0.53},
  urlcolor=[rgb]{0,0.37,0.53},
  pagebackref=true,
  linktoc=all,}

\usepackage{hyperref}
\usepackage[utf8x]{inputenc}
\usepackage{fixltx2e}
\usepackage{graphicx}
\usepackage{longtable}
\usepackage{float}
\usepackage{wrapfig}
\usepackage{rotating}
\usepackage[normalem]{ulem}
\usepackage{amsmath}
\usepackage{textcomp}
\usepackage[citestyle=authoryear-icomp,bibstyle=authoryear, hyperref=true,backref=true,maxcitenames=3,url=true,backend=biber,natbib=true] {biblatex}
\addbibresource{/Users/satibodhi/Creation/notes/bibliography/thesis.bib}
\author{TYH}
\date{\today}
\title{Citation Issues}
\begin{document}

\maketitle
\tableofcontents

這是一註腳\footnote{\cite{錢穆LunYuXinJie2008}。},這又是一註腳\footnote{\cite[55-100]{陳鼓應YiChuanYuDaoJiaSiXiang1994}}。

\section{引用書目}
\label{sec:orgf6071a9}

\printbibliography
\end{document}

Bibtex:

@book{錢穆LunYuXinJie2008,
  langid = {Chinese},
  location = {{臺北市}},
  title = {論語新解},
  isbn = {978-957-19-2770-1},
  abstract = {附錄:孔子年表},
  publisher = {{東大出版}},
  date = {2008},
  author = {{錢穆}},
  file = {/Volumes/Seagate/Digital Library/論語新解.pdf},
  note = {OCLC: 858329177}
}

@book{陳鼓應YiChuanYuDaoJiaSiXiang1994,
  langid = {pinyin},
  location = {{台北}},
  title = {易傳與道家思想},
  isbn = {978-957-05-0994-6},
  pagetotal = {382},
  publisher = {{臺灣商務印書館}},
  date = {1994},
  author = {{陳鼓應}},
  eprinttype = {googlebooks}
}

Update:

The error above was apparently caused by this .bib entry.

@article{祝總(又武)LueLunJinLuDe1983,
  title = {略論晉律的``寬簡''和``周備''},
  abstract = {{$<$}正{$>$} 晉律(泰始律)頒布于泰始四年(268),是我國古代一部頗為重要的法典。它旣反映了魏晉時期政治經濟特點,成為鞏固西晉地主階級統治的工具,對太康年間的經濟繁榮起了一定作用;又前承漢律,后啟唐律,影響于后代法律頗大,在我國法制發展史上占有其不可忽視的地位。遺憾的是:晉律早已散佚,比較重要的資料{$\ElsevierGlyph{300A}$}晉書{$\cdot$}刑法志{$\ElsevierGlyph{300B}$}又語焉而不詳。為了有助于晉律之研究,本文試圖就它的``寬簡''和``周備''這兩方面的問題作一些考證和分析,并初步接觸其階級本質和指導思想。拋磚引玉,千慮一得,敬希讀者指正。},
  number = {02},
  journaltitle = {北京大學學報(哲學社會科學版)},
  date = {1983},
  author = {祝總(又武)}
}
Sati
  • 167
  • Related https://tex.stackexchange.com/q/496173/35864 – moewe Aug 30 '19 at 05:47
  • I don't know where exactly the locale settings come from, but en_TW.UTF-8 looks a bit fishy. – moewe Aug 30 '19 at 05:47
  • 1
    A very similar issue is reported at https://stackoverflow.com/q/44243909 and https://github.com/godotengine/godot/issues/6787 (also https://discourse.brew.sh/t/failed-to-set-locale-category-lc-numeric-to-en-ru/5092) lang in the terminal gives a sensible output, but Perl detects a different locale. So I guess it tries to get the locale settings from somewhere else. en_TW looks as though your system language is English, but you configured Taiwanese localisation extras (dates, currency, etc.) – moewe Aug 30 '19 at 05:53
  • Not sure if the error indicated above is in anyway related to this locale issue. – Sati Aug 30 '19 at 15:32
  • Yes, that's true. However, if that is the case, changing system language back to Chinese should cause Perl to switch back to the more normal-looking zh-TW. It did not. – Sati Aug 30 '19 at 15:35
  • 1
    Indeed the two issues are very likely independent. I can not reproduce the Biber error with the given .bib file. Do check if any of your .bib entries (especially around line 7325 of the .bib file) contains any ( or ). In particular ( and ) may not be used in the entry key. – moewe Aug 30 '19 at 16:49
  • 1
    Aha! ( and ) are not allowed, see https://tex.stackexchange.com/q/96454/35864, https://github.com/plk/biblatex/issues/876 and https://github.com/ambs/Text-BibTeX/issues/30. This behaviour is documented in the biblatex manual (p. 161 for biblatex v3.13). – moewe Aug 31 '19 at 05:01
  • Removing parentheses from the bibtex key is not an issue for me, so long as I know it is the cause of the error. – Sati Sep 07 '19 at 16:48
  • 1
    I'd urge you to test this, but from what I can tell from the information provided in the question, the parentheses in the key are indeed cause or the error. The warnings about locale settings are independent of that issue, but most likely harmless anyway. – moewe Sep 07 '19 at 19:49
  • Any updates here? Can we close this as a duplicate of https://tex.stackexchange.com/q/96454/35864 or do we need to address anything else? – moewe Sep 14 '19 at 07:00
  • I'd say this is not exactly a duplicate, but - yes - we can close this issue for now. Thank you. – Sati Sep 15 '19 at 09:34

0 Answers0