summary refs log tree commit diff stats
path: root/tools/kochdocs.nim
diff options
context:
space:
mode:
authorAndrey Makarov <ph.makarov@gmail.com>2022-08-29 01:04:13 +0300
committerGitHub <noreply@github.com>2022-08-28 18:04:13 -0400
commitee11302c2493795c630b080fe3dd7ea7721a9fdc (patch)
tree91e3e2812dacb09a1020344314a4d066e91ec522 /tools/kochdocs.nim
parent2b56b38235c7cdb60a952ee4ec684a053eeee47c (diff)
downloadNim-ee11302c2493795c630b080fe3dd7ea7721a9fdc.tar.gz
fix `nim md2tex` and `koch pdf` commands (#20280)
* fix `nim md2tex` and `koch pdf` commands

* change rst2tex -> md2tex also
Diffstat (limited to 'tools/kochdocs.nim')
-rw-r--r--tools/kochdocs.nim22
1 files changed, 11 insertions, 11 deletions
diff --git a/tools/kochdocs.nim b/tools/kochdocs.nim
index 6332edd79..9fe0a8246 100644
--- a/tools/kochdocs.nim
+++ b/tools/kochdocs.nim
@@ -121,15 +121,15 @@ proc getMd2html(): seq[string] =
   doAssert "doc/manual/var_t_return.md".unixToNativePath in result # sanity check
 
 const
-  rstPdfList = """
-manual.rst
-lib.rst
-tut1.rst
-tut2.rst
-tut3.rst
-nimc.rst
-niminst.rst
-mm.rst
+  mdPdfList = """
+manual.md
+lib.md
+tut1.md
+tut2.md
+tut3.md
+nimc.md
+niminst.md
+mm.md
 """.splitWhitespace().mapIt("doc" / it)
 
   doc0 = """
@@ -293,7 +293,7 @@ proc nim2pdf(src: string, dst: string, nimArgs: string) =
   # xxx expose as a `nim` command or in some other reusable way.
   let outDir = "build" / "xelatextmp" # xxx factor pending https://github.com/timotheecour/Nim/issues/616
   # note: this will generate temporary files in gitignored `outDir`: aux toc log out tex
-  exec("$# rst2tex $# --outdir:$# $#" % [findNim().quoteShell(), nimArgs, outDir.quoteShell, src.quoteShell])
+  exec("$# md2tex $# --outdir:$# $#" % [findNim().quoteShell(), nimArgs, outDir.quoteShell, src.quoteShell])
   let texFile = outDir / src.lastPathPart.changeFileExt("tex")
   for i in 0..<3: # call LaTeX three times to get cross references right:
     let xelatexLog = outDir / "xelatex.log"
@@ -314,7 +314,7 @@ proc buildPdfDoc*(nimArgs, destPath: string) =
   if os.execShellCmd("xelatex -version") != 0:
     doAssert false, "xelatex not found" # or, raise an exception
   else:
-    for src in items(rstPdfList):
+    for src in items(mdPdfList):
       let dst = destPath / src.lastPathPart.changeFileExt("pdf")
       pdfList.add dst
       nim2pdf(src, dst, nimArgs)