mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-31 10:22:15 +00:00
with this patch :idx: can be used for the index generation for LaTeX (#18946)
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
# (c) 2012 Andreas Rumpf
|
||||
# Feel free to edit the templates as you need.
|
||||
|
||||
split.item.toc = "20"
|
||||
split.item.toc = "20"
|
||||
# too long entries in the table of contents wrap around
|
||||
# after this number of characters
|
||||
|
||||
@@ -97,12 +97,14 @@ doc.file = """
|
||||
\usepackage{parskip} % paragraphs delimited by vertical space, no indent
|
||||
\usepackage{graphicx}
|
||||
|
||||
\newcommand{\nimindexterm}[2]{#2\label{#1}}
|
||||
|
||||
\usepackage{dingbat} % for \carriagereturn, etc
|
||||
\usepackage{fvextra} % for code blocks (works better than original fancyvrb)
|
||||
\fvset{
|
||||
breaklines,
|
||||
breakafter={=}:|\_\{\}[](){,}.;+-*/'",
|
||||
breaksymbolleft=\color{red}{\ensuremath{\hookrightarrow}},
|
||||
breaksymbolleft=\color{red}{\ensuremath{\hookrightarrow}},
|
||||
breaksymbolright=\color{red}{\small\carriagereturn}
|
||||
}
|
||||
\fvinlineset{%
|
||||
|
||||
@@ -406,7 +406,7 @@ proc renderIndexTerm*(d: PDoc, n: PRstNode, result: var string) =
|
||||
var term = ""
|
||||
renderAux(d, n, term)
|
||||
setIndexTerm(d, changeFileExt(extractFilename(d.filename), HtmlExt), id, term, d.currentSection)
|
||||
dispA(d.target, result, "<span id=\"$1\">$2</span>", "$2\\label{$1}",
|
||||
dispA(d.target, result, "<span id=\"$1\">$2</span>", "\\nimindexterm{$2}{$1}",
|
||||
[id, term])
|
||||
|
||||
type
|
||||
|
||||
Reference in New Issue
Block a user