- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
以下代码在我今年夏天提交一篇文章时运行良好,但在最近更新后不再运行。 (R 版本 4.2.2(2022-10-31,R Studio 2022.12.0 Build 353,文章 0.24)。
---
title: "test"
author:
- name: JB MD PhD
email: jb@mcgill.ca
affiliation: McGill University Health Center
correspondingauthor: true
footnote: 1
- name: LN MSc
email:
affiliation: McGill University Health Center
address:
- code: McGill University Health Center
address: McGill University Health Center, Centre for Health Outcomes Research (CORE), 5252 Boul. de Maisonneuve West Room 2B.37, Montreal, QC, H4A 3S5
footnote:
- code: 1
text: "JMB is a research scholar supported by Les Fonds de Recherche Québec Santé"
abstract: |
Background: Atrial fibrillation is one of the most common arrhythmias but the optimal drug choice for a rate control strategy remains uncertain.
Methods: This was a retrospective cohort claims database study. Patients with a new diagnosis of atrial fibrillation and a discharge date between 2011 and 2015 were included. The exposure variables of interest were a discharge prescription for beta blockers with and without digoxin. The average treatment effect for the composite of total mortality or a repeat cardiovascular (CV) hospitalization was the primary outcome. Sensitivity analyses with other treatment effect metrics were performed. Baseline covariate imbalance between the groups were adjusted using propensity score methods with inverse probability weighting.
keywords:
- Atrial fibrillation
- Amiodarone
- Dronedarone
journal: "CJC Open submission"
date: "Original date 2022-12-19, Updated - `r Sys.Date()`"
bibliography: references.bib
linenumbers: false
numbersections: true
#classoption: preprint, 3p, authoryear
csl: vancouver-brackets.csl
# csl: https://www.zotero.org/styles/elsevier-harvard
# geometry: "left=3cm,right=3cm,top=2cm,bottom=2cm"
geometry: margin = 2cm
header-includes:
- \usepackage{setspace}
- \doublespacing
output:
rticles::elsevier_article:
keep_tex: true
citation_package: natbib
latex_engine: xelatex
editor_options:
markdown:
wrap: 72
---
这给出了以下错误
processing file: Untitled.Rmd
|......................................................................| 100%
inline R code fragments
/Applications/RStudio.app/Contents/Resources/app/quarto/bin/tools/pandoc +RTS -K512m -RTS Untitled.knit.md --to latex --from markdown+tex_math_single_backslash-autolink_bare_uris --output Untitled.tex --lua-filter /Library/Frameworks/R.framework/Versions/4.2/Resources/library/rmarkdown/rmarkdown/lua/pagebreak.lua --lua-filter /Library/Frameworks/R.framework/Versions/4.2/Resources/library/rmarkdown/rmarkdown/lua/latex-div.lua --embed-resources --standalone --template /Library/Frameworks/R.framework/Versions/4.2/Resources/library/rticles/rmarkdown/templates/elsevier/resources/template.tex --highlight-style tango --pdf-engine xelatex --natbib --include-in-header /var/folders/vz/g1j5pr8n7tg786zcwmv2dx8c0000gp/T//RtmpifKb24/rmarkdown-str8d9913e20bf4.html
output file: Untitled.knit.md
! LaTeX Error: Command \gather already defined.
Or name \end... illegal, see p.192 of the manual.
Error: LaTeX failed to compile Untitled.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See Untitled.log for more info.
Execution halted
我查看了日志文件,但鉴于我对 LaTex 的理解水平较低,我看不出问题是什么
This is XeTeX, Version 3.141592653-2.6-0.999994 (TeX Live 2022) (preloaded format=xelatex 2022.12.21) 21 DEC 2022 22:48
entering extended mode
restricted \write18 enabled.
%&-line parsing enabled.
**Untitled.tex
(./Untitled.tex
LaTeX2e <2022-11-01> patch level 1
L3 programming layer <2022-12-17> (/Users/jay/Library/TinyTeX/texmf-dist/tex/latex/elsarticle/elsarticle.cls
Document Class: elsarticle 2020/11/20, 3.3: Elsevier Ltd
(/Users/jay/Library/TinyTeX/texmf-dist/tex/latex/l3kernel/expl3.sty
Package: expl3 2022-12-17 L3 programming layer (loader)
(/Users/jay/Library/TinyTeX/texmf-dist/tex/latex/l3backend/l3backend-xetex.def
File: l3backend-xetex.def 2022-10-26 L3 backend support: XeTeX
\g__graphics_track_int=\count181
\l__pdf_internal_box=\box51
\g__pdf_backend_object_int=\count182
\g__pdf_backend_annotation_int=\count183
\g__pdf_backend_link_int=\count184
)) (/Users/jay/Library/TinyTeX/texmf-dist/tex/latex/l3packages/xparse/xparse.sty
Package: xparse 2022-12-17 L3 Experimental document command parser
) (/Users/jay/Library/TinyTeX/texmf-dist/tex/latex/etoolbox/etoolbox.sty
Package: etoolbox 2020/10/05 v2.5k e-TeX tools for LaTeX (JAW)
\etb@tempcnta=\count185
)
\@bls=\dimen140
(/Users/jay/Library/TinyTeX/texmf-dist/tex/latex/base/article.cls
Document Class: article 2022/07/02 v1.4n Standard LaTeX document class
(/Users/jay/Library/TinyTeX/texmf-dist/tex/latex/base/size10.clo
File: size10.clo 2022/07/02 v1.4n Standard LaTeX file (size option)
)
\c@part=\count186
\c@section=\count187
\c@subsection=\count188
\c@subsubsection=\count189
\c@paragraph=\count190
\c@subparagraph=\count191
\c@figure=\count192
\c@table=\count193
\abovecaptionskip=\skip48
\belowcaptionskip=\skip49
\bibindent=\dimen141
) (/Users/jay/Library/TinyTeX/texmf-dist/tex/latex/graphics/graphicx.sty
Package: graphicx 2021/09/16 v1.2d Enhanced LaTeX Graphics (DPC,SPQR)
(/Users/jay/Library/TinyTeX/texmf-dist/tex/latex/graphics/keyval.sty
Package: keyval 2022/05/29 v1.15 key=value parser (DPC)
\KV@toks@=\toks16
) (/Users/jay/Library/TinyTeX/texmf-dist/tex/latex/graphics/graphics.sty
Package: graphics 2022/03/10 v1.4e Standard LaTeX Graphics (DPC,SPQR)
(/Users/jay/Library/TinyTeX/texmf-dist/tex/latex/graphics/trig.sty
Package: trig 2021/08/11 v1.11 sin cos tan (DPC)
) (/Users/jay/Library/TinyTeX/texmf-dist/tex/latex/graphics-cfg/graphics.cfg
File: graphics.cfg 2016/06/04 v1.11 sample graphics configuration
)
Package graphics Info: Driver file: xetex.def on input line 107.
(/Users/jay/Library/TinyTeX/texmf-dist/tex/latex/graphics-def/xetex.def
File: xetex.def 2022/09/22 v5.0n Graphics/color driver for xetex
))
\Gin@req@height=\dimen142
\Gin@req@width=\dimen143
)
\c@tnote=\count194
\c@fnote=\count195
\c@cnote=\count196
\c@ead=\count197
\c@author=\count198
\@eadauthor=\toks17
\c@affn=\count199
\absbox=\box52
\elsarticlehighlightsbox=\box53
\elsarticlegrabsbox=\box54
\keybox=\box55
\Columnwidth=\dimen144
\space@left=\dimen145
\els@boxa=\box56
\els@boxb=\box57
\leftMargin=\dimen146
\@enLab=\toks18
\@sep=\skip50
\@@sep=\skip51
(./Untitled.spl) (/Users/jay/Library/TinyTeX/texmf-dist/tex/latex/natbib/natbib.sty
Package: natbib 2010/09/13 8.31b (PWD, AO)
\bibhang=\skip52
\bibsep=\skip53
LaTeX Info: Redefining \cite on input line 694.
\c@NAT@ctr=\count266
)
\splwrite=\write3
\openout3 = `Untitled.spl'.
\appnamewidth=\dimen147
) (/Users/jay/Library/TinyTeX/texmf-dist/tex/latex/url/url.sty
\Urlmuskip=\muskip16
Package: url 2013/09/16 ver 3.4 Verb mode for urls, etc.
) (/Users/jay/Library/TinyTeX/texmf-dist/tex/latex/lineno/lineno.sty
Package: lineno 2022/07/30 line numbers on paragraphs v5.0
Invalid UTF-8 byte or sequence at line 297 replaced by U+FFFD.
\linenopenalty=\count267
\output=\toks19
\linenoprevgraf=\count268
\linenumbersep=\dimen148
\linenumberwidth=\dimen149
\c@linenumber=\count269
\c@pagewiselinenumber=\count270
\c@LN@truepage=\count271
\c@internallinenumber=\count272
\c@internallinenumbers=\count273
\quotelinenumbersep=\dimen150
\bframerule=\dimen151
\bframesep=\dimen152
\bframebox=\box58
\linenoamsmath@ams@eqpen=\count274
LaTeX Info: Redefining \\ on input line 3114.
) (/Users/jay/Library/TinyTeX/texmf-dist/tex/latex/base/fontenc.sty
Package: fontenc 2021/04/29 v2.0v Standard LaTeX package
LaTeX Font Info: Trying to load font information for T1+lmr on input line 112.
(/Users/jay/Library/TinyTeX/texmf-dist/tex/latex/lm/t1lmr.fd
File: t1lmr.fd 2015/05/01 v1.6.1 Font defs for Latin Modern
)) (/Users/jay/Library/TinyTeX/texmf-dist/tex/latex/lm/lmodern.sty
Package: lmodern 2015/05/01 v1.6.1 Latin Modern Fonts
LaTeX Font Info: Overwriting symbol font `operators' in version `normal'
(Font) OT1/cmr/m/n --> OT1/lmr/m/n on input line 22.
LaTeX Font Info: Overwriting symbol font `letters' in version `normal'
(Font) OML/cmm/m/it --> OML/lmm/m/it on input line 23.
LaTeX Font Info: Overwriting symbol font `symbols' in version `normal'
(Font) OMS/cmsy/m/n --> OMS/lmsy/m/n on input line 24.
LaTeX Font Info: Overwriting symbol font `largesymbols' in version `normal'
(Font) OMX/cmex/m/n --> OMX/lmex/m/n on input line 25.
LaTeX Font Info: Overwriting symbol font `operators' in version `bold'
(Font) OT1/cmr/bx/n --> OT1/lmr/bx/n on input line 26.
LaTeX Font Info: Overwriting symbol font `letters' in version `bold'
(Font) OML/cmm/b/it --> OML/lmm/b/it on input line 27.
LaTeX Font Info: Overwriting symbol font `symbols' in version `bold'
(Font) OMS/cmsy/b/n --> OMS/lmsy/b/n on input line 28.
LaTeX Font Info: Overwriting symbol font `largesymbols' in version `bold'
(Font) OMX/cmex/m/n --> OMX/lmex/m/n on input line 29.
LaTeX Font Info: Overwriting math alphabet `\mathbf' in version `normal'
(Font) OT1/cmr/bx/n --> OT1/lmr/bx/n on input line 31.
LaTeX Font Info: Overwriting math alphabet `\mathsf' in version `normal'
(Font) OT1/cmss/m/n --> OT1/lmss/m/n on input line 32.
LaTeX Font Info: Overwriting math alphabet `\mathit' in version `normal'
(Font) OT1/cmr/m/it --> OT1/lmr/m/it on input line 33.
LaTeX Font Info: Overwriting math alphabet `\mathtt' in version `normal'
(Font) OT1/cmtt/m/n --> OT1/lmtt/m/n on input line 34.
LaTeX Font Info: Overwriting math alphabet `\mathbf' in version `bold'
(Font) OT1/cmr/bx/n --> OT1/lmr/bx/n on input line 35.
LaTeX Font Info: Overwriting math alphabet `\mathsf' in version `bold'
(Font) OT1/cmss/bx/n --> OT1/lmss/bx/n on input line 36.
LaTeX Font Info: Overwriting math alphabet `\mathit' in version `bold'
(Font) OT1/cmr/bx/it --> OT1/lmr/bx/it on input line 37.
LaTeX Font Info: Overwriting math alphabet `\mathtt' in version `bold'
(Font) OT1/cmtt/m/n --> OT1/lmtt/m/n on input line 38.
) (/Users/jay/Library/TinyTeX/texmf-dist/tex/latex/amsfonts/amssymb.sty
Package: amssymb 2013/01/14 v3.01 AMS font symbols
(/Users/jay/Library/TinyTeX/texmf-dist/tex/latex/amsfonts/amsfonts.sty
Package: amsfonts 2013/01/14 v3.01 Basic AMSFonts support
\@emptytoks=\toks20
\symAMSa=\mathgroup4
\symAMSb=\mathgroup5
LaTeX Font Info: Redeclaring math symbol \hbar on input line 98.
LaTeX Font Info: Overwriting math alphabet `\mathfrak' in version `bold'
(Font) U/euf/m/n --> U/euf/b/n on input line 106.
)) (/Users/jay/Library/TinyTeX/texmf-dist/tex/latex/amsmath/amsmath.sty
Package: amsmath 2022/04/08 v2.17n AMS math features
\@mathmargin=\skip54
For additional information on amsmath, use the `?' option.
(/Users/jay/Library/TinyTeX/texmf-dist/tex/latex/amsmath/amstext.sty
Package: amstext 2021/08/26 v2.01 AMS text
(/Users/jay/Library/TinyTeX/texmf-dist/tex/latex/amsmath/amsgen.sty
File: amsgen.sty 1999/11/30 v2.0 generic functions
\@emptytoks=\toks21
\ex@=\dimen153
)) (/Users/jay/Library/TinyTeX/texmf-dist/tex/latex/amsmath/amsbsy.sty
Package: amsbsy 1999/11/29 v1.2d Bold Symbols
\pmbraise@=\dimen154
) (/Users/jay/Library/TinyTeX/texmf-dist/tex/latex/amsmath/amsopn.sty
Package: amsopn 2022/04/08 v2.04 operator names
)
\inf@bad=\count275
LaTeX Info: Redefining \frac on input line 234.
\uproot@=\count276
\leftroot@=\count277
LaTeX Info: Redefining \overline on input line 399.
LaTeX Info: Redefining \colon on input line 410.
\classnum@=\count278
\DOTSCASE@=\count279
LaTeX Info: Redefining \ldots on input line 496.
LaTeX Info: Redefining \dots on input line 499.
LaTeX Info: Redefining \cdots on input line 620.
\Mathstrutbox@=\box59
\strutbox@=\box60
LaTeX Info: Redefining \big on input line 722.
LaTeX Info: Redefining \Big on input line 723.
LaTeX Info: Redefining \bigg on input line 724.
LaTeX Info: Redefining \Bigg on input line 725.
\big@size=\dimen155
LaTeX Font Info: Redeclaring font encoding OML on input line 743.
LaTeX Font Info: Redeclaring font encoding OMS on input line 744.
\macc@depth=\count280
LaTeX Info: Redefining \bmod on input line 905.
LaTeX Info: Redefining \pmod on input line 910.
LaTeX Info: Redefining \smash on input line 940.
LaTeX Info: Redefining \relbar on input line 970.
LaTeX Info: Redefining \Relbar on input line 971.
\c@MaxMatrixCols=\count281
\dotsspace@=\muskip17
\c@parentequation=\count282
\dspbrk@lvl=\count283
\tag@help=\toks22
\row@=\count284
\column@=\count285
\maxfields@=\count286
\andhelp@=\toks23
\eqnshift@=\dimen156
\alignsep@=\dimen157
\tagshift@=\dimen158
\tagwidth@=\dimen159
\totwidth@=\dimen160
\lineht@=\dimen161
\@envbody=\toks24
! LaTeX Error: Command \gather already defined.
Or name \end... illegal, see p.192 of the manual.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.1560 }
Here is how much of TeX's memory you used:
3712 strings out of 478757
54106 string characters out of 5849423
1841979 words of memory out of 5000000
23743 multiletter control sequences out of 15000+600000
515285 words of font info for 34 fonts, out of 8000000 for 9000
14 hyphenation exceptions out of 8191
70i,0n,76p,233b,93s stack positions out of 10000i,1000n,20000p,200000b,200000s
No pages of output.
最佳答案
问题是当前版本的lineno包,需要在amsmath包之后加载(详见https://github.com/latex-lineno/lineno/issues/5)
已经为 rticles 实现了修复,你可以安装开发版本
remotes::install_github("rstudio/rticles")
关于r rticle 包在最近更新后停止编译,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/74889936/
通过终端,您可以使用命令 - “SetFile -a B 文件名” 以编程方式,我认为我应该通过[[NSFileManager defaultManager] createDirectoryAtPat
嗨,正在尝试书中的一些示例:Practical Graph mining with R对于子图挖掘: library(subgraphMining) library(igraph) graph1 =
代码中的相同问题: class Foo { int getIntProperty () { ... } CustomObject getObjectProperty () { ... }
所以这可能是一个愚蠢的问题,但它已经困扰我一段时间了。 使用 React,我创建了两个组件(Buttons.js 和 Message.js),每个组件都有一个导出。但是,现在我希望将这两个组件用作 n
从今天早上开始,我发现我无法再从某个范围安装任何 NPM 包(或任何具有依赖项的包)。例如,如果我输入 npm i webpack 我会收到以下错误... npm ERR! code E401 npm
我在这里搜索过,Angular 2, @ngtools/webpack, AOT ,但对我不起作用。我运行了 npm install 命令。我正在做的是创建一个新的 Angular 2 项目。当我运行
情况: 我有一个 Swift 包,将其命名为 lib。 lib 位于其自己的存储库中。在lib的仓库中,有一堆本地包;也就是说,这些包是在 lib 中定义的,使用本地路径依赖格式 .package(p
我想在工作中学习和使用nodejs,但是在使用 de npm 命令安装模块/包时遇到网络问题。我是否可以使用我的家用计算机构建完整的 Node js 包,然后将其安装在另一台计算机(我的工作场所计算机
我需要将一些 .tar.bz2 格式的非 Python 包转换为 Anaconda/miniConda .egg 文件并安装它们。为此,我需要一个适用于 Windows 的 bld.bat 文件。互联
我需要共享库文件 libthrift-0.9.3.so 作为其他包的依赖项。我在构建 thrift-0.9.3 包时看到编译问题(我确实从 https://thrift.apache.org/down
我尝试在 R 版本 3.5.0 中安装“arcgisbinding”包。但是我失败了,得到以下错误和警告。 Installing package into ‘C:/Users/Lenovo/Docum
我尝试在 R 版本 3.5.0 中安装“arcgisbinding”包。但是我失败了,得到以下错误和警告。 Installing package into ‘C:/Users/Lenovo/Docum
我试图在 flutter 中测试这个应用程序,但我无法运行该应用程序,因为出现此错误“名称‘Page’在库‘package:burn_off/widgets/page.dart’和‘package’中
试图理解和学习如何编写包...用我一直使用的东西进行测试,记录... 您能帮我理解为什么“日志”变量不起作用...并且屏幕上没有日志记录吗? 谢谢! 主要文件: #!/opt/local/bin/py
我尝试运行此使用 Google 云的代码。 import signal import sys from google.cloud import language, exceptions # creat
我想知道是否有人找到了一个很好的 R 包来分析眼动追踪数据? 我遇到了 eyetrackR,但据我所知,没有可用的英文支持文档: http://read.psych.uni-potsdam.de/pm
我正在 R 上制作一个包。我有两个函数共享一个变量(全局)。 如何将其导入到包中? 例如, m<-0 f<-function() { m <- m+1 } g<-function() { m <- m
我用 C 为 Lua 编写了很多模块。每个模块都包含一个 Lua 用户数据类型,我像这样加载和使用它们: A = require("A") B = require("B") a = A.new(3,{
我正在尝试在 R 中的 Ubuntu 上安装 xlsx 包,以便使用允许在 R 中插入链接然后将它们导出到 Excel 的功能。 话虽如此,我根本无法安装该软件包。 显然它必须与 rJava 一起使用
我想在 Haskell 中做一些蒙特卡洛分析。我希望能够编写这样的代码: do n <- poisson lambda xs <- replicateM n $ normal mu sigma
我是一名优秀的程序员,十分优秀!