fix nimindexterm in rst2tex/doc2tex [backport] (#19106)
* fix nimindexterm (rst2tex/doc2tex) [backport] * Add support for indexing in rst
This commit is contained in:
parent
46fb855425
commit
997ccc5889
3 changed files with 18 additions and 2 deletions
|
|
@ -301,6 +301,12 @@ proc nim2pdf(src: string, dst: string, nimArgs: string) =
|
|||
# `>` should work on windows, if not, we can use `execCmdEx`
|
||||
let cmd = "xelatex -interaction=nonstopmode -output-directory=$# $# > $#" % [outDir.quoteShell, texFile.quoteShell, xelatexLog.quoteShell]
|
||||
exec(cmd) # on error, user can inspect `xelatexLog`
|
||||
if i == 1: # build .ind file
|
||||
var texFileBase = texFile
|
||||
texFileBase.removeSuffix(".tex")
|
||||
let cmd = "makeindex $# > $#" % [
|
||||
texFileBase.quoteShell, xelatexLog.quoteShell]
|
||||
exec(cmd)
|
||||
moveFile(texFile.changeFileExt("pdf"), dst)
|
||||
|
||||
proc buildPdfDoc*(nimArgs, destPath: string) =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue