diff options
-rw-r--r-- | compiler/docgen.nim | 3 | ||||
-rw-r--r-- | tools/kochdocs.nim | 22 |
2 files changed, 13 insertions, 12 deletions
diff --git a/compiler/docgen.nim b/compiler/docgen.nim index 4a914b0e7..a93dc01cf 100644 --- a/compiler/docgen.nim +++ b/compiler/docgen.nim @@ -277,7 +277,8 @@ proc getOutFile2(conf: ConfigRef; filename: RelativeFile, else: result = getOutFile(conf, filename, ext) -proc isLatexCmd(conf: ConfigRef): bool = conf.cmd in {cmdRst2tex, cmdDoc2tex} +proc isLatexCmd(conf: ConfigRef): bool = + conf.cmd in {cmdRst2tex, cmdMd2tex, cmdDoc2tex} proc newDocumentor*(filename: AbsoluteFile; cache: IdentCache; conf: ConfigRef, outExt: string = HtmlExt, module: PSym = nil, 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) |