2
votes

I was trying to write create some beamer slides in Rmarkdown. Since the beamer slides would need to include some Chinese characters, I have to specify xelatex as the latex engine.

However, recently I found that the xelatex engine has a problem (the problem was not here a month ago): When using xelatex as the latex engine, the itemise bullets in beamer slides disappeared.

Does anyone know how to resolve this issue?

Below is a minimum working example:

---
title: trial doc
institute: |
  | Department trial
  | trial Education
  
Date: "17 October 2020"

output: 
  beamer_presentation:
    theme: "CambridgeUS"
    colortheme: "dolphin"
    slide_level: 3
    latex_engine: xelatex
    df_print: kable
classoption: "aspectratio=169"
fontsize: 10pt
mainfont: Times New Roman
    
   
header-includes:
  - \setbeamercolor{frametitle}{bg=white}
  - \usepackage{ctex}
  - \AtBeginSubsection{}
  - \AtBeginSection{}
  - \setbeamerfont{frametitle}{series=\bfseries}
  - \AtBeginDocument{\title[xxx]{xxxxx}}
  - \AtBeginDocument{\institute[xxxxx]{\\Department of xxx\\xxx}}
  - \AtBeginDocument{\author[xxxxxx]{XXX}}
  

  
---

\frametitle{Outline}

\tableofcontents

# 欢迎

\frametitle{\textbf{Welcome}}

some text

some Chinese text 你好

trying to itemize:

- Hello
  - subitem

trying some numbered list:

1. hello

2. hello


And the output I get is as below:

Output from the code above

When I try using pdflatex as the latex engine (in which case I cannot use the ctex package and cannot include Chinese characters in my beamer slides), the itemize and numbered list works perfectly.

Really appreciate if someone can help me with this!

1
github.com/pgf-tikz/pgf/issues/928 Already fixed in the dev version of pgf/tikz - samcarter_is_at_topanswers.xyz
Sorry, I just checked the github page and could not locate where to solution to the problem is, is it ok if you can explicitly illustrate how to solve this problem in RMarkdown? Thanks a lot. - john liang
The solution was implemented in pgf. Either download the current head version from github.com/pgf-tikz/pgf or wait until new version is released - samcarter_is_at_topanswers.xyz
or you could copy the redefinition of \pgfutil@insertatbegincurrentpagefrombox from github.com/pgf-tikz/pgf/issues/928#issuecomment-700690532 to your header - samcarter_is_at_topanswers.xyz
What is missing? Put \makeatletter \def\pgfutil@insertatbegincurrentpagefrombox#1{...}\makeatother in your header - samcarter_is_at_topanswers.xyz

1 Answers

0
votes

As provided by @samcarter_is_at_topanswers.xyz above, I solved this problem by following the steps in github.com/pgf-tikz/pgf/issues/928#issuecomment-700690532.