r - 仅在使用 R Markdown 的投影仪暂停后显示脚注
问题描述
我正在制作 Beamer 演示文稿,并在单张幻灯片的内容之间使用暂停。我不知道如何仅在暂停后显示脚注。
这是一个例子:
---
title: ""
author: ""
date: ""
output:
beamer_presentation
bibliography: test.bib
---
* one argument
\pause
* another argument^[This citation should appear only with point 2: @fargues2006]
# references
与test.bib
:
@article{fargues2006,
title = {The {{Demographic Benefit}} of {{International Migration}}: {{Hypothesis}} and {{Application}} to {{Middle Eastern}} and {{North African Contexts}}},
author = {Fargues, Philippe},
date = {2006},
journaltitle = {World Bank Policy Research Paper},
url = {http://documents.worldbank.org/curated/en/508301468280735279/pdf/wps4050.pdf},
number = {4050}
}
在此示例中,脚注不应仅在显示第一个点时出现,而是在显示第二个点时出现。
我试图从 TeX StackExchange 应用这个答案,但没有成功。
我怎样才能做到这一点?
编辑:在@samcarter_is_at_topanswers.xyz 的回答之后,我确切地说我更喜欢不需要在文档中从markdown切换到LaTeX的解决方案,具体取决于幻灯片是否同时具有暂停和脚注。但是,我可以.tex
在 YAML 中使用文件或添加 pandoc 参数(因为我认为解决方案必须是这种方式,但我可能错了)。
编辑#2:我想在这些脚注中加上参考@citationkey
解决方案
您可以通过使用正确的乳胶语法来解决此问题:
---
title: ""
author: ""
date: ""
output:
beamer_presentation
---
* one argument
\pause
* ```{=latex}
another argument\footnote<.(1)->{This should appear only with point 2}
```
或带有隐藏的脚注:
---
title: ""
author: ""
date: ""
output:
beamer_presentation:
keep_tex: true
---
## {.t}
* one argument
\pause
* ```{=latex}
another argument\only<.(1)->{\footnote{This should appear only with point 2}}
```
(顶部对齐是为了避免跳跃)
推荐阅读
- javascript - 为什么this.var不能改变JS?
- c++ - LLVM C++:编译器无法将类成员的原始类型识别为 const
- python - 如何在 ~/.ssh/config 中使用带有主机定义的 Paramiko?
- rust - rust:构建一个静态链接的二进制文件,包括外部 C 库
- npm - 如何通过 http 安装创建反应应用程序?
- visual-studio-code - 当我关闭 Windows PowerShell 时 VS Code 崩溃
- javascript - 如何在 Discord.js 中组织命令
- python - 如何打印第二个数字及其位置
- c# - ASP.Net Core Web API 在 IIS Express 上工作,但在部署到 IIS 时无法工作
- javascript - 在调用 reducer 之前,redux 状态被 - 不正确 - 更新(w/ ReactDnD)