删除 R Markdown 中的幻灯片编号

标签 r latex rstudio r-markdown beamer

如何使用“马德里”主题从 Rmarkdown 投影仪演示文稿中删除幻灯片编号。 另外,我如何指定或增加字体大小

---
title: "Title"
author: "Keniajin"
output:
  beamer_presentation:
    theme: "Madrid"
    colortheme: "default" 
    fonttheme: "professionalfonts"
header-includes:
- \usepackage{booktabs}
- \usepackage{longtable}
- \usepackage{array}
- \usepackage{multirow}
- \usepackage{wrapfig}
- \usepackage{float}
- \usepackage{colortbl}
- \usepackage{pdflscape}
- \usepackage{tabu}
- \usepackage{xcolor}
- \usepackage{threeparttable}
- \newcommand{\columnsbegin}{\begin{columns}}
- \newcommand{\columnsend}{\end{columns}}
- \newenvironment{knitrout}{\setlength{\topsep}{0mm}}{}
fontsize: 30pt
---

## Background

This is background

## Histrory

Hii story ya

## Methods

### Method A - about this

我尝试使用\setbeamertemplate{head/foot中的页码}{}但没有成功。

最佳答案

Madrid beamer主题使用 infolines将它们置于外部,进而设置

\setbeamertemplate{page number in head/foot}[totalframenumber]

基于beamer user guide :

beamer-Template/-Color/-Font page number in head/foot

These beamer-color and -font are used to typeset the page number or frame number in the footline.

The beamer-template provides a convenient way to format the page or frame number in the footline. It is used by the infolines outer theme and the page number and frame number footline themes. It can also be used with the miniframes and split outer themes, but for them it is set to empty as default.

The following template options are predefined:

  • [default] The default option is empty.

  • [framenumber] This option inserts the current frame number.

  • [totalframenumber] In addition to the current frame number, this option also shows the total number of frames.

  • [appendixframenumber] This options replicates the behaviour of the appendixnumberbeamer package. In the main part before the \appendix command the current frame number and the total number of frames in the main part is displayed. In the appendix only the frame number within the appendix and the total number of frames in the appendix are shown.

  • [pagenumber] Shows the current page number.

  • [totalpagenumber] In addition to the current page number also the total page number is displayed.

你需要

\setbeamertemplate{page number in head/foot}[default]

不建议更改文档的字体大小,而是更改纸张大小。这间接地调整了字体大小。如果您希望“增大[减小]字体大小”,请选择较小[较大]的纸张尺寸。 beamer 演示文稿的默认纸张尺寸使用 4:3 宽高比(文档类选项 aspectratio = 43),纸张尺寸为 12.8cm x 9.6cm,设置内部使用geometry 。如果您希望字体大小大 20%(例如),请选择与默认大小 80% 的纵横比相匹配的纸张大小(12.8 厘米 x 80% = 10.24 厘米;9.6 厘米 x 80% = 7.68 厘米) :

\geometry{papersize = {10.24cm, 7.68cm}}

关于删除 R Markdown 中的幻灯片编号,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53199212/

相关文章:

c++ - 在 C++ 中为 Rcpp 的 NumericMatrix 使用循环是一个很好的理想吗?

r - 在 R 中使用 igraph 绘制(连接的)三元组的随机样本

r - Beamer Rmarkdown,更改备份幻灯片的幻灯片计数

latex - 合并 LaTeX 表格中的单元格

尝试使用 fix() 时,Mac OS X 10.13 上的 RStudio 获取 X11 不可用错误

r - 使用 Sparklyr 时不显示 Hive 表

将 .txt 文件读入 R,未知分隔符,无列

rvest 表抓取,包括链接

打印或导出时无法正确呈现 Matlab 字体

当 RStudio 中的 ioslides 的 type=HTML 时,调整 stargarzer 表的大小