[NTG-context] [***SPAM***] Two-language environment and page breaking
Hi, one more question to my arabic-german table environment. See this code: \definefont[amiri][file:UthmanTN1Ver10.ttf*arabic at 11 pt] % or amiri-regular.ttf \define[1]\Arab{\setupalign[r2l]\amiri#1} %\showgrid \startsetups[arde] \setupTABLE[c][1][rightframe=on] \stopsetups \def\startarde {\bTABLE[frame=off,width=.5\textwidth,setups=arde,split=yes]} \def\stoparde {\eTABLE} \define[2]\arde {\bTR \bTD [align={tolerant, stretch}, roffset=1ex,style={\setupinterlinespace[line=3ex]}] #1\eTD \bTD[align={r2l,tolerant,stretch}, loffset=1ex,style={\amiri\setupinterlinespace[line=5.4ex]}] #2 \eTD \eTR} \starttext \startarde \arde{% Dies ist nur ein vollkommen sinnfreier Text und hat rein gar nichts mit dem Arabischen auf der rechten Seiten zutun. Wirklich gar nichts. Glauben Sie es mir? Also versuchen Sie nicht den Sinn des Arabischen hierdurch zu erfassen. } {% اللهُمَّ ارْزُقْنِي حَجَّ بَيْتِك الحَرامِ فِي عامِي هذا وَفِي كُلِّ عامٍ ما أَبْقَيْتَنِي فِي يُسْرٍ مِنْكَ وَعافِيَةٍ وَسَعَةِ رِزْقِ، وَلا تُخْلِنِي مِنْ تِلْكَ المَواقِفِ الكَرِيِمَةِ وَالمَشاهِدِ الشَّرِيفَةِ، وَزِيارَةِ قَبْرِ نَبِيِّكَ صَلَواتُكَ عَلَيْهِ وَآلِهِ، وَفِي جَمِيعِ حَوائِجِ الدُّنْيا وَالآخرةِ فَكُنْ } \stoparde \blank {\bf Should be the same like:}\blank \startarde \arde{% Dies ist nur ein vollkommen sinnfreier Text und hat rein gar nichts mit dem Arabischen auf der rechten Seiten zutun. } {% اللهُمَّ ارْزُقْنِي حَجَّ بَيْتِك الحَرامِ فِي عامِي هذا وَفِي كُلِّ عامٍ ما أَبْقَيْتَنِي فِي يُسْرٍ مِنْكَ وَعافِيَةٍ وَسَعَةِ رِزْقِ، وَلا تُخْلِنِي } \arde{Wirklich gar nichts. Glauben Sie es mir? Also versuchen Sie nicht den Sinn des Arabischen hierdurch zu erfassen.}{مِنْ تِلْكَ المَواقِفِ الكَرِيِمَةِ وَالمَشاهِدِ الشَّرِيفَةِ، وَزِيارَةِ قَبْرِ نَبِيِّكَ صَلَواتُكَ عَلَيْهِ وَآلِهِ، وَفِي جَمِيعِ حَوائِجِ الدُّنْيا وَالآخرةِ فَكُنْ } \stoparde \stoptext In the code you see two \startarde\stoparde blocks. The first block is the example, the correct setting. But the first block can not be broken over pages. This is fixed by the second block, where I seperated the text into two \arde, so now it can be broken over pages, because they are now two different tables. But if they are NOT broken over pages, they sould be set as if they were only one table, so as in the first \startarde\stoparde block. But the are not. You see the small distance between them. Is there a way to produce the behavior I descibed? It would be a workaround to get natural tables, which can be broken over pages (my manually sperating them). (Only natural tables are possible for this environment, and not normales tables, because of the needed different interlinespace of the two columns). Thanks. 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] \digits get \times instead of \cdot before exponent
Hi, is it possible to change the behaviour of \digits to have \cdot as in http://www.pragma-ade.com/general/magazines/mag-0003.pdf page 2 (table at the bottom) instead of \times as shown in the latest units-mkiv-document http://www.pragma-ade.com/general/manuals/units-mkiv.pdf pages 67? Thanks for your advise Christian Prim Example: \unit{10.5e3 Newton} should produce 10.5\cdot 10^3 N and not 10.5\times 10^3 N (also tested in the latest version at http://live.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] Crossref package
On 05/17/2013 04:47 PM, Zenlima wrote: Hi Patrick, I put the actual crossref package temporary under this link: http://zenlima.eu/t-crossref-0.9.3.zip I will try to catch an admin to fix the broken link. H. Thanks ! ___ 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] Crossref package
On May 21, 2013, at 9:29 AM, Patrick kpa_i...@yahoo.fr wrote: On 05/17/2013 04:47 PM, Zenlima wrote: Hi Patrick, I put the actual crossref package temporary under this link: http://zenlima.eu/t-crossref-0.9.3.zip I will try to catch an admin to fix the broken link. H. Thanks ! Fixed (and I uploaded the new version also, as that was the easiest way to check that all is ok now). Best wishes, Taco ___ 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] Missing °C symbol in math mode with dejavu font
On 5/20/2013 11:36 PM, Khaled Hosny wrote: On Mon, May 20, 2013 at 11:22:41PM +0200, Khaled Hosny wrote: My suggestion is to just use \phys_units_text_* always, since the decomposed, two characters is the preferred form for those two units. “In normal use, it is better to represent degrees Celsius ‘°C’ with a sequence of U+00B0 DEGREE SIGN + U+0043 LATIN CAPITAL LETTER C, rather than U+2103 DEGREE CELSIUS. For searching, treat these two sequences as identical. Similarly, the sequence U+00B0 DEGREE SIGN + U+0046 LATIN CAPITAL LETTER F is preferred over U+2109 DEGREE FAHRENHEIT, and those two sequences should be treated as identical for searching.” http://www.unicode.org/versions/Unicode6.2.0/ch15.pdf#G20445 Searching should be ok due to the tonunicode that mentions the two characters ... how about the visual aspect? Should we care about? It's no problem to make an option to always use the split version. 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] Missing °C symbol in math mode with dejavu font
On Tue, May 21, 2013 at 10:01:30AM +0200, Hans Hagen wrote: On 5/20/2013 11:36 PM, Khaled Hosny wrote: On Mon, May 20, 2013 at 11:22:41PM +0200, Khaled Hosny wrote: My suggestion is to just use \phys_units_text_* always, since the decomposed, two characters is the preferred form for those two units. “In normal use, it is better to represent degrees Celsius ‘°C’ with a sequence of U+00B0 DEGREE SIGN + U+0043 LATIN CAPITAL LETTER C, rather than U+2103 DEGREE CELSIUS. For searching, treat these two sequences as identical. Similarly, the sequence U+00B0 DEGREE SIGN + U+0046 LATIN CAPITAL LETTER F is preferred over U+2109 DEGREE FAHRENHEIT, and those two sequences should be treated as identical for searching.” http://www.unicode.org/versions/Unicode6.2.0/ch15.pdf#G20445 Searching should be ok due to the tonunicode that mentions the two characters ... how about the visual aspect? Should we care about? I think for ConTeXt purposes we should just ignore the composed form, it is there only for compatibility with some legacy CJK encodings and their use is almost discouraged. If user enters those code points directly, then he on his own, so nothing to be done here either. In short, this is just some of the compatibility nonsense crippling Unicode, we are better off pretending they do not exist Regards, Khaled ___ 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] \digits get \times instead of \cdot before exponent
Le lundi 20 mai 2013, Christian Prim a écrit : is it possible to change the behaviour of \digits to have \cdot as in http://www.pragma-ade.com/general/magazines/mag-0003.pdf page 2 (table at the bottom) instead of \times as shown in the latest units-mkiv-document http://www.pragma-ade.com/general/manuals/units-mkiv.pdf pages 67? Seems to be hardcoded in phys-dim.mkiv for the moment: l. 173-175 \unexpanded\def\digitspower #1{\times10\phys_digits_raised{#1}} \unexpanded\def\digitspowerplus #1{\times10\phys_digits_raised{\digitsplus#1}} \unexpanded\def\digitspowerminus #1{\times10\phys_digits_raised{\digitsminus#1}} ntextgarden.net/) -- Romain Diss romain.d...@yahoo.fr ___ 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] Missing °C symbol in math mode with dejavu font
In short, this is just some of the compatibility nonsense crippling Unicode, we are better off pretending they do not exist Second that. Arthur ___ 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] Percent symbol inside \type{}?
That does not work for me, Wolfgang. With or without the \start-/stoptext (which is redundant in my own document I assume). \placetable{Test} {\bTABLE \bTR \bTD[background=color,backgroundcolor=gray] tst \eTD \bTD \starttext \type{Hello %s --test world --test %s} \stoptext \eTD \eTR \eTABLE} Error: Runaway argument? \starttext \type {Hello \eTR \bTR \bTD [background=color,backgroundco\ETC. ! File ended while scanning use of \tabl_ntb_td_nop. On 20-05-13 15:04, Wolfgang Schuster wrote: Am 20.05.2013 um 14:51 schrieb Sander Maijers s.n.maij...@student.ru.nl: Hello, What is the most straightforward way to print a percent symbol inside the argument to \type{} (or, if necessary, more generally: monospace type) Is this easy enough for you? \starttext \type{%} \stoptext 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 ___ ___ 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] Percent symbol inside \type{}?
On 20-05-13 15:08, Marco Patzer wrote: On 2013–05–20 Sander Maijers wrote: What is the most straightforward way to print a percent symbol inside the argument to \type{} (or, if necessary, more generally: monospace type) I'd say the most straightforward way is using \asciimode: \starttext \startlines \mono{foo \% bar} \mono{foo \letterpercent\ bar} \asciimode \mono{foo % bar} \stoplines \stoptext That works, thanks! Marco PS: Please don't hijack threads. Start a new thread for each new issue. I have used a new subject line. If you see any problem that makes you think that I hijacked a thread could you point it out, please? ___ 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] \digits get \times instead of \cdot before exponent
On 5/21/2013 11:44 AM, Romain Diss wrote: Le lundi 20 mai 2013, Christian Prim a écrit : is it possible to change the behaviour of \digits to have \cdot as in http://www.pragma-ade.com/general/magazines/mag-0003.pdf page 2 (table at the bottom) instead of \times as shown in the latest units-mkiv-document http://www.pragma-ade.com/general/manuals/units-mkiv.pdf pages 67? Seems to be hardcoded in phys-dim.mkiv for the moment: l. 173-175 \unexpanded\def\digitspower #1{\times10\phys_digits_raised{#1}} \unexpanded\def\digitspowerplus #1{\times10\phys_digits_raised{\digitsplus#1}} \unexpanded\def\digitspowerminus #1{\times10\phys_digits_raised{\digitsminus#1}} ntextgarden.net/) there are several ways we can deal with this: % \def\digitstimessymbol{\symbol[units][times]} % \definesymbol[units][times][\times] % \definesymbol[units][times][\cdots] % \definesymbol[units][times][\kern.2\emwidth\cdot\kern.2\emwidth] \def\digitstimessymbol{\times} \def\digitstimessymbol{\cdot} \def\digitstimessymbol{\kern.2\emwidth\cdot\kern.2\emwidth} \unprotect \unexpanded\def\digitspower #1{\digitstimessymbol10\phys_digits_raised{#1}} \unexpanded\def\digitspowerplus #1{\digitstimessymbol10\phys_digits_raised{\digitsplus#1}} \unexpanded\def\digitspowerminus #1{\digitstimessymbol10\phys_digits_raised{\digitsminus#1}} \protect or maybe a key/value in setuptimes .. not sure yet 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] Percent symbol inside \type{}?
I have used a new subject line. If you see any problem that makes Changing the subject line is not enough. If you are reading another email sent to the list, and you press reply or something similar, the email you send will contain instructions to link it to the earlier email, and many mailers will display them as one thread (see attached image that shows how it is displayed in my mailer). I suspect that's what you've done here. Technically, the problem is that your email's headers contain a field References, which they shouldn't; but from a usage point of view the easiest is to simply start a new thread by using the compose feature of your mailer, or equivalent. As I see that you're using Thunderbird, I'm surprised that it doesn't display the emails in one thread, by the way. Arthur attachment: email-thread.png___ 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] \digits get \times instead of \cdot before exponent
Thanks for the tip Hans, but the kerning in \def\digitstimessymbol{\kern.**2\emwidth\cdot\kern.2\emwidth} should not take place in mathmode, only in textmode. Else the space is too big. Don't know how to deal with that. Christian 2013/5/21 Hans Hagen pra...@wxs.nl On 5/21/2013 11:44 AM, Romain Diss wrote: Le lundi 20 mai 2013, Christian Prim a écrit : is it possible to change the behaviour of \digits to have \cdot as in http://www.pragma-ade.com/**general/magazines/mag-0003.pdfhttp://www.pragma-ade.com/general/magazines/mag-0003.pdfpage 2 (table at the bottom) instead of \times as shown in the latest units-mkiv-document http://www.pragma-ade.com/**general/manuals/units-mkiv.pdfhttp://www.pragma-ade.com/general/manuals/units-mkiv.pdfpages 67? Seems to be hardcoded in phys-dim.mkiv for the moment: l. 173-175 \unexpanded\def\digitspower #1{\times10\phys_digits_**raised{#1}} \unexpanded\def\**digitspowerplus #1{\times10\phys_digits_**raised{\digitsplus#1}} \unexpanded\def\**digitspowerminus #1{\times10\phys_digits_**raised{\digitsminus#1}} ntextgarden.net/) there are several ways we can deal with this: % \def\digitstimessymbol{\**symbol[units][times]} % \definesymbol[units][times][\**times] % \definesymbol[units][times][\**cdots] % \definesymbol[units][times][\**kern.2\emwidth\cdot\kern.2\**emwidth] \def\digitstimessymbol{\times} \def\digitstimessymbol{\cdot} \def\digitstimessymbol{\kern.**2\emwidth\cdot\kern.2\emwidth} \unprotect \unexpanded\def\digitspower #1{\digitstimessymbol10\phys_** digits_raised{#1}} \unexpanded\def\**digitspowerplus #1{\digitstimessymbol10\phys_** digits_raised{\digitsplus#1}} \unexpanded\def\**digitspowerminus #1{\digitstimessymbol10\phys_** digits_raised{\digitsminus#1}} \protect or maybe a key/value in setuptimes .. not sure yet 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 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/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] \digits get \times instead of \cdot before exponent
On 5/21/2013 5:15 PM, Christian Prim wrote: Thanks for the tip Hans, but the kerning in \def\digitstimessymbol{\kern.__2\emwidth\cdot\kern.2\emwidth} should not take place in mathmode, only in textmode. Else the space is too big. Don't know how to deal with that. \def\digitstimessymbol{\mathortext{\cdot}{\kern.2\emwidth\cdot\kern.2\emwidth}} - 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] \digits get \times instead of \cdot before exponent
Now it's perfect! Will this be included in the next version of context? Christian 2013/5/21 Hans Hagen pra...@wxs.nl On 5/21/2013 5:15 PM, Christian Prim wrote: Thanks for the tip Hans, but the kerning in \def\digitstimessymbol{\kern._**_2\emwidth\cdot\kern.2\**emwidth} should not take place in mathmode, only in textmode. Else the space is too big. Don't know how to deal with that. \def\digitstimessymbol{\**mathortext{\cdot}{\kern.2\** emwidth\cdot\kern.2\emwidth}} --**--**- 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 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/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 ___
[NTG-context] [***SPAM***] \defineenumeration options?
Hi, I have two enumerations: \defineenumeration [exercici] [alternative=serried,text={\startcolor[middlecyan]Exercici\stopcolor},stopper={.\space},left={\bgroup},right={\egroup},width=fit,headstyle=\ss] \defineenumeration [exercicivora] [alternative=serried,text={\startcolor[middlecyan]Exercici\stopcolor},stopper={.\space},left={\bgroup\startframedtext[background=screen,frame=off,width=broad]},right={\stopframedtext\egroup},width=fit,headstyle=\ss] I just want to join into one: when I do \startexercici ... \stopexercici ConTeXt do the first, and when I pass \startexercici[vora] ... \stopexercici then do the second. That is, 'vora' as optional argument. How can I achieve that? I use MKIV. Thanks in advance, Xan. PS: Please CCme ___ 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] [***SPAM***] \defineenumeration options?
Am 21.05.2013 um 17:41 schrieb Xan dxpubl...@telefonica.net: Hi, I have two enumerations: \defineenumeration [exercici] You need a different name for the normal enumeration environment, e.g. exercicidefault [alternative=serried,text={\startcolor[middlecyan]Exercici\stopcolor},stopper={.\space},left={\bgroup},right={\egroup},width=fit,headstyle=\ss] \defineenumeration [exercicivora] [alternative=serried,text={\startcolor[middlecyan]Exercici\stopcolor},stopper={.\space},left={\bgroup\startframedtext[background=screen,frame=off,width=broad]},right={\stopframedtext\egroup},width=fit,headstyle=\ss] I just want to join into one: when I do \startexercici ... \stopexercici ConTeXt do the first, and when I pass \startexercici[vora] ... \stopexercici then do the second. That is, 'vora' as optional argument. How can I achieve that? You have to write you own version of the exercise environment which chooses one the two enumerations dependent on the argument. \def\startexercici {\dosingleempty\dostartexercici} \def\dostartexercici[#1]% {\edef\currentexercici{#1}% \doifelse{\currentexercici}{vora} \startexercicivora \startexercicidefault} \def\stopexercici {\doifelse{\currentexercici}{vora} \stopexercicivora \stopexercicidefault} 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] split natural table
I use a natural table to format my page header. I have another natural table in the body. When the body's table is split onto the second page it interferes with the formatting of the header's table, but only the header-table on the first page. I've included an example. Run as-is, the header has the correct format. Uncomment the last row of the body table to see the incorrect header formatting. This behavior also occurs using live.contextgarden.net (today, 2013-05-21). The incorrect header table format occurs with split=yes and split=repeat for the body table. If split=no then the header table keeps the correct format. TexLive 2012 (updated 2013-05-20 to frozen version) LuaTeX beta-0.70.2-2012052410 ConTeXt: 2012.05.30 11:26 MkIV fmt: 2012.9.13 \setuppapersize[letter][letter] \setuplayout[topspace=0pt, header=42pt, headerdistance=6pt, ] \setuppagenumbering[location=] \setupwhitespace[none] \define\syllabusheader{% \vskip0.1mm \bTABLE[frame=off,width=\textwidth] \setupTABLE[c][1][width=fit, align=raggedright,style={\bfb\ss}] \setupTABLE[c][2][width=broad,align=center, style={\bfd\ss}] \setupTABLE[c][3][width=fit, align=raggedleft, style={\bfb\ss}] \bTR \bTD Left \eTD \bTD Center \eTD \bTD Right \eTD \eTR \eTABLE } \setupheadertexts[{\framed[corner=09,width=broad,align=center,height=\headerheight]% {\syllabusheader}}] \starttext \bTABLE[split=repeat] \setupTABLE[c][1][width=10em,align={center,lohi},style={\bfx}] \setupTABLE[r][1][align={hilo,center},style={\bfx}] \setupTABLE[c][2][width=20em,style={\tfx}] \bTABLEhead \bTR\bTH Row number \eTH\bTH Content \eTH\eTR \eTABLEhead \bTABLEbody \bTR\bTC 1 \eTC\bTC \input{knuth} \eTC\eTR \bTR\bTC 2 \eTC\bTC \input{knuth} \eTC\eTR \bTR\bTC 3 \eTC\bTC \input{knuth} \eTC\eTR % \bTR\bTC 4 \eTC\bTC \input{knuth} \eTC\eTR % Uncomment this line to see wrong behavior \eTABLEbody \eTABLE \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] split natural table
Am 21.05.2013 um 18:55 schrieb Stephens, Kenny ksteph...@hsutx.edu: I use a natural table to format my page header. I have another natural table in the body. When the body’s table is split onto the second page it interferes with the formatting of the header’s table, but only the header-table on the first page. I’ve included an example. Run as-is, the header has the correct format. Uncomment the last row of the body table to see the incorrect header formatting. This behavior also occurs using live.contextgarden.net (today, 2013-05-21). The incorrect header table format occurs with “split=yes” and “split=repeat” for the body table. If “split=no” then the header table keeps the correct format. TexLive 2012 (updated 2013-05-20 to frozen version) LuaTeX beta-0.70.2-2012052410 ConTeXt: 2012.05.30 11:26 MkIV fmt: 2012.9.13 \setuppapersize[letter][letter] \setuplayout[topspace=0pt, header=42pt, headerdistance=6pt, ] \setuppagenumbering[location=] \setupwhitespace[none] \define\syllabusheader{% \vskip0.1mm \bTABLE[frame=off,width=\textwidth] \setupTABLE[c][1][width=fit, align=raggedright,style={\bfb\ss}] \setupTABLE[c][2][width=broad,align=center, style={\bfd\ss}] \setupTABLE[c][3][width=fit, align=raggedleft, style={\bfb\ss}] \bTR \bTD Left \eTD \bTD Center \eTD \bTD Right \eTD \eTR \eTABLE } \setupheadertexts[{\framed[corner=09,width=broad,align=center,height=\headerheight]% {\syllabusheader}}] This is a known problem when you use the same table environment in the body and for the header, you can use \framed to get the same result without these problems (it’s also faster). \startsetups[header] \startframed[corner=09,width=max,height=max,align={middle,low},foregroundstyle=\ss\bfb,offset=1ex] \startoverlay {\leftaligned {Left}} {\midaligned {Middle}} {\rightaligned{Right}} \stopoverlay \stopframed \stopsetups \setupheadertexts[\texsetup{header}] 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] [***SPAM***] \defineenumeration options?
Al 21/05/13 18:41, En/na Wolfgang Schuster ha escrit: Am 21.05.2013 um 17:41 schrieb Xan dxpubl...@telefonica.net mailto:dxpubl...@telefonica.net: Hi, I have two enumerations: \defineenumeration [exercici] You need a different name for the normal enumeration environment, e.g. exercicidefault [alternative=serried,text={\startcolor[middlecyan]Exercici\stopcolor},stopper={.\space},left={\bgroup},right={\egroup},width=fit,headstyle=\ss] \defineenumeration [exercicivora] [alternative=serried,text={\startcolor[middlecyan]Exercici\stopcolor},stopper={.\space},left={\bgroup\startframedtext[background=screen,frame=off,width=broad]},right={\stopframedtext\egroup},width=fit,headstyle=\ss] I just want to join into one: when I do \startexercici ... \stopexercici ConTeXt do the first, and when I pass \startexercici[vora] ... \stopexercici then do the second. That is, 'vora' as optional argument. How can I achieve that? You have to write you own version of the exercise environment which chooses one the two enumerations dependent on the argument. \def\startexercici {\dosingleempty\dostartexercici} \def\dostartexercici[#1]% {\edef\currentexercici{#1}% \doifelse{\currentexercici}{vora} \startexercicivora \startexercicidefault} \def\stopexercici {\doifelse{\currentexercici}{vora} \stopexercicivora \stopexercicidefault} Wolfgang Thanks Wolfgang. I note this is a little bit complicated than LaTeX define command (by me). But, thanks a lot, Xan. ___ 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] Percent symbol inside \type{}?
Am 21.05.2013 um 16:02 schrieb Sander Maijers s.n.maij...@student.ru.nl: That does not work for me, Wolfgang. With or without the \start-/stoptext (which is redundant in my own document I assume). My example was a short a complete document and not a snippet which can be just copied in a document. \placetable{Test} {\bTABLE \bTR \bTD[background=color,backgroundcolor=gray] tst \eTD \bTD \starttext \type{Hello %s --test world --test %s} \stoptext \eTD \eTR \eTABLE} Error: Runaway argument? \starttext \type {Hello \eTR \bTR \bTD [background=color,backgroundco\ETC. ! File ended while scanning use of \tabl_ntb_td_nop. This can’t work because \type doesn’t work when used in a natural table or in tabulate because it can’t change the meaning of % which has already disappeared at this moment. Using \letterpercent or \asciimode are the best solutions in this case. 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] \digits get \times instead of \cdot before exponent
Hi Hans, Christian Prim wrote: is it possible to change the behaviour of \digits to have \cdot [...] instead of \times [...]? Hans wrote: there are several ways we can deal with this: [...] or maybe a key/value in setuptimes .. not sure yet We've already got \setdigitmode, \setdigitorder, and \setdigitspace; it might make sense to create a \setupdigits to consolidate these setups into one interface. Something like this: \setupdigits [mode=4, % --\setdigitmode{4} % (decimal period, thinspace between groups) inputdecimalmark={,}, % --\setdigitorder{0} signspace=yes,% --\setdigitsign{1}; '+ 1.4', not '+1.4' times=\times, % or times=\cdot ] Cheers, Sietse --- P.s: I've been thinking I'd like to write more contexty interface that doesn't use predefined modes, but lets you setup the decimal mark, separator mark, the input decimal mark, etc. Something like this: \setupdigits [inputdecimal={.}, % input 3.1415926535 decimal={,} separator=\space, groupsize=4, % output 3,1415 9265 45 signspace=,] % +3.14159... That could even tie into \setuplanguage to allow setting language-specific defaults. Would anyone be interested in this? ___ 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] Numbers in Headings
Hello everyone, When I try the following simple example, the first \subsection generates 1 as the section number. I would want to get a 1.0.1 without defining my own section numbers. Is there an easier way to get the desired number? Thanks for your help. Jannik \starttext \chapter{Test} \subsection{Test} \chapter{Test} \section{Test} \subsection{Test} \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] \digits get \times instead of \cdot before exponent
We've already got \setdigitmode, \setdigitorder, and \setdigitspace; it might make sense to create a \setupdigits to consolidate these setups into one interface. Something like this: \setupdigits [mode=4, % --\setdigitmode{4} % (decimal period, thinspace between groups) inputdecimalmark={,}, % --\setdigitorder{0} signspace=yes,% --\setdigitsign{1}; '+ 1.4', not '+1.4' times=\times, % or times=\cdot ] +1 P.s: I've been thinking I'd like to write more contexty interface that doesn't use predefined modes, but lets you setup the decimal mark, separator mark, the input decimal mark, etc. Something like this: \setupdigits [inputdecimal={.}, % input 3.1415926535 decimal={,} separator=\space, groupsize=4, % output 3,1415 9265 45 signspace=,] % +3.14159... That could even tie into \setuplanguage to allow setting language-specific defaults. Would anyone be interested in this? +1 again! -- Romain Diss romain.d...@yahoo.fr ___ 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] split natural table
From: ntg-context-boun...@ntg.nl [ntg-context-boun...@ntg.nl] on behalf of Wolfgang Schuster [schuster.wolfg...@gmail.com] Sent: Tuesday, May 21, 2013 12:20 PM To: mailing list for ConTeXt users Subject: Re: [NTG-context] split natural table Am 21.05.2013 um 18:55 schrieb Stephens, Kenny ksteph...@hsutx.edumailto:ksteph...@hsutx.edu: I use a natural table to format my page header. I have another natural table in the body. When the body’s table is split onto the second page it interferes with the formatting of the header’s table, but only the header-table on the first page. I’ve included an example. Run as-is, the header has the correct format. Uncomment the last row of the body table to see the incorrect header formatting. This behavior also occurs using live.contextgarden.nethttp://live.contextgarden.net (today, 2013-05-21). The incorrect header table format occurs with “split=yes” and “split=repeat” for the body table. If “split=no” then the header table keeps the correct format. TexLive 2012 (updated 2013-05-20 to frozen version) LuaTeX beta-0.70.2-2012052410 ConTeXt: 2012.05.30 11:26 MkIV fmt: 2012.9.13 \setuppapersize[letter][letter] \setuplayout[topspace=0pt, header=42pt, headerdistance=6pt, ] \setuppagenumbering[location=] \setupwhitespace[none] \define\syllabusheader{% \vskip0.1mm \bTABLE[frame=off,width=\textwidth] \setupTABLE[c][1][width=fit, align=raggedright,style={\bfb\ss}] \setupTABLE[c][2][width=broad,align=center, style={\bfd\ss}] \setupTABLE[c][3][width=fit, align=raggedleft, style={\bfb\ss}] \bTR \bTD Left \eTD \bTD Center \eTD \bTD Right \eTD \eTR \eTABLE } \setupheadertexts[{\framed[corner=09,width=broad,align=center,height=\headerheight]% {\syllabusheader}}] This is a known problem when you use the same table environment in the body and for the header, you can use \framed to get the same result without these problems (it’s also faster). \startsetups[header] \startframed[corner=09,width=max,height=max,align={middle,low},foregroundstyle=\ss\bfb,offset=1ex] \startoverlay {\leftaligned {Left}} {\midaligned {Middle}} {\rightaligned{Right}} \stopoverlay \stopframed \stopsetups \setupheadertexts[\texsetup{header}] Wolfgang -- This fails for me. I commented my approach and replaced it with yours. Here is what that section of the file now looks like: %\define\syllabusheader{% % \vskip0.1mm % \bTABLE[frame=off,width=\textwidth] % \setupTABLE[c][1][width=fit, align=raggedright,style={\bfb\ss}] % \setupTABLE[c][2][width=broad,align=center, style={\bfd\ss}] % \setupTABLE[c][3][width=fit, align=raggedleft, style={\bfb\ss}] % \bTR \bTD Left \eTD \bTD Center \eTD \bTD Right \eTD \eTR % \eTABLE % } %\setupheadertexts[{\framed[corner=09,width=broad,align=center,height=\headerheight]% % {\syllabusheader}}] \startsetups[header] \startframed[corner=09,width=max,height=max,align={middle,low},foregroundstyle=\ss\bfb,offset=1ex] \startoverlay {\leftaligned {Left}} {\midaligned {Middle}} {\rightaligned{Right}} \stopoverlay \stopframed \stopsetups \setupheadertexts[\texsetup{header}] But I get the error: ! Undefined control sequence. argument \texsetup {header}{}{}{} \firstoftwoarguments #1#2-#1 \doattributes ...sname #1#2\@EA \endcsname \fi {#4 }\dostopattributes \dosingletexts ...atetexts {#1#2#5}{#6{}{}{}}} \egroup argument ...tk \v!header \v!text \c!middletext } \hss }\hskip -\makeupwidth... \dododoplacelayouttextline ...#2 #3}\hbox to #1{#4 }\stoplayoutcomponent \get... ... l.46 \eTABLE But I like your idea. It is definitely cleaner and faster is always nice. Kenny ___ 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] split natural table
Am 22.05.2013 um 04:58 schrieb Stephens, Kenny ksteph...@hsutx.edu: This fails for me. I commented my approach and replaced it with yours. Here is what that section of the file now looks like: %\define\syllabusheader{% % \vskip0.1mm % \bTABLE[frame=off,width=\textwidth] % \setupTABLE[c][1][width=fit, align=raggedright,style={\bfb\ss}] % \setupTABLE[c][2][width=broad,align=center, style={\bfd\ss}] % \setupTABLE[c][3][width=fit, align=raggedleft, style={\bfb\ss}] % \bTR \bTD Left \eTD \bTD Center \eTD \bTD Right \eTD \eTR % \eTABLE % } %\setupheadertexts[{\framed[corner=09,width=broad,align=center,height=\headerheight]% % {\syllabusheader}}] \startsetups[header] \startframed[corner=09,width=max,height=max,align={middle,low},foregroundstyle=\ss\bfb,offset=1ex] \startoverlay {\leftaligned {Left}} {\midaligned {Middle}} {\rightaligned{Right}} \stopoverlay \stopframed \stopsetups \setupheadertexts[\texsetup{header}] Use the normal \framed command and replace \texsetup with \setups in \setupheadertexts and it will also work with your older version of context. \startsetups[header] \framed[corner=09,width=max,height=max,align={middle,low},foregroundstyle=\ss\bfb,offset=1ex]\bgroup \startoverlay {\leftaligned {Left}} {\midaligned {Middle}} {\rightaligned{Right}} \stopoverlay \egroup \stopsetups \setupheadertexts[\setups{header}] When you have a longer text for all three fields you need a different solution because \startoverlay … \stopoverlay can only position texts which fit in a single line. \startsetups[header] \framed[corner=09,width=max,height=max,foregroundstyle=\ss\bfb,offset=1ex]\bgroup \framed[frame=off,height=\vsize,width=.33\hsize,align={low,flushleft}] {Left} \framed[frame=off,height=\vsize,width=.33\hsize,align={low,middle}]{Middle} \framed[frame=off,height=\vsize,width=.33\hsize,align={low,flushright}]{Right} \egroup \stopsetups \setupheadertexts[\setups{header}] 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] split natural table
Use the normal \framed command and replace \texsetup with \setups in \setupheadertexts and it will also work with your older version of context. \startsetups[header] \framed[corner=09,width=max,height=max,align={middle,low},foregroundstyle=\ss\bfb,offset=1ex]\bgroup \startoverlay {\leftaligned {Left}} {\midaligned {Middle}} {\rightaligned{Right}} \stopoverlay \egroup \stopsetups \setupheadertexts[\setups{header}] When you have a longer text for all three fields you need a different solution because \startoverlay … \stopoverlay can only position texts which fit in a single line. \startsetups[header] \framed[corner=09,width=max,height=max,foregroundstyle=\ss\bfb,offset=1ex]\bgroup \framed[frame=off,height=\vsize,width=.33\hsize,align={low,flushleft}] {Left} \framed[frame=off,height=\vsize,width=.33\hsize,align={low,middle}]{Middle} \framed[frame=off,height=\vsize,width=.33\hsize,align={low,flushright}]{Right} \egroup \stopsetups \setupheadertexts[\setups{header}] Wolfgang ___ I could not use \framed[corner=09,width=MAX,height=MAX,foregroundstyle=\ss\bfb,offset=1ex]\bgroup but \framed[corner=09,width=broad,height=\headerheight,foregroundstyle=\ss\bfb,offset=1ex]\bgroup worked perfectly. Many thanks. Keep up the good work on ConTeXt---it's becoming my favorite tool for creating materials for my courses, reports, letters, etc. Kenny ___ 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 ___