Re: [NTG-context] Quick way to proofread / check index entries?
> On 3 Sep 2022, at 19:51, Bruce Horrocks via ntg-context > wrote: > > My own fault for not thinking head :-) but I have a largeish text with a lot > of \index{...} entries. To make life easier for the proofreader I would like > to temporarily redefine \index to wrap it or replace it with something that > will highlight indexed items in the text where they occur, e.g. change their > colour. > > I could do this with a global find and replace (across many files) to replace > \index with \MyIndex, say, and then define a \MyIndex that understands the > various parameter options but this is a hassle. Before I do this, is there > anything already pre-built? > > The ultimate aim is to enable a proofreader to see each indexed term where it > appears in order to judge whether the term deserves to be in the index at > all. (Working backwards from the index itself is possible but clicking a page > number, trying to find the term on the page, then reading the context to make > a decision is quite hard work - much easier to read through and deal with the > terms as they appear.) Thanks for the suggestions Richard and Mikael. For the benefit of the list I went with the following quick'n'dirty™ approach which will be good enough: \def\index{\dosingleempty\debugIndex} \def\debugIndex[#1]#2{% \iffirstargument \null% Ignore it for now \else \inmargin[color=blue,stack=yes,style=ssxx]{#2}% \fi } \def\startregister{\dotripleempty\debugStartRegister} \def\debugStartRegister[#1][#2][#3]#4{% \inmargin[color=darkgreen,stack=yes,style=ssxx]{↓ #2}% } \def\stopregister[#1][#2]{\inmargin[color=darkred,stack=yes,style=ssxx]{↑ #2}} — Bruce Horrocks Hampshire, UK ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] How to add entire chapter's page ranger for index entry?
> On 23 Jan 2022, at 21:40, Joel via ntg-context wrote: > > I am adding items to an index simply using `\index{word}`. > > There are a few cases where instead of printing just the page number where > `\index{word}` is placed, I need the entire page range for that chapter to be > displayed. For instance, if Chapter 3 spans page 22-50, and I place > `\index{word}` in Chapter 3, I need the index to display "word 22-50", but > only for that entry...not for all index entries. > > How to add entire chapter's page ranger for index entry? \startchapter[title={My chapter title}] \startregister[index][anIdentifier]{word} The text... \stopregister[index][anIdentifier] \stopchapter — Bruce Horrocks Hampshire, UK ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] How to add entire chapter's page ranger for index entry?
Am 23.01.22 um 22:40 schrieb Joel via ntg-context: I am adding items to an index simply using `\index{word}`. There are a few cases where instead of printing just the page number where `\index{word}` is placed, I need the entire page range for that chapter to be displayed. For instance, if Chapter 3 spans page 22-50, and I place `\index{word}` in Chapter 3, I need the index to display "word 22-50", but only for that entry...not for all index entries. How to add entire chapter's page ranger for index entry? You need to use \startregister[index][some code]{Entry} ... chapter content ... \stopregister[index][some code] Hraban ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] index issues
> Am 06.11.2020 um 12:22 schrieb Henning Hraban Ramm : > > (2) > Page/column breaking is odd in that the preferred breaking point seems to be > one entry too early, i.e. the last entry of one letter end up in the next > column and the previous column is one line too short. > It doesn’t change with balance=yes/no. If one of the \index{D...} lines is commented in the following example, the last D entry goes into the second column, the columns get balanced, and the second line of the last K entry is broken to the next page. If you uncomment that line, it looks as intended (no balancing, full left column). What’s wrong? Can I influence this e.g. with penalties? (Screenshots were too big...) Hraban \setuppapersize[A6] \setupbodyfont[16pt] \setupregister[index][balance=no,indicator=no] \showframe \starttext %\setinjector[index][10][{\column}] %\showinjector[index] % ERROR! \index{Danold} \index{Drum} %\index{Dapper} % uncomment to test \index{Kankra} \index{Kookaburra} \placeregister[index][criterium=all] \page \startregister[index][test]{Knuth} \input tufte \index{Donald}\index{Drom}\index{Divine} \page\index{Dummy} \input knuth \index{Donald}\index{Dom}\index{Dunno} \page \stopregister[index][test] \input darwin\index{Darwin} \page \dorecurse{5}{ \input knuth \index{Knuth}\index{Donald}\index{Dixit} \page\index{Knothing} } \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] index issues
Hello again, still struggling with indexes. (1) \setupregister’s before and after go around the indicator. e.g. \setupregister[][indicator=no,after={XX}] never shows that XX, since after is only used after the indicator, while before also works without. I was hoping for a hook at the end of a section (to add \testcolumn, \blank etc. to work around no.2). Is there any? (2) Page/column breaking is odd in that the preferred breaking point seems to be one entry too early, i.e. the last entry of one letter end up in the next column and the previous column is one line too short. It doesn’t change with balance=yes/no. E.g. p.1 A A A A A A B A B A B A <<<< !? p.2 B C B C B C C C C D C D (3) (How) can I otherwise influence page/column breaking? E.g. - always keep multi line entries together - break before or after some entry (4) Is it possible to combine entries from \index and \startregister[index]? If I use \start/stopregister and have the same index entry within the range or on the same page, I get duplicate pages or page ranges, like 10-12 from \startregister and additionally 11, 12-13 from \index entries, makes at the moment 10-12, 11, 12-13 instead of just 10-13. I’ll prepare MWEs, but maybe you can answer some of these without? Thank you in advance, Hraban ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Fine tuning an index
I'm doing my first mkiv index (it took me a long time to upgrade from mkii!) and I really like the processor feature to format elements differently. But there are a couple of things I would really like to achieve that I'm struggling with: 1. Elided numbers in an index range entry. For example if I have a \startregister - \stopregister pair resulting in an index entry like entry 354--356 I would like to be able to make this read entry 354--6 There are different conventions for number span elision but usually teens aren't elided so entry 314--316 would become entry 314-16. It strikes me that if I could set up a processor specifically for page number ranges I could possibly write a macro to do elision; but I don't think that's currently possible? Maybe it's possible in lua to write code which both identifies range page numbers and carries out the elision. I'm not quite sure where to start. 2. Fine tuning column and page breaking in an index. This is tricky, because there are usually very few "good" places to break an index, and automatic breaking seems to alter slightly depending on whether interactions are set up or not, but is there a way to manually insert a column or page break into the register before or after a certain entry, the way there is for a table of contents? Sorry for no MWE, for obvious reasons. Any pointers to what might be able to be done on these would be much appreciated. Thanks. Duncan ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Index range with page number suffix
(Using mkiv.) I have an index in which some entries need suffixes on the page numbers, for which I have used processors. For index ranges, I need the page number suffix only to appear on the end page number, not the start page number. The below MWE produces an index entry: sausage 1i-2i What I need is: sausage 1-2i Is this possible? MWE \defineprocessor[important][right={\it{i}}] \starttext \samplefile{knuth} \startregister[index][sausage][important->sausage]{sausage} \dorecurse{6}{\samplefile{knuth}} \stopregister[index][sausage]{sausage} \samplefile{knuth} \page \placeindex \stoptext Thanks in advance, Duncan ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] force index entries without page number
Il 04/09/20 11:01, Henning Hraban Ramm ha scritto: Am 03.09.2020 um 13:32 schrieb mf : Use check=yes But I need check=no, because my author has several entries like Miller, Carolyne, born Princess of Sayn-Wittgenstein 123–125 Sayn-Wittgenstein, Carolyne of see Miller, Carolyne i.e. the reference target often has a different wording from the entry, and thus \seeindex{Something}{} always inserts a "see". Now I understand. Since I'm working with XML, I'm using registers in an even stricter way: the text I'm indexing is actually the ID of a person in a database. Something like this: Carolyne in the main text results in a \index[miller_carolyne]{v18in231} In another place of the XML there's a record like this: Miller, Carolyne ... The deeptextcommand parameter of \setupregister is set to a macro that takes the ID and gives back the text of the person. Maybe in the database there's also another record like this: sort-key="sayn_wittgenstein_carolyne">Sayn-Wittgenstein, Carolyne Miller, Carolyne that results in a \seeindex[sayn_wittgenstein_carolyne]{Sayn-Wittgenstein, Carolyne}{Miller, Carolyne} I don’t know how common these "passim" entries are in scientific works; maybe I could use Mainperson firstpage–lastpage instead to avoid the major hassle of tricking the index mechanisms. in that case \startindex...\stopindex or \startregister...\stopregister could be your friends. Massi ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Index confusion with first entry
Hi, my index of locations shows a strange problem: Hamburg 6, 12, 14, 24–25, 27, 31, 33, 35, 44, 46, 48, 57, 59, 64, 75, 79, 81, 93–94, 96, 102, 104–105, 108–110, 112, 116–118, 120, 121–125, 6, 126–135, 6, 137– 147, 149, 151–159, 161, 165, 168, 169–171, 174, 176, 178, 182, 207, 209, 211, 215–216, 219–220, 224, 240, 242–244, 291 Page 6 is mentioned two times out of order. The problem doesn’t show at other locations. The first index entry (p.6) is made by \startregister[locations][test]{Someplace}, second is Hamburg (single entry). If I replace Hamburg with another town, the problem moves. If I move the Hamburg entry in front of \startregister, it disappears! I.e. if the first index entry is set by \startregister, the subsequent entry gets confused. I tried to come up with a MWE, but couldn’t reproduce the problem in a simple example like \starttext \placeregister[index][criterium=all] \startregister[index][test]{Knuth} \input tufte \index{Donald} \page \input knuth \index{Donald} \page \stopregister[index][test] \input darwin \page \dorecurse{5}{ \input knuth \index{Knuth}\index{Donald} \page } \stoptext Hraban ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] index page ranges where start page == end page
The following probably well known minimal example \starttext \startregister[index][key1]{an entry}\input knuth\stopregister[index][key1] \placeindex \stoptext produces the index entry "an entry 1--1", where the page range should be just a single page. A question (and then two workarounds): Could ConTeXt automatically change such page ranges to the single page ("an entry 1")? Meanwhile, a couple of workarounds: In the MkII (pre-lua) days, I wrote a shell/sed/awk/perl script that converted the .pdf file to text, grepped for (strings that are likely to be) page ranges, and spat out lines where the page range should be a page. (Those days were so long ago that I've forgotten the script's language.) Then I would manually find and change the corresponding \startregister[index] in the source to a plain \index (and delete the corresponding \stopregister). In these MkIV days, with the index data in a lua table, I've been playing with the following python2 script that parse the .tuc file to spit out the same information slightly more reliably. In the next step, coming soon, the script will check that each \seeindex entry points to an actual entry and also that each \seeindex{also ...} entry originates from an actual entry (otherwise it shouldn't be "also"). The script requires the slpp package; pip install git+https://github.com/SirAnthony/slpp The parser in the script has a bug in that it doesn't handle minus signs in the lua table, maybe everywhere or maybe only some of them, so the script replaces them with "_" before sending the data to the parser (a terrible hack). To run the script: python check-index.py < file.tuc Here is check-index.py: # parse lua-format index-entry table extracted from book.tuc to check # that each xref points to an actual entry, and that, further, "see # also" src entries have at least one page ref (perhaps in subtree) # due to bug in slpp parser: replace "-" (minus signs) in data with "_" from slpp import slpp as lua from sys import stdin,stderr import re def tuclist2entry(l): return '+'.join(l) data = [] intro_re = r'utilitydata.structures.registers.collected\s*=' in_register_data = False for l in stdin: if re.match(intro_re, l): in_register_data = True data.append(re.sub(intro_re,'',l)) elif in_register_data: data.append(l) if re.match(r'}$', l): in_register_data = False data = re.sub("-", "_", ''.join(data)) dict = lua.decode(data) index = dict['index'] entries = [] xrefs = [] for entry in index['entries']: src = [x[0] for x in entry['list']] refs = entry['references'] if 'seeword' in entry: dest = entry['seeword']['text'] xrefs.append((src,dest)) else: page = refs['realpage'] if refs.get('lastrealpage',None) == page: print "silly range:", tuclist2entry(src) entries.append(src) for xref in xrefs: print tuclist2entry(xref[0]),'->', xref[1] ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] \startregister…\stopregister bug?
You forgot the second argument for \startregister and \stopregister. \defineregister[TesT] \starttext \startregister[TesT][one]{samples} \input knuth \page \startregister[TesT][two]{more} \input ward \stopregister[TesT][one] \page zapf \stopregister[TesT][two] \blank[3*big] \placeregister[TesT] \stoptext Wolfgang Alan Bowen schrieb am 14.08.18 um 17:25: In the latest beta (2018.08.10), \defineregister[TesT] \starttext \startregister[TesT]{samples} \input knuth \page \input ward \stopregister[TesT] \blank[3*big] \placeregister[TesT] \stoptext produces on page 2 the index entry /samples 1/ when one expects /samples 1–2/ / / Alan ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] \startregister…\stopregister bug?
In the latest beta (2018.08.10), \defineregister[TesT] \starttext \startregister[TesT]{samples} \input knuth \page \input ward \stopregister[TesT] \blank[3*big] \placeregister[TesT] \stoptext produces on page 2 the index entry *samples 1* when one expects *samples 1–2* Alan ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] compressing register ranges
>> Using [compress=all] for registers yields somewhat puzzling results (1.0.4 >> (TeX Live 2017)). >> I would expect the register of the following code to become one single range >> "1--7", though context produces "1--2, 3--7". >> Is this the expected behaviour? >> And if so: is there another switch to get the ranges to be collapsed >> completely? >> >> Also: There wouldn't be a shorthand to define explicit ranges? LaTeX has >> \index{Demorange|(} to \index{Demorange|)} which is actually very convenient. > > ConTeXt has \startregister, see > http://wiki.contextgarden.net/Registers#Collapse_Page_Numbers I shoud probably have been more specific: While \startregister as such works for me, it 1) isn't collapsed as expected together with ordinary single register-entries (my main problem, cf mwe below) 2) is a bit cumbersome to use as it requires the user to keep track of keys, as explained in your link from contextgarden. Best, Florian. > > \defineregister [demo] [demoes] > \starttext > > 1 > \demo{Demorange} > > \page[yes] > > 2 > \demo{Demorange} > > \page[yes] > > 3 > \startregister[demo][demorange]{Demorange} > > \page[yes] > > 4 > \demo{Demorange} > > \page[yes] > > 5 > > \page[yes] > > 6 > \stopregister[demo][demorange] > > \page[yes] > > 7 > \demo{Demorange} > > \page[yes] > > \placeregister [demo] [compress=all] > > \stoptext Florian Grammel Copenhagen, Denmark ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] compressing register ranges
Am 2017-06-16 um 17:42 schrieb Florian Grammel <florian.gram...@gmail.com>: > Using [compress=all] for registers yields somewhat puzzling results (1.0.4 > (TeX Live 2017)). > I would expect the register of the following code to become one single range > "1--7", though context produces "1--2, 3--7". > Is this the expected behaviour? > And if so: is there another switch to get the ranges to be collapsed > completely? > > Also: There wouldn't be a shorthand to define explicit ranges? LaTeX has > \index{Demorange|(} to \index{Demorange|)} which is actually very convenient. ConTeXt has \startregister, see http://wiki.contextgarden.net/Registers#Collapse_Page_Numbers Greetlings, Hraban --- http://www.fiee.net http://wiki.contextgarden.net GPG Key ID 1C9B22FD ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] compressing register ranges
Using [compress=all] for registers yields somewhat puzzling results (1.0.4 (TeX Live 2017)). I would expect the register of the following code to become one single range "1--7", though context produces "1--2, 3--7". Is this the expected behaviour? And if so: is there another switch to get the ranges to be collapsed completely? Also: There wouldn't be a shorthand to define explicit ranges? LaTeX has \index{Demorange|(} to \index{Demorange|)} which is actually very convenient. Best regards, Florian. \defineregister [demo] [demoes] \starttext 1 \demo{Demorange} \page[yes] 2 \demo{Demorange} \page[yes] 3 \startregister[demo][demorange]{Demorange} \page[yes] 4 \demo{Demorange} \page[yes] 5 \page[yes] 6 \stopregister[demo][demorange] \page[yes] 7 \demo{Demorange} \page[yes] \placeregister [demo] [compress=all] \stoptext Florian Grammel Copenhagen, Denmark ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Regression in register processing in last beta
Dear All, I have to admit I use quite cumbersome code to get desired output, but while it was working in previous betas, now emergency stop is reported: 'Extra }, or forgotten \endgroup' Here is MWE: \setupalign[hz, hanging] \setupindenting[medium, yes] \setupnotation[footnote][align={hz, hanging}] \starttext Hello One \start \setuptolerance[strict] \startregister[index][two]{two} Hello Two This is \footnote{ \parfillskip 14pt plus 1 fill Footnote \index{content}content. }\par\stop % this brace is reported as unexpected character here \stopregister[index][two] \page \placeindex \stoptext Briefly, when footnotes appear in \startregister ... \stopregister block, processing is somehow confused and ends prematurely. ConTeXt-2014.03.16 LuaTeX 0.79 Win7-64bit Any suggestion how to update my code to get it working again? Thanks, Jan ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Regression in register processing in last beta
On 3/16/2014 7:25 PM, Jan Tosovsky wrote: Dear All, I have to admit I use quite cumbersome code to get desired output, but while it was working in previous betas, now emergency stop is reported: 'Extra }, or forgotten \endgroup' Here is MWE: \setupalign[hz, hanging] \setupindenting[medium, yes] \setupnotation[footnote][align={hz, hanging}] \starttext Hello One \start \setuptolerance[strict] \startregister[index][two]{two} Hello Two This is \footnote{ \parfillskip 14pt plus 1 fill Footnote \index{content}content. }\par\stop % this brace is reported as unexpected character here \stopregister[index][two] \page \placeindex \stoptext Briefly, when footnotes appear in \startregister ... \stopregister block, processing is somehow confused and ends prematurely. ConTeXt-2014.03.16 LuaTeX 0.79 Win7-64bit Any suggestion how to update my code to get it working again? ah, i have to swap some definition order ... but anyway, your start-stop is somewhat messed up (in fact, the start-stop names for registers are not really properly nested ones so maybe i should use other names anyway new beta coming Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Regression in register processing in last beta
On 2014-03-16 Jan Tosovsky wrote: Dear All, I have to admit I use quite cumbersome code to get desired output, but while it was working in previous betas, now emergency stop is reported: 'Extra }, or forgotten \endgroup' Here is MWE: \setupalign[hz, hanging] \setupindenting[medium, yes] \setupnotation[footnote][align={hz, hanging}] \starttext Hello One \start \setuptolerance[strict] \startregister[index][two]{two} Hello Two This is \footnote{ \parfillskip 14pt plus 1 fill Footnote \index{content}content. }\par\stop % this brace is reported as unexpected character here \stopregister[index][two] \page \placeindex \stoptext Briefly, when footnotes appear in \startregister ... \stopregister block, processing is somehow confused and ends prematurely. ConTeXt-2014.03.16 LuaTeX 0.79 Win7-64bit Any suggestion how to update my code to get it working again? There was mistake in my code: \startregister has to be before \start command to be correctly paired. Maybe parsing is now stricter, which I rather appreciate :-) Sorry for the noise, Jan ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Regression in register processing in last beta
On 2014-03-16 Hans Hagen wrote: On 3/16/2014 7:25 PM, Jan Tosovsky wrote: Dear All, I have to admit I use quite cumbersome code to get desired output, but while it was working in previous betas, now emergency stop is reported: 'Extra }, or forgotten \endgroup' Here is MWE: \setupalign[hz, hanging] \setupindenting[medium, yes] \setupnotation[footnote][align={hz, hanging}] \starttext Hello One \start \setuptolerance[strict] \startregister[index][two]{two} Hello Two This is \footnote{ \parfillskip 14pt plus 1 fill Footnote \index{content}content. }\par\stop % this brace is reported as unexpected character here \stopregister[index][two] \page \placeindex \stoptext Briefly, when footnotes appear in \startregister ... \stopregister block, processing is somehow confused and ends prematurely. ConTeXt-2014.03.16 LuaTeX 0.79 Win7-64bit Any suggestion how to update my code to get it working again? ah, i have to swap some definition order new beta coming :-) Awesome! Thanks for quick fix! Now it works even without source changes! Jan ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Paragraph - the last line handling
On 2013-11-23 Hans Hagen wrote: On 11/23/2013 2:43 PM, Jan Tosovsky wrote: On 2013-11-23 Hans Hagen wrote: On 11/22/2013 11:07 PM, Jan Tosovsky wrote: in my document there are lot of cases when the last line in the paragraph has a very narrow gap on the right. \hsize 15.4cm \input tufte \parfillskip30pt plus 1 fill \input tufte Wow, exactly! Thanks a lot. Sorry for a dumb question, but is there any way how to use it globally for all paragraphs in my document? no, as i need to think of a decent interface to that (so remind me in a few months) When this gap (parfillskip) is set in the beginning of the document, it is shared for all paragraphs within the document. I was not aware of that. But I've encountered this weird edge case. When the text is followed with \stopregister command, the last line has no gap at all: \starttext \hsize 15.3cm % in older versions this value has to be set to 15.4cm \input tufte \parfillskip 30pt plus 1 fill \input tufte \startregister[index][test]{test} \input{tufte} \stopregister[index][test] \stoptext It can be fixed by a blank line inserted before \stopregister command, but this is unacceptable in my case for other reasons. Any idea? Thanks, Jan ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Index - ranges
On 2013-11-12 honyk wrote: On 2013-11-07 honyk wrote: 1) when a range for my subject index entry is specified and the text between doesn't overflow to the next page, even in this case the range of pages 1-1 is created. Is there any option to normalize it to a single page number? \startregister[index][range_01]{primary} Dummy text. \stopregister[index][range_01] I've found a promising option compress=no|yes|all in an experimental test case located in the strc-reg.mkiv file. The corresponding lua code seems to be performing some cleanup of page ranges, but when I define it same way, there is no difference in my output (still 1-1). Looking into the lua code this one is an edge case as normalization is performed if #pages 1 which is not achieved here. No problem. But I've encountered more serious issue now: When original pages are 'compressed' for the index 114, 117, 119, 122, 130-132, 135, 135-139, 188-204, 321-321 The incorrect result is returned: 114, 117, 119, 122, 130-135, 135-321 I'd expect: 114, 117, 119, 122, 130-132, 135-139, 188-204, 321 Debugging it roughly I've noticed unsorted page numbers before compressing (in collapsedpage function in strc-reg.lua), which leads to unexpected result from first/second comparison. Some kind of page entries sorting might help here. Regards, Jan ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Index - ranges
On 2013-11-15 honyk wrote: On 2013-11-12 honyk wrote: On 2013-11-07 honyk wrote: 1) when a range for my subject index entry is specified and the text between doesn't overflow to the next page, even in this case the range of pages 1-1 is created. Is there any option to normalize it to a single page number? \startregister[index][range_01]{primary} Dummy text. \stopregister[index][range_01] I've finally found it is caused by this logic: if first == last then if first.references.lastrealpage then -- IMHO this could be optional pagerange(first,first,true,prefixspec,pagespec) else pagenumber(first,prefixspec,pagespec) end elseif last.references.lastrealpage then pagerange(first,last,true,prefixspec,pagespec) else pagerange(first,last,false,prefixspec,pagespec) end Even after normalization, if there is a range, it is preserved regardless it spans multiple pages or not. The fix is quite easy. But whether to convert these single page ranges into a single value or not could be optional, or applied according to the compress parameter (both 'yes' and 'all' would collapse the range). Jan ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Index - ranges
On 2013-11-07 honyk wrote: 1) when a range for my subject index entry is specified and the text between doesn't overflow to the next page, even in this case the range of pages 1-1 is created. Is there any option to normalize it to a single page number? \startregister[index][range_01]{primary} Dummy text. \stopregister[index][range_01] ... 3) when several single index entries are used on consecutive pages, the result 1,2,3,4,5 is produced. Is there any option to create a range from this? (A) I've found a promising option compress=no|yes|all in an experimental test case located in the strc-reg.mkiv file. The corresponding lua code seems to be performing some cleanup of page ranges, but when I define it same way, there is no difference in my output (still 1-1): \startregister[index][range_01]{primary} Dummy text. \stopregister[index][range_01] \placeregister[index][compress=yes] Is it necessary to switch it on somehow? (B) I've also found a special syntax for collapsing pages in http://wiki.contextgarden.net/Registers [[Command/{{{1}}}|\{{{1}}}]] - but I have no idea how to appply it. I already use the 'command' parameter to switch the index group letter to upper case: \setupregister[index][n=2,command=\Word,style=normal] Can these commands be combined together somehow? Or is it obsolete in favor of (A)? Thanks, Jan ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Index - ranges
On 2013-11-07 honyk wrote: 1) when a range for my subject index entry is specified and the text between doesn't overflow to the next page, even in this case the range of pages 1-1 is created. Is there any option to normalize it to a single page number? \startregister[index][range_01]{primary} Dummy text. \stopregister[index][range_01] It is rare, but any help to eliminate it completely is appreciated. 2) when ranges are used heavily, confusing results are produced. In following examples I would expect a single range 1-6: a) 1-3, 3-6 b) 1-6, 2-4 c) 1-6, 5-6 This one was caused by improper Docbook = dbcontext = ConTeXt conversion. All ranges of secondaries were treated as primaries so they were collected at primaries. After fixing the XSLT such cases dissapeared completely. Great. This would be a blocker for me. 3) when several single index entries are used on consecutive pages, the result 1,2,3,4,5 is produced. Is there any option to create a range from this? I'm reconsidering this now. I designed my 'subject' index to use ranges when the subject is thoroughly explained, which obviously needs to define beginning and end. On the contrary, when the subject is just mentioned (above the threshold of importance), I inserted just a single index entry instance. Collecting these single instances into the range of e.g. 1-5 would bring false expectations that the subject is thoroughly explained there... This logic goes slightly against the case (1). When the range would be collapsed into to a single value, we would loose the info that the subject is described here. But it looks weird. Jan ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Index - ranges
Dear All, 1) when a range for my subject index entry is specified and the text between doesn't overflow to the next page, even in this case the range of pages 1-1 is created. Is there any option to normalize it to a single page number? \startregister[index][range_01]{primary} Dummy text. \stopregister[index][range_01] 2) when ranges are used heavily, confusing results are produced. In following examples I would expect a single range 1-6: a) 1-3, 3-6 b) 1-6, 2-4 c) 1-6, 5-6 3) when several single index entries are used on consecutive pages, the result 1,2,3,4,5 is produced. Is there any option to create a range from this? Thanks, Jan ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Index - entries in section titles
Dear All, what is the correct placing indext entries somewhere in the section title? I use it for both ranges (when covering the whole section) and sometimes also for individual entries: (A) \section{\startregister[index][primary_range_01]{primary}Primary} (B) \section{\index{primary}Primary} This syntax is however: (1) used 'as is' in bookmark labels (\index{primary}Primary instead of Primary) (2) producing page references also from TOC (labels are correct, but the index entry instances are kept together there internally) How can I get rid of it? Thanks, Jan ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Index - entries in section titles
Am 07.11.2013 um 23:43 schrieb honyk j.tosov...@email.cz: Dear All, what is the correct placing indext entries somewhere in the section title? I use it for both ranges (when covering the whole section) and sometimes also for individual entries: (A) \section{\startregister[index][primary_range_01]{primary}Primary} (B) \section{\index{primary}Primary} (C) \section{Primary}\index{primary} Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Index - entries in section titles
On 2013-11-07 Wolfgang Schuster wrote: Am 07.11.2013 um 23:43 schrieb honyk j.tosov...@email.cz: what is the correct placing indext entries somewhere in the section title? I use it for both ranges (when covering the whole section) and sometimes also for individual entries: (A) \section{\startregister[index][primary_range_01]{primary}Primary} (B) \section{\index{primary}Primary} (C) \section{Primary}\index{primary} :-) I usually place it at the beginning to ensure visibility of the title when the page in the index is clicked in a large zoom (which should be preserved) - it should be scrolled accordingly. Is that index entry on the same line as the title or the next one? I found I am not able to test it: Even with the 'focus=standard' when any page in the index is clicked, the zoom is set to FitPage :-( Preserving of zoom seems to be working for TOC only... \setupinteraction[state=start,focus=standard] \starttext \startfrontmatter \completecontent \blank \section{Primary}\index{primary} Dummy text. \stopbodymatter \startbackmatter \completeindex \stopbackmatter \stoptext Jan ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Registers with distinguishable entries.
Hi Robert, On 2012-04-26 12:07, Robert Blackstone wrote: In many books page numbers indicating illustrations are set in italics. Pagenumbers indicating foot- or endnotes often have a suffix n. This I’d like to have in Context, too. Furthermore, when an indexed item is discussed on a number of consecutive pages, usually a range is given in the index, like 144-53, or 143 ff. You want the “compress” switch in placeregister, or indicate ranges with \{start,stop}register: \defineregister [demo] [demoes] \starttext \demo{Demoitem} foo \page[yes] \demo{Demoitem} foo \page[yes] %%% Here’s the range; should work without “compress” \startregister[demo][demorange]{Demorange} \demo{Demoitem} foo \page[yes] \demo{Otheritem} bar \page[yes] \demo{Otheritem} bar \page[yes] \stopregister[demo][demorange]%% = you’ll need to explicitly terminate the ranges so they can overlap \demo{Otheritem} bar \page[yes] \demo{Demoitem} foo \page[yes] \demo{Demoitem} foo \page[yes] Here’s the relevant bit: \placeregister [demo] [compress=yes] \stoptext Btw. have you read the small print: http://wiki.contextgarden.net/Registers#Tricks ? Regards Philipp -- () ascii ribbon campaign - against html e-mail /\ www.asciiribbon.org - against proprietary attachments pgpdyp5QGeuVi.pgp Description: PGP signature ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Registers with distinguishable entries.
On Thu, Apr 26, 2012 12:53:57 +0200, Philipp Gesang ges...@stud.uni-heidelberg.de wrote You want the ?compress? switch in placeregister, or indicate ranges with \{start,stop}register: \defineregister [demo] [demoes] \starttext \demo{Demoitem} foo \page[yes] \demo{Demoitem} foo \page[yes] %%% Here?s the range; should work without ?compress? \startregister[demo][demorange]{Demorange} \demo{Demoitem} foo \page[yes] \demo{Otheritem} bar \page[yes] \demo{Otheritem} bar \page[yes] \stopregister[demo][demorange]%% = you?ll need to explicitly terminate the ranges so they can overlap \demo{Otheritem} bar \page[yes] \demo{Demoitem} foo \page[yes] \demo{Demoitem} foo \page[yes] Here?s the relevant bit: \placeregister [demo] [compress=yes] \stoptext Btw. have you read the small print: http://wiki.contextgarden.net/Registers#Tricks ? Thank you, Philipp, This works perfectly. I had seen the small print in that page but had obviously not read it carefully enough. So two of my problems are solved, the main wish, to be able to make an index with distinguishable entries, is still unfulfilled, not only for me but for at least two others. Let's someone on the list can shine some light on that one too. Kind regards, Robert ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] footnotes rewritten
Am 22.02.2012 um 11:44 schrieb Thomas A. Schmitz: On 02/21/2012 09:24 PM, Steffen Wolfrum wrote: Am I the only one who uses footnotes ? ;o) Steffen No, I'm using footnotes too, and the current implementation is an absolute disaster. I get weird and unexpected behavior as well. 1. Footnotes are shifted to the following page. This puts a huge black triangle at the position of the footnote marker. I have no idea how to get rid of it, and I have no idea why this is the default behavior - nobody wants that in printed documents, I suppose? 2. Footnote numbers in the footnotes themselves are shifted one line down. Luckily, I still have 2011.11.29 around, which doesn't have these problems. Hans had warned about the current beta a few days ago; I hope things will calm down in the not-too-distant future... Unfortunately up to vers. 20120125 there is a bug when cite/index/startregister and bookmarks are used in a project. The first version that solved this bug was vers. 20120208 ... and this already introduced the new footnotes. The triangle can be switched of by \setupnote[symbolcommand=\gobbleoneargument], as Wolfgang knew. In general we'd need a comprehensive explanation what is new and what has to be changed. Steffen ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Multipages registers
Hello Wolfgang, thank you for your answer. It's not what I want. Let me explain : - when I join the registers to my presentation with \placeindex I obtain more than one slide ; - so, I would like to be able to split this register into two or more slides with something like this : \startslide \placeindex[a-k] \stopslide \startslide \placeindex[l-z] \stopslide Is this possible ? best regards, Pierre-François Bonnefoi. Wolfgang Schuster wrote : Am 01.09.2011 um 18:54 schrieb Pierre-François Bonnefoi: Hello, I would like to be able to spread a registers on several slides from my lecture notes, with the possibility to include some text at the beginning of each of these slides : first slide : title index entries next slides : title next index entries I've not found the way to do this. Can you be more concrete, it’s not clear what do you want. When you need a index entry which spans multiple pages you can write it with “\startregister[index][identifier]{entries} … \stopregister[index][identifier]”. Wolfgang -- Bonnefoi Pierre-Francois|E-mail : bonne...@unilim.fr Universite de Limoges, Laboratoire XLIM | Tel : 06 28 18 03 38 83, rue d'Isle | Mrs. Peel, we're needed... 87000 Limoges - FRANCE | The Avengers. smime.p7s Description: S/MIME cryptographic signature ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Multipages registers
Am 01.09.2011 um 18:54 schrieb Pierre-François Bonnefoi: Hello, I would like to be able to spread a registers on several slides from my lecture notes, with the possibility to include some text at the beginning of each of these slides : first slide : title index entries next slides : title next index entries I've not found the way to do this. Can you be more concrete, it’s not clear what do you want. When you need a index entry which spans multiple pages you can write it with “\startregister[index][identifier]{entries} … \stopregister[index][identifier]”. Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] register broken in latest beta!
Hi, todays beta gives an error with this test (taken from strc-reg.kmiv at line 35): \starttext \placeregister[index] test \index{aa} test \startregister[index][x]{bb} test \page test \page test \page test \stopregister[index][x] \stoptext ! LuaTeX error ...text/tex/texmf-context/tex/context/base/sort-ini.lua:106: attempt to compare nil with number stack traceback: ...text/tex/texmf-context/tex/context/base/sort-ini.lua:106: in function ...text/tex/texmf-context/tex/context/base/sort-ini.lua:105 ...text/tex/texmf-context/tex/context/base/sort-ini.lua:416: in function 'firstofsplit' ...text/tex/texmf-context/tex/context/base/strc-reg.lua:403: in function 'finalize' ...text/tex/texmf-context/tex/context/base/strc-reg.lua:427: in function 'analyzed' ...text/tex/texmf-context/tex/context/base/strc-reg.lua:789: in function 'process' main ctx instance:1: in main chunk. system error on line 8 in file index_ff.tex: LuaTeX error ... Greetings, Steffen BTW: I found three invalid characters (form feed?) in strc-reg.mkiv: at line 549, 568, 632. ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Tagged register
Hi, up to now one can use either collapsed registeres ... \placeregister[index][compress=yes] or tagged PDF ... \setupstructure[state=start] Otherwise there is an error (see below). Couldn't we also have both, or is this impossible by the logic of structure? (I have to admit, I never saw the combination of a tagged pdf with collapsed register ...) Steffen === ! Undefined control sequence. system error on line 26 in file Ohnee-Titel.tex: Undefined control sequence ... 16 \starttext 17 \placeregister[index][compress=yes] \blank[2*big] 18 \page 19 \dorecurse{10}{test 1:!\startregister[index]{test} test 20 \stopregister{} 21 \page} 22 \dorecurse{5} {test 2:\recurselevel \page} 23 \dorecurse{10}{test 3:!\startregister[index]{test} test 24 \stopregister{} 25 \page} 26\dorecurse{5} {test 4:\recurselevel \page} 27 \dorecurse{1} {test 5:!\startregister[index]{test} test 28 \stopregister{} 29 \page} 30 \dorecurse{5} {test 6:\recurselevel \page} 31 \dorecurse{10}{test 7:!\startregister[index]{test} test 32 \stopregister{} 33 \page} 34 \stoptext argument \t!registerpagerange \dododostarttagged ...a {structures.tags.start(#1 ,{ label = \dogetupsomet... \registerpagerange ...\t!registerpagerange \empty \dostarttagged \t!register... l.26 } \doplaceregister ...ameter \c!pagesegments , } )} \stoppacked \stopcolumns \... l.17 \placeregister[index][compress=yes] \blank[2*big] ? Process aborted ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] new beta (index)
On 24-9-2010 5:53, Steffen Wolfrum wrote: Am 22.09.2010 um 16:52 schrieb Hans Hagen: On 22-9-2010 3:22, Alan BRASLAU wrote: Nice, but something is broken (of course, my minimal examples work, but not my 700+ page test file!): (thanks to Taco, I now understand the luatex error message) hm, so some word in the index is triggering this ... no minimal example I guess btw: does the MkIV-structure-idea also provide an xml-alike start/stop for index marks? index termSchlüsselwort/term /index we have an experimental \setregisterentry [index] [specification][userdata] (I assume \startregister[index]{keyword}...\stopregister is meant for something different: a MkII command for index ranges?) those are ranges indeed Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] new beta (index)
Am 22.09.2010 um 16:52 schrieb Hans Hagen: On 22-9-2010 3:22, Alan BRASLAU wrote: Nice, but something is broken (of course, my minimal examples work, but not my 700+ page test file!): (thanks to Taco, I now understand the luatex error message) hm, so some word in the index is triggering this ... no minimal example I guess btw: does the MkIV-structure-idea also provide an xml-alike start/stop for index marks? index termSchlüsselwort/term /index (I assume \startregister[index]{keyword}...\stopregister is meant for something different: a MkII command for index ranges?) Steffen ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] some (older) problems
Hans Hagen mailto:pra...@wxs.nl wrote on Monday, August 17, 2009 7:56 PM: Thomas Floeren wrote: a) Floatcaptions are no longer placed: \externalfigure[dummy] \placefloatcaption[figure]{blabla} i didn't yet rewrite that bit of code b) \start...\stopregister results in an error: hmmpf\startregister[index][identifier]{Hmmpf}\page[yes] \dorecurse{2}{hmmpf\page[yes]} hmmpf\stopregister[index][identifier]\page[yes] \placeregister[index][compress=no] works ok in current version/beta c) I'm not able to build caption numbers with the chapter number as prefix: I want for example Fig. 2.6 where 2 is the chapter number and 6 the figure number by chapter. I tried all the options I found for setupcaptions (at least I think so), but I dont get the chapter number in the caption. LuaTeX, Version beta-0.40.5-2009061123 (Web2C 2009) ConTeXt ver: 2009.06.14 21:01 MKIV fmt: 2009.6.18 can you try the latest version Hans Same thing with LuaTeX, Version beta-0.42.0-2009081710 ConTeXt ver: 2009.08.17 19:06 MKIV fmt: 2009.8.18 int: english/english \chapter{Ch 1} \placefigure[here]{captiontext} -- should be 1.1, but gives 1 {\externalfigure[dummy]} \chapter{Ch 2} \placefigure[here]{captiontext} -- should be 2.1, but gives 1 {\externalfigure[dummy]} MkII works as expected Thomas _ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] some (older) problems
Hi, on 2009-06-18 there was a mail on the list with a collection of mkIV problems, a big part related to references and captions. (original text below) I just did a quick re-check with the actual minimals and lua, with the following result: Problems 2), 3) and b) are gone, problems 1), 4), 5), a) and c) are still there. I'm not sure if the remaining problems are due to bugs or rather a result of my poor comprehension of certain changes/new things in the mkIV code (especially c). Any help would be appreciated. Thomas This is LuaTeX, Version beta-0.42.0-2009081521 ConTeXt ver: 2009.08.16 18:21 MKIV fmt: 2009.8.17 int: english/english ---Original text: Author: Thomas Floeren Date: 2009-06-18 22:17 +200 To: mailing list for ConTeXt users Subject: Re: [NTG-context] Lots of problems in mkiv 2009/6/18, richard.steph...@??? richard.steph...@???: I've recently started using mkiv because of the fonts, but I have found lots of things that don't work. The trouble is, I don't know if it's just me, or whether I need to go back to mkii until things settle down. Can someone, PLEASE, tell me if they get any of the following problems with mkiv (I've included code snippets): Everything below works perfectly in mkii. 1) References to equations appear as '??' in the final document \placeformula[eq:pythag] \startformula a^2 = b^2 + c^2 \stopformula Pythagoras proposed \in{equation}[eq:pythag]. 2) References to footnotes appear as '??' inside \startlocalfootnotes...\stoplocalfootnotes \startlocalfootnotes This has a note.\footnote[fn]{Footnote.} See note \note[fn]. \stoplocalfootnotes 3) References to sections are repeated (e.g. reference to section 1 appears as '11' or ref to section 1.1 appears as '1.11.1') \section[sec:one]{Section one} It was in \in{section}[sec:one]. 4) \digits command falls over at periods or commas with \textfont1 is undefined (character 58). \digits{1.6} 5) \infull command does not work for abbreviations: falls over with Missing } inserted. \abbreviation {KF} {Kalman filter} Rudolph Kalman invented the \infull{KF}. Please help!! Richard Same thing here with 1,3,4,5. 2 works fine. I've noticed also 3 problems since I switched to MKIV: a) Floatcaptions are no longer placed: \externalfigure[dummy] \placefloatcaption[figure]{blabla} b) \start...\stopregister results in an error: hmmpf\startregister[index][identifier]{Hmmpf}\page[yes] \dorecurse{2}{hmmpf\page[yes]} hmmpf\stopregister[index][identifier]\page[yes] \placeregister[index][compress=no] c) I'm not able to build caption numbers with the chapter number as prefix: I want for example Fig. 2.6 where 2 is the chapter number and 6 the figure number by chapter. I tried all the options I found for setupcaptions (at least I think so), but I dont get the chapter number in the caption. LuaTeX, Version beta-0.40.5-2009061123 (Web2C 2009) ConTeXt ver: 2009.06.14 21:01 MKIV fmt: 2009.6.18 Thanks in advance for any hint Greetings Tom ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] some (older) problems
Thomas Floeren wrote: a) Floatcaptions are no longer placed: \externalfigure[dummy] \placefloatcaption[figure]{blabla} i didn't yet rewrite that bit of code b) \start...\stopregister results in an error: hmmpf\startregister[index][identifier]{Hmmpf}\page[yes] \dorecurse{2}{hmmpf\page[yes]} hmmpf\stopregister[index][identifier]\page[yes] \placeregister[index][compress=no] works ok in current version/beta c) I'm not able to build caption numbers with the chapter number as prefix: I want for example Fig. 2.6 where 2 is the chapter number and 6 the figure number by chapter. I tried all the options I found for setupcaptions (at least I think so), but I dont get the chapter number in the caption. LuaTeX, Version beta-0.40.5-2009061123 (Web2C 2009) ConTeXt ver: 2009.06.14 21:01 MKIV fmt: 2009.6.18 can you try the latest version Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Lots of problems in mkiv
2009/6/18, richard.steph...@converteam.com richard.steph...@converteam.com: I've recently started using mkiv because of the fonts, but I have found lots of things that don't work. The trouble is, I don't know if it's just me, or whether I need to go back to mkii until things settle down. Can someone, PLEASE, tell me if they get any of the following problems with mkiv (I've included code snippets): Everything below works perfectly in mkii. 1) References to equations appear as '??' in the final document \placeformula[eq:pythag] \startformula a^2 = b^2 + c^2 \stopformula Pythagoras proposed \in{equation}[eq:pythag]. 2) References to footnotes appear as '??' inside \startlocalfootnotes...\stoplocalfootnotes \startlocalfootnotes This has a note.\footnote[fn]{Footnote.} See note \note[fn]. \stoplocalfootnotes 3) References to sections are repeated (e.g. reference to section 1 appears as '11' or ref to section 1.1 appears as '1.11.1') \section[sec:one]{Section one} It was in \in{section}[sec:one]. 4) \digits command falls over at periods or commas with \textfont1 is undefined (character 58). \digits{1.6} 5) \infull command does not work for abbreviations: falls over with Missing } inserted. \abbreviation {KF} {Kalman filter} Rudolph Kalman invented the \infull{KF}. Please help!! Richard Same thing here with 1,3,4,5. 2 works fine. I've noticed also 3 problems since I switched to MKIV: a) Floatcaptions are no longer placed: \externalfigure[dummy] \placefloatcaption[figure]{blabla} b) \start...\stopregister results in an error: hmmpf\startregister[index][identifier]{Hmmpf}\page[yes] \dorecurse{2}{hmmpf\page[yes]} hmmpf\stopregister[index][identifier]\page[yes] \placeregister[index][compress=no] c) I'm not able to build caption numbers with the chapter number as prefix: I want for example Fig. 2.6 where 2 is the chapter number and 6 the figure number by chapter. I tried all the options I found for setupcaptions (at least I think so), but I dont get the chapter number in the caption. LuaTeX, Version beta-0.40.5-2009061123 (Web2C 2009) ConTeXt ver: 2009.06.14 21:01 MKIV fmt: 2009.6.18 Thanks in advance for any hint Greetings Tom ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] startregister produces strange page range (1-2-3)
Hi, I'm using ConTeXt 2008.10.31 (Mk II) from the Debian unstable packages. The live context (2009.03.06) produces a blank index with the pdftex engine, so I'm CC'ing Patrick in case that problem is separate. The context live is now 2009.04.28. I don't know if this helps, but at least it is now updated daily again. Patrick -- ConTeXt wiki and more: http://contextgarden.net ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] startregister produces strange page range (1-2-3)
Hi Sanjoy, I'm using ConTeXt 2008.10.31 (Mk II) from the Debian unstable packages. The live context (2009.03.06) produces a blank index with the pdftex engine, so I'm CC'ing Patrick in case that problem is separate. The context did not receive an update for quite some time. I will take a look into that on sunday. Patrick -- ConTeXt wiki and more: http://contextgarden.net ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] startregister produces strange page range (1-2-3)
With the following minimal file, the index entry for Knuth has the strange page range 1-2-3 rather than 1-2, 2-3. Adding \input knuth a few times in between the two start..stopregister stanzas gives a correct page range (so maybe that change hides the problem). I'm using ConTeXt 2008.10.31 (Mk II) from the Debian unstable packages. The live context (2009.03.06) produces a blank index with the pdftex engine, so I'm CC'ing Patrick in case that problem is separate. \starttext \startregister[index][Knuth]{Knuth} \dorecurse{5}{\input knuth } \stopregister[index][Knuth] \startregister[index][Knuth2]{Knuth} \dorecurse{5}{\input knuth } \stopregister[index][Knuth2] \completeindex \stoptext -Sanjoy ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] urgent index error
Am 29.09.2008 um 00:16 schrieb Wolfgang Schuster: Am 29.09.2008 um 00:00 schrieb Steffen Wolfrum: Hi, in my document I use utf-input. So do the index-marks: \enableregime[utf] \starttext START\startregister[index][umlautä]{Umlaute– ä} \input knuth END\stopregister[index][umlautä] \placeregister[index][compress=yes] \stoptext Just, this can't be typset: ! Missing \endcsname inserted. to be read again \char \dochar #1-\char #1\relax \setgvalue #1-\expandafter \gdef \csname #1 \endcsname \dostartregister ... \setgvalue {\??id #1\??id #2} {\dodostopregister [#1][#3... l.5 ...rtregister[index][umlautä]{Umlaute– ä} ? UTF in maintext but not in index-marks ... What can be done now (besides re-writting the document)? \startregister[index][umlautae]{...} ... \stopregister[index][umlautae] You could use umlauts in macro names only with XeTeX and LuaTeX but not with pdfTeX. strange... sure, you are right: no umlaut in macro names. only, I didn't consider it as a macro name, for it is written in the text (ie. the original doc-file) by the author, and thus in my consideration part of the text. some kind of hybrid, no? but as using pdfTeX can be totally avoided in near future it's all right with me. Steffen ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] urgent index error
Hi, in my document I use utf-input. So do the index-marks: \enableregime[utf] \starttext START\startregister[index][umlautä]{Umlaute– ä} \input knuth END\stopregister[index][umlautä] \placeregister[index][compress=yes] \stoptext Just, this can't be typset: ! Missing \endcsname inserted. to be read again \char \dochar #1-\char #1\relax \setgvalue #1-\expandafter \gdef \csname #1 \endcsname \dostartregister ... \setgvalue {\??id #1\??id #2} {\dodostopregister [#1][#3... l.5 ...rtregister[index][umlautä]{Umlaute– ä} ? UTF in maintext but not in index-marks ... What can be done now (besides re-writting the document)? Steffen (MKII) ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] urgent index error
Am 29.09.2008 um 00:00 schrieb Steffen Wolfrum: Hi, in my document I use utf-input. So do the index-marks: \enableregime[utf] \starttext START\startregister[index][umlautä]{Umlaute– ä} \input knuth END\stopregister[index][umlautä] \placeregister[index][compress=yes] \stoptext Just, this can't be typset: ! Missing \endcsname inserted. to be read again \char \dochar #1-\char #1\relax \setgvalue #1-\expandafter \gdef \csname #1 \endcsname \dostartregister ... \setgvalue {\??id #1\??id #2} {\dodostopregister [#1][#3... l.5 ...rtregister[index][umlautä]{Umlaute– ä} ? UTF in maintext but not in index-marks ... What can be done now (besides re-writting the document)? \startregister[index][umlautae]{...} ... \stopregister[index][umlautae] You could use umlauts in macro names only with XeTeX and LuaTeX but not with pdfTeX. Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] \index versus makeindex.
On Wed, Jul 23, 2008 at 2:50 PM, John Culleton [EMAIL PROTECTED] wrote: On Monday 21 July 2008 02:16:04 am Wolfgang Schuster wrote: On Fri, Jul 18, 2008 at 7:38 PM, John Culleton [EMAIL PROTECTED] wrote: Usually I use makeindex for indexing but for my current job I thought the Context \index command would be convenient. However I discovered that the \index command does not provide for page ranges. If I index the same item on pages 46, 47, 48, and 49 makeindex will collapse this into a range of 46-49. Context won't. I looked at the book.tuo file but it does not look like something I can hand-modify. Is there a work-around I have missed or must I revert to makeindex to get a proper index? I am ccing Hans because my posts don't seem to make their way to the list for some reason. Perhaps Comcast has torpedoed me once again. \placeindex[compress=yes] Regards, Wolfgang your suggestion to use compress=yes works well. Thanks. Such compression is essential in many works. Now I wonder if there is a Context command like eplain's range commands which occur in pairs: \sidx[begin]{foo} ... \sidx[end]{foo} The same effect in LaTeX is a bit more cryptic: \index{foo|(} ... \index{foo|)} Either form includes all the pages between the two commands as entries under foo, e.g., foo 24-68 \startregister[index][knuthrange]{knuth} ... \stopregister[index][knuthrange] Don't know why it is not possible to use \startindex ... \stopindex as short form for \startregister[index] ... \stopregister[index] This facility may exist but the Context manual is a bit hard to follow on indexing. The list has many example, you should use index, register or Steffen Wolfrum in the search field to find them. Regards, Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] startregister - stopregister
On Wed, Jul 2, 2008 at 1:46 PM, Steffen Wolfrum [EMAIL PROTECTED] wrote: Hi, converting a MSWord Doc file to TEI-XML gives me this kind of index range: anchor type=bookmark-start xml:id=Index216/ anchor type=bookmark-end corresp=#Index216/ indextermVerfassungsvertrag/term/index Unfortunately in ConTeXt the register entry is required the other way round: \startregister[index][knuthrange1]{Knuth} \stopregister[index][knuthrange1] Could it be possible also to provide something like ... \startregister[index][Index216] \stopregister[index][Index216]{Verfassungsvertrag} ... in mkii, please? You could use twopassdata to save then index entry in the first run and pass it to \startregister in the second run. Regards Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] startregister - stopregister
Hi, converting a MSWord Doc file to TEI-XML gives me this kind of index range: anchor type=bookmark-start xml:id=Index216/ anchor type=bookmark-end corresp=#Index216/ indextermVerfassungsvertrag/term/index Unfortunately in ConTeXt the register entry is required the other way round: \startregister[index][knuthrange1]{Knuth} \stopregister[index][knuthrange1] Could it be possible also to provide something like ... \startregister[index][Index216] \stopregister[index][Index216]{Verfassungsvertrag} ... in mkii, please? Steffen ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] ConTeXt-ifying Kile
] # \setuptextbackground \setuptextposition[name][settings] \setuptextrules[options] \setuptexttexts[text|margin|edge][text|section|date|mark|pagenumber][text|section|date|mark|pagenumber] \setuptextvariable[name][options] \setupthinrules[options] \setuptolerance[options] \setuptop[text|margin|edge][options] \setuptoptexts[text|margin|edge][text|section|date|mark|pagenumber][text|section|date|mark|pagenumber] \setuptype[options] \setuptyping[file|typing|name][options] \setupunderbar[options] \setupurl[options] \setupversions[options] \setupwhitespace[none|small|medium|big|line|fixed|fix|dimension] # \setvalue # \setvariables # \setxvalue # \setxvariables # \showaccents \showbodyfont[settings] \showbodyfontenvironment[settings] # \showcharacters \showcolor[name] \showcolorgroup[name][horizontal|vertical|name|value|number] \showexternalfigures[alternative=a|b|c] \showfields[names] # \showfont \showframe[text|margin|edge] \showgrid # \showgridboxes # \showgridsnapping \showlayout # \showlayoutcomponents \showmakeup \showpalet[name][horizontal|vertical|name|value] \showprint[typesetting papersize][printing papersize][settings] \showsetups \showstruts # \showstruts \showsymbolset[name] # \snaptogrid \someline[reference] \somewhere{text}{text}[reference] \sort[text]{text} \space \splitfloat[settings]{text}{text} # \splitstring # \SR # \start \stop # \start \stop \startalignment[width|left|right|middle|inner|outer|wide|broad|height|bottom|line|reset|hanging|nothanging|hyphenated|nothyphenated] \stopalignment # \startarabicpar \stoparabicpar # \startarabictext \stoparabictext # \startappendices \stopappendices \startbackground \stopbackground # \startbackmatter \stopbackmatter # \startbaselinecorrection \stopbaselinecorrection # \startblockquote \stopblockquote # \startbodymatter \stopbodymatter \startbuffer[name] \stopbuffer \startcolor[name] \stopcolor \startcolumns[settings] \stopcolumns \startcombination[matrix] \stopcombination \startcomment[name][settings] \stopcomment \startcomponent file \stopcomponent \startdescription{text} \stopdescription \startdocument[name] \stopdocument \startenumeration \stopenumeration \startenvironment file \stopenvironment \startfact\fact text \\ text \\ text \\\fact text \stopfact \startfigure[name][file][factor=number][frame=on|off] \stopfigure \startfloattext[left|right|high|middle|low|offset|tall][reference]{text}{text} \stopfloattext # \startFLOWcell \stopFLOWcell # \startFLOWchart \stopFLOWchart \startformula \stopformula # \startframedcontent \stopframedcontent \startframedtext[left|right|middle|none][settings] \stopframedtext # \startfrontmatter \stopfrontmatter # \starthanging \stophanging \starthiding \stophiding \startinteractionmenu[name] \stopinteractionmenu \startitemgroup[name][options][settings] \stopitemigroup # \startitemize \stopitemize # \startitemize \stopitemize # \startJScode \stopJScode # \startJSpreamble \stopJSpreamble # \startJSscripts \stopJSscripts \startlegend[two]\leg text \\ text \\ text \\\leg \stoplegend \startline[reference] \stopline \startlinecorrection \stoplinecorrection \startlinenumbering[continue] \stoplinenumbering \startlines \stoplines \startlocal \stoplocal \startlocalenvironment \stoplocalenvironment \startlocalfootnotes \stoplocalfootnotes # \startlocalsetups \stoplocalsetups \startmakeup[name][settings] \stopmakeup \startmarginblock \stopmarginblock \startmarginrule[number] \stopmarginrule # \startmode \stopmode # \startMPpage \stopMPpage \startnamemakeup \stopnamemakeup \startnarrower[left|middle|right] \stopnarrower # \startnointerference \stopnointerference # \startnotmode \stopnotmode \startopposite \stopopposite \startoverlay{text}{text} \stopoverlay \startoverview[names] \stopoverview \startpacked[blank] \stoppacked \startparagraph \stopparagraph \startpositioning \stoppositioning \startpostponing \stoppostponing \startproduct file \stopproduct \startprofile[names] \stopprofile \startproject file \stopproject \startquotation[left|middle|right] \stopquotation \startregister[text]{text+text+text} \stopregister # \startsetups \stopsetups # \startstandardmakeup \stopstandardmakeup \startsymbolset[name] \stopsymbolset \startsynchronization \stopsynchronization \starttable[text|name] \stoptable \starttables[text|name] \stoptables \starttabulate[text][settings] \stoptabulate # \startTEXpage \stopTEXpage # \starttext \stoptext # \starttextbackground \stoptextbackground # \starttextdata \stoptextdata \starttextrule[top|bottom]{text} \stoptextrule \starttyping \stoptyping \startunpacked \stopunpacked \startversion[numbers] \stopversion # \startXMLdata \stopXMLdata # \startXMLignore \stopXMLignore # \startXMLmapping \stopXMLmapping \stretched{text} # \strut # \strutdepth # \strutheight # \struttedbox \sub[references] \subject[references]{text} \subsection[references]{text} \subsubject[references]{text} \subsubsection[references]{text} \subsubsubject[references]{text} \switchtobodyfont[font settings] \switchtorawfont[name] \sym{text} \symbol[name][name
Re: [NTG-context] index questions - again
Thomas A. Schmitz wrote: On Mar 13, 2007, at 6:41 PM, Hans Hagen wrote: OK, I tried a hack, and I just wanted to ask if there's anything wrong with it: as dirty workaround, I added a fourth key to dostartregister: \def\startregister {\doquadrupleempty\dostartregister} \def\dostartregister[#1][#2][#3][#4]#5% {\chardef\registerpagestatus\plustwo \def\currentregister{#1}% \setgvalue{\??id#1\??id#2}{\dodostopregister[#1][#3]{#5}}% \dodoregister[#3]{#4}{#5}} and after a quick test, this seems to do what I want. The endash between numbers is not bold, but I could live with that. Any comments from the developers? looks harmless to me so we can patch that Hmm, I'm not quite sure I'm doing the right thing. I thought I could have 4 arguments in []: \startregister[name of register][key for range][type of register] [sort key]{register entry} but the [sort key] doesn't seem to work. The hack is OK for me now, but it may not be good for the distribution. \def\dostartregister[#1][#2][#3][#4]#5% % 3 args: #3 is sortkey {\chardef\registerpagestatus\plustwo % 4 args: #3 is type, #4 is sortkey \def\currentregister{#1}% \iffourarguments \setgvalue{\??id#1\??id#2}{\dodostopregister[#1][#4]{#5}}% \dodoregister[#4]{#3}{#5}% \else \setgvalue{\??id#1\??id#2}{\dodostopregister[#1][#3]{#5}}% \dodoregister[#3]{}{#5}% \fi} can you also provide the appropriate cont-en.xml entry Would like to, but comparing register to startregister, I don't see anything that has to be changed? cd:command name=register generated=yes file=core-reg.tex cd:sequence cd:variable value=register/ /cd:sequence cd:arguments cd:keywords optional=yes cd:constant type=cd:text/ /cd:keywords cd:index list=yes/ /cd:arguments /cd:command cd:command name=startregister generated=yes file=core-reg.tex cd:sequence cd:string value=start/ cd:variable value=register/ /cd:sequence cd:arguments cd:keywords optional=yes cd:constant type=cd:text/ /cd:keywords cd:index list=yes/ /cd:arguments /cd:command Best Thomas ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context -- - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] index questions - again
Thomas A. Schmitz wrote: On Mar 12, 2007, at 9:42 AM, Thomas A. Schmitz wrote: Hi, I'm sorry, this is the third time I'm asking this question, but I haven't been able to solve this, and the book is going to the publisher next month, so it's kind of urgent (I will sulk in Epen if this doesn't work :-) 1. I need to define a special type of register that will typeset page ranges in bold. I have a subindex that does that for single entries: \setupregister[index][imp][pagestyle=bold] which I invoke like \index[imp::]{modernity} and it works. How can I have the same thing for ranges? OK, I tried a hack, and I just wanted to ask if there's anything wrong with it: as dirty workaround, I added a fourth key to dostartregister: \def\startregister {\doquadrupleempty\dostartregister} \def\dostartregister[#1][#2][#3][#4]#5% {\chardef\registerpagestatus\plustwo \def\currentregister{#1}% \setgvalue{\??id#1\??id#2}{\dodostopregister[#1][#3]{#5}}% \dodoregister[#3]{#4}{#5}} and after a quick test, this seems to do what I want. The endash between numbers is not bold, but I could live with that. Any comments from the developers? looks harmless to me so we can patch that can you also provide the appropriate cont-en.xml entry - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] index questions - again
On Mar 13, 2007, at 6:41 PM, Hans Hagen wrote: OK, I tried a hack, and I just wanted to ask if there's anything wrong with it: as dirty workaround, I added a fourth key to dostartregister: \def\startregister {\doquadrupleempty\dostartregister} \def\dostartregister[#1][#2][#3][#4]#5% {\chardef\registerpagestatus\plustwo \def\currentregister{#1}% \setgvalue{\??id#1\??id#2}{\dodostopregister[#1][#3]{#5}}% \dodoregister[#3]{#4}{#5}} and after a quick test, this seems to do what I want. The endash between numbers is not bold, but I could live with that. Any comments from the developers? looks harmless to me so we can patch that Hmm, I'm not quite sure I'm doing the right thing. I thought I could have 4 arguments in []: \startregister[name of register][key for range][type of register] [sort key]{register entry} but the [sort key] doesn't seem to work. The hack is OK for me now, but it may not be good for the distribution. can you also provide the appropriate cont-en.xml entry Would like to, but comparing register to startregister, I don't see anything that has to be changed? cd:command name=register generated=yes file=core-reg.tex cd:sequence cd:variable value=register/ /cd:sequence cd:arguments cd:keywords optional=yes cd:constant type=cd:text/ /cd:keywords cd:index list=yes/ /cd:arguments /cd:command cd:command name=startregister generated=yes file=core-reg.tex cd:sequence cd:string value=start/ cd:variable value=register/ /cd:sequence cd:arguments cd:keywords optional=yes cd:constant type=cd:text/ /cd:keywords cd:index list=yes/ /cd:arguments /cd:command Best Thomas ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] index questions - again
On Mar 12, 2007, at 9:42 AM, Thomas A. Schmitz wrote: Hi, I'm sorry, this is the third time I'm asking this question, but I haven't been able to solve this, and the book is going to the publisher next month, so it's kind of urgent (I will sulk in Epen if this doesn't work :-) 1. I need to define a special type of register that will typeset page ranges in bold. I have a subindex that does that for single entries: \setupregister[index][imp][pagestyle=bold] which I invoke like \index[imp::]{modernity} and it works. How can I have the same thing for ranges? OK, I tried a hack, and I just wanted to ask if there's anything wrong with it: as dirty workaround, I added a fourth key to dostartregister: \def\startregister {\doquadrupleempty\dostartregister} \def\dostartregister[#1][#2][#3][#4]#5% {\chardef\registerpagestatus\plustwo \def\currentregister{#1}% \setgvalue{\??id#1\??id#2}{\dodostopregister[#1][#3]{#5}}% \dodoregister[#3]{#4}{#5}} and after a quick test, this seems to do what I want. The endash between numbers is not bold, but I could live with that. Any comments from the developers? 2. Another index question: I have several seeindex entries. They work, but the publisher doesn't want a linebreak, and they want see in italics. SO instead of lisible see readerly they want lisible *see* readerly Can this be configured, or can I hack core-reg.tex (and how?). Any chances to know more about this? Best Thomas ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] register fine tuning
On Oct 25, 2006, at 10:45 PM, Hans Hagen wrote: in mkiv there will be more control because we may move index handling in mem Hans OK, since we're speaking of registers, may I repeat my question from last weekend and add something that could be a bug? First, here's the question: I have defined a special index which will typeset numbers in bold: \setupregister[index][imp][pagestyle=bold] which I invoke like \index[imp::]{modernity} How can I get a register range to use this special style? I tried something like \startregister[imp][signi][signifie]{\em signifié} but get errors missing csname. What am i overlooking? And then the bug: I want a \seeindex entry to be typeset in italics, but there seems to be a problem; I get this error message: Runaway argument? {\noexpand \gdef \noexpand \dosplitofffoliopart [1 \sectionseparator \ETC. ! File ended while scanning use of \aftersplitstring. inserted text \par to be read again \relax \dodoreadfile ...\preprocesssuffix \or \fi \relax \the \everyafterreadfile \emphasislook ...beginrobusttest \futurelet \next \emphasistest \doifelsenothing #1-\edef \!!stringa {#1 }\ifx \!!stringa \empty \expandafte... \dolimitatetext #1#2-\doifelsenothing {#1} {\unhbox \nextbox } {\nopenaltie... ... l.40 \registersee{index}{,}{two}{2--0-0-0-0-0-0-0} ! Missing number, treated as zero. to be read again \begingroup \emphasislook -\begingroup \beginrobusttest \futurelet \next \emphasistest argument ...s \scratchdimen \emphasiscorrection \relax \ifdim \scratchdime... \secondoftwoarguments #1#2-#2 \dolimitatetext ...fi \else \unhbox \nextbox \fi } \egroup \limitatetext ...ormallimitatetext {#1}\leftlimit {#3}\else \speciallimitate... ... l.40 \registersee{index}{,}{two}{2--0-0-0-0-0-0-0} ! Illegal unit of measure (pt inserted). to be read again \begingroup \emphasislook -\begingroup \beginrobusttest \futurelet \next \emphasistest argument ...s \scratchdimen \emphasiscorrection \relax \ifdim \scratchdime... \secondoftwoarguments #1#2-#2 \dolimitatetext ...fi \else \unhbox \nextbox \fi } \egroup \limitatetext ...ormallimitatetext {#1}\leftlimit {#3}\else \speciallimitate... ... l.40 \registersee{index}{,}{two}{2--0-0-0-0-0-0-0} ) minimal test file: \starttext one\seeindex[one]{\em one}{two} \seeindex[Latex]{\LaTeX}{one}\LaTeX\ \index{two}two \page \placeregister[index] \stoptext Thanks for any help! Thomas ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] index question
I couldn't find anything on the wiki or in the documentation: I have defined a special index which will typeset numbers in bold: \setupregister[index][imp][pagestyle=bold] which I invoke like \index[imp::]{modernity} How can I get a register range to use this special style? I tried something like \startregister[imp][signi][signifie]{\em signifié} but get errors missing csname. What am i overlooking? Thanks Thomas ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] index page range bug
Jason wrote: When using startregister/stopregister commands, if the range is only one one page, then while both a [f] and a [t] are written to the tui file, only one \registerfrom command is put in the tuo file. If there is only one range, it seems like the software deals with it nicely. However, if there are two ranges (like in the example below), then the index incorrectly assumes that the first \registerfrom command in the tuo file corresponds to the \registerto command. Aha! Great work tracking this down Jason, I have been bitten by this bug many times in the past but not been able to isolate it. It would be really great if this could be fixed in the ruby script. Duncan ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] index page range bug
Hans (or whoever could change this), When using startregister/stopregister commands, if the range is only one one page, then while both a [f] and a [t] are written to the tui file, only one \registerfrom command is put in the tuo file. If there is only one range, it seems like the software deals with it nicely. However, if there are two ranges (like in the example below), then the index incorrectly assumes that the first \registerfrom command in the tuo file corresponds to the \registerto command. Here's an example test.tex: \setuppapersize [letter][letter] \starttext \input knuth KNUTH START\startregister[index][knuthrange1]{Knuth} \input knuth KNUTH END\stopregister[index][knuthrange1] \dorecurse{10}{\input zapf } KNUTH START\startregister[index][knuthrange2]{Knuth} \dorecurse{10}{\input knuth } KNUTH END\stopregister[index][knuthrange2] \completeindex \stoptext test.tui: r f {index} {1} {} {Knuth} {2--0-0-0-0-0-0-0--1} {1} r t {index} {2} {} {Knuth} {2--0-0-0-0-0-0-0--1} {1} r f {index} {3} {} {Knuth} {2--0-0-0-0-0-0-0--3} {3} r t {index} {4} {} {Knuth} {2--0-0-0-0-0-0-0--5} {5} test.tuo: \registerentrya{index}{Knuth} \registerfrom{index}{,}{1}{2--0-0-0-0-0-0-0--1}{1} \registerfrom{index}{,}{3}{2--0-0-0-0-0-0-0--3}{3} \registerto{index}{,}{4}{2--0-0-0-0-0-0-0--5}{5} and the index reads Knuth 1--5, but it should read Knuth 1, 3--5 My guess is the problem lies in the line in texutil.rb: if copied || ! ((lastpage == entry.page) \ (lastrealpage == entry.realpage)) then (sorry, that was one line before my mail program wrapped it). Since the ending [t] reference for the first \stopregister command is on the same page as the first one, the whole section outputting a \registerto command to the tuo file is skipped. Instead, how about making the code check to see if we have a range that ends on the same page as it started? If it does, then just insert a \registerpage command instead of a \registerfrom command. I've corrected this in the perl version (I had an old version of ConTEXt before today, otherwise I would have worked on the ruby version). I also added support for nesting ranges, which I then discovered weren't supported anyway. (I also had to change the sort order on @RegisterEntries so that [f] and [t] entries would be consecutive, instead of all the [f] entries preceding the [t] entries, but it looks like that was fixed already). Here's my code from the perl texutil (with a bunch of comments from me): { # print $LastPage / $Page // $LastRealPage / $RealPage\n ; $NextEntry = {$Class}{$PreviousA}{$PreviousB}{$PreviousC}{$PageHow,$TextHow} ; $SavedLine = {$Class}{$PageHow,$TextHow}{$Location}{$Page}{$RealPage}\n ; # If we are starting a new level, start our nesting over. # This will completely ignore the last non-properly # nested result in the previous heading. if($Copied) { $NestingLevel=0; $TopLevelFromPage=; $TopLevelFromRealPage=; $TopLevelFromLine=; } if ($RegisterState eq $RegStat{f}) # If we are starting a range { FlushSavedLine ; if($NestingLevel eq 0) { $TopLevelFromLine=$SavedLine; $TopLevelFromPage=$Page; $TopLevelFromRealPage=$RealPage; } $NestingLevel++; } elsif ($RegisterState eq $RegStat{t}) # If we are ending a range { FlushSavedLine ; $NestingLevel--; if($NestingLevel = 0) { if((($Page eq $TopLevelFromPage) and ($RealPage eq $TopLevelFromRealPage)) or $NestingLevel 0) { print TUO \\registerpage$SavedLine ; } else { print TUO \\registerfrom$TopLevelFromLine ; print TUO \\registerto$SavedLine ; } $NestingLevel = 0 ; $TopLevelFromPage=; $TopLevelFromRealPage=; $TopLevelFromLine=; } } else # If we have a normal single entry { if ($CollapseEntries) { if ($SavedEntry ne $NextEntry) { $SavedFrom = $SavedLine } else { $SavedTo = $SavedLine } $SavedEntry = $NextEntry } else { print TUO \\registerpage$SavedLine } } Of course, if I've missed something, please let me know. I've only started using ConTEXt in the last few weeks. I needed grid typesetting for a book I was working on and I was getting tired of LaTeX not helping me there. I've absolutely loved working with ConTEXt
[NTG-context] register ranges
Hi all, I must be obtuse, but I can't find the answer to this easy question: to define a register range, I was using this: \startregister[index]{Menippean} \stopregister[index] and it works. However, when I try to replace [index] with my own key (because I have overlapping ranges) \startregister[satire]{Menippean} \stopregister[satire] I get errors: ERROR: Missing \endcsname inserted. --- TeX said --- to be read again \@@idsatkeyexpansion \convertexpanded ... \csname \s!do \c!expansion #1 \endcsname \relax \s!defau... \doprocesspageregister ...#1}\asciiregisterentryA \convertexpanded {\registe... \dodogotopar ...ageregister []{}{Menippean satire} \ifvmode \nobreak \fi to be read again \index l.567 \index [imp::spoudogeloion]{\localgreek{spoudog'eloion}} ``serio|-|comi... --- HELP --- From the .log file... The control sequence marked to be read again should not appear between \csname and \endcsname. Is there some \define something that I'm missing? Thanks Thomas ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] register ranges
Thomas A. Schmitz wrote: Hi all, I must be obtuse, but I can't find the answer to this easy question: to define a register range, I was using this: \startregister[index]{Menippean} \stopregister[index] and it works. However, when I try to replace [index] with my own key (because I have overlapping ranges) \startregister[satire]{Menippean} \stopregister[satire] Are you sure that you have defined that register (\defineregister)? Cheers, Taco ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] register ranges
On Feb 23, 2006, at 12:10 PM, Duncan Hothersall wrote: Hi Thomas. The first [...] in the \startregister command is the name of the register itself, then there is a second one for the sort key/range identifier. So you want: \startregister[index][Menippean]{Menippean} \stopregister[index][Menippean] and then you can have \startregister[index][Menippean1]{Menippean} \stopregister[index][Menippean1] as well. Hope that helps. Duncan Duncan, thanks, that helped a lot! I will add a line to the wiki with your explanation, if you don't mind... Thanks, and best Thomas ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] register ranges
\startregister[index]{Menippean} \stopregister[index] and it works. However, when I try to replace [index] with my own key (because I have overlapping ranges) \startregister[satire]{Menippean} \stopregister[satire] I get errors: ... Hi Thomas. The first [...] in the \startregister command is the name of the register itself, then there is a second one for the sort key/range identifier. So you want: \startregister[index][Menippean]{Menippean} \stopregister[index][Menippean] and then you can have \startregister[index][Menippean1]{Menippean} \stopregister[index][Menippean1] as well. Hope that helps. Duncan ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Index
Hans, many thanks for the recent fixes on index sorting in the new ruby scripts. Can I offer another test file in which some errors still show up, in the hope that these too can be ironed out? The following shows two problems, culled from a much bigger project. It should be clear from the output what the problems are, but basically 1. there are three separate spans (\startregister...\stopregister pairs) with the same term content (these three separate spans coalesce) which get coalesced into one strange a-b-c-d span, despite having been given different sort keys (I added numbers to the end of the sort keys to differentiate them). 2. there are three refs and a span all with the same term content (these mixed refs and spans are in the wrong order), and they get sorted into the wrong order in the output (the span comes before the refs, despite coming after in page order). So in my output, my index page at the back has the following content: these mixed refs and spans are in the wrong order 1/12–1/13, 1/2, 1/10, 1/14 these three separate spans coalesce 1/1–1/2–1/5–1/7 whereas what I'd hope to see is: these mixed refs and spans are in the wrong order 1/2, 1/10, 1/12–1/13, 1/14 these three separate spans coalesce 1/1–1/2, 1/3–1/5, 1/6–1/7 Really hope you can hammer out these two bugs, it would really help me! Thanks, Duncan \defineregister[Index][Indices] \setupregister[Index][2,balance=no,distance=1em,partnumber=no,chapternumber=yes,pagestyle=,separator=/,indicator=no] \starttext \startbodymatter \setuppagenumbering[state=start,alternative={singlesided,doublesided}, location=bottom,way=bychapter,partnumber=no, chapternumber=yes,numberseparator={/}] \chapter{Economic Concepts, Issues and Tools} \input knuth\par {\bf ttssc span 1 starts} \startregister[Index][these three separate spans coalesce1]{these three separate spans coalesce}% \dorecurse{4}{\input knuth\par} {\bf ttssc span 1 stops} \stopregister[Index][these three separate spans coalesce1]% \input knuth {\bf tmrasaitwo ref 1} \Index[these mixed refs and spans are in the wrong order1]{these mixed refs and spans are in the wrong order}% \dorecurse{4}{\input knuth\par} {\bf ttssc span 2 starts} \startregister[Index][these three separate spans coalesce2]{these three separate spans coalesce}% \dorecurse{8}{\input knuth\par} {\bf ttssc span 2 stops} \stopregister[Index][these three separate spans coalesce2]% \dorecurse{4}{\input knuth\par} {\bf ttssc span 3 starts} \startregister[Index][these three separate spans coalesce3]{these three separate spans coalesce}% \dorecurse{5}{\input knuth\par} {\bf ttssc span 3 stops} \stopregister[Index][these three separate spans coalesce3]% \dorecurse{8}{\input knuth\par} \input knuth {\bf tmrasaitwo ref 2} \Index[these mixed refs and spans are in the wrong order2]{these mixed refs and spans are in the wrong order}% \dorecurse{8}{\input knuth\par} {\bf tmrasaitwo span 1 starts} \startregister[Index][these mixed refs and spans are in the wrong order3]{these mixed refs and spans are in the wrong order}% \dorecurse{4}{\input knuth\par} {\bf tmrasaitwo span 1 stops} \stopregister[Index][these mixed refs and spans are in the wrong order3]% \dorecurse{4}{\input knuth\par} \input knuth {\bf tmrasaitwo ref 3} \Index[these mixed refs and spans are in the wrong order4]{these mixed refs and spans are in the wrong order}% \dorecurse{3}{\input knuth\par} \stopbodymatter \startbackmatter \chapter{Index} \setuppagenumbering[numberseparator=/]\placeIndex\page[yes] \stopbackmatter \stoptext ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Index
Hans Hagen wrote: Thomas A. Schmitz wrote: ... it's still missing a few features (I don't think it can post-process pdf-files yet) and has a few buglets... it should at least i remember writing some code -) Here is an old example: \defineregister[Name][Names] \setupregister[Name][pagestyle=\it] \setupregister[Name][bf][pagestyle=\bf] \starttext Names: \Name[bf::]{Hans} \Name{Taco} \startregister[Name][bf::]{Patrick} \page[yes] \Name{Hans} \stopregister[Name][bf::]{Patrick} \page[yes] \Name{Patrick} \placeregister[Name] \stoptext -- Regrettably, I have now no time to install and check the new version of newtexexec.rb, so perhaps it is already done. Please, for quick check focus on 'Patrick' entry, it should have 1--2, 3 page numbers. Or more complex example: \defineregister[Name][Names] \setupregister[Name] \setupregister[Name][bf][pagestyle=\bf] \starttext Names: \Name{Patrick} \Name[bf::]{Hans} \Name{Taco} \startregister[Name][bf::]{Patrick} \page[yes] \Name{Patrick} \page[yes] \Name{Hans} \stopregister[Name][bf::]{Patrick} \placeregister[Name] \stoptext -- Possible variants: 1) Patrick 1, 2, {\bf 1--3} 2) Patrick {\bf 1--3}, 1, 2 3) Patrick 1--2, {\bf 1--3} 4) Patrick {\bf 1--3}, 1--2 in case of variants 1 v. 2 and 3 v. 4 I am not sure how the categories 'empty_string' and bf are sorted. But it does not matter since user can set any category name. variants 3, 4 should be set if some register option (coupling?) is set on vit ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Index
\fi argument ...}[2::0:0:0:0:0:0:0]\ifnum 1=2\/\fi } }\gotonextinternal {\s!ind... ... l.46 ...isterpage{index}{,}{3}{2::0:0:0:0:0:0:0}{} and have this in the index: see This, :0]– After that, the .tuo file will be messed up, you have to delete it to make the document compile again. For the bug with ranges: \starttext \index{This} This \page \startregister[index]{This} and \page that \page again \stopregister[index]{This} \page \index{This} This \index{and} and \seeindex{That}{This} That. \page \placeindex \stoptext Will only have This 2-4 in the index, the other pages are ignored. All best, and thanks so much Hans Thomas ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Bug / feature request tracking
Taco, great to have your bug collector, and let's hope it'll be a bug squasher before long... I had submitted a couple of bugs and feature requests for the index command that don't seem to be resolved and which didn't make it to your list. I'd say they are fairly critical because they will really mess up index generation: 1. index ranges inserted via \startregister[index] will gobble all other entries for the term; 2. \seeindex gives an error and will foul up the .tui file when processed with newtexexec; 3. again with newtexexec: capital letters at the beginning of terms are disregarded for the index, thus Taco will be sorted under a. 4. and a feature request: it would be good to have some formatting options like LaTeX makeidx offers: \index{keyword|textit} will produce a page-number in italics in the register. That would be immensely useful to produce a structured index. All best Thomas On Nov 7, 2005, at 6:50 PM, Taco Hoekwater wrote: Hi all, Some of you may be aware of the fact that there is a bug / feature request tracker for ConTeXt. The URL is: http://context.literatesolutions.com/collector I have to do a call-to-arms for the people that have made feature requests and / or found bugs in the past few months, especially if the extension /solution has not been included in the latest distribution (2005.10.27). Will you all please have a look at the current list, and see if I have added your item(s) already? I have a rather large archive of context-related email (because I let it slip for a while), and I fear that may have missed some extant bugs. This is quite important, because if it is not in the list, it is much less likely to get fixed. Greetings, Taco ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Bug / feature request tracking
Thomas A. Schmitz wrote: Taco, great to have your bug collector, and let's hope it'll be a bug squasher before long... I had submitted a couple of bugs and feature requests for the index command that don't seem to be resolved and which didn't make it to your list. I'd say they are fairly critical because they will really mess up index generation: 1. index ranges inserted via \startregister[index] will gobble all other entries for the term; 2. \seeindex gives an error and will foul up the .tui file when processed with newtexexec; 3. again with newtexexec: capital letters at the beginning of terms are disregarded for the index, thus Taco will be sorted under a. Yes, I agree. 4. and a feature request: it would be good to have some formatting options like LaTeX makeidx offers: \index{keyword|textit} will produce a page-number in italics in the register. That would be immensely useful to produce a structured index. This is already present in the ConTeXt even in more general way then in the LaTeX is. More info in the manual. vit All best Thomas On Nov 7, 2005, at 6:50 PM, Taco Hoekwater wrote: Hi all, Some of you may be aware of the fact that there is a bug / feature request tracker for ConTeXt. The URL is: http://context.literatesolutions.com/collector I have to do a call-to-arms for the people that have made feature requests and / or found bugs in the past few months, especially if the extension /solution has not been included in the latest distribution (2005.10.27). Will you all please have a look at the current list, and see if I have added your item(s) already? I have a rather large archive of context-related email (because I let it slip for a while), and I fear that may have missed some extant bugs. This is quite important, because if it is not in the list, it is much less likely to get fixed. Greetings, Taco ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Index
In theory, you can say \startregister[index]{great+topic} and \stopregister[index]{great+topic} and this will do what you want. However, this is one of several bugs in the index module of ConTeXt: this will print just this range and gobble all other entries in the index for great/topic. I wrote a note to the list about these bugs about a week ago, but there were no replies. I guess if there are two of us and we yell loud enough, Hans will hear us eventually :-) Best Thomas On Oct 15, 2005, at 10:44 PM, Olivier wrote: Hi, is there a mechanism so that on is able to say \index[start from here]{great+topic} % we are on p3 blabla much material \index[stop there]{great+topic} % we are on p7 and the index will advertise the topic as great topic 3-7 Of course I don't want to put an \index at every page (I don't even know the page break when looking at the source file ;) This feature is especially nice when defining a concept in a manual. Many thanks in advance, Olivier ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Index
Quoting Thomas A. Schmitz : -- was [EMAIL PROTECTED] on Oct 16, 2005 at 12:11:31 -- In theory, you can say \startregister[index]{great+topic} and \stopregister[index]{great+topic} Many thanks Thomas, that's what I was looking for :)) and this will do what you want. However, this is one of several bugs in the index module of ConTeXt: this will print just this range and gobble all other entries in the index for great/topic. You're right, a quick test demonstrated the bug. However, the .tui contained r f {index} {108} {} {great+topic} {2--0-9-1-1-0-0-0--101} {111} r t {index} {109} {} {great+topic} {2--0-9-1-1-0-0-0--102} {112} c \listentry{subsubsection}{110}{}{A section}{2--0-9-1-2-0-0-0--102}{112} c \mainreference{}{eq:aneq}{2--0-9-1-2-0-0-0--102}{112}{37} r e {index} {111} {} {great+topic} {2--0-9-1-2-0-0-0--103} {113} and the .tuo % % TeXUtil 9.0.0 - ConTeXt / PRAGMA ADE 1992-2004 / Registers % \registerentry{index}{a} \registerentrya{index}{astonishing} \registerentryb{index}{bug} \registerpage{index}{,}{113}{2--0-9-1-3-0-0-0--103}{113} \registerentry{index}{g} \registerentrya{index}{great} \registerentryb{index}{topic} \registerfrom{index}{,}{108}{2--0-9-1-1-0-0-0--101}{111} \registerpage{index}{,}{111}{2--0-9-1-2-0-0-0--103}{113} \registerto{index}{,}{109}{2--0-9-1-1-0-0-0--102}{112} When swapping the two last lines in the .tuo and running texexec --once make it print the index great topic 101-102, 103 which is not that nice (should have been merged into 101-103), but recovered the missing file. In the texutil script there seems to be only sorting on entries' labels and no further sorting with the page number because it sorts this string join($JOIN,$Class,$LCKey,$Key,$Entry,$TextHow,$RegStatus, $RealPageNumber,$Location,$Page,$PageHow,$SeeToo) What about using a hash instead of a string to handle the register entries' information so that it will be easier to handle the page ranges after having sorted the labels? I wrote a note to the list about these bugs about a week ago, but there were no replies. I guess if there are two of us and we yell loud enough, Hans will hear us eventually :-) I'm with you :)) By the way, this may benefit Taco's bibmodule when implementing the backtracking referencing mechanism... Greetings, Olivier ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Elided page numbers in registers
Duncan Hothersall wrote: On 31 Aug I wrote: I have page ranges in my index, such as 1/1-1/3, or 2/24-2/26. I would like these ranges to be elided - in other words, the first one would read 1/1-3 (remove repeated chapter number), and the second would read 2/24-6 (remove repeated chapter number and also the repeated 2 in page number). Question: is there an already existing system to do this? I guess no :-) Followup: I would be willing to help to code this if it doesn't exist (I have some experience with such systems) if someone can point me at the right bit of code to look at (things seem to be changing around texutils, newtexexec etc. so I don't want to start at the wrong place). Sorry to be a pain, but can anyone help with this? I'm converting a legacy system, in which everything (cross referencing, tables of contents, indices) was hand-coded in plain tex and Perl, across to ConTeXt. The advantage of having hand-coded the indexing stuff was that I could easily add features like eliding, or funny sort orders. I now need to reproduce the same output. I suspect I could apply the same techniques to the ConTeXt code, but I don't want to embark on a fool's errand if (a) it's already done somewhere, or My experience: It is not implemented in (old) texutil.pl. It is even not implemented in simpler only-page-number case. In the code there is secret switch '$CollapseEntries', by default it is off. Switching manually on leads to all index page entries collaps to one (generally noncontinuous) range. The same sad result you obtain if you use startregister...stopregister pair. If you know Perl it is not difficult to insert such stuff for one application. It is very difficult to create a general solution. I have no (positive and deep) experience with new ruby texutil equivalent. vit (b) the code I hack is about to be replaced. Thanks, Duncan ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context -- === Ing. Vít Zýka, Ph.D. TYPOkvítek database publishing databazove publikovani data maintaining and typesetting in typographic quality priprava dat a jejich sazba v typograficke kvalite tel.: (+420) 777 198 189 www: http://typokvitek.com === ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] Register page ranges
Bug or feature? In a register (such as the index), a command like \index[key]{entry} creates an index entry sorted as 'key', and there exists also \startregister[key]{entry} ... \stopregister[key] which creates a page range. As far as I can tell, the [key] here plays two roles - the ID of the range, and the sort key. Problems arise if a publication contains more than one range with the same key - the system ends up thinking it is one long range and you get output like entry 1-2-8-9 instead of entry 1-2, 8-9. One solution here is to simply add a number to the end of the key, so that the first range becomes [key1] and the second [key2]. This corrects the output. So I guess my question is, is this a bug or a feature? It had me confused for a while... Thanks, Duncan ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Elided page numbers in registers
Duncan Hothersall wrote: Another question on registers (just getting into indexing!). I have a book which numbers its pages by chapter, and so page numbers are 1/1, 1/2 ... for the pages of chapter 1, and then 2/1, 2/2 ... for the pages of chapter 2. I have page ranges in my index, such as 1/1-1/3, or 2/24-2/26. I would like these ranges to be elided - in other words, the first one would read 1/1-3 (remove repeated chapter number), and the second would read 2/24-6 (remove repeated chapter number and also the repeated 2 in page number). Question: is there an already existing system to do this? I guess no :-) And I add one more related question: Is it possible to mix \start...\stopregister with just \register? According to this minimal example not. If there is not some secret for me, can it be extended? Please, focus on Duncan: -- \defineregister[Name][Names] \setupregister[Name][pagestyle=\it] \setupregister[Name][bf][pagestyle=\bf] \starttext Names: \Name[bf::]{Hans} \Name{Taco} \startregister[Name][bf::]{Duncan} \page[yes] \Name{Hans} \stopregister[Name][bf::]{Duncan} \page[yes] \Name{Duncan} \placeregister[Name] \stoptext -- Thanks vit Followup: I would be willing to help to code this if it doesn't exist (I have some experience with such systems) if someone can point me at the right bit of code to look at (things seem to be changing around texutils, newtexexec etc. so I don't want to start at the wrong place). Thanks... Duncan ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context -- === Ing. Vít Zýka, Ph.D. TYPOkvítek database publishing databazove publikovani data maintaining and typesetting in typographic quality priprava dat a jejich sazba v typograficke kvalite tel.: (+420) 777 198 189 www: http://typokvitek.com === ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] Urgent index problem
I am one night from a deadline and I have just noticed that my index is silently ignoring some entries... Help!! The following demonstrates the problem (tested on live.contextgarden.net): -- \starttext \startregister[index]{this term+in+particular} This term is discussed from the start of this page.\page[yes] Some more text about the term, and another page.\page[yes] And the end of the info about that term. \stopregister[index]{this term+in+particular}\page[yes] A page unrelated to that term.\page[yes] \index{this term+in+particular} And then another page on exactly the same term.\page[yes] \placeindex\page[yes] Disaster! The entry on page 5 has been eaten! \stoptext -- So we have the same terms referenced as a span over pages 1 to 3, and as a single entry on page 5. But only the span appears, not the second entry! The .tuo file contains: \registerentry{index}{t} \registerentrya{index}{this term} \registerentryb{index}{in} \registerentryc{index}{particular} \registerfrom{index}{,}{1}{2::0:0:0:0:0:0:0::1}{1} \registerpage{index}{,}{3}{2::0:0:0:0:0:0:0::5}{5} \registerto{index}{,}{2}{2::0:0:0:0:0:0:0::3}{3} so it looks like the sorting of these by page numbers has broken, and ConTeXt thinks that page 5 is between pages 1 and 3. I hope someone can help... Duncan ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Urgent index problem
I wrote: -- \starttext \startregister[index]{this term+in+particular} This term is discussed from the start of this page.\page[yes] Some more text about the term, and another page.\page[yes] And the end of the info about that term. \stopregister[index]{this term+in+particular}\page[yes] A page unrelated to that term.\page[yes] \index{this term+in+particular} And then another page on exactly the same term.\page[yes] \placeindex\page[yes] Disaster! The entry on page 5 has been eaten! \stoptext -- I realise that there is a workaround for the sample above, using the literal ASCII string in [] which makes this specific example work. Unfortunately this doesn't make everything work correctly in a larger document. I'm now seeing two other specific behaviours as well: 1. When there is a range and a single entry, the range is sometimes listed first in the index, even if the single entry is many pages before it - i.e. 282-283, 170 2. On other occasions where a range and a single entry exist, I end up having a strange three-way range in the index - like 282-283-349. The last reference should be just a single one on its own. It's really difficult to post a minimal file for these because they only occur when the whole text is processed (several hundred pages). I have just synchronised my tree this morning and no difference is made. Any help, especially today, VERY gratefully received. Duncan ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context