Re: [NTG-context] Hyphenation documentation
Am 20.04.2013 um 22:05 schrieb Sietse Brouwer sbbrou...@gmail.com: Hello all, I've just pulled together some questions of mine and their answers, and written them up into a hyphenation QA. http://wiki.contextgarden.net/Hyphenation http://wiki.contextgarden.net/Command/definebreakpoint Unfortunately, there are still some holes in the documentation I wrote. Questions I still have, and which I now pose to the list: 1. how do I protect a single instance of a word against hyphenation? Does ConTeXt, like LaTeX, use \hbox{myfragileword}, or something different? No, you have to use \hbox too but I think a command with a speaking name would be better. 2. In the command \definebreakpoint, what do these keys do? I can't get them to do anything (MWE below) ** left ** middle ** right The left, right and middle keys are used in combination with “type=5”. \definebreakpoints[test] \definebreakpoint [test] [?] [type=5,left=L,right=R,middle=M] \setbreakpoints[test] \setuppapersize[A7] \starttext \showframe ???????\par \stoptext 3. Is there perhaps a bug in breakpoints of type 2 and 3. (MWE below.) The key 'type' seems to control where hyphens appear. If 1 is a hyphenation character of type 1, etc, this is the observed behaviour (`/` is the linebreak): ...1...1 / ... ...2... / 2-... % I would expect: ...2... / -2... ...3...-3 / ... % I would expect: ...3...3- / ... ...4...4 / 4... ../ ... % breakpoint of type 5 just disappears Type 2 and 3 are used for braces to have line breaks which produce (xxx-) xxx and xxx (-xxx) If this behaviour is not a bug: is there a way to set a breakpoint X that produces ...X...X- / …? You have to use type 5 to create a rule for this, do you have a example where this is needed besides the one mentioned in the duden [1] example for a closing bracket. [1] http://www.duden.de/sprachwissen/sprachratgeber/klammern-und-bindestrich-bei-der-worttrennung 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] Hyphenation documentation
On 4/21/2013 10:26 AM, Wolfgang Schuster wrote: No, you have to use \hbox too but I think a command with a speaking name would be better. \unexpanded\def\unhyphenated {\groupedcommand{\lefthyphenmin\maxdimen}\donothing} I'll add that. 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 ___
[NTG-context] setuppagenumber--start at page xy
Has the code for starting pagenumbering at a given number changed? I'm using last year's template for an annual report, but can't get it to work. Minimal example: \setuppagenumber[number=3] \starttext \input tufte \stoptext I'm using today's context version. Thanks, Jörg -- Prof. Jörg Hagmann-Zanolari MD University of Basel Department of Biomedicine Institute of Biochemistry and Genetics Mattenstrasse 28 CH-4058 Basel Switzerland Phone +41 (0)61 267 3565 ___ 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] setuppagenumber--start at page xy
Minimal example: \setuppagenumber[number=3] \starttext \input tufte \stoptext I'm using today's context version. Thanks, Jörg You could use \setcounter[userpage][2] \starttext \input tufte \stoptext Huseyin ___ 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] xml path
Having for example xml-structure: rootnode node1subnode1../subnode1/node1 node2/ /node3/ /rootnode With the path expression \xmlall{#1}{!node1} the node1 should be suppressed, as happens in case. However, nodes under node1 like subnode1 should be suppressed because node1 is suppressed. But that is not the case, these nodes do appear. Apparently I need another path expression. But which one? Hans van der Meer ___ 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] csname not applicable?
Why doesn't it seem possible to have the following macro \def\docall#1{\csname xmlprocess#1\encsname{}{}} and use it with \docall{buffer}? How then accomplish this? Runaway argument? \def \sourcenode {exam::15}\edef \currentsource {\xmlattdef {exam::15\ETC. ! File ended while scanning use of \buff_gobble. ... \luat_start_lua_code_indeed ...nd \directlua {#1}} Hans van der Meer ___ 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] select setups
If I have various setups like: \startxmlsetups xam:setups \xmlsetsetup{\xmldocument}{..{xam:*} \stopxmlsetups \xmlregistersetup{xam:setups} \startxmlsetups xbm:setups \xmlsetsetup{\xmldocument}{..{xbm:*} \stopxmlsetups \xmlregistersetup{xbm:setups} Is it then possible to have \xmlall{#1}{lpath} with a path such that on the top level restrictions apply to some of the xam:setups but to none of the xbm:setups? Hans van der Meer ___ 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] Hyphenation documentation
Hi Wolfgang, hi Hans, Thanks, I've updated the documentation accordingly. You have to use type 5 to create a rule for this, do you have a example where this is needed besides the one mentioned in the duden [1] example for a closing bracket. No, this was just a gut reaction. I can see the sense of the other way, too, and I couldn't hope to compete with the Duden for authority. ;-) \unexpanded\def\unhyphenated {\groupedcommand{\lefthyphenmin\maxdimen}\donothing} \unhyphenated also documented. The name is inconsistent with \setupalign[nothyphenated]; perhaps \nothyphenated is a better name? (You could also add it as a synonym, but it is cleaner to have only one name, I think.) Cheers, Sietse On 21 April 2013 12:43, Hans Hagen pra...@wxs.nl wrote: On 4/21/2013 10:26 AM, Wolfgang Schuster wrote: No, you have to use \hbox too but I think a command with a speaking name would be better. \unexpanded\def\unhyphenated {\groupedcommand{\lefthyphenmin\maxdimen}\donothing} I'll add that. 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 ___ ___ 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] csname not applicable?
Why doesn't it seem possible to have the following macro \def\docall#1{\csname xmlprocess#1\encsname{}{}} and use it with \docall{buffer}? How then accomplish this? encsname -- endcsname might do the trick. Cheers, Sietse ___ 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] Hyphenation documentation
On 4/21/2013 7:27 PM, Sietse Brouwer wrote: Hi Wolfgang, hi Hans, Thanks, I've updated the documentation accordingly. You have to use type 5 to create a rule for this, do you have a example where this is needed besides the one mentioned in the duden [1] example for a closing bracket. No, this was just a gut reaction. I can see the sense of the other way, too, and I couldn't hope to compete with the Duden for authority. ;-) \unexpanded\def\unhyphenated {\groupedcommand{\lefthyphenmin\maxdimen}\donothing} \unhyphenated also documented. The name is inconsistent with \setupalign[nothyphenated]; perhaps \nothyphenated is a better name? (You could also add it as a synonym, but it is cleaner to have only one name, I think.) that would be more like a directive: {.. \nothyphenated ...} - 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 ___
[NTG-context] calculating with dimension unit
In a book I produced with ConTeXt last year, I did a lot of calculation to be able to change the layout dynamicaly. With the actual version of ConTeXt I can't compile the book. I have tried a lot of things today ... without success. I hope my minimal-example helps you to understand, what I want to do - and what I am doing wrong: \starttext \setupexternalfigures[location={local,global,default}] \defineexpandable\ColumnA{30mm} \defineexpandable\ColumnB{40mm} \defineexpandable\ColumnABi{\dimexpr(\ColumnA + \ColumnB)} \defineexpandable\ColumnABii {\ctxlua{context(\ColumnA + \ColumnB)}} \newdimen\ColumnABiii \ColumnABiii = \dimexpr(\ColumnA + \ColumnB) A \ColumnA% ok B \ColumnB% ok % I sadly get only errors when I delete the comments: %ColumnABi: \ColumnABi %ColumnABii: \ColumnABii %ColumnABiii: \ColumnABiii %\externalfigure[cow][width=\ColumnABiii] ~ \page \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] calculating with dimension unit
\starttext \setupexternalfigures[location={local,global,default}] \defineexpandable\ColumnA{30mm} \defineexpandable\ColumnB{40mm} \defineexpandable\ColumnABi{\the\dimexpr(\ColumnA + \ColumnB)} \defineexpandable\ColumnABii {\ctxlua{context([==[\ColumnA + \ColumnB]==])}} \newdimen\ColumnABiii \ColumnABiii=\dimexpr(\ColumnA + \ColumnB) A \ColumnA% ok B \ColumnB% ok ColumnABi: \ColumnABi ColumnABii: \ColumnABii ColumnABiii: \the\ColumnABiii \externalfigure[cow][width=\ColumnABiii] ~ \page \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 ___