将降落斜体和黑体转换为乳胶

将降落斜体和黑体转换为乳胶,第1张

概述将降落斜体黑体转换为乳胶

我希望能够将降价的斜体和黑体转换成乳胶版本(即,给出一个文本string返回一个文本string)。 我觉得容易。 错误! (它仍然可能)。 看到我在底部尝试的基石buisness和错误。

我有什么(注意起始星号已经被markdown掉了):

x <- "\*note: I *like* chocolate **milk** too ***much***!"

我想要什么:

"*note: I \emph{like} chocolate \textbf{milk} too \textbf{\emph{much}}!"

我不喜欢正则Expression式,但更喜欢基础解决scheme(虽然不是必需的)。

如何匹配所有未标记所需LaTeX标签的短语?

当我使用knitr和RStudio在windows上生成pdf文件时,无法安装framed.sty

让TeXstudio在linux mint中工作:找不到文件“url.sty”。

如何执行自动化的Unixinput?

在网站上即时创build自定义文档(pdf)

愚蠢的生意:

helper <- function(ins,outs,x) { gsub(paste0(ins[1],".+?",ins[2]),paste0(outs[1],outs[2]),x) } helper(rep("***",2),c("\textbf{\emph{","}}"),x) Error in gsub(paste0(ins[1],: invalID regular Expression '***.+?***',reason 'InvalID use of repetition operators'

我有Ananda Mahto帮助我制作的这个玩具 ,如果它有帮助的话。 您可以通过wheresPandoc <- reports:::wheresPandoc从报告中访问它

编辑每本的评论我试过了:

action <- paste0(" echo ",x," | ",wheresPandoc()," -t latex ") system(action) *note: I *like* chocolate **milk** too ***much***! | C:PROGRA~2Pandocbinpandoc.exe -t latex

EDIT2每个Dason的评论我试过了:

out <- paste("echo",shQuote(x),"|"," -t latex"); system(out) system(out,intern = T) > system(out,intern = T) *note: I *like* chocolate **milk** too ***much***! | C:PROGRA~2Pandocbinpandoc.exe -t latex

在CentOS5上通过SSH安装Texlive

如何用LaTeX编写path?

在Rmd文件中包含apsrtable(或stargazer)输出

跟踪单个文件的版本控制系统

将Texlive添加到TexStudio对path的理解中

注意到我正在使用windows和from ?system

这意味着重定向,管道,DOS内部命令…不能被使用

和来自?system2的注释

注意

system2是比R 2.12.0中引入的系统更加便携和灵活的接口。 它允许重定向输出,而不需要在windows上调用一个shell,一个可移植的方法来设置执行命令的环境变量,以及更好地控制stdout和stderr的重定向。 相反,系统(和windows上的shell)允许调用任意的命令行。 使用system2

system2('pandoc','-t latex',input = '**em**',stdout = TRUE)

在windows上缺乏管道使这个棘手,但你可以绕过它使用input提供的stdin :

> x = system("pandoc -t latex",intern=TRUE,input="\*note: I *like* chocolate **milk** too ***much***!") > x [1] "*note: I \emph{like} chocolate \textbf{milk} too \textbf{\emph{much}}!"

总结

以上是内存溢出为你收集整理的将降落斜体和黑体转换为乳胶全部内容,希望文章能够帮你解决将降落斜体和黑体转换为乳胶所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/langs/1281881.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-06-09
下一篇 2022-06-09

发表评论

登录后才能评论

评论列表(0条)

保存