问题描述
我是编程的初学者。我尝试使用tinytex在import SwiftUI
import PlaygroundSupport
struct AnyShape_Working: Shape {
private let someShapePath: (CGRect) -> Path
// required to conform to Shape
public func path(in rect: CGRect) -> Path {
someShapePath(rect)
}
init<S: Shape>(_ someShape: S) {
someShapePath = { rect in
someShape.path(in: rect)
}
}
}
struct AnyShape_AlwaysBlank: Shape {
private let someShapePath: Path
// required to conform to Shape
public func path(in rect: CGRect) -> Path {
someShapePath
}
init<S: Shape>(_ someShape: S) {
let rect = CGRect()
someShapePath = someShape.path(in: rect)
}
}
struct ContentView: View {
var body: some View {
vstack {
Text("Circle will appear below")
AnyShape_Working( Circle() )
Text("Blank area will appear below")
AnyShape_AlwaysBlank( Circle() )
}
}
}
PlaygroundPage.current.setLiveView( ContentView() )
中编译hadley wickham的AdvancedR。经过数小时的设置和软件包/字体安装,出现了另一个问题:
我无法从错误日志 _main.log
中找到任何丢失的LaTeX软件包。! LaTeX错误:环境侧栏 未定义。
我不知道发生了什么。谢谢大家的帮助。
解决方法
我只是遇到了同样的问题。解决方案是这样的:
问题出在Markdown中。查看https://github.com/yihui/tinytex/issues/230
中的答案
解决方案是使用当前的github版本更新rmarkdown:
更新为:
remotes::install_github('rstudio/rmarkdown')
要将rmarkdown还原为RStudio的CRAN版本,只需卸载rmarkdown,然后重新安装即可:
remove.packages(‘rmarkdown’)
install.packages(‘rmarkdown’)
您还可以删除两个自定义存储库的远程安装:
remove.packages(‘emo’)
remove.packages(‘sloop’)
由于编译本书,我不得不安装的其他软件包是:
,devtools,bookdown,zeallot,lobstr,RSQLite,zeallot,dbplyr,bench,tidyr,ggbeeswarm
似乎您可能正在尝试建立一个与使用bookdown建立的网站重复的网站。没有理由做这样的事情。这本书是完整的,可以免费获得。
只需访问以下网站即可查看整个Hadley撰写的Advanced R书。