#StackBounty: #org-mode #latex #bibtex How to generate cited references with biber and xelatex

Bounty: 50

I would like to generate cited references and bibliography using biber and xelatex through org mode, but have not figured out how to do so.

I have to use xelatex because I am working with Chinese articles.

Sample Document:

#+TITLE: How to Automate Footnote Citations in Org-Mode
#+AUTHOR: Sati Bodhi

* Cite Test

This is a statement with a footnote reference. [fn:2a55720f42c74dd:This is the footnote with a citation that is supposed to be formatted in Chicago-fullnote style. cite:Rogersbecoming1995。]


Bibtex Entry:

  title = {On Becoming a Person: A Therapist's View of Psychotherapy},
  author = {Rogers, Carl R.},
  year = {1995},
  publisher = {{Houghton Mifflin}},
  address = {{Boston, New York}},
  abstract = {Collection of essays by American psychotherapist Carl Rogers written between 1951 and 1961, in which he put forth his ideas about self-esteem, flexibility, respect for self, and acceptance of others.},
  isbn = {9780395755310},
  keywords = {Client-centered psychotherapy},
  language = {eng},
  place = {;}


(setq org-latex-classes

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

% For Generation of Citations and Bibliography

% Set Font.
\setsansfont{Times New Roman}
\setmainfont{Calibri} % Set serifed font to Calibri. Originally set to 'Times New Roman', but it cannot display certain characters such as ①②③.
\setCJKmainfont{Songti TC}
\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.
\setCJKmonofont{PingFang TC}

% Set title font.

% Set quotation font.
\newCJKfontfamily\quotefont{Kaiti TC}

% Tweak default settings.
\renewcommand{\baselinestretch}{1.2} % Set line width.
%\renewcommand{\contentsname}{\hfill\bfseries\Large 目\hspace{0.5cm} 次\hfill} % Translate content page title to Chinese.
%\renewcommand{\cftaftertoctitle}{\hfill} % Center contents title.

% For text-boxes


% For tables


% [FIXME] ox-latex 的設計不良導致 hypersetup 必須在這裡插入
  colorlinks=true, %把紅框框移掉改用字體顏色不同來顯示連結
         ("\section{%s}" . "\section*{%s}")
         ("\subsection{%s}" . "\subsection*{%s}")
         ("\subsubsection{%s}" . "\subsubsection*{%s}")
         ("\paragraph{%s}" . "\paragraph*{%s}")
         ("\subparagraph{%s}" . "\subparagraph*{%s}"))

(setq org-latex-with-hyperref t)

(setq org-latex-default-packages-alist
      '(("" "hyperref" nil)
        ("" "graphicx" t)
        ("" "longtable" nil)
        ("" "wrapfig" nil)
        ("" "rotating" nil)
        ("normalem" "ulem" t)
        ("" "amsmath" t)
        ("" "textcomp" t)))

;; Use XeLaTeX to export PDF in Org-mode
(setq org-latex-pdf-process
      '("xelatex -interaction nonstopmode -output-directory %o %f"
        "xelatex -interaction nonstopmode -output-directory %o %f"
        "xelatex -interaction nonstopmode -output-directory %o %f"))

(require 'ox-latex)
(setq org-latex-inputenc-alist '(("utf8" . "utf8x")))

;; Use XeLaTeX to compile in Latex-mode

(setq tex-compile-commands '(("xelatex %r")))
(setq tex-command "xelatex")
(setq-default TeX-engine 'xetex)

Generated Bibliography and Footnote:



Get this bounty!!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.