diff options
author | Karl Berry <karl@freefriends.org> | 2012-11-13 00:19:06 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2012-11-13 00:19:06 +0000 |
commit | c5f6a6bfb60c86449df07a7984c1813129e0673f (patch) | |
tree | af336e2e4eea6e1b434481bb7750b1a5e2f9397d /Master/texmf-dist/source/latex/imakeidx | |
parent | 9d0bdc017d2c211e0b87ffad503d0b306c7de7ca (diff) |
imakeidx (11nov12)
git-svn-id: svn://tug.org/texlive/trunk@28240 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/imakeidx')
-rw-r--r-- | Master/texmf-dist/source/latex/imakeidx/imakeidx.dtx | 51 |
1 files changed, 40 insertions, 11 deletions
diff --git a/Master/texmf-dist/source/latex/imakeidx/imakeidx.dtx b/Master/texmf-dist/source/latex/imakeidx/imakeidx.dtx index ecf7dfdc43f..bcac4894408 100644 --- a/Master/texmf-dist/source/latex/imakeidx/imakeidx.dtx +++ b/Master/texmf-dist/source/latex/imakeidx/imakeidx.dtx @@ -43,7 +43,7 @@ and the derived files imakeidx.sty and imakeidx.pdf. %<package>\NeedsTeXFormat{LaTeX2e}[2005/12/01] %<package>\ProvidesPackage{imakeidx}% %<*package> - [2012/10/05 v1.2d Package for typesetting indices in a synchronous mode] + [2012/10/22 v1.2e Package for typesetting indices in a synchronous mode] %</package> %<*driver> \documentclass{ltxdoc} @@ -77,7 +77,7 @@ and the derived files imakeidx.sty and imakeidx.pdf. \end{document} %</driver> % \fi -% \CheckSum{782} +% \CheckSum{785} % % \changes{v1.0}{2010/07/10}{First public version} % \changes{v1.0a}{2010/07/12}{Small bug correction} @@ -89,6 +89,7 @@ and the derived files imakeidx.sty and imakeidx.pdf. % \changes{v1.2}{2012/08/31}{added index processing engine option truexindy} % \changes{v1.2c}{2012/10/02}{Fixed regression} % \changes{v1.2d}{2012/10/06}{Fixed bugs with index internal names} +% \changes{v1.2e}{2012/10/22}{Fixed bug with showidx simulated by memoir} % % \begin{abstract} % This package exploits the |\write18| facility of modern \TeX\ system @@ -553,7 +554,9 @@ and the derived files imakeidx.sty and imakeidx.pdf. % \pack{memoir} class. Since version 1.1 it is; however, one has to % keep in mind that all index processing is done with the methods of % the present package, and \emph{not} with \pack{memoir}'s; however -% the syntax used is the same and there should be no problem. +% the syntax used is the same and there should be no problem. There is +% an interaction between \pack{memoir} and \pack{showidx} that required +% special attention. See below about using \pack{showidx}. % % \subsubsection{Package \pack{showidx}} % @@ -644,7 +647,7 @@ and the derived files imakeidx.sty and imakeidx.pdf. % differently according to the next list entry. % \item There are some classes (for example \class{book}, % \class{scrapbook}, \class{menoir},\dots) that have the special -% ``sectioning'' declarations |\fontmatter|, |\mainmatter|, and +% ``sectioning'' declarations |\frontmatter|, |\mainmatter|, and % |\backmatter| modify how the unstarred sectioning commands behave for % what concerns the heading and the table of contents entries. % @@ -721,6 +724,15 @@ and the derived files imakeidx.sty and imakeidx.pdf. % to the fact that \pack{showidx} redefines several internal commands, % some of which have to receive the \pack{imakeidx} definition in order % to perform as described in this documentation. + +% At the same time if the \pack{memoir} classis being used, remember that this class +% simulates the \pack{showidx} package and has its own commands to enable or +% disable the printing of the index entries into the margin of the document; +% the default setting is with the |\hideindexmarks| command in force; but if +% the user wants to write his index entries in the margin he has to issue the +% declaration |\showindexmarks| just after begin document, in any case before +% the part of the source file(s) he wants to be marked with the index entries +% in the margin. % % \subsection{Index List sectioning customization} % Use freely the options and the key values in order to reach the @@ -1055,14 +1067,30 @@ and the derived files imakeidx.sty and imakeidx.pdf. \def\imki@nowrindex#1{\endgroup\@esphack} % \end{macrocode} % -% Command \cs{@wrindex} must be duplicated; we have to call it the -% same as usual in order to support \pack{hyperref}. But the real name -% will be given at the end. We have to define a switch to allow the use of the \pack{showidx} facilities. We define also a helper macro so as to do the right thing so as to show the index file name to which a certain index entry is going to be written; the idea is to prefix the induex entry with the actual name of the specific index, except in the case or the default index, where the name is set to |\jobname|. Since they control sequence is a primitive command, its value cannot be directly compared in the |\ifx| sense to the current macro represented by argument |#1|. therefore we need a further helper control sequence |\imki@jobname| that contains the value assigned to |\jobname|. +% Command \cs{@wrindex} must be duplicated; we have to call it the same as usual in order +% to support \pack{hyperref}. But the real name will be given at the end. We have to +% define a switch to allow the use of the \pack{showidx} facilities. We define also a +% helper macro so as to do the right thing so as to show the index file name to which +% a certain index entry is going to be written; the idea is to prefix the index entry +% with the actual name of the specific index, except in the case or the default index, +% where the name is set to |\jobname|. Since the control sequence is a primitive +% command, its value cannot be directly compared in the |\ifx| sense to the current +% macro represented by argument |#1|. Therefore we need a further helper control +% sequence |\imki@jobname| that contains the value assigned to |\jobname|. +% We must also take care of the case where the user wants to print the index entries +% in the margin while working on the document. This implies testing for the package +% \pack{showidx} being already loaded; but this is not sufficient, because the +% \pack{memoir} class simulates the \pack{showidx} package and the test would result +% to be true even if the user did not load thet package, but uses the \pack{memoir} class. +% Therefore we use the same boolean used by \pack{memoir}, testing in advance so as not +% defining it twice; then we use it to let the \pack{showidx} true or simulated macros do +% their job, but we also take care of resetting the switch default value to +% false at begin document time if the \pack{memoir} class is being used. % \begin{macrocode} -\newif\ifimki@showidx -\@ifpackageloaded{showidx}{\imki@showidxtrue}{\imki@showidxfalse} +\@ifundefined{showindexmarks}{\newif\ifshowindexmark}{} +\@ifpackageloaded{showidx}{\showindexmarktrue}{\showindexmarkfalse} \newcommand\imki@showidxentry[2]{% - \ifimki@showidx + \ifshowindexmark \@showidx{\ifdefequal{\imki@jobname}{#1}{}{[#1]\space}#2}% \fi} \def\imki@wrindexsplit#1#2{% @@ -1378,7 +1406,8 @@ and the derived files imakeidx.sty and imakeidx.pdf. % \end{macrocode} % To end the code, we deal with \pack{memoir}: % \begin{macrocode} -\@ifclassloaded{memoir}{\let\@wrindexm@m\@wrindex}{} +\@ifclassloaded{memoir}{\let\@wrindexm@m\@wrindex + \AtBeginDocument{\hideindexmarks}}{} % \end{macrocode} %\iffalse %</package> |