【问题标题】:slide presentation change language of top title幻灯片演示更改顶部标题的语言
【发布时间】:2022-10-04 20:10:40
【问题描述】:

我想在幻灯片演示文稿的左下角使用Inhalt 而不是Contents

我试过了

---
title: "Untitled"
author: "Erich Neuwirth"
date: "2022-09-28"
output:
  slidy_presentation:
    incremental: yes
    pandoc_args: [
      "--variable=lang:de"
    ]
---

## R Markdown
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.

## Slide with Bullets

- Bullet 1
- Bullet 2
- Bullet 3

但这没有用。

【问题讨论】:

  • 您只想将Contents 更改为Inhalts,其他所有内容都是英文的??
  • 对于我的德语幻灯片演示,这是唯一始终可见的英文文本。当然,能够将所有幻灯片提供的文本更改为德语会更好。
  • 好吧,Contents 实际上可以使用 javascript 更改为 Inhalt。但我不确定是否有其他文本。

标签: r-markdown presentation slidy


【解决方案1】:

左下角Contents 可以使用javascript代码更改为Inhalts(蛮力方式)

演示文稿.Rmd

---
title: "Untitled"
author: "Erich Neuwirth"
date: "2022-09-28"
output:
  slidy_presentation:
    incremental: yes
    includes:
      after_body: content-change.html
---

## R Markdown

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.

## Slide with Bullets

- Bullet 1
- Bullet 2
- Bullet 3

内容更改.html

<script>
  window.onload = function(){
    var content = document.querySelectorAll(".toolbar a")[1];
    content.innerText = "Inhalts";
};
</script>

【讨论】:

    【解决方案2】:

    有了这个 yaml 头

    ---
    title: "COVID-19 <br> Mathematische<br> und <br> statistische Analysen"
    author: "Erich Neuwirth"
    date: "29. September 2022<br><br><br><br><br>Informatiktag 2022"
    output:
      slidy_presentation:
        incremental: yes
        includes:
          after_body: content-change.html    
    lang: de
    ---
    

    一切正常文件。

    lang: de 将标题和类似内容更改为德语。它只是不会替换左下角的Content 链接。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-02-23
      • 1970-01-01
      相关资源
      最近更新 更多