Changes

Jump to navigation Jump to search
125 bytes added ,  01:05, 14 January 2014
m
no edit summary
=Tricks=
* {{cmd|startregister}}<tt>[index][mymouse]{mouse}</tt> ... {{cmd|stopregister}}<tt>[index][mymouse]</tt>: to mark several pages for the same entry; becomes e.g. "mouse 12--16". Note that if you have two or more of these ranges, you need them to have different <tt>[key]</tt> values to stop the system treating them as part of a great big range. So, use {{cmd|startregister}}<tt>[index][mymouse1]{mouse}</tt> ... {{cmd|stopregister}}<tt>[index][mymouse1]</tt> and then {{cmd|startregister}}<tt>[index][mymouse2]{mouse}</tt> ... {{cmd|stopregister}}<tt>[index][mymouse2]</tt> to get two independent ranges in the list. {{cmd|startregister}} takes four arguments, of which two are mandatory: {{cmd|startregister}}<tt>[NAME_OF_REGISTER]{ENTRY_NAME}</tt>. The other arguments are <tt>[KEY_FOR_RANGE]</tt> and <tt>[KEY_FOR_SORTING]</tt>. To give an example: {{cmd|startregister}}<tt>[index][levi][Levi-Strauss]{Lévi|-|Strauss}</tt>. This will start a range with the key <tt>levi</tt> which will put the entry "Lévi-Strauss" in the register "index" (the "normal" register) and sort it under "Levi-Strauss." To mark the end of the range, you write {{cmd|stopregister}}<tt>[index][levi]</tt>.
* Automatically collapse page ranges: {{cmd|placeindex[compress=yes]}}
* {{cmd|writetoregister}} (sometimes needed to avoid macro expansion issues)
* A register per chapter: {{cmd|placeregister}}<tt>[index][criterium=chapter]</tt>
* Place a word in text ''and'' index: <tt>\def\Tindex#1{\index{#1}#1}</tt> -- Please someone enhance this to get space correction, [] sorting etc.!
* Get uppercase-letter heads: {{cmd|setupregister}}<tt>[index][n=2,command=\Word,style=normal]</tt>
 
== Collapse Page Numbers ==
 
There are a few ways to collapse page numbers. The first way is to use the `compress=yes` parameter to the {{cmd|setupregister}} command.
 
The second way is to mark several pages for the same entry using {{cmd|startregister}}<tt>[index][mymouse]{mouse}</tt> ... {{cmd|stopregister}}<tt>[index][mymouse]</tt>. This becomes e.g. "mouse 12--16". Note that if you have two or more of these ranges, you need them to have different <tt>[key]</tt> values to stop the system treating them as part of a great big range. So, use {{cmd|startregister}}<tt>[index][mymouse1]{mouse}</tt> ... {{cmd|stopregister}}<tt>[index][mymouse1]</tt> and then {{cmd|startregister}}<tt>[index][mymouse2]{mouse}</tt> ... {{cmd|stopregister}}<tt>[index][mymouse2]</tt> to get two independent ranges in the list. {{cmd|startregister}} takes four arguments, of which two are mandatory: {{cmd|startregister}}<tt>[NAME_OF_REGISTER]{ENTRY_NAME}</tt>. The other arguments are <tt>[KEY_FOR_RANGE]</tt> and <tt>[KEY_FOR_SORTING]</tt>. To give an example: {{cmd|startregister}}<tt>[index][levi][Levi-Strauss]{Lévi|-|Strauss}</tt>. This will start a range with the key <tt>levi</tt> which will put the entry "Lévi-Strauss" in the register "index" (the "normal" register) and sort it under "Levi-Strauss." To mark the end of the range, you write {{cmd|stopregister}}<tt>[index][levi]</tt>.
 
== Rename Register Heading ==
398

edits

Navigation menu