[NTG-context] How to sort list of sections?
Hi Folks, If sections are just lists, and lists can be sorted, how can I sort a list of sections? My actual goal is to generate an 'index' that is made up of section headings. Here's my attempt that does not work. \setuphead[section][number=no ] % This was a guess at how I might be able to sort sections. I was wrong :-) \definesorting[section][sections] \setupsorting[sections][criterium=all] % I thought something like this might work too \definesorting[wahs] \definesorting[wah][wahs][\getmarking[section]][\getmarking[section]] \starttext placelist (not sorted, as you would expect): \placelist[section] \blank placelistofsorts (doesn't render anything. My guess was wrong) \placelistofsorts[wahs] Sections start here: \startsection[title={Beta}] Hello \startsection[title={Alpha}] World \stoptext Thank you for your time. I really appreciate it. Kerry ___ 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] Expansion in bookmarks
On 7/9/2015 11:34 AM, Christoph Reller wrote: On Wed, 08 Jul 2015 21:01:21 +0200, Hans Hagen pra...@wxs.nl mailto:pra...@wxs.nl wrote: On 7/8/2015 4:18 PM, Christoph Reller wrote: Dear all! I want to define a command that is to be used in a section title. Also I want to use \autoinsertnextspace with this command. In the following MWE, why do \This and \AName not work, while \TEX does work? I appreciate any feedback, Christoph MWE: \setupinteraction[state=start] \setupinteractionscreen[option=bookmark] \placebookmarks[section][section] \def\What{This\autoinsertnextspace} \definesorting[Name] \setupsorting[Name][next=\autoinsertnextspace] \Name[AName]{Knuth} \usemodule[abr-01] \setupsorting[logo][next=\autoinsertnextspace] \starttext \startsection[title={\What is puzzling}]\stopsection \startsection[title={\AName is puzzling}]\stopsection \startsection[title={\TEX is puzzling}]\stopsection \stoptext you can try: \enabledirectives[references.bookmarks.preroll] or specify bookmarks with bookmark=... alongside the title= Hans Thank you very much Hans! The references.bookmarks.preroll directive works nicely. However, I still don't understand why in the above example \TEX is working. Can you shed any light on this? because synonyms etc are automatically simplified .. just imagine: what is \framed} supposed to be in a bookmark or \externalfigure ... a macro can be anything 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] Expansion in bookmarks
On Wed, 08 Jul 2015 21:01:21 +0200, Hans Hagen pra...@wxs.nl wrote: On 7/8/2015 4:18 PM, Christoph Reller wrote: Dear all! I want to define a command that is to be used in a section title. Also I want to use \autoinsertnextspace with this command. In the following MWE, why do \This and \AName not work, while \TEX does work? I appreciate any feedback, Christoph MWE: \setupinteraction[state=start] \setupinteractionscreen[option=bookmark] \placebookmarks[section][section] \def\What{This\autoinsertnextspace} \definesorting[Name] \setupsorting[Name][next=\autoinsertnextspace] \Name[AName]{Knuth} \usemodule[abr-01] \setupsorting[logo][next=\autoinsertnextspace] \starttext \startsection[title={\What is puzzling}]\stopsection \startsection[title={\AName is puzzling}]\stopsection \startsection[title={\TEX is puzzling}]\stopsection \stoptext you can try: \enabledirectives[references.bookmarks.preroll] or specify bookmarks with bookmark=... alongside the title= Hans Thank you very much Hans! The references.bookmarks.preroll directive works nicely. However, I still don't understand why in the above example \TEX is working. Can you shed any light on this? Regards, Christoph ___ 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] Expansion in bookmarks
Dear all! I want to define a command that is to be used in a section title. Also I want to use \autoinsertnextspace with this command. In the following MWE, why do \This and \AName not work, while \TEX does work? I appreciate any feedback, Christoph MWE: \setupinteraction[state=start] \setupinteractionscreen[option=bookmark] \placebookmarks[section][section] \def\What{This\autoinsertnextspace} \definesorting[Name] \setupsorting[Name][next=\autoinsertnextspace] \Name[AName]{Knuth} \usemodule[abr-01] \setupsorting[logo][next=\autoinsertnextspace] \starttext \startsection[title={\What is puzzling}]\stopsection \startsection[title={\AName is puzzling}]\stopsection \startsection[title={\TEX is puzzling}]\stopsection \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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Expansion in bookmarks
On 7/8/2015 4:18 PM, Christoph Reller wrote: Dear all! I want to define a command that is to be used in a section title. Also I want to use \autoinsertnextspace with this command. In the following MWE, why do \This and \AName not work, while \TEX does work? I appreciate any feedback, Christoph MWE: \setupinteraction[state=start] \setupinteractionscreen[option=bookmark] \placebookmarks[section][section] \def\What{This\autoinsertnextspace} \definesorting[Name] \setupsorting[Name][next=\autoinsertnextspace] \Name[AName]{Knuth} \usemodule[abr-01] \setupsorting[logo][next=\autoinsertnextspace] \starttext \startsection[title={\What is puzzling}]\stopsection \startsection[title={\AName is puzzling}]\stopsection \startsection[title={\TEX is puzzling}]\stopsection \stoptext you can try: \enabledirectives[references.bookmarks.preroll] or specify bookmarks with bookmark=... alongside the title= 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] Synonyms - feature request?
On 3/25/2015 11:24 AM, robin.kirk...@csiro.au wrote: Folks, I use the synonym feature heavily as technical documents can have hundreds of them. It’s great I can produce a list of synonyms I actually use in a document. Proper style however requires that each synonym be “explained” (shown in full) the first time it is used — usually in a document, but sometimes in a smaller scope, like a part or chapter. This is something I frequently get wrong, and is something document reviewers are quick to complain about. So it would be great if Context could do this automatically. The attached MWE shows what I mean — with such a feature, the two paragraphs should come out the same. I’ve placed some (commented) guesses as to how this might be configured in \setupsynonyms. Maybe better key names can be imagined. Typically I would want synonym \XX\ to be expanded to XX (Xxx Xxx) the first time it is used (alternative a), but the reverse (alternative b), Xxx Xxx (XX) might be preferred. However a command could be used for a custom “explanation”. Internally to Context, I guess this means each group of synonyms actually used has to be complemented with a list of the synonyms that have been “explained” (i.e., \infull{}) would add them to this second list). The second list would be cleared each new scope (chapter, section). The \XX\ macro would explain the synonym if it wasn’t on the second list (using \infull{}, which would then add it). None of this would change the behaviour of \placelistof… where you would continue to select the criterium for the list you want output, independently of The only further tweak might be a scheme so that certain common synonyms (a third list) are never explained automatically (perhaps by example, UK in a document written in and for a UK audience). This list would silently added to the second list immediately after it was cleared, I guess. Synonyms for this this list would be added by a slightly different version of the synonym definition macro (perhaps \commonabbreviation instead of \abbreviation, in the MWE). Anyone think this would be a useful feature addition? Robin \definesynonyms[abbreviation][abbreviations][\infull] \setupsynonyms[abbreviation][ state=start, %explain=first,% first,always,never %explainscope=text,% text,part,chapter,section... %explainalternative=a, % a: XX (Xxx Xxx), b: Xxx Xxx (XX), command %explaincommand=COMMAND#1#2, % to format it yourself textstyle=normal, synonymstyle=\cap] \abbreviation [UN] {UN} {United Nations} \abbreviation [UK] {UK} {United Kingdom} \abbreviation [USA] {USA} {United States of America} \abbreviation [UAE] {UAE} {United Arab Emirates} %\commonabbreviation [OK] {OK} {okay} \abbreviation [OK] {OK} {okay} \setupwhitespace[medium] \starttext The \UK\ and the \USA\ are both founding members of the \UN. And I'm told the \UK\ and \USA\ are both English speaking countries. But that’s \OK. The \UK\ (\infull{UK}) and the \USA\ (\infull{USA}) are both founding members of the \UN\ (\infull{UN}). And I'm told the \UK\ and \USA\ are both English speaking countries. But that’s \OK. \placelistofabbreviations \stoptext The next beta has enough to get you going (lightweight extensions): \definesynonyms [myabbreviation] \setupsynonyms [myabbreviation] [headstyle=bold, headcolor=darkred, synonymstyle=boldslanted, synonymcolor=darkblue, textstyle=slanted, textcolor=darkgreen, style=normal, color=darkyellow] \definesorting [mylogo] \setupsorting [mylogo] [style=bold, color=darkmagenta] \myabbreviation [FIRST] {TheFirst} {The First Words} \myabbreviation [SECOND] {TheSecond} {The Second Words} \myabbreviation [THIRD] {TheThird} {The Third Words} \mylogo [FOURTH] {TheFourth} \starttext \setupsynonyms[myabbreviation][alternative=first] We have \FIRST, \SECOND\ and also \THIRD\ but no \FOURTH. We have \FIRST, \SECOND\ and also \THIRD\ but no \FOURTH. \resetshownsynonyms[myabbreviation] \setupsynonyms[myabbreviation][alternative=last] We have \FIRST\ and \THIRD\ or \FOURTH. We have \FIRST\ and \THIRD\ or \FOURTH. \placelistofsynonyms[myabbreviation] \placelistofsorts[mylogo] - 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
[NTG-context] sorting footnotes alphabetically
Hi there, I read in strc-not.mkvi that footnotes can be treated as lists. And the reference manual deals in section 12.3 with sorting lists. My basic sample is the following: \definenote[dict] \setupnotation[dict][number=no] \starttext This is my dictionary\dict{dictionary: vocabulario} command\dict{command: orden} for a complex\dict{complex: complejo} text\dict{text: texto}. \stoptext What I'm trying to achieve is that the \dict footnotes are sorted alphabetically. Adding the code from sorted lists, I get the following: \definesorting[meaning][meanings] \setupsorting[meaning][criterium=all] \definenote[dict] \setupnote[dict][number=no,command=\placelistofmeanings] \setupnotation[dict][number=no,command=\meaning] \starttext This is my dictionary\dict{dictionary: vocabulario} command\dict{command: orden} for a complex\dict{complex: complejo} text\dict{text: texto}. \stoptext It compiles fine, but the footnotes aren't alphabetically sorted. Is there any way to achieve this? Many thanks for your help, Pablo -- http://www.ousia.tk ___ 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] sorting footnotes alphabetically
Am 01.04.2012 um 12:15 schrieb Pablo Rodríguez: Hi there, I read in strc-not.mkvi that footnotes can be treated as lists. And the reference manual deals in section 12.3 with sorting lists. My basic sample is the following: \definenote[dict] \setupnotation[dict][number=no] \starttext This is my dictionary\dict{dictionary: vocabulario} command\dict{command: orden} for a complex\dict{complex: complejo} text\dict{text: texto}. \stoptext What I'm trying to achieve is that the \dict footnotes are sorted alphabetically. Adding the code from sorted lists, I get the following: \definesorting[meaning][meanings] \setupsorting[meaning][criterium=all] \definenote[dict] \setupnote[dict][number=no,command=\placelistofmeanings] \setupnotation[dict][number=no,command=\meaning] \starttext This is my dictionary\dict{dictionary: vocabulario} command\dict{command: orden} for a complex\dict{complex: complejo} text\dict{text: texto}. \stoptext It compiles fine, but the footnotes aren't alphabetically sorted. Is there any way to achieve this? I’m sorry to disappoint you but notes can’t be sorted. 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] placelistofsorts
Hi Hans, also with the newest beta—the bug is still there. \definesorting[test][texts] \setupsorting [test][criterium=all,after=\hairline] \starttext \test{bb} \test{cc} \test{xx} \test{aa} % \placelistofsorts[test][] % works (but one can't customize the formatting) % \placelistoftests % error \placelist[test] % empty \stoptext Greeting Andreas ___ 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] \autoinsertnextspace in MKIV?
On 15-5-2010 12:59, Bernhard Rosensteiner wrote: Hi all, does anybody know if there is an replacement of \autoinsertnextspace in MKIV. I use it a lot in my macros. Until now i copied the macrodefinition from the MKII source in my document, but i think it would be nice if the macro is „out of my eyes“. i'll add a mkiv variant to the beta so that you can do \setupsorting[logo][next=\autoinsertnextspace] \starttext bla \TEX\autoinsertnextspace bla bla \TEX\autoinsertnextspace (bla) bla (\TEX\autoinsertnextspace) bla bla \TEX\autoinsertnextspace\ bla \usemodule[abr-01] bla \TEX bla bla \TEX (bla) bla (\TEX) bla bla \TEX\ bla \stoptext (beta will be uploaded later) - 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
Am 28.03.2009 um 01:03 schrieb Aditya Mahajan: On Fri, 27 Mar 2009, Hans Hagen wrote: anyhow, i tried to fix the font issue so there is a new attempt uploaded Another bug... \usemodule[abr-01] \starttext \CONTEXT \stoptext gives ! Missing } inserted. inserted text } to be read again \dostopattributes \processsort ...s {\??so #1}\c!style \c!color {#2} \endgroup \executesort ...}{#2}{#3}\processsort {#1}{#3}{#2} \endgroup \getvalue {\??so... l.3 \CONTEXT I couldn't figure out what is wrong. Smallcaps did not work in start/stopattributes, use \setupsorting[logo] [style=\tx\WORD] 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] new beta
On Sat, 28 Mar 2009, Wolfgang Schuster wrote: Am 28.03.2009 um 01:03 schrieb Aditya Mahajan: On Fri, 27 Mar 2009, Hans Hagen wrote: anyhow, i tried to fix the font issue so there is a new attempt uploaded Another bug... \usemodule[abr-01] \starttext \CONTEXT \stoptext gives ! Missing } inserted. inserted text } to be read again \dostopattributes \processsort ...s {\??so #1}\c!style \c!color {#2} \endgroup \executesort ...}{#2}{#3}\processsort {#1}{#3}{#2} \endgroup \getvalue {\??so... l.3 \CONTEXT I couldn't figure out what is wrong. Smallcaps did not work in start/stopattributes, use \setupsorting[logo][style=\tx\WORD] Thanks. I just switched to abr-02 :) Aditya ___ 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] lists in mkiv
For a small manual-type document I am trying to include a phone directory. I would like it to be sorted. The following produces no output other than test. Shouldn't it? Johan Sandblom \starttext test \definesorting[telefon][telefoner] \setupsorting[telefon][criterium=all] \telefon{Milad El Segaie, 0746231022} \telefon{Carina C, 33050} \placelistoftelefoner \definesynonyms[Phone][Phones][\PhoneName][\PhoneNumber] \setupsynonyms[Phone][criterium=all] \Phone{Milad El Segaie}{0746231022} \Phone{Carina C}{33050} \placelistofPhones \stoptext -- Johan Sandblom, MD PhD m +46735521477 Sweden What is wanted is not the will to believe, but the will to find out, which is the exact opposite - Bertrand Russell ___ 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] lists in mkiv
Further investigation shows that I also cannot produce an index with the following \starttext test\index{test} \placeindex \stoptext This is using the minimals on linux-amd64 and the following versions ~/context$ context --version MtxRun | main context file: /home/johans/context/tex/texmf-context/tex/context/base/context.tex MtxRun | current version: 2009.01.18 14:39 ~/context$ luatex --version This is LuaTeX, Version snapshot-0.31.3-2008123108, build unknown 2009/2/22 Johan Sandblom jsandb...@gmail.com: For a small manual-type document I am trying to include a phone directory. I would like it to be sorted. The following produces no output other than test. Shouldn't it? Johan Sandblom \starttext test \definesorting[telefon][telefoner] \setupsorting[telefon][criterium=all] \telefon{Milad El Segaie, 0746231022} \telefon{Carina C, 33050} \placelistoftelefoner \definesynonyms[Phone][Phones][\PhoneName][\PhoneNumber] \setupsynonyms[Phone][criterium=all] \Phone{Milad El Segaie}{0746231022} \Phone{Carina C}{33050} \placelistofPhones \stoptext -- Johan Sandblom, MD PhD m +46735521477 Sweden What is wanted is not the will to believe, but the will to find out, which is the exact opposite - Bertrand Russell -- Johan Sandblom, MD PhD m +46735521477 Sweden What is wanted is not the will to believe, but the will to find out, which is the exact opposite - Bertrand Russell ___ 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] header to register
On Jan 19, 2008 9:51 PM, Henning Hraban Ramm [EMAIL PROTECTED] wrote: Ahoi! For a songbook I need a alphabetically sorted TOC. As easy workaround I tried to use an register/index. But I'd like to get my headers into the index without typing \index all the time. But with my following setup I get only garbage numbers instead of my titles: \setuphead[Titel] [style={\hw\tfa}, page=yes, number=no, textcommand=\TitelFrame] \def\TitelFrame#1{\index{#1}% \framed[ width=\textwidth, height=7.5mm, frame=off, align={right,high}, after={}, before={}]% {\switchtobodyfont[12pt]\hw\tfa #1}% } My .tuo file contains lines like: \listentry{Titel}{2}{}{nihil ita ut videtur}{2--0-1-0-0-0-0-0--1}{3}% ... \registerpage{index}{,}{1}{\dowritetolist \@@koppeling {}{nihil ita ut videtur}\v!head }}\fi \executeifdefined {\??ko Titel\c! deeptextcommand }\firstofoneargument {nihil ita ut videtur}\endstrut } {2--0-1-0-0-0-0-0--1}% The 5th instead of the 4th parameter of \listentry is printed in the index. My fault or a bug? I haven't tested you example but you can try my solution. \def\doplacesectiontitles#1:#2\relax {\line{#1\hfill\hbox to 3em{#2\hss}}} \def\placesectiontitles#1% {\doplacesectiontitles#1\relax} \definesorting [sectiontitle] [sectiontitles] \setupsorting [sectiontitle] [criterium=all, command=\placesectiontitles] \def\titleformat#1% {\bgroup \expanded{\sectiontitle[music:#1]{#1:\pagenumber}}% #1% \egroup} \setuphead [chapter] [incrementnumber=list, coupling=chapter, deeptextcommand=\titleformat] \def\placetitle {\setbox\scratchbox\vbox{\placelist[chapter][]}% \placelistofsectiontitles} \starttext \placetitle \chapter{Knuth}\input knuth\par \chapter{Tufte}\input tufte\par \chapter{Reich}\input reich\par \chapter{Materie}\input douglas\par \chapter{Douglas}\input douglas\par \chapter{Dawkins}\input dawkins\par \chapter{Ward}\input ward\par \chapter{Zapf}\input zapf\par \chapter{Bryson}\input bryson\par \chapter{Davis}\input davis\par \chapter{Thuan}\input thuan\par \chapter{Hawking}\input hawking\par \chapter{Linden}\input linden\par \chapter{Weisman}\input weisman\par \stoptext The names for the macros are not very well choosen and should be renamed and the format the toc and the headers is also should be also changed but the sorting works. 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] place figures at the end of document
Dear Peter, please be aware that I am still a ConTeXt newbie, therefore, I am not sure if this is really the way things should be done, only that it seems to work with up to a 999 figures (tested) and probably more ;-) Nonetheless, the following code probably does the trick you were looking for It has the further benefit that only those figures with the option [list] will go to the list and that you can do all the other tricks with this list of figures that you can do with any sort of list. Unfortunately you have to change all \placefigure to \PlaceFigure (or some other name of your choosing for this macro) Cheers Carsten %-- setting things up - \definesorting[Figure][Figures] \setupsorting[Figure][criterium=all] \newcounter\FigureCounter \def\PlaceFigure{\dodoubleempty\doPlaceFigure} \def\doPlaceFigure[#1][#2]#3#4{ \ifsecondargument \doifsamestringelse{#1}{list}{ \expanded{\Figure[\FigureCounter]{\noexpand\placefigure[#2]{#3} {{#4}} }} \increment\FigureCounter }{ \placefigure[#1][#2]{#3}{#4} } \else \placefigure[#2]{#3}{#4} \fi } %-- the actual text - \starttext \dorecurse{100}{ \PlaceFigure[here][fig:\recurselevel]{Blackbox in text at level \recurselevel}{\blackrule[width=6cm,height=4cm]} \input knuth\par \PlaceFigure[list][fig:\recurselevel]{Blackbox in list at level \recurselevel}{\blackrule[width=6cm,height=4cm]} } \page \placelistofFigures \stoptext On 18.01.2008 at 17:36 wrote Peter I. Hansen: Hi, Is there a way in ConTeXt to place figures (and other floats) at the very end of the document? More specifically I would like to keep on having to placefigure code at the relevant place in the text where I would normally typeset with the option [here], but sometimes readers want all figures moved to the end of the document and it would be handy if this could be done by changing a keyword. thanks, Peter ___ 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 ___ ___ 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
# \processaction # \processallactionsinset \processblocks[names][names] # \processcommacommand # \processcommalist # \processfirstactioninset \processpage[names][yes|no] # \processXMLbuffer # \processXMLelement # \processXMLfile # \processXMLfilegrouped # \product \program[name] # \project # \protect \publication[reference] \quotation{text} \quote{text} \ran{text} # \readfile \ref[t|p|r|s|e][reference] \reference[reference]{text} \referral[options] \referraldate \register[text]{register+register+register} \reservefloat[options][text][references]{text} \reset[names] # \resetlayer \resetmarking[name] \rightaligned{text} \Romannumerals{text} \romannumerals{text} \rotate[settings]{text} # \saveXMLasdata # \saveXMLdata # \saveXMLelement # \sbox \scale[options]{text} # \scratchbox # \scratchcounter # \scratchdimen # \scratchskip \screen \section[references]{text} \seeregister[text]{text}{text+text+text} \selectblocks[names][names][critererium] \selectpaper[options] \selectversion # \setcollector # \setevalue # \setevariables # \setflag # \setfontstrut # \setgvalue # \setgvariables # \setlayer # \setlayerframed # \setlocalhsize # \setstrut \settextvariable[name]{text} \setupalign[options] \setuparranging[options] # \setupattachments \setupbackground[options] \setupbackgrounds[position][position][state][settings] \setupblackrules[options] \setupblank[options] \setupblock[names][options] \setupbodyfont[options] \setupbodyfontenvironment[settings][settings] \setupbottom[settings][settings] \setupbottomtexts[text|margin|edge][text|section|date|mark|pagenumber][text|section|date|mark|pagenumber] \setupbuffer[name][options] \setupbuttons[state][settings] \setupcapitals[title=yes|no][sc=yes|no] \setupcaption[name][settings] \setupcaptions[options] \setupclipping[options] \setupcolor[name] \setupcolors[options] \setupcolumns[options] \setupcombinations[options] \setupcombinedlist[name][levels and options] \setupcomment[options] \setupdescriptions[names][options] # \setupencoding \setupenumerations[names][settings] \setupexternalfigures[options] \setupfield[name][label|horizontal|vertical|frame][settings] \setupfields[names][reset|label|horizontal|vertical|frame][options][settings][settings] \setupfillinlines[options] \setupfillinrules[options] \setupfloat[name][options] \setupfloats[options] \setupfloatsplitting[options] # \setupFLOWcharts # \setupFLOWlines # \setupFLOWshapes # \setupfontsynonym \setupfooter[text|margin|edge][options] \setupfootertexts[text|margin|edge][text|section|date|mark|pagenumber][text|section|date|mark|pagenumber] \setupfootnotedefinition[settings] \setupfootnotes[options] \setupforms[method=HTML|FDF] \setupformulae[options] \setupframed[options] \setupframedtexts[options] \setuphead[sections][options] \setupheader[text|margin|edge][options] \setupheadertexts[text|margin|edge][text|section|date|mark|pagenumber][text|section|date|mark|pagenumber] \setupheadnumber[section][number|+number|-number] \setupheads[options] \setupheadtext[language code][name=text] \setuphyphenmark[sign=-|--|---|( )|=|/] \setupindentations[names][options] \setupindenting[none|small|medium|big|next|first|normal|odd|even|dimension] \setupinmargin[left|right|number][options] \setupinteraction[options] \setupinteractionbar[options] \setupinteractionscreen[options] \setupinterlinespace[reset|small|medium|auto|big|on|off][options] \setupitemgroup[name][number|each][options][options] \setupitems[options] \setuplabeltext[language code][name=text] \setuplanguage[language code][settings] # \setuplayer \setuplayout[options] \setuplegend[options] \setuplinenumbering[options] \setuplines[options] \setuplinewidth[dimension] \setuplist[names][options] \setupmakeup[name][options] \setupmarginblocks[options] \setupmarginrules[level=number|rulethickness=dimension] \setupmarking[name][options] \setupnarrower[options] \setupnumbering[options] \setupoppositeplacing[options] \setupoutput[names] \setuppagenumber[number][state=start|stop|keep] \setuppagenumbering[options] \setuppagetransitions[options] \setuppalet[name] \setuppaper[options] \setuppapersize[typesetting papersize][printing papersize] \setupparagraphnumbering[options] \setupparagraphs[name][number|each][options] \setuppositioning[options] \setupprofiles[options] \setupprograms[directory=text] \setuppublications[options] \setupquote[options] \setupreferencelist[names][options] \setupreferencing[options] \setupregister[singular][name][options] \setuprotate[options] \setuprule[name][options] # \setups \setupscreens[options] \setupsection[name][name][options] \setupsectionblock[name][options] \setupsorting[name][options] \setupspacing[broad|packed] \setupstrut[yes|no|cap|text] \setupsubpagenumber[options] \setupsymbolset[name] \setupsynchronization[state=start|stop] \setupsynchronizationbar[options] \setupsynonyms[name][options] \setupsystem[options] \setuptab[options] # \setupTABLE \setuptables[options] \setuptabulate[name][options] \setuptext[text|margin|edge][options
Re: [NTG-context] unsetting textstyle for one synonym
Peter Münster wrote: Hello, how could I cancel the textstyle=cap for just one synonym? Here an example to show what I want: \definesynonyms[Test][Tests][\Full] \setupsynonyms[Test][textstyle=cap] \Test{BLA}{This is B.L.A.} %\Test[CONTEXT]{{\nocap{\ConTeXt}}}{This is \ConTeXt}% does not work %\Test[CONTEXT]{{\tf\ConTeXt}}{This is \ConTeXt}% does not work \starttext \BLA\ and \CONTEXT. \stoptext Greetings, Peter \definealternativestyle[xxx][\cap][\bf] \setupsorting[logo][style=xxx] \logo[TEST]{Test} \starttext \title{Test \TEST} test \TEST test {\dontconvertfont \TEST} \stoptext -- - 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] Spacing after defined word: beginner's question
On Mon, 25 Dec 2006, [EMAIL PROTECTED] wrote: This must be a beginner's question, but I can't find the answer to it in the manuals... :) Read below. Take this ConTeXt source: -- \def\Acme{% {\ss\sc ACME}} Welcome from \Acme. \Acme make fine products. When this is made into a PDF, it looks like this: -- Welcome from ACME. ACMEmake fine products. [snip] What am I doing wrong? You are not doing anything wrong. This is how TeX operates. A macro with no argument gobbles the spaces after it. One way to ensure that you get a space is to tell TeX that you are done with the macro, for example Welcome from \Acme. \Acme{} makes fine products. or Welcome from \Acme. \Acme\ makes fine products. After a while you get used to adding a \ where you want. There is an automated way, but it is (and will remain) undocumented. You can append \autoinsertnextspace at the end of your macro. So, something like \def\Acme{{\ss\sc ACME}\autoinsertnextspace} The reason that this is undocumented is because it makes it harder for other parsers to parse TeX. BTW, ConTeXt has a sorting and abbreviation mechanism for the kind of thing that you are doing. With \definesorting or \abbreviation, you can also get a list of logos or list of abbreviations free of cost :). Look up the manual for details. And as a futher incentive, you can use \setupsorting[logo][next=\autoinsertnextspace] to get the behaviour you want. Aditya ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] sorting commalist?
Hans van der Meer wrote: Is there a simple manner to sort the list externally and get it back for further processing? Otherwise, how are the indexes sorted? Externally, using texexec functionality. Something like this works well enough, I guess (but I normally sort my stuff by piping it through the unix sort command): % This sorts the list contained in it's argument \def\sortalphacommacommand#1% {\definesorting[listsort][listsorts]% \processcommacommand[#1]\listsort \def\sortedcommalist{}% \def\makesortedlist##1% {\doglobal\appendtocommalist{##1}\sortedcommalist}% \setupsorting[listsort][criterium=all,command=\makesortedlist]% \placelistoflistsorts \let#1\sortedcommalist} \def\citylist{Londen,Berlijn,New York,Parijs,Amstelveen} \sortalphacommacommand\citylist Cheers, taco ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] sorting list
Hans van der Meer wrote: Some things I do not understand about sorting: This is the example: \def\sortprocess#1{{\bf #1}} \definesorting[city][cities][\callupcities] \setupsorting[city][criterium=all,command=\sortprocess] \city{Londen} \city{Berlijn} \city{New York} \city{Parijs} \city{Amstelveen} \placelistofcities \callupcities question 1. The manual states (p.163) When we add a command in the third argument during the definition of the sorted list we may recall sorted list with this command. However \callupcities gives me this error: Runaway argument? ! Paragraph ended before \callupcities was complete. to be read again \par \callupcities takes an argument, that is what is causing the error message. But how it is supposed to work, I do not know. question 2. The command \sortprocess does work, the items are in bold. But they now are typeset next to one another instead of each one on a line by itself, as occurs without command=\sortprocess on the setup. You have to extend \sortprocess if you want something besides making a bold inlined list of cities. Why? Consider this idiom: \def\citylist{} \def\makecitylist#1{\doglobal\appendtocommalist{#1}\citylist} \setupsorting[city][criterium=all,command=\makecitylist] Cheers, Taco ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] sorting list
Some things I do not understand about sorting:This is the example:\def\sortprocess#1{{\bf #1}}\definesorting[city][cities][\callupcities]\setupsorting[city][criterium=all,command=\sortprocess]\city{Londen}\city{Berlijn}\city{New York}\city{Parijs}\city{Amstelveen}\placelistofcities\callupcitiesquestion 1. The manual states (p.163) "When we add a command in the third argument during the definition of the sorted list we may recall sorted list with this command."However \callupcities gives me this error:Runaway argument?! Paragraph ended before \callupcities was complete.to be read again \par question 2. The command \sortprocess does work, the items are in bold. But they now are typeset next to one another instead of each one on a line by itself, as occurs without command=\sortprocess on the setup.Hans van der Meer ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Tex Errors But Good PDF Output
Browder, Tom wrote: -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Hans Hagen Sent: Friday, May 19, 2006 3:29 PM To: mailing list for ConTeXt users Subject: Re: [NTG-context] Tex Errors But Good PDF Output ... can you make a small test file that fails? normally abbrev etc should behave normally in bookmarks, as long as you define them beforehand Hans I've assmbled the smallest set of files I have found so far that show the problem. See the attached zip archive. There are four files: brl-doc.tex % the master file which '\input's the other move: \input brltool_preamble \input brltool_version to before where you set the bookmarks files: brltool_preamble.tex % my definitions (converted from tex style to context style) \setupsorting[logo][style=it] \logo[brLT] {brltool} \logo[brlLT]{brltool} \logo[brlrc]{.brltoolrc} \logo[brt] {brltool} \logo[mged] {mged} \logo[pkcurv] {pkcurves.qdb} \logo[pkcurvtwo]{pkcurves2.qdb} \logo[tgtb] {tgt.brltool} \logo[tgtbs]{tgt.brltool.save.n} \logo[tgtcd]{tgt.cod} \logo[tgtcgp] {tgt.compgroups} \logo[tgtco]{tgt.covart} \logo[tgtcom] {tgt.covart.material} \logo[tgtcr]{tgt.cri} \logo[tgte] {tgt.edcomb} \logo[tgtfalt] {tgt.falt.ps} \logo[tgtfmeca] {tgt.fme} \logo[tgtg] {tgt.g} \logo[tgtgp]{tgt.group} \logo[tgti] {tgt.idents} \logo[tgtl] {tgt.log} \logo[tgtpd]{tgt.pdam} \logo[tgtpdm] {tgt.pdam.material} \logo[tgtsys] {tgt.sysconn} \logo[tgttree] {tgt.tree} \logo[tgtx] {tgt.xref} \logo[tgtxs]{tgt.xref.save.n} \logo[tgtxyz] {tgt.xyz} brltool_version.tex % auto-generated with version data brl-intro.tex% the first chapter Thanks for any help. -Tom ___ 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
[NTG-context] Context 2006.02.15 released
Hello all, I am pleased to announce that the new ConTeXt release from Hans Hagen can be downloaded as of now from the Pragma ADE website or one of its mirrors. http://www.pragma-ade.com/context/current/cont-tmf.zip http://context.aanhet.net/context/current/cont-tmf.zip http://mirror.contextgarden.net/context/current/cont-tmf.zip The current release has version 2006.02.15. The total set of distributed files now consists of eight files; the zip containing a repackaging of cont-lmt.zip and the zip containing pattern files have been deleted. The zip with windows font support has merged with the remaining zip with font metrics. A very short list of changes is given below. As usual, there is an html page with more detailed release notes available on the Wiki, see: http://wiki.contextgarden.net/Release_Notes New features (since 2006.02.03): * newtexexec has a new switch --keep, that uses tt.keep/tt as extension for temporary files * texmfstart has a new switch --showenv, that dumps the runtime environment. * There is now some support for intelligent spaces after logos, use \setupsorting[logo][next=\autoinsertnextspace] * Trailing empty lines in verbatims can be typeset using \setupverbatim[empty=all] * demo code is added to many presentation styles Interesting bugfixes: * \startitemize[start=2] * unintentionally numbered math displays * strechted-out math in short figure captions. ***This fix may change linebreaking in other center-ed paragraphs!*** * wrong extra space after \quote and \quotation * \type{\iffalse} (and other if... tests) Happy TeXing, Taco ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Implementing xspace
Aditya Mahajan wrote: It basically saves the pain of typing \ or {} after all commands. Suppose I have \abbreviation {ABC} {Some abbreviation} keep in mind that such mechanism are (1) incomplete, since not all chars are looked at (2) don't handle commands following such a call (3) it's like an input encoding non conforming the default tex parsing (4) best can be mention ed in a comment at the top of the file (5) always will be fragile so, i can provide a hook for such a thing in sort/syn but after that you're on your own since i'm not going to add support for this at each level \unprotect % core-syn: \def\reprocesssort#1#2#3% {\processsort{#1}{#3}{#2}% \getvalue{\??so#1\c!next}} \def\preexecutesort#1#2#3% {\ifdoinpututilities \else \dowritesort{#1}{#2}{#3}% \unexpanded\setgvalue{#2}{\reprocesssort{#1}{#3}{#2}}% \fi} \def\executesort#1#2#3% {\begingroup \let\executesort\thirdofthreearguments \preexecutesort{#1}{#2}{#3}% \processsort{#1}{#3}{#2}% \endgroup \getvalue{\??so#1\c!next}} % not formally documented \def\reprocesssynonym#1#2#3% {\processsynonym{#1}{#3}{#2}% \getvalue{\??sm#1\c!next}} \def\preexecutesynonym#1#2#3#4% {\ifdoinpututilities \else \dowritesynonym{#1}{#2}{#3}{#4}% \unexpanded\setgvalue{#2}{\reprocesssynonym{#1}{#3}{#4}}% \fi} \def\executesynonym#1#2#3#4% {\preexecutesynonym{#1}{#2}{#3}{#4}% \processsynonym{#1}{#3}{#4}% \getvalue{\??sm#1\c!next}} % not formally documented % cors-spa: %D This is a dangerous feature because it makes the \TEX\ source %D less portable, i.e. any parser now needs to apply exactly the %D same algorithm when it wants to interpret the source. We %D strongly recommend not to mention this feature in manuals! \def\autoinsertnextspace{\futurelet\nexttoken\doautoinsertnextspace} \def\doautoinsertnextspace % slightly extended version of a user supplied macro {\ifx\nexttoken \bgroup\else \ifx\nexttoken\begingroup\else \ifx\nexttoken \egroup\else \ifx\nexttoken \endgroup\else \ifx\nexttoken \/\else \ifx\nexttoken /\else \ifx\nexttoken ~\else \ifx\nexttoken \ \else \ifx\nexttoken \blankspace\else \ifx\nexttoken \space\else \ifx\nexttoken .\else \ifx\nexttoken ,\else \ifx\nexttoken !\else \ifx\nexttoken ?\else \ifx\nexttoken :\else \ifx\nexttoken ;\else \ifx\nexttoken '\else \ifx\nexttoken \else \ifx\nexttoken )\else \ifx\nexttoken -\else \ifx\nexttoken |\else % \ifx\nexttoken \%\else \ifx\nexttoken \\else \space % \fi\fi \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi} \protect \setupsorting[logo][next=\autoinsertnextspace] \logo[TEX]{\TeX} bla bla \TEX test test bla bla \TEX (test) test bla bla (\TEX) test \stoptext 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 - ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Sorting question
Bernd Militzer wrote: Hello, is it possible to produce a sorted list without unsing the entry \Ueberall in text? % \definesorting[person][personen] \setupsorting[person][criterium = all] % \person{Unsinn, Klaus} \person{Militzer, Bernd} \person{Horten, Hans} \person[Ueberall]{Überall, Heinrich} % \placelistofpersonen Any ideas? We need to define (German?) sorting rules for newtexexec (newtexutil). Tell me in between 'Ü' have to be sorted I will try to prepare a code for this rule. Vit Thanks, Bernd %#ConTeXt % % allgemeine Grundeinstellung % \enableregime[windows] % Eingabe-Codierung \mainlanguage[de] % Sprachmodus \usetypescript[modern][texnansi] \setupbodyfont[12pt] % % Die besondere Seitenanpassung % \setuppapersize[a4][a4] \setuplayout[location=singlesided] \setuplayout[ backspace=2.46cm,topspace=1.2cm, top=0cm,bottom=0cm,topdistance=0cm,bottomdistance=0cm, header=1.5cm,footer=1.0cm,headerdistance=0cm,footerdistance=0cm, leftedge=0cm,rightedge=0cm,leftedgedistance=0cm,rightedgedistance=0cm, leftmargin=1.5cm,rightmargin=1.0cm,leftmargindistance=0.42cm,rightmargindistance=0.42cm, width=16.5cm,height=27.4cm, ] % % % Z�hler f�r die lfdNr. % \global\newcount\xlfd \xlfd=0 % \def\LFD{\futurelet\testchar\MitOptArgLFD} % \def\MitOptArgLFD{\ifx[\testchar% \let\next\OptArgLFD \else % \let\next \NoOptArgLFD \fi \next} % % setzte den Z�hler auf bestimmten Wert % \def\OptArgLFD[#1]{% {\global\xlfd=\number#1} } % % erh�he den Wert um 1 % und gebe den Z�hler aus % Besonderheit % zweistellige Ausgabe der Zahl also 01., 02. ... 10. 11. ... % und Punkt % \def\NoOptArgLFD{% {\global\advance\xlfd by 1\relax} \ifnum\xlfd10 0\fi \number\xlfd. } % %Linie nach dem Namen % \def\myrule{ {\thinrules[n=1]\par}} % % % \starttext % % % 1. ex no prob % \definesorting[personA][personenA] \setupsorting[personA][criterium = all,before=\LFD,after=\myrule] \personA{Unsinn, Klaus} \personA{Militzer, Bernd} \personA{Horten, Hans} \placelistofpersonenA \page % 2. ex prob �berall on wrong position % \definesorting[personB][personenB] \setupsorting[personB][criterium = all,before=\LFD,after=\myrule] \personB{Unsinn, Klaus} \personB{Militzer, Bernd} \personB{Horten, Hans} \personB{�berall, Heinrich} \placelistofpersonenB \page % 3. ex prob �berall is missing % \definesorting[personC][personenC] \setupsorting[personC][criterium = all,before=\LFD,after=\myrule] \personC{Unsinn, Klaus} \personC{Militzer, Bernd} \personC{Horten, Hans} \personC[Ueberall]{�berall, Heinrich} \placelistofpersonenC \page % 4. ex prob �berall is missing % \definesorting[personD][personenD] \setupsorting[personD][criterium = all,before=\LFD,after=\myrule] \personD{Unsinn, Klaus} \personD{Militzer, Bernd} \personD{Horten, Hans} \personD[Ueberall]{�berall, Heinrich} First I use \Ueberall\ in text \placelistofpersonenD \page \stoptext ___ 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
Re: [NTG-context] Sorting question
Mojca Miklavec wrote: On 1/22/06, Vit Zyka wrote: We need to define (German?) sorting rules for newtexexec (newtexutil). Tell me in between 'Ü' have to be sorted I will try to prepare a code for this rule. ä (adiaeresis) is identical to a, ö (odiaeresis) identical to o, ü (udiaeresis) identical to u, the same for uppercase. ß (ssharp) is edentical to ss (same for uppercase, but in uppercase it's written as SS anyway). Hmmm, that is not complete: I understand that every ü, Ü, u, U comes to single group, but is uüUÜ? Let say yes. Then try -- \input sort-ini.tex \useregime[win] \enableregime[windows] % Eingabe-Codierung \mainlanguage[de] % Sprachmodus \usetypescript[modern][texnansi] \startmode[sortorder-de] \exportsortexpansion{u}{u+1} \exportsortexpansion{udiaeresis}{u+2} \exportsortexpansion{U}{u+3} \exportsortexpansion{Udiaeresis}{u+4} \exportsortdivision{u+1}{u} \exportsortdivision{u+2}{u} \exportsortdivision{u+3}{u} \exportsortdivision{u+4}{u} \stopmode \setmode{sortorder-de} \starttext \definesorting[person][personen] \setupsorting[person][criterium = all] %\def\person#1{#1\expanded{\index{#1}}, } %\def\person#1{#1\index{#1}, } \person{Unsinn, Klaus} \person{Militzer, Bernd} \person{Horten, Hans} %\person{Überall, Heinrich} \person{\Udiaeresis berall, Heinrich} Index: \placelistofpersonen %\placeindex[alternative=A] \stoptext -- Comments: - newtexexec is needed! - works for both index/sorting - works only for \Udiaeresis not for direct Ü! Strange! Why? Vit ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] reverse order sorting
Dear Hans and ConTeXters, I go back to this question since it was not answered: is possible to change sorting order (e.g. sort in reverse order: not A, B, C but C, B, A) in the mechanism: - \definesorting[address][addressbook] \setupsorting[address][criterium=all] \address{A} \address{C} \address{B} \placelistofaddressbook - I was looking for something like 'reverse=yes' in \setupsorting definition and texexec perl sort function calling, but it seemed to me, it has not been implemented yet. Am I right? I still do not have insign to setup option passing and parsing mechanism in ConTeXt macros, but who knows, the implementation might be very easy. I would need it for sorting simple scoring points. Using external (Perl or XSLT) engine ia like a hammer to mosquitos. I can solve to problem by forward sorting and TeX macro language but Perl solution is more effective. Thank you Vit Zyka ___ ntg-context mailing list [EMAIL PROTECTED] http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] reverse order sorting
Hallo ConTeXt debaters, is possible to change sorting order (e.g. sort in reverse order) in the mechanismn: - \definesorting[address][addressbook] \setupsorting[address][criterium=all] \address{A} \address{B} \placelistofaddressbook - Thanks Vit Zyka ___ ntg-context mailing list [EMAIL PROTECTED] http://www.ntg.nl/mailman/listinfo/ntg-context