Hello, I have a multiple component document that uses \definesynonym. If I build a single component then \placelistofsynonyms with a criterium of "used" performs as expected. But when I run the whole project each \placelistof... displays the list of synonyms used in the entire document. I need to have a common file of synonyms, and place the list of just those used in each chapter, not the entire document.
From what I can tell from the source code, \placelistof... can only show all or used. It does not have a criterium of "chapter" or a reset command available. So what can I do?
(I know you prefer a minimal example, but that would require at least three files, and I'm typing on my tablet, which is very slow.) Thanks. -- Chris Kennedy
A couple of reasons for minimal examples: having an isolated issue is easier to debug and in the process of simplifying the code you might stumble on the solution yourself. For example, I have a book that uses dozens of files. When I encounter an issue, I concatenate the files and then start chopping out chunks that don't affect the output. Eventually I get down to a minimal example that allows me to further research the issue. If I get stuck, then I post the problem. It's time-consuming but you can't assume people will dedicate the time to replicate issues based on descriptions... :-) Try to whittle down a minimal example that illustrates the problem.
I appreciate what you are saying in regards to examples, but in this case I have looked at the source code and a minimal example wouldn't be of assistance. But since you insist... %Warning, don't have context or source files on current computer, so this is from memory %Expect bugs. \definesynonym[Define][Defines][\fullDefine] \setupDefines[criterium=used] \Define[defa]{Def A}{Full definition of A. Used in Chapter 1.} \Define[defb]{Def B}{Full definition of B. Used in Chapter 2.} \Define[defc]{Def C}{Full definition of C. Used in Chapter 2.} \Define[defu]{Def U}{This definition is not used at all.} \starttext \startchapter[title={One}] \placelistofDefines[width=fit,align=serried] %will show all used in document, want only those used in chapter. Here we are looking at \defa. \stopchapter \startchapter[title={Two}] \placelistofDefines[width=fit,align=serried] %only want those used in this chapter, will show defa as well. Here we are discussing \defb\ and \defc. \stopchapter \stoptext I'm good enough with TeX and Lua to understand what is going on, but not good enough to patch it. The usage model for synonyms is either all defined, or all used in the entire document, not just those per chapter. The Lua code only tracks whether a synonym was used at any point within the run, it has only one counter. I need to differentiate between synonyms used by chapter. In this case, synonyms are simply missing the feature I want. I'm asking for alternatives that allow me to use a predefined list of "synonym like" definitions that are common for the entire document, but per chapter only place a list of those that are used within that chapter, like when you place an in-chapter table of contents. Basically I'm asking for direction on where to look next, since the current definition of synonyms will not do what I need. I'm hoping I have overlooked some other feature that will let me do what I need to do. If not, guess I will have to get programming. I updated context last week to current using the procedure on contextgarden. Thanks. On Mon, April 28, 2014 00:56, Thangalin wrote:
A couple of reasons for minimal examples: having an isolated issue is easier to debug and in the process of simplifying the code you might stumble on the solution yourself.
For example, I have a book that uses dozens of files. When I encounter an issue, I concatenate the files and then start chopping out chunks that don't affect the output. Eventually I get down to a minimal example that allows me to further research the issue. If I get stuck, then I post the problem.
It's time-consuming but you can't assume people will dedicate the time to replicate issues based on descriptions... :-) Try to whittle down a minimal example that illustrates the problem. ___________________________________________________________________________________ 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 ___________________________________________________________________________________
-- Chris Kennedy
On 4/28/2014 3:27 PM, Chris Kennedy (ConTeXt List) wrote:
In this case, synonyms are simply missing the feature I want. I'm asking for alternatives that allow me to use a predefined list of "synonym like" definitions that are common for the entire document, but per chapter only place a list of those that are used within that chapter, like when you place an in-chapter table of contents.
it should nto be too hard to define a macro that combines abbreviations with lists or registers as these can be filtered per chapter. I have no time now to demo this. 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 -----------------------------------------------------------------
On Mon, April 28, 2014 07:03, Hans Hagen wrote:
On 4/28/2014 3:27 PM, Chris Kennedy (ConTeXt List) wrote:
In this case, synonyms are simply missing the feature I want. I'm asking for alternatives that allow me to use a predefined list of "synonym like" definitions that are common for the entire document, but per chapter only place a list of those that are used within that chapter, like when you place an in-chapter table of contents.
it should nto be too hard to define a macro that combines abbreviations with lists or registers as these can be filtered per chapter. I have no time now to demo this.
Hans
Thank you. That gives me a place to start. I'll let you know if I have any problems. I'll also post what I come up with. Thanks. -- Chris Kennedy
participants (3)
-
Chris Kennedy (ConTeXt List)
-
Hans Hagen
-
Thangalin