在rmarkdown幻灯片演示中引入徽标

brc7rcf0  于 2023-07-31  发布在  其他
关注(0)|答案(1)|浏览(92)

我有一个rmarkdown文件:

---
title: "Hi"
author: "me"
date: 'July 2023'
output:
  slidy_presentation: default
  powerpoint_presentation: default
---

## R Markdown

This is an R Markdown presentation. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see <http://rmarkdown.rstudio.com>.

When you click the **Knit** button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document.

字符串
对于幻灯片演示(html),我想在第一张幻灯片的底部中心和其余幻灯片的右上角引入这个徽标https://w7.pngwing.com/pngs/574/475/png-transparent-logo-xunit-random-org-randomness-computer-software-logo-github-blue-angle-text.png。另外,我想添加一个最后的幻灯片与标志在页面的中心。

lo8azlld

lo8azlld1#

我想你可以用乳胶来解决这个问题。下面是一个例子,从我的rmd文件供您参考。

documentclass: ctexart
fontsize: 11pt
geometry: margin=2cm
pagesize: A4paper
output:
  rticles::ctex:
    fig_caption: yes
    number_sections: yes
    toc: no
mainfont: 更纱黑体 UI SC #LiberationSerif
sansfont: 更纱黑体 UI SC Xlight #LiberationSans
monofont: 等距更纱黑体 SC Light #LiberationMono
header-includes:
    - \usepackage{fancyhdr}  #Load fancyhdr package for head and foot
    - \usepackage{xeCJK}
---
\pagestyle{fancyplain} 
\fancyhead[L]{\includegraphics[height=1.2cm]{cdmlogo.png}} #Print the logo top left
\fancyhead[R]{打印日期\today}

字符串

相关问题