with this patch :idx: can be used for the index generation for LaTeX (#18946)
This commit is contained in:
parent
5c4692fad4
commit
e9268b52d9
2 changed files with 5 additions and 3 deletions
|
|
@ -3,7 +3,7 @@
|
||||||
# (c) 2012 Andreas Rumpf
|
# (c) 2012 Andreas Rumpf
|
||||||
# Feel free to edit the templates as you need.
|
# 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
|
# too long entries in the table of contents wrap around
|
||||||
# after this number of characters
|
# after this number of characters
|
||||||
|
|
||||||
|
|
@ -97,12 +97,14 @@ doc.file = """
|
||||||
\usepackage{parskip} % paragraphs delimited by vertical space, no indent
|
\usepackage{parskip} % paragraphs delimited by vertical space, no indent
|
||||||
\usepackage{graphicx}
|
\usepackage{graphicx}
|
||||||
|
|
||||||
|
\newcommand{\nimindexterm}[2]{#2\label{#1}}
|
||||||
|
|
||||||
\usepackage{dingbat} % for \carriagereturn, etc
|
\usepackage{dingbat} % for \carriagereturn, etc
|
||||||
\usepackage{fvextra} % for code blocks (works better than original fancyvrb)
|
\usepackage{fvextra} % for code blocks (works better than original fancyvrb)
|
||||||
\fvset{
|
\fvset{
|
||||||
breaklines,
|
breaklines,
|
||||||
breakafter={=}:|\_\{\}[](){,}.;+-*/'",
|
breakafter={=}:|\_\{\}[](){,}.;+-*/'",
|
||||||
breaksymbolleft=\color{red}{\ensuremath{\hookrightarrow}},
|
breaksymbolleft=\color{red}{\ensuremath{\hookrightarrow}},
|
||||||
breaksymbolright=\color{red}{\small\carriagereturn}
|
breaksymbolright=\color{red}{\small\carriagereturn}
|
||||||
}
|
}
|
||||||
\fvinlineset{%
|
\fvinlineset{%
|
||||||
|
|
|
||||||
|
|
@ -406,7 +406,7 @@ proc renderIndexTerm*(d: PDoc, n: PRstNode, result: var string) =
|
||||||
var term = ""
|
var term = ""
|
||||||
renderAux(d, n, term)
|
renderAux(d, n, term)
|
||||||
setIndexTerm(d, changeFileExt(extractFilename(d.filename), HtmlExt), id, term, d.currentSection)
|
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])
|
[id, term])
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue