Hot answers tagged

19

egreg answered the specific issue but the general issue of avoiding package loading as mentioned in comments: \documentclass{article} \ProvidesFile{longtable.sty} \usepackage{longtable} \typeout{longtable is: \meaning\longtable} \stop produces longtable is: undefined showing that the package is not loaded, despite the \usepackage.


16

One can use David's suggestion, but etoolbox must be loaded anyway: \ProvidesFile{xpatch.sty} \usepackage{etoolbox} \usepackage{imakeidx} \usepackage{regexpatch} should do.


16

Load imakeidx before hyperref. Generally, hyperref should be loaded last, though there are some exceptions (see Which packages should be loaded after hyperref instead of before? ).


13

I found a version of the style fileMyStyle.ist here: delim_0 "\\dotfill\ " delim_1 "\\dotfill\ " headings_flag 1 heading_prefix "\\vspace*{0.5cm}\\nopagebreak\n\\tikz\\node at (0pt,0pt) [rounded corners=5pt,draw=ocre,fill=ocre!10,line width=1pt,inner ...


10

I don't see any way of configuring the current version of latexmk to prevent it doing the extra runs. Not only is makeindex run a second time by latexmk, but so is latex, so the run time is doubled, which is a bad penalty on a large document. To correct this needs changes in latexmk itself. There is enough information in the .log file for latexmk to ...


9

For makeindex the symbol ! has a specific meaning. The manual of makeindex (texdoc makeindex) has the following example / explanation: To produce a subentry, the argument of the \index command should contain both the main entry and the subentry, separated by a ! character. Page 7: \index{gnat!size of} || gnat, 32 Page 32: \index{gnat} ...


9

For getting the colon you need to define a new MakeIndex style; it's really simple: just prepare the following 31083.ist file in the same folder as your main document, with the single line delim_0 ": " because delim_0 is the container of the tokens inserted between an index entry and the first page number (if any). Then you have to instruct imakeidx to ...


8

One can modify the index formatting with \indexsetup, that takes as argument a list of key-value pairs; in your case the key is othercode: \indexsetup{othercode=\small} The code given as value to the key is inserted just before the index body is typeset, so this doesn't influence the header. Note, however, that the effect is global and will affect all ...


8

The page range formation is disabled via a command line option, rather than an instruction in the .ist file. So the solution is to call makeindex with the -r option; with imakeidx this can be specified in the value for the option key; the simplest call would be \makeindex[options= -r] if no other setting for the (main) index is needed. In your case, ...


7

Here is a possible solution. I show it with sections, it should be easy to adapt to your setting. (1) I define a counter and step it each time a new section is started with the \Section command, which defines a unique command holding the section's title and whose name depends on the value of the counter. (2) I get copies of the relevant indexing commands ...


7

It's the pool size: the letters used in command names, mostly. You can increase it in texmf.cnf usually (unless you reach the compiler limits) % Max number of characters in all strings, including all error messages, % help texts, font names, control sequences. These values apply to TeX. pool_size = 6250000 a simple test file (plain pdftex) ...


7

You can do it with imakeidx: \documentclass{scrbook} \usepackage{imakeidx} \usepackage{hyperref} % creates links on refs \makeindex[title={Index\label{index}}] \begin{document} % add something to the index... The foobar\index{foobar} is quite impressive! % some reference to the index... Please follow the \hyperref[index]{index}. % print index... ...


7

There is a hook \setindexpreamble in the scr classes to add material at the beginning of the index. You can use this to set your label. Using just \ref will give a blank link, you need either a \pageref or a \nameref. \documentclass{scrbook} \usepackage{makeidx} \usepackage{hyperref} % creates links on refs \makeindex \setindexpreamble{\label{index}} ...


6

Normally the argument of \index is read verbatim, but ams alignments act like command arguments and defeat verbatim so the argument is read as command tokens and the entry expands to \indexentry{$\mu ^{\otimes \delimiter "3223379 n}$}{1} which messes up the index. You could use \index{$\mu^{\otimes\protect\downarrow n}$} which would work, but produces ...


6

Just have a new document which inputs the .ind file of the first (and does nothing else) .


6

This should be something like you are trying to use: \documentclass{book} \usepackage{imakeidx} \makeindex[name=statutes,title=Statutes] \makeindex[name=dummy] \newcommand{\eunumerical}{statutes} \newcommand{\eualphabetical}{dummy} \begin{document} \chapter{abc} \index[\eualphabetical]{title} \index[\eunumerical]{number@number, title} ...


6

The solution is to move \nobreak after \@idxitem: % arara: lualatex % arara: makeindex % arara: lualatex \documentclass{article} \usepackage{makeidx} \makeatletter % we don't want a page break before a subitem \renewcommand\subitem{\@idxitem\nobreak\hspace*{20\p@}} \makeatother \makeindex \begin{document} \index{gap!radial}\index{gap!axial} ...


6

While it is possible to reduce the index fontsize using only imakeidx, the space between index heading and first entry will be somewhat larger than that produced by a fontsize switch after a "normal" heading. If you use idxlayout, the spacing will be the same. The following MWE contains both variants; comment/uncomment the respective lines and compare. ...


6

You have to call imakeidx with the nonewpage option and run makeindex manually. Unfortunately, there's also the need to apply a patch around a bug that should be solved in the next release of imakeidx; see Why does imakeidx + nonewpage fail to write an idx file? In order to automate the work you have two roads: Use latexmk Use arara I'd prefer the ...


6

What you have to do is to create a file named mystyle.ist with the following contents: item_1 ", " Then add the option options=-s mystyle when you are generating the index \makeindex[name=wdes,title=Initia Heirmorum,columns=1,options=-s mystyle] and you're done. MWE \documentclass{article} \usepackage{lipsum} \usepackage{imakeidx} ...


6

Create a pyro.ist file in the same directory as your main file with the following contents: heading_prefix "\n\\noindent\\textbf{" heading_suffix "}\\par\\nopagebreak\n" headings_flag 1 and change the call to \makeindex to \makeindex[program=makeindex,options=-s pyro,columns=2,intoc=true] That's all. Your .ind file will look like \begin{theindex} ...


6

Just to let you know how to add additional options on the fly to the command line of makeindex in WinEdt. Open the Execution Modes dialog (Options menu) and select the option 'Enter Extra Switches on Spot' for MakeIndex application At compiling time you will be prompted for inserting extra options and type -s StyleInd.ist If instead you want to add it ...


5

Quick solution Here is a shorter solution, it struggles with the issue that it writes the first occurence text to the glossary. \defglsdisplayfirst[\acronymtype]{#1#4\index{#1}} It redefines the first display of the term to include a call to index using the \defglsdisplayfirst command and restricts this change to the acronym glossary. Right now the ...


5

imakeidx sets the number of columns with \imki@columns; so you can simply build another document with the following format: \documentclass{article} \usepackage{imakeidx} \usepackage{hyperref} \begin{document} \makeatletter \def\imki@columns{1} \def\indexname{External index} \makeatother \input{mainfile.ind} \end{document} leaving to the class the rest.


5

The imakeidx package must be loaded before hyperref. \documentclass{scrbook} \usepackage{imakeidx} \usepackage{classicthesis} \usepackage{cleveref} \makeindex \begin{document} Since hyperref is loaded by classicthesis this is the correct order.


5

By using xindy instead of makeindex I get the desired result. That is, instead of running makeindex filename.idx run texindy filename.idx


5

This has nothing to do with imakeidx nor with \item. Just define a new index style. With imakeidx it's just simpler to manage the whole thing. File ind10.ist Save this file in the same directory as your LaTeX file preamble "\\begin{theindex}\n\\begin{longtable}{lll}\\mygobble" postamble "\n\\end{longtable}\n\\end{theindex}\n" item_0 "\\\\\n\\mymacro" ...


5

The writing of an index entry in the .idx file happens when the page where the \index command eventually appears. In order to be able to compile the index on the fly, that is using MakeIndex for transforming the .idx file into the .ind file containing LaTeX instructions, imakeidx closes the .idx file when LaTeX encounters \printindex. In your example, ...


4

Not to take away anything from John's answer, adding $makeindex = "touch -m %D"; to the local .latexmkrc produces automated workflow with nearly minimal overhead. In which case, on my system with this example, latex is only run once. I.e., this is (nearly) as efficient as things can ever get. The proviso, of course, is that imakeidx with \write18 enabled is ...


4

Experimental; first version (IAST scheme) I am trying to setup this transliteration in Xindy. I've used lowercase characters for letter groups, but it isn't typical in European languages. I've used merge-rules for capital letters, we don't use these rules this way either. So we only see Shiva not shiva after this step. I disliked rendering of several ...



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