Move generated tex file to doc to correct location (#14191)

This commit is contained in:
Dien Tran
2020-05-02 16:49:08 -05:00
committed by GitHub
parent ff1c0bae4c
commit 3be669be32

View File

@@ -271,6 +271,9 @@ proc buildPdfDoc*(nimArgs, destPath: string) =
const pdflatexcmd = "pdflatex -interaction=nonstopmode "
for d in items(pdf):
exec(findNim().quoteShell() & " rst2tex $# $#" % [nimArgs, d])
let tex = splitFile(d).name & ".tex"
removeFile("doc" / tex)
moveFile(tex, "doc" / tex)
# call LaTeX twice to get cross references right:
exec(pdflatexcmd & changeFileExt(d, "tex"))
exec(pdflatexcmd & changeFileExt(d, "tex"))