diff options
author | Andrey Makarov <ph.makarov@gmail.com> | 2021-11-09 21:01:47 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-09 19:01:47 +0100 |
commit | 997ccc588955dab5cdbfd4c0fc067d91ccc1a7c8 (patch) | |
tree | 23444ba705596e450ea690302e3aec96576a43a2 /tools | |
parent | 46fb85542518c8594c24d168b025cc8a64b8fb3d (diff) | |
download | Nim-997ccc588955dab5cdbfd4c0fc067d91ccc1a7c8.tar.gz |
fix nimindexterm in rst2tex/doc2tex [backport] (#19106)
* fix nimindexterm (rst2tex/doc2tex) [backport] * Add support for indexing in rst
Diffstat (limited to 'tools')
-rw-r--r-- | tools/kochdocs.nim | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/kochdocs.nim b/tools/kochdocs.nim index 42e648fb4..70ee5ad07 100644 --- a/tools/kochdocs.nim +++ b/tools/kochdocs.nim @@ -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) = |