Replies: 3 comments 8 replies
-
Not sure if I understand all aspects of the question. I usually have a list of index items in a variable. For example: <SetVariable variable="indexentries">
<Copy-of select="$indexentries"/>
<Element name="indexentry">
<Attribute name="name" select="@word"/> ①
<Attribute name="page" select="@page"/>
</Element>
</SetVariable> This stores the equivalent of Depending on your needs, you have a few possibilities:
This surely depends on the data you have. Once you have this variable with the data, call the command There is no sorting and collecting the page in one pass. |
Beta Was this translation helpful? Give feedback.
-
Hi Patrick I am still studying this, I'd like to avoid to repeat the same stupidity I had with the single page TOC... 🤦♂️ Here are my thoughts, it would be a waste of energy pass two time the layout, it would be better to create the index in a semi-auto way... I wonder if I can:
The third point is there only to explain the process. To recap, the first time I would run: The second time: Is that possible? 🤷♂️ |
Beta Was this translation helpful? Give feedback.
-
Hi @pgundlach I brutally copied and pasted your code and tried to adapt it to my node structures, but it fails disrupting completely the layout... 😩 And this is a little bit weird because it should operate it on the index section, which is at the very bottom of the layout, after section that populate the body of the PDF. In my knowledge the index section shouldn't conflict with the previous section because the previous is operating a Perhaps there is some overlapping in the <SetVariable variable="index">
<Element name="index">
<Makeindex select="$indexentries" sortkey="name" section="idxsection" pagenumber="page" />
</Element>
</SetVariable> I have already a node <Record element="keyword">
<SetVariable variable="indexentries">
<Copy-of select="$indexentries" />
<Element name="indexentry">
<Attribute name="name" select="@title" />
<Attribute name="page" select="@page" />
</Element>
</SetVariable>
</Record>
The problem is that is breaking apart a lot of stuff, for instance:
The metapost code to create the rounded boxes gets broken the moment I invoke the index block otherwise it renders the PDF properly. Sorry for the pebcak news... 😩 |
Beta Was this translation helpful? Give feedback.
-
Hi @pgundlach I am trying to understand how to create a keyword index but I am confused about your method explained in the documentation.
You stated in the documentation:
This means that I should pass the catalog two times, the first to create a record and a second time to "parse" the alphabetically? Or do I have to create the record before and the run the index (you wrote command
makeindex
for instance) separately from the main "catalog".Is it possible saving the page and sorting in one pass since the index is usually at the end any publication?
Thanks in advance! 🙏
Beta Was this translation helpful? Give feedback.
All reactions