pretext
pretext copied to clipboard
Putting <idx> in <term> for definitions
To indicate a locator in the index is for a definition, when the <definition>
is not used, then <idx>
should be placed inside <term>
, and the index should do this nicely.
The work to address this is similar that required for #1088 and #753 .
May I request that this is a switch (even if default is on)? One may use <term>
but it might be on a different page than the actual definition, depending upon pagination.
There is no need for a switch: if you put an idx inside a term, then you get that term in the index. By definition, the term tag encloses the word being defined.
On Mon, 24 Jun 2019, kcrisman wrote:
May I request that this is a switch (even if default is on)? One may use
but it might be on a different page than the actual definition, depending upon pagination. — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute thethread.[AABTULAU6IVVQKIX2Y3VL33P4C4NTA5CNFSM4H2DKIOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWS ZGODYMX77Q.gif]
There is no need for a switch: if you put an idx inside a term, then you get that term in the index. By definition, the term tag encloses the word being defined.
I see, I misunderstood the proposal. I thought you meant that putting <idx>
would happen automatically; you mean (I think) that if someone puts it in, there is no need to do something awkward like
<term>exciting number</term><idx>exciting number</idx>
though one might still have to do
<term>exciting number</term><idx><h>number</h><h>exciting</h></idx>
if one wished that. Have I understood now?
You have to put the idx inside the term
tag, like this:
<term>exciting number<idx>exciting number</idx></term>
BUT, only do this if you don't use the defnition
tag.
Terms defined inside a definition
should be idx'ed as in the
past.
On Mon, 24 Jun 2019, kcrisman wrote:
There is no need for a switch: if you put an idx inside a term, then you get that term in the index. By definition, the term tag encloses the word being defined.
I see, I misunderstood the proposal. I thought you meant that putting
would happen automatically; you mean (I think) that if someone puts it in, there is no need to do something awkward like
exciting number exciting number though one might still have to do
exciting number number exciting if one wished that. Have I understood now?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute thethread.[AABTULGCNT5ST3ZZC6HV5JDP4DEDBA5CNFSM4H2DKIOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWS ZGODYM5V2Q.gif]
I think I am still confused as the purpose, then, since the amount of work is the same. Will there be some (automatic, opt-in, opt-out) mechanism in the index that specifies certain references are to definitions? I guess my obtuseness suggests that at the very least whenever/however this is implemented, there should be a clear explanation of its precise purpose and outcome in the author guide 😃
At a minimum, the behavior for the HTML index will become that the word that appears in the index as the clickable for the knowl will be "Definition" instead of "Paragraph" in texts such as Keller/Trotter and Judson that do not use the definition
element. (Once we have good indexes in our books, most things defined in the text will have lots of locators. If someone wants to see what the definition of "graph" is in Applied Combinatorics, they would like to know which knowl will show them that definition.) There is some talk of using a decoration of sorts on page numbers in the LaTeX index to point to where a term is defined, but I think that's one step further down the road.
Thanks, that is a helpful example of a use case. (Currently I've been doing things like <idx><h>FunFunFun</h><h>definition</h></idx>
in cases where there might be a lot of locators to slog through - which is probably suboptimal, though I've seen it in real indexes.)
In the context of PreTeXt, when using the definition
environment
it definitely is wrong to include the <h>definition</h>
in the
idx
because PreTeXt "knows" that the idx
is in a definition.
For example, in NT:ICaI , the definition of "group" should appear in the index like this:
group Definition Abelian Paragraph, etc, etc etc
On Mon, 24 Jun 2019, kcrisman wrote:
Thanks, that is a helpful example of a use case. (Currently I've been doing things like
, which is probably suboptimal, though I've seen it in real indexes.) FunFunFun definition — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute thethread.[AABTULFR7XYWPUAWQH6NZEDP4DKGVA5CNFSM4H2DKIOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWS ZGODYNC64Q.gif]
Of course, the print version won't know that (yet) ...
For example, in NT:ICaI , the definition of "group" should appear in the index like this: group Definition Abelian Paragraph, etc, etc etc
On a separate note, thanks, that was a good catch that is still present in my source because I haven't made it to that chapter that in editing.
Of course, the print version won't know that (yet) ...
Heavy emphasis on the "(yet)" there. I suspect that once @rbeezer gets this modification up and running, then he'll have a thorough way to identify where the definition of something is. Then it's just down to deciding what sort of decoration to use for the locators in the LaTeX index to identify what is a figure, an exercise, a table, a definition, etc.