11

How do I determine how much save space was used form the log file? At the end of the log file: 87i,19n,130p,10511b,4441s stack positions out of 5000i,500n,10000p,200000b,80000s it is the fifth entry. Here, the used stack size is 4441, maximum stack size is 80000. Am I correct in assuming that the cause of this is likely some change to a macro ...


9

The output file should look like this: http://www.gurt-der-wahrheit.org/files/konkordanz_schlachter_1951_A4.pdf Sure, it is possible. How about this? The complete concordance, of which the above is page 2, was generated by the following file (compile with lualatex rather than pdflatex): \documentclass[a4paper]{article} \usepackage{luatex85} % a4paper ...


8

This kind of “self-reference” is easy to obtain with xparse: \documentclass{article} \usepackage{xparse} \usepackage{imakeidx} \NewDocumentCommand{\Index}{O{#2}m}{% \textit{#1}\index{#2@#1}% } \makeindex \begin{document} Here I index `Term': \Index{Term} Here I index `Actually Used Term' \Index[Actually Used Term]{z} \printindex \end{document} ...


7

The save stack usage is shown in the line 87i,19n,130p,10511b,4441s stack positions out of 5000i,500n,10000p,200000b,80000s so 4441 in this case. the TeXBook says You can figure out what TeX puts on the save stack by setting \tracingrestores=1; then your log file will record information about whatever is removed from the stack at the end of a group.


6

The problem here is that makeindex can't deal with conflicting encaps (the location formatting command) for the same location. For example, page (location) 1 has an empty encap (from \index{Lahm}) and the encap nn (from \index{Lahm|nn}). Since makeindex doesn't know how to resolve this, it adds both 1 and \nn{1} to the location list for Lahm and issues a ...


6

Christian Hupfer's comment gives Does a current workaround for babel and indexing Roman-numeral page numbers exist? as an answer, but since I never want to use Roman numerals in Greek text, just restoring the LaTeX definition of \@roman after babel has "enhanced" it also works: \documentclass{book} \usepackage{makeidx} \makeatletter \let\save@roman\@roman \...


6

With the document class tufte-book, a margin (of 2 inches) is reserved for sidenotes. Regarding options twoside,symmetric, the manual says: The twoside option will modify the running heads so that the page number is printed on the outside edge (as opposed to always printing the page number on the right-side edge in oneside mode). The symmetric ...


5

It is an answer of author of the question -- keep it in mind! After some work, I found the way, which helps me. I will be grateful if you advice me some cool features or improve my answer. Well, really cool. Here is MWE: \documentclass[openany]{book} \usepackage[T1, T2A]{fontenc} \usepackage[utf8]{inputenc} \usepackage[english, russian]{babel} \...


5

makeindex's default compositor is a hyphen -. You can change it in a style file using page_compositor: \RequirePackage{filecontents} \begin{filecontents*}{\jobname.ist} page_compositor "." \end{filecontents*} \documentclass[12pt,oneside]{scrbook} \usepackage{makeidx} \makeindex \renewcommand{\thepage}{% \thechapter.\arabic{page}} \begin{document} \...


5

Node that you should do term\index{term} or some recommend \index{term}term never term \index{term} Or you may get a page break after term and the index will refer to the following page. The choice of which of the first forms to use depends if your "term" can be hyphenated and what you want to do if the page break occurs at the hyphen, index the ...


4

The problem with index is that there are no pages in the HTML, so it doesn't make sense to use them. Instead, we can number each \index use and insert link destination in that place. This way, we can go directly to the place where the index entry has been used. We will use xindy, because it is more flexible than makeindex and it supports additional ...


4

The options key can only be honored without the splitindex option, because the production of the indices is handed over to that program and there's no way to pass options to it automatically. You can do splitindex -m "makeindex -s index" <filename> when you do the call. The obvious limitation is that just one style can be passed to each index. Just ...


4

You can use the quote character to prefix the actual character: \documentclass[a4paper,10pt,openany]{scrbook} \usepackage{imakeidx} \makeindex \newcommand{\indexthing}[1]% {% \index{#1@\texttt{#1} (thing)}% \index{things!\texttt{#1}}% } \begin{document} \chapter{ch1} foo\index{foo} bar\index{bar} \index{\$"@} % PROBLEM A \indexthing{\$"@} %...


4

It's unrelated to " just as the error message indicates you have more { than } i assume \index{"#1@\texttt{"#1} (C operator)% was intended to be \index{"#1@\texttt{"#1} (C operator)}% and \index{#1@\texttt{#1} (C operator)% intended to be \index{#1@\texttt{#1} (C operator)}% \documentclass{article} \usepackage{makeidx,ifthen}...


4

EDITED to actually use \index. \documentclass{article} \usepackage{imakeidx} \newcommand\Index[2][\relax]{% \ifx\relax#1\def\actualarg{#2@#2}\else\def\actualarg{#2@#1}\fi% \textit{#2}% \expandafter\index\expandafter{\actualarg}% } \makeindex \begin{document} \Index{term} \Index[TermActuallyDisplayed]{term} \printindex \end{document}


4

The xparse package is a great tool which can do what you want (it can declare a command with an optional argument with its default value taken from another argument). See the following example: \documentclass{article} \usepackage{xparse} \usepackage{imakeidx} \makeindex \NewDocumentCommand\Index{O{#2}m}{% \textit{#2}\index{#2@#1}% } \begin{document} \...


4

Given the rather precise promises you make (only one index entry per item, only one page reference etc) you could just alter the \index command so that it automatically creates a label with the same name as well. Then you just use the ordinary \pageref command to cross-reference it. \documentclass{article} \usepackage{makeidx} \makeatletter \def\@wrindex#1{...


4

If you set the quote character to ', then you have to quote it when using it in an index entry. Here's a schematic solution. The filecontents* environment is just to make the example self-contained. If the current directory contains a file with the same name as the main TeX file and extension .mst, this one will be automatically used by MakeIndex. File ...


4

This seems to help (\let\gobbleone\relax added four times). It is related to using babel as babel redefines \markboth. Honestly, I do not quite understand why the \let... is needed in both places. For the headers it seems to be because \gobbleone actually survives into the header instead of just becoming nothing. But that does not explain why it is still ...


4

\index writes out the value of \thepage. Just change it to \thetheorem. \documentclass[12pt]{article} \usepackage{etoolbox} \usepackage{makeidx} \makeindex \makeatletter \patchcmd\@wrindex{\thepage}{\thetheorem}{}{} \makeatother \newtheorem{theorem}{Theorem} \begin{document} \begin{theorem} This theorem is about apples\index{apple} and bananas\index{...


4

Using MakeIndex or Xindy doesn't make a difference here. Pass the option intoc to \makeindex. \documentclass{memoir} \usepackage[xindy]{imakeidx} \makeindex[intoc] \begin{document} \tableofcontents* \chapter{First} abc\index{abc} \printindex \end{document} I suggest \tableofcontents* so that the TOC doesn't list itself.


3

A different implementation of Paul Stanley’s idea. \documentclass{scrartcl} \usepackage[T1]{fontenc} \usepackage[ngerman]{babel} \usepackage{makeidx} \usepackage{xparse} \makeindex \ExplSyntaxOn \NewDocumentCommand{\nn}{m} { % split the argument at commas \seq_set_split:Nnn \l_martin_nn_in_seq { , } { #1 } % add a trailing n to each item \...


3

You could re-write the \nn command so that it can handle a comma-separated list: \usepackage{etoolbox} \newcounter{notereferencecount} \newcommand{\nn}[1]{% \setcounter{notereferencecount}{0}% \renewcommand{\do}[1]{% \ifnumequal{\value{notereferencecount}}{0} {##1n} {, ##1n}% \stepcounter{notereferencecount}}% \docsvlist{#1}} ...


3

I've found these two snippets that can be defined in the preamble of a document in order to force the expansion of \nameref{} prior to the generation of an index. I've haven't fully understood the details behind these snippets, but it seems that when a label is added to latex, its details (pagenumber, title, hyperlink, etc.) are saved as a tuple of five ...


3

Working solution: \documentclass{book} \usepackage[bookmarks]{hyperref} \hypersetup{hidelinks} \usepackage{lipsum} \usepackage[nopostdot,toc]{glossaries} \glsaddkey*% star version needed as default value needs expanding {nn}% key {\glsentrytext{\glslabel}nn}% default value {\glsentrynn}% command analogous to \glsentrytext {\Glsentrynn}% command analogous ...


3

I suggest you install the Nomenclature package from the community of WinEdt users, WinEdt.org. It will add a Make Nomenclature item to the TeX menu. Here is a direct link for the package. No button is installed in the toolbar. If you want to have one, open the Toolbar.ini file with the Options interface and insert BUTTON="Make_Nomenclature" between lines ...


3

You have to escape it by using the quote character which is ". So your entry has to be \index{data!"@data}.


3

TLDR: It's not a bug but is the result of makeindex requiring a valid page number, as it's designed for creating indexes. Packages such as nomencl (and glossaries etc) have to sort and collate the information that needs to appear in the list of nomenclature/symbols/terms. TeX really isn't designed for that kind of data processing. (The glossaries package ...


3

If it is acceptable to slightly change the macro input design to \Index{...}[...]: \documentclass{article} \makeatletter \def\Index#1{% \textit{#1}% \kernel@ifnextchar[{\Index@optarg{#1}}{\index{#1@#1}}% } \def\Index@optarg#1[#2]{\index{#1@#2}} \makeatother \begin{document} \Index{Term} \Index{foo}[bar] \end{document}


Only top voted, non community-wiki answers of a minimum length are eligible