pretext icon indicating copy to clipboard operation
pretext copied to clipboard

Putting <idx> in <term> for definitions

Open oscarlevin opened this issue 5 years ago • 12 comments

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.

oscarlevin avatar Jun 20 '19 23:06 oscarlevin

The work to address this is similar that required for #1088 and #753 .

davidfarmer avatar Jun 24 '19 11:06 davidfarmer

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.

kcrisman avatar Jun 24 '19 12:06 kcrisman

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]

davidfarmer avatar Jun 24 '19 13:06 davidfarmer

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?

kcrisman avatar Jun 24 '19 13:06 kcrisman

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 numberexciting number

though one might still have to do

exciting numbernumberexciting

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]

davidfarmer avatar Jun 24 '19 14:06 davidfarmer

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 😃

kcrisman avatar Jun 24 '19 14:06 kcrisman

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.

mitchkeller avatar Jun 24 '19 14:06 mitchkeller

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.)

kcrisman avatar Jun 24 '19 14:06 kcrisman

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 FunFunFundefinition, which is probably suboptimal, though I've seen it in real indexes.)

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute thethread.[AABTULFR7XYWPUAWQH6NZEDP4DKGVA5CNFSM4H2DKIOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWS ZGODYNC64Q.gif]

davidfarmer avatar Jun 24 '19 15:06 davidfarmer

Of course, the print version won't know that (yet) ...

kcrisman avatar Jun 24 '19 15:06 kcrisman

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.

kcrisman avatar Jun 24 '19 16:06 kcrisman

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.

mitchkeller avatar Jun 24 '19 16:06 mitchkeller