ph_slidelink - 不确定如何使用它?
ph_slidelink - not sure how to use it?
很高兴官员可以创建 link 用于演示文稿内部的幻灯片。但是我不知道如何从可用的示例中使用它。我从来没有看到一个实际的 hyperlink 到出现在下面示例中的页面,例如:
fileout <- tempfile(fileext = ".pptx")
doc <- read_pptx()
doc <- add_slide(doc, layout = "Title and Content", master = "Office Theme")
doc <- ph_with_text(x = doc, type = "title", str = "Un titre 1")
doc <- add_slide(doc, layout = "Title and Content", master = "Office Theme")
doc <- ph_with_text(x = doc, type = "title", str = "Un titre 2")
doc <- on_slide(doc, 1)
slide_summary(doc) # read column id here
doc <- ph_slidelink(x = doc, id_chr = "2", slide_index = 2)
print(doc, target = fileout )
在这里,我没有看到第 2 页的任何 link 出现在任何地方...
你能帮助我吗?谢谢!!
如果您单击 "Un titre 1"(使用查看模式,而不是编辑模式),将显示幻灯片 2。
ph_slidelink(x = doc, id_chr = "2", slide_index = 2)
: 当点击id为“2”的形状时,显示幻灯片2 (slide_index = 2)
谢谢大卫!
我明白了,但我想要将文本链接到另一张幻灯片。与此同时,我想出了如何在这个 fork 中做到这一点:
https://github.com/danielinteractive/officer
在函数 ph_add_text2 中。随意将其中的一些内容放入您的包中,可能其他人也需要这个!
干杯
丹尼尔
很高兴官员可以创建 link 用于演示文稿内部的幻灯片。但是我不知道如何从可用的示例中使用它。我从来没有看到一个实际的 hyperlink 到出现在下面示例中的页面,例如:
fileout <- tempfile(fileext = ".pptx")
doc <- read_pptx()
doc <- add_slide(doc, layout = "Title and Content", master = "Office Theme")
doc <- ph_with_text(x = doc, type = "title", str = "Un titre 1")
doc <- add_slide(doc, layout = "Title and Content", master = "Office Theme")
doc <- ph_with_text(x = doc, type = "title", str = "Un titre 2")
doc <- on_slide(doc, 1)
slide_summary(doc) # read column id here
doc <- ph_slidelink(x = doc, id_chr = "2", slide_index = 2)
print(doc, target = fileout )
在这里,我没有看到第 2 页的任何 link 出现在任何地方... 你能帮助我吗?谢谢!!
如果您单击 "Un titre 1"(使用查看模式,而不是编辑模式),将显示幻灯片 2。
ph_slidelink(x = doc, id_chr = "2", slide_index = 2)
: 当点击id为“2”的形状时,显示幻灯片2 (slide_index = 2)
谢谢大卫!
我明白了,但我想要将文本链接到另一张幻灯片。与此同时,我想出了如何在这个 fork 中做到这一点: https://github.com/danielinteractive/officer 在函数 ph_add_text2 中。随意将其中的一些内容放入您的包中,可能其他人也需要这个!
干杯 丹尼尔