Re: [NTG-context] setuphead for in-paragraph head ?

2014-01-09 Thread Jaroslav Hajtmar

Hello Wolfgang, Otared and Aditya.
Thanks for your advice and treatments. It is there a complete working 
example?
I am sorry, but I am not able to achieve the proposed modifications to 
make it work.

Thanx.
Jaroslav Hajtmar






Dne 9.1.2014 18:41, Wolfgang Schuster napsal(a):


Am 09.01.2014 um 18:36 schrieb Otared Kavian >:



Hi Wolfgang, Hi Aditya,

Thanks for your attention.
Unfortunately adding
\keepblocks[question]
the example I sent before does not work in mkiv, and changing
location=hanging
to
alternative=hanging
does not help neither…
The error message in mkiv is:
\dostopnormalblock ...meter \c!after \par \egroup

 ...fact that $2\times 5 = 10$. \dostopnormalblock
\dostartnormalblock {hint}...
\dodowithpar ...dler \v!construction \endcsname #1
\csname \??constructionsto…

So I don’t know what to do if one has to use mkiv.


When you enumerations in this form

\beginanswer
\answer $10$
\endanswer

you have to finish the paragraph, e.g. by adding \par

\beginanswer
\answer $10$\par
\endanswer

or better use the start/stop commands for the enumeration.

\beginanswer
\startanswer
$10$
\stopanswer
\endanswer

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] Macro expansion inside \type

2014-01-09 Thread Aditya Mahajan

On Fri, 10 Jan 2014, Devendra Ghate wrote:


Hello Everyone,

Consider the following MWE:

\define\author{Devendra Ghate}
\starttext
\type{\author}
\stoptext

As mentioned on the wiki, this doesn't expand `\author` but rather
prints it as it is. However, I would like `\author` to be expanded
before it is typeset.


Type is for verbatim material. If you want monospaced fonts, use 
\mono{\author}.


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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] kpfonts, math, type 1 font

2014-01-09 Thread Elspeth McGullicuddy
On Tue, Jan 7, 2014 at 8:48 PM, Wolfgang Schuster
 wrote:
>
> You can also put the goodies files and the typescript file in the same
> folder as your test files which makes it easier to test them and to make
> changes. When you’re finished you can let us take a look at them
> and Hans can add them to the core.

Two files: kpfonts-math.lfg and testfile004.tex.

It works rather well with the formulas of that file:
https://github.com/khaledhosny/euler-otf/blob/master/tests/test.tex.

Main issue: $\bf \Gamma$ produces "medium" \Gamma, though:
["kpfonts-bf"] = {...
{ name = "jkpbmia",  vector = "tex-mr", skewchar=0x7F },
should make it bold.
Why is this vector never selected?

Other issue: Two consecutive \Gamma, are overlapping a lot.

In case I add a vector for a script font which is in jkpsyd.pfb. What
font switch would be used to select this vector (vector="tex-md")?

Chris

>
> Wolfgang
>


kpfonts-math.lfg
Description: Binary data


testfile004.tex
Description: TeX document
___
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] Macro expansion inside \type

2014-01-09 Thread Devendra Ghate

Hello Everyone,

Consider the following MWE:

\define\author{Devendra Ghate}
\starttext
 \type{\author}
\stoptext

As mentioned on the wiki, this doesn't expand `\author` but rather
prints it as it is. However, I would like `\author` to be expanded
before it is typeset.

Is this possible?

Regards,
Devendra Ghate
___
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] Drop folio on first page of chapter.

2014-01-09 Thread john Culleton
My chapter heads have no headline. For chapter
heads only I want to put the page number on the
bottom of the page centered. How do I do this?

definepagebreak
  [mychapterpagebreak]
  [yes,header,right]


\setuphead[chapter]
[alternative=middle,
header=empty,
align=normal,
number=no,
page=mychapterpagebreak,
style=ssbfc,
before={\blank[2*big]},
after={\blank[2*big]}]



-- 
John Culleton
Wexford Press
Free list of books for self-publishers:
http://wexfordpress.net/shortlist.html
PDF e-book: "Create Book Covers with Scribus"
available at
http://www.booklocker.com/books/4055.html
___
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] Mixing math and text font

2014-01-09 Thread Wolfgang Schuster

Am 09.01.2014 um 23:12 schrieb Joshua Krämer :

> Dear Wolfgang,
> 
> thanks for your clarifications.  I will avoid the spec method.  The
> remaining question is, if "regularfont=" should be avoided, too, in
> favour of "tf=", or will this be made to work in the future?

The “regularfont”, “regularfeatures” etc. keys are going to disappear at some
point because both settings can be done with with “tf”, “it” etc. keys.

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] Mixing math and text font

2014-01-09 Thread Joshua Krämer
Dear Wolfgang,

thanks for your clarifications.  I will avoid the spec method.  The
remaining question is, if "regularfont=" should be avoided, too, in
favour of "tf=", or will this be made to work in the future?

> \definefallbackfamily[xxxface][math][xxx][regularfont=file:xxxitalic1,preset=math:lowercaseitalic]

Kind regards,
Joshua

___
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] Mixing math and text font

2014-01-09 Thread Wolfgang Schuster

Am 09.01.2014 um 22:30 schrieb Joshua Krämer :

> Am Thu, 9 Jan 2014 20:41:15 +0100
> schrieb Wolfgang Schuster :
> 
>>> (3) I have a typeface that uses unusual style names: "roman1",
>>> "roman2", "italic1", "italic2";  1 is regular, 2 is bold weight.
>>> The following works:
>>> 
>>> \definefontfamily[xxxface][serif][xxx][regularfont=xxxroman1, 
>>> italicfont=xxxitalic1, boldfont=xxxroman2]
>>> \setupbodyfont[xxxface]
>>> \starttext
>>> abc {\it abc} {\bf abc}
>>> \stoptext
>>> 
>>> This works for roman1 only:
>>> 
>>> \definefontfamily[xxxface][serif][xxx][regularfont=spec:roman1, 
>>> italicfont=spec:italic1, boldfont=spec:roman2]
>>> 
>>> Even this works for roman1 only:
>>> 
>>> \definefontfamily[xxxface][serif][xxx][regularfont=spec:roman1, 
>>> italicfont=xxxitalic1, boldfont=xxxroman2]
>> 
>> The name of the font files has nothing to do with way how
>> \definefontfamily collects the individual files for each style, to do
>> this it uses internal names and values from the font.
> 
> I've got the values from the output of "mtxrun --script fonts --list
> --all --pattern=xxx" (and compared with the name/style values in
> Fontforge), so I don't understand why "spec:roman1" works, but
> "spec:italic1" doesn't.
> 
> Additionally, what I think must be a bug is that
> "italicfont=file:xxxitalic1, boldfont=file:xxxroman2" works but stops
> working if I add "regularfont=spec:roman1":
> 
> \definefontfamily[xxxface][serif][xxx][regularfont=spec:roman1,
> italicfont=file:xxxitalic1, boldfont=file:xxxroman2]
> 
> Maybe if one of the values uses the "spec:" selector, all the values
> are treated as spec values despite the "file:" selector given?

What you try can’t work because spec is one of context three methods to load a 
font,
the first two are “file:…” and “name:…”. With the spec method you give context 
a list
of features for the font you want to load, the spec specifier has 5 argument:

1. The family name of the font
2. The weight of the font (light, normal, medium, bold, …)
3. The style of the font (normal, italic, slanted, …)
4. The width of the font (condensed, normal, expanded, …)
5. The variant of the font (normal, old style or smallcaps)

When you load a font you separate all arguments by a hyphen, when you leave
arguments out they get normal as default values. Below is a example how to load
TeX Gyre Pagella Regular and Bold with the spec method:

\starttext

{\definedfont[spec:texgyrepagella-normal]TeX Gyre Pagella Regular}

{\definedfont[spec:texgyrepagella-bold]TeX Gyre Pagella Bold}

\stoptext

When you want now the bolditalic form of the font you have to set the third 
argument
for the style:

\starttext

{\definedfont[spec:texgyrepagella-bold-normal]TeX Gyre Pagella Bold}

{\definedfont[spec:texgyrepagella-bold-italic]TeX Gyre Pagella Bolditalic}

\stoptext

When you now use the spec method with \definefontfamily nearly the same thing
happens but you set only the argument 2–5 because the name of the font was
already set.

>> When you use a opentype math font the upright, italic, bold etc.
>> characters are all in the same file which uses only the regular style
>> (a few math fonts provide also a bold style which can be useful in
>> headings).
>> 
>> Because there is only a upright math font you have to set a fallbacks
>> also for the upright style even when the font you’re using is italic,
>> e.g.
>> 
>> \definefallbackfamily[xxxface][math][xxx][tf=file:xxxitalic1,preset=math:lowercaseitalic]
> 
> Thanks, this works.  For some reason, "tf=" works, but "regularfont="
> doesn't.
> 
> And by the way, this works:
> \definefontfamily[leitura][serif][Leitura News][regularfont=spec:roman2]
> 
> and this doesn't work:
> \definefontfamily[leitura][serif][Leitura News][tf=spec:roman2]
> 
> So in some cases only "regularfont" seems to work, and in some cases only 
> "tf“.

Just avoid the spec method, it depends a lot on the information in the font
and is not always reliable, because of this I don’t use it as default method
to search for all files in a font family.

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] Fallback for mathematical lowercase h and hyphen

2014-01-09 Thread Joshua Krämer
Dear list!

(1) With the following example, only manually inserted hyphens are
replaced. How can I replace the hyphen automatically inserted at
linebreaks?

\definefontfeature[extended][default][extend=3]
\definefallbackfamily[mainface][serif][TeX Gyre Termes]
[range={0x0002d}, features=extended]
\definefontfamily[mainface][serif][Latin Modern Roman]
\setupbodyfont[mainface, 30pt]
\starttext
line-break \dorecurse{100}{linebreak }
\stoptext

I have added the feature "extended" only for better distinction.


(2) In the following example, the lowercase h is not replaced. I think
this may be because it is separately encoded as "Planck
constant" (U+210E) in math fonts.

\definefontfamily[mainface][serif][Latin Modern Roman]
\definefallbackfamily[mainface][math][Latin Modern Roman]
[preset=math:lowercaseitalic]
\definefontfamily[mainface][math][TeX Gyre Termes Math]
\setupbodyfont[mainface, 30pt]
\starttext
$ abch $
\stoptext

Kind regards,
Joshua Krämer


___
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] Malayalam shaping with mkiv/LuaTeX

2014-01-09 Thread Rajeesh K Nambiar
On Thu, Jan 9, 2014 at 7:11 PM, Hans Hagen  wrote:

>>>
>>> Remove \usemodule[font-odv], the code is part of the core and reloading
>>> it causes only problems.
>>
>>
>> Indeed, that fixes the compilation! And 2-part matras are fine now.
>> But the output (shaping) is not what is expected as you have observed.
>> Notably:
>> 1.  When a pre-base matra follows the "akhn" ligatures are broken
>> 2. "pref", "pstf" and "blwf" ligatures are not formed
>
>
> you need to identify the place in the code where that has to happen after
> which i can have a look at it (with real minimal examples)
>
With the initial patch I had sent, these were working okay (ie, akhn,
pref, pstf and blwf ligatures were being formed).
Minimal character sequence for test case:
\char"0D26 \char"0D4D \char"0D26 \char"0D47%% 
needs to form 

With initial patch, in "methods.dev2", (syllablestart,syllableend)
were: (0D26, 0D26) {cluster DA, VIRAMA, DA} and (0D47,0D47) {E}.
Current beta gets (0D26,0D4D) {cluster DA, VIRAMA} and (0D26,0D47)
{DA, E}. Something changed in "analyze_next_chars_two", may be?

Okay - found that you had not considered 0D4D (virama/halant) not as
"halant{}" but as "stress_tone_mark{}". Adding 0D4D to the array
"halant{}" restores the previous behaviour - ligatures are formed but
with issues mentioned in the initial mail. "analyze_next_chars_two"
indeed looks for halant.

>
>

-- 
Regards,
Rajeesh
___
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] Mixing math and text font

2014-01-09 Thread Joshua Krämer
Am Thu, 9 Jan 2014 20:41:15 +0100
schrieb Wolfgang Schuster :

> > (3) I have a typeface that uses unusual style names: "roman1",
> > "roman2", "italic1", "italic2";  1 is regular, 2 is bold weight.
> > The following works:
> > 
> > \definefontfamily[xxxface][serif][xxx][regularfont=xxxroman1, 
> > italicfont=xxxitalic1, boldfont=xxxroman2]
> > \setupbodyfont[xxxface]
> > \starttext
> > abc {\it abc} {\bf abc}
> > \stoptext
> > 
> > This works for roman1 only:
> > 
> > \definefontfamily[xxxface][serif][xxx][regularfont=spec:roman1, 
> > italicfont=spec:italic1, boldfont=spec:roman2]
> > 
> > Even this works for roman1 only:
> > 
> > \definefontfamily[xxxface][serif][xxx][regularfont=spec:roman1, 
> > italicfont=xxxitalic1, boldfont=xxxroman2]
> 
> The name of the font files has nothing to do with way how
> \definefontfamily collects the individual files for each style, to do
> this it uses internal names and values from the font.

I've got the values from the output of "mtxrun --script fonts --list
--all --pattern=xxx" (and compared with the name/style values in
Fontforge), so I don't understand why "spec:roman1" works, but
"spec:italic1" doesn't.

Additionally, what I think must be a bug is that
"italicfont=file:xxxitalic1, boldfont=file:xxxroman2" works but stops
working if I add "regularfont=spec:roman1":

\definefontfamily[xxxface][serif][xxx][regularfont=spec:roman1,
italicfont=file:xxxitalic1, boldfont=file:xxxroman2]

Maybe if one of the values uses the "spec:" selector, all the values
are treated as spec values despite the "file:" selector given?


> When you use a opentype math font the upright, italic, bold etc.
> characters are all in the same file which uses only the regular style
> (a few math fonts provide also a bold style which can be useful in
> headings).
> 
> Because there is only a upright math font you have to set a fallbacks
> also for the upright style even when the font you’re using is italic,
> e.g.
> 
> \definefallbackfamily[xxxface][math][xxx][tf=file:xxxitalic1,preset=math:lowercaseitalic]

Thanks, this works.  For some reason, "tf=" works, but "regularfont="
doesn't.

And by the way, this works:
\definefontfamily[leitura][serif][Leitura News][regularfont=spec:roman2]

and this doesn't work:
\definefontfamily[leitura][serif][Leitura News][tf=spec:roman2]

So in some cases only "regularfont" seems to work, and in some cases
only "tf".

Kind regards,
Joshua


___
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] Mixing math and text font

2014-01-09 Thread Wolfgang Schuster

Am 09.01.2014 um 12:01 schrieb Joshua Krämer :

> Thanks for your hard work!  I have a few additional questions regarding 
> the new system and font fallbacks.
> 
> 
> (1) How can I replace the hyphen automatically inserted at linebreaks?  
> If I use the following, only manually inserted hyphens are replaced:
> 
> \definefallbackfamily[mainface][serif][TeX Gyre Termes][range={0x0002d}]

Dunno, can you make this a separate question?

> (2) What effect does force=yes have?  It doesn't seem to make a 
> difference for me.

When you set “force=yes” (default value) context uses the fallback font even
when the character exists the main font.

> (3) I have a typeface that uses unusual style names: "roman1", "roman2", 
> "italic1", "italic2";  1 is regular, 2 is bold weight.  The following 
> works:
> 
> \definefontfamily[xxxface][serif][xxx][regularfont=xxxroman1, 
> italicfont=xxxitalic1, boldfont=xxxroman2]
> \setupbodyfont[xxxface]
> \starttext
> abc {\it abc} {\bf abc}
> \stoptext
> 
> This works for roman1 only:
> 
> \definefontfamily[xxxface][serif][xxx][regularfont=spec:roman1, 
> italicfont=spec:italic1, boldfont=spec:roman2]
> 
> Even this works for roman1 only:
> 
> \definefontfamily[xxxface][serif][xxx][regularfont=spec:roman1, 
> italicfont=xxxitalic1, boldfont=xxxroman2]

The name of the font files has nothing to do with way how \definefontfamily
collects the individual files for each style, to do this it uses internal names
and values from the font.

In a case where \definefontfamily can’t find all styles you can select them
with the name of the files:

\definefontfamily[][

[NTG-context] betas

2014-01-09 Thread Hans Hagen

Hi,

As some of you might have noticed, we're in transition to luatex 0.80
(currently 0.78.1). This binary is somewhat faster with respect to nodes 
without modification of Lua code, but it also provides an additional 
node field access mechanism. Luigi and I spent quite some time on 
getting that done and in the process some 70 context files were adapted 
(as we needed to test). However, it's likely that I have missed some 
needed changes. As both access mechanisms cannot be mixed, one has to be 
consistent in usage. Also, the somewhat faster (new) usage is more 
sensitive for errors so it has to be used with robust (proven) code 
(read: pluggable code can best use the traditional node field accessors 
which also have been sped up). And of course it only makes sense for 
very demanding cases (as stock luatex is already rather efficient now), 
think of devanagari (where we can get 50% faster) and complex arabic 
(some 25%). As ConTeXt spends > 50% of its time in Lua it might make a 
difference in other places too.


Anyway, for instance the 175 fonts-mkiv manual processes 10% faster due 
to this and sometimes more can be achieved (it really depends on how 
much Lua enhanced mechanisms are used). Roughly I get on my win 8.1 64 
bit laptop for the font manual:


10sec luatex0.77 with previous context code base
10.25 sec luatex0.77 with current context code base
 9.00 sec luatex0.78 with current context code base
 7.50 sec luajittex 0.78 with current context code base

(This manual loads quite some fonts in the process.)

In case you wonder why speed is an issue: it really matters when tex is 
used as a service, and I like fast edit-test cycles too. The target is 
to get 20 pps or more even for complex documents. It's not that hard to 
get 550 pps for simple 1000 page one-word-per page documents but when 
much more kicks in we quickly drop to 15-20 pps.


Also, Luigi and I also want to reach reasonable speeds on android phones 
(triggered by Harald's experiments at the context meeting) but that's 
another topic.


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] Malayalam shaping with mkiv/LuaTeX

2014-01-09 Thread Hans Hagen

On 1/8/2014 11:02 PM, Rajeesh K Nambiar wrote:

On Wed, Jan 8, 2014 at 10:53 PM, Wolfgang Schuster
 wrote:


Am 08.01.2014 um 22:51 schrieb Rajeesh K Nambiar :


On Wed, Jan 8, 2014 at 10:39 PM, Wolfgang Schuster
 wrote:


Am 08.01.2014 um 22:27 schrieb Rajeesh K Nambiar
:

I just did a clean install of beta to be sure and the issue persists.
Indeed there is no 'start' at line 879 in my system as well. I tried
on two different systems (both are 32 bit Linux). Are you able to
compile the test file?


I can process your example without problem even though the output doesn’t
like for all cases like the text in the image.

BTW: Can you attach your test file.


Thanks for checking, Wolfgang.
Attached the test file.


Remove \usemodule[font-odv], the code is part of the core and reloading it 
causes only problems.


Indeed, that fixes the compilation! And 2-part matras are fine now.
But the output (shaping) is not what is expected as you have observed. Notably:
1.  When a pre-base matra follows the "akhn" ligatures are broken
2. "pref", "pstf" and "blwf" ligatures are not formed


you need to identify the place in the code where that has to happen 
after which i can have a look at it (with real minimal examples)


-
  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] \setcharactercasing misbehaviour

2014-01-09 Thread Marco Patzer
On 2014–01–09 Hans Hagen wrote:

> On 1/9/2014 12:56 PM, Marco Patzer wrote:
> >Hi,
> >
> >\setcharactercasing requires a new paragraph to work. Seems like a
> >bug to me.
> >
> >\starttext
> >   \setcharactercasing[Word]foo  %% Uppercase
> >   \setcharactercasing[Word]bar  %% lowercase
> >
> >   \setcharactercasing[Word]bar  %% Uppercase
> >\stoptext
> 
> That's the difference between Word and Words so it is intentional.

Words indeed works, thanks.

Marco


signature.asc
Description: Digital signature
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Language “deo” causes “TeX capacity exceeded” when units are used

2014-01-09 Thread Hans Hagen

On 1/9/2014 12:59 PM, Marco Patzer wrote:

Hi,

the following example exceeds TeX's capacity:

\mainlanguage [deo]
\starttext
   \unit{10 square metre}
\stoptext


fixed in next beta (needs testing) but if you're in a hurry you can 
patch lang-lab.mkiv


% \else\ifcsname\??language#4\s!default\endcsname
%   \expandafter#5\csname\??language#4\s!default\endcsname{##2}%
\else\ifcsname\??language##1\s!default\endcsname
  \expandafter#5\csname\??language##1\s!default\endcsname{##2}%


-
  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] latest beta and luajittex in Linux 32-bit

2014-01-09 Thread Pablo Rodriguez
On 01/09/2014 01:37 PM, Mojca Miklavec wrote:
> On Wed, Jan 8, 2014 at 8:47 PM, Pablo Rodriguez wrote:
> 
> I added Alan's binary now, but I currently don't have a suitable linux
> box to test whether it works.

Many thanks for the replies and the help, Luigi, Alan and Mojca.

Everything works fine now.


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] setuphead for in-paragraph head ?

2014-01-09 Thread Wolfgang Schuster

Am 09.01.2014 um 18:36 schrieb Otared Kavian :

> Hi Wolfgang, Hi Aditya,
> 
> Thanks for your attention.
> Unfortunately adding 
>   \keepblocks[question] 
> the example I sent before does not work in mkiv, and changing 
>   location=hanging
> to
>   alternative=hanging
> does not help neither…
> The error message in mkiv is:
>   \dostopnormalblock ...meter \c!after \par \egroup 
>   
>  ...fact that $2\times 5 = 10$. \dostopnormalblock 
>   \dostartnormalblock 
> {hint}...
> \dodowithpar ...dler \v!construction \endcsname #1
>   \csname \??constructionsto…
> 
> So I don’t know what to do if one has to use mkiv.

When you enumerations in this form

\beginanswer
\answer $10$
\endanswer

you have to finish the paragraph, e.g. by adding \par

\beginanswer
\answer $10$\par
\endanswer

or better use the start/stop commands for the enumeration.

\beginanswer
\startanswer
$10$
\stopanswer
\endanswer

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] \setcharactercasing misbehaviour

2014-01-09 Thread Hans Hagen

On 1/9/2014 12:56 PM, Marco Patzer wrote:

Hi,

\setcharactercasing requires a new paragraph to work. Seems like a
bug to me.

\starttext
   \setcharactercasing[Word]foo  %% Uppercase
   \setcharactercasing[Word]bar  %% lowercase

   \setcharactercasing[Word]bar  %% Uppercase
\stoptext


That's the difference between Word and Words so it is intentional.

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] setuphead for in-paragraph head ?

2014-01-09 Thread Otared Kavian
Hi Wolfgang, Hi Aditya,

Thanks for your attention.
Unfortunately adding 
\keepblocks[question] 
the example I sent before does not work in mkiv, and changing 
location=hanging
to
alternative=hanging
does not help neither…
The error message in mkiv is:
\dostopnormalblock ...meter \c!after \par \egroup 
  
 ...fact that $2\times 5 = 10$. \dostopnormalblock 
  \dostartnormalblock {hint}...
\dodowithpar ...dler \v!construction \endcsname #1
  \csname \??constructionsto…

So I don’t know what to do if one has to use mkiv.

Best regards: OK

On 9 janv. 2014, at 18:23, Wolfgang Schuster  
wrote:

> 
> Am 09.01.2014 um 16:36 schrieb Otared Kavian :
> 
>> 
>> On 9 janv. 2014, at 15:48, Jaroslav Hajtmar  wrote:
>> 
>>> Hello Otared.
>>> I will throw this one... Thanx.
>>> 
>>> Once I was using exercise-answer package for LaTeX.
>>> Is there anything like this to use in ConTeXt?
>>> 
>>> Thanx
>>> Jaroslav Hajtmar
>> 
>> Hello Jaroslav,
>> 
>> I have something like the following which was given to me by Hans a long 
>> time ago: unfortunately for some reason this does not work anymore with 
>> ConTeXt mkiv, but it is quite fine with mkii:
> 
> Add \keepblocks[question].
> 
> 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] setuphead for in-paragraph head ?

2014-01-09 Thread Wolfgang Schuster

Am 09.01.2014 um 16:36 schrieb Otared Kavian :

> 
> On 9 janv. 2014, at 15:48, Jaroslav Hajtmar  wrote:
> 
>> Hello Otared.
>> I will throw this one... Thanx.
>> 
>> Once I was using exercise-answer package for LaTeX.
>> Is there anything like this to use in ConTeXt?
>> 
>> Thanx
>> Jaroslav Hajtmar
> 
> Hello Jaroslav,
> 
> I have something like the following which was given to me by Hans a long time 
> ago: unfortunately for some reason this does not work anymore with ConTeXt 
> mkiv, but it is quite fine with mkii:

Add \keepblocks[question].

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] setuphead for in-paragraph head ?

2014-01-09 Thread Aditya Mahajan

On Thu, 9 Jan 2014, Otared Kavian wrote:



On 9 janv. 2014, at 15:48, Jaroslav Hajtmar  wrote:


Hello Otared.
I will throw this one... Thanx.

Once I was using exercise-answer package for LaTeX.
Is there anything like this to use in ConTeXt?

Thanx
Jaroslav Hajtmar


Hello Jaroslav,

I have something like the following which was given to me by Hans a long 
time ago: unfortunately for some reason this does not work anymore with 
ConTeXt mkiv, but it is quite fine with mkii:


(Untested): Change location=hanging to alternative=hanging.


%%% begin question-hint-answer.tex
\defineblock[question]
\defineblock[hint]
\defineblock[answer]

\defineenumeration[question][location=hanging,text={Question},stopper={.}]
\defineenumeration[hint][location=hanging,text={Hint for question},stopper={.}]
\defineenumeration[answer][location=hanging,text={Answer to 
question},stopper={.}]



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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Multipage xtables starts at the wrong page

2014-01-09 Thread Hans Hagen

On 1/9/2014 4:30 PM, Marco Patzer wrote:

On 2014–01–09 Marco Pallante wrote:


How do I use LuajitTeX?


   context --jit 


I've seen the two options --jit and --jiton
which seem to be the right way. Am I right?


context --help | grep jit

   --jituse luajittex with jit turned off (only use the faster virtual 
machine)
   --jiton  use luajittex with jit turned on (in most cases not faster, even 
slower)

I've never come across a real world document where --jiton was
faster than --jit, so just stick with --jit.


in fact we found that --jiton is slower ... just use --jit and benefit 
from the faster virtual machine (the fact that jitting can slow down 
gets obscured by the fact that the vm is twice as fast); i guess that 
the context lua codebase is too large to benefit from jit and also 
hardly uses jitabble built-in functions (much if that is hardcoded in 
jit) and the amount of calls is too low to trade off jitting and using 
(we don't do number crunching or have applications running for more than 
a few seconds)


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] setuphead for in-paragraph head ?

2014-01-09 Thread Otared Kavian

On 9 janv. 2014, at 15:48, Jaroslav Hajtmar  wrote:

> Hello Otared.
> I will throw this one... Thanx.
> 
> Once I was using exercise-answer package for LaTeX.
> Is there anything like this to use in ConTeXt?
> 
> Thanx
> Jaroslav Hajtmar

Hello Jaroslav,

I have something like the following which was given to me by Hans a long time 
ago: unfortunately for some reason this does not work anymore with ConTeXt 
mkiv, but it is quite fine with mkii:

%%% begin question-hint-answer.tex
\defineblock[question]
\defineblock[hint]
\defineblock[answer]

\defineenumeration[question][location=hanging,text={Question},stopper={.}]
\defineenumeration[hint][location=hanging,text={Hint for question},stopper={.}]
\defineenumeration[answer][location=hanging,text={Answer to 
question},stopper={.}]

\hideblocks[hint]
\hideblocks[answer]

\starttext
\section{Questions}

\beginquestion
\question Compute $4\times 5$.

\beginhint
\hint Use the fact that $2\times 5 = 10$.
\endhint

\beginanswer
\answer $20$.
\endanswer

\endquestion

\beginquestion
\question What is the value of $100 / 10$?

\beginhint
\hint Remember that $10\times 10 = 100$.
\endhint

\beginanswer
\answer $10$
\endanswer

\endquestion

\section{Hints}
\useblocks[hint]

\section{Answers}
\useblocks[answer]

\stoptext
%%% end question-hint-answer.tex

Best regards: OK



> 
> 
> Dne 9.1.2014 15:19, Otared Kavian napsal(a):
>> %%% begin example-exercise.tex
>> %%%
>> % defining \startexo, \stopexo as an enumeration:
>> \startsetups style:simple
>> \defineenumeration[exo]
>>  [alternative=hanging,
>>  width=fit,
>>  stopper={.},
>>  text=Exercise,
>> %between=,
>>  before=,
>>  after=\blank]
>> \stopsetups % style:simple
>> 
>> \startsetups style:textrule
>> \definenumber[MyExoNumber][way=bysection,sectionumber=yes]
>> \setuptextrules[rulecolor=darkred]
>> \define\ExoCommand{\incrementnumber[MyExoNumber]
>>  \textrule[top]{Exercise \getnumber[MyExoNumber]}
>>  \startbackground[frame=off,leftframe=on,backgroundcolor=white,
>>  framecolor=darkred]}
>> 
>> \defineenumeration[exo]
>>  [alternative=hanging,
>>  width=fit,
>>  text={},
>>  number=hide,
>>  number=no,
>>  before={\ExoCommand},
>>  after={\stopbackground\blank}]
>> \stopsetups % style:textrule
>> 
>> % end defining \startexo, \stopexo as an enumeration
>> %%%
>> 
>> %defining  numbered questions
>> \defineconversion[exercise][\numbers]
>> %\setupitemize[packed]
>> \def\StartQuestions{%
>>  \startitemize[exercise][width=2em,packed,style=bold,stopper=,right=)]}
>> \def\StopQuestions{\stopitemize}
>> \def\q{\item}
>> 
>> % trye each of the following
>> \setups[style:simple]
>> %\setups[style:textrule]
>> 
>> \starttext
>> \startexo
>> Prove that for all $a,b\in {\Bbb K}$, a field of characteristic 2, one has 
>> $(a+b)^2  = a^2  + b^2$.
>> \stopexo
>> 
>> 
>> \startexo
>> Prove that for all $a,b\in {\Bbb K}$, a field of characteristic 2, one has 
>> $(a+b)^4  = a^4  + b^4$.
>> \stopexo
>> 
>> \startexo
>> \StartQuestions
>> \q Prove that
>> \startformula
>> \sum_{n=1}^\infty{1 \over n^2} = {\pi^2  \over 6}.
>> \stopformula
>> 
>> \q Prove that for any $n \geq 1$ integer one has
>> \startformula
>> \sum_{k=1}^n k^3  = \left({n(n+1) \over 2}\right)^2.
>> \stopformula
>> \StopQuestions
>> \stopexo
>> 
>> \stoptext
>> %%% end example-exercise.tex
> 
> ___
> 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] Multipage xtables starts at the wrong page

2014-01-09 Thread Marco Patzer
On 2014–01–09 Marco Pallante wrote:

> How do I use LuajitTeX?

  context --jit 

> I've seen the two options --jit and --jiton
> which seem to be the right way. Am I right?

context --help | grep jit

  --jituse luajittex with jit turned off (only use the faster virtual 
machine)
  --jiton  use luajittex with jit turned on (in most cases not faster, even 
slower)

I've never come across a real world document where --jiton was
faster than --jit, so just stick with --jit.

Marco


signature.asc
Description: Digital signature
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Multipage xtables starts at the wrong page

2014-01-09 Thread Marco Pallante
Il giorno gio, 09/01/2014 alle 15.49 +0100, Marco Patzer ha scritto:
> On 2014–01–09 Marco Pallante wrote:
> 
> Hello Marco,
> 
> I have no clue where the issue is, but I can confirm that the table
> starts on page two using version 2013.05.28. It works with a current
> beta.
> 
> If want to keep using TeXLive, instead of ConTeXt standalone, one
> possible workaround would be to use LuajitTeX. Surprisingly
> LuajitTeX in TeXlive uses context ver: 2014.01.08, whereas LuaTeX
> uses ver: 2013.05.28. The newer context version might break your
> document, though.
> 
> Marco

Thank you for your answer :)

How do I use LuajitTeX? I've seen the two options --jit and --jiton
which seem to be the right way. Am I right?

Let's see if it breaks anything :)

Marco

> ___
> 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] Multipage xtables starts at the wrong page

2014-01-09 Thread Marco Patzer
On 2014–01–09 Marco Pallante wrote:

Hello Marco,

I have no clue where the issue is, but I can confirm that the table
starts on page two using version 2013.05.28. It works with a current
beta.

If want to keep using TeXLive, instead of ConTeXt standalone, one
possible workaround would be to use LuajitTeX. Surprisingly
LuajitTeX in TeXlive uses context ver: 2014.01.08, whereas LuaTeX
uses ver: 2013.05.28. The newer context version might break your
document, though.

Marco


signature.asc
Description: Digital signature
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] setuphead for in-paragraph head ?

2014-01-09 Thread Jaroslav Hajtmar

Hello Otared.
I will throw this one... Thanx.

Once I was using exercise-answer package for LaTeX.
Is there anything like this to use in ConTeXt?

Thanx
Jaroslav Hajtmar


Dne 9.1.2014 15:19, Otared Kavian napsal(a):

%%% begin example-exercise.tex
%%%
% defining \startexo, \stopexo as an enumeration:
\startsetups style:simple
\defineenumeration[exo]
[alternative=hanging,
width=fit,
stopper={.},
text=Exercise,
%   between=,
before=,
after=\blank]
\stopsetups % style:simple

\startsetups style:textrule
\definenumber[MyExoNumber][way=bysection,sectionumber=yes]
\setuptextrules[rulecolor=darkred]
\define\ExoCommand{\incrementnumber[MyExoNumber]
\textrule[top]{Exercise \getnumber[MyExoNumber]}
\startbackground[frame=off,leftframe=on,backgroundcolor=white,
framecolor=darkred]}

\defineenumeration[exo]
[alternative=hanging,
width=fit,
text={},
number=hide,
number=no,
before={\ExoCommand},
after={\stopbackground\blank}]
\stopsetups % style:textrule

% end defining \startexo, \stopexo as an enumeration
%%%

%defining  numbered questions
\defineconversion[exercise][\numbers]
%\setupitemize[packed]
\def\StartQuestions{%
\startitemize[exercise][width=2em,packed,style=bold,stopper=,right=)]}
\def\StopQuestions{\stopitemize}
\def\q{\item}

% trye each of the following
\setups[style:simple]
%\setups[style:textrule]

\starttext
\startexo
Prove that for all $a,b\in {\Bbb K}$, a field of characteristic 2, one has 
$(a+b)^2  = a^2  + b^2$.
\stopexo


\startexo
Prove that for all $a,b\in {\Bbb K}$, a field of characteristic 2, one has 
$(a+b)^4  = a^4  + b^4$.
\stopexo

\startexo
\StartQuestions
\q Prove that
\startformula
\sum_{n=1}^\infty{1 \over n^2} = {\pi^2  \over 6}.
\stopformula

\q Prove that for any $n \geq 1$ integer one has
\startformula
\sum_{k=1}^n k^3  = \left({n(n+1) \over 2}\right)^2.
\stopformula
\StopQuestions
\stopexo

\stoptext
%%% end example-exercise.tex


___
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] Multipage xtables starts at the wrong page

2014-01-09 Thread Marco Pallante
Hello Marco,

First log line reports:
  ConTeXt  ver: 2013.05.28 00:36 MKIV current  fmt: 2013.7.29

$ context --version
reports:

mtx-context | ConTeXt Process Management 0.60
mtx-context |
mtx-context | main context
file: /usr/local/texlive/2013/texmf-dist/tex/context/base/context.mkiv
mtx-context | current version: 2013.05.28 00:36

ConTeXt is installed from TL2013 distribution.

I've attached the generated PDF.

Thank you,

Marco


Il giorno gio, 09/01/2014 alle 13.08 +0100, Marco Patzer ha scritto:
> On 2014–01–07 Marco Pallante wrote:
> 
> > […]
> > 
> > What I get, however, is a table that starts at page 2 and not just after
> > the chapter head.
> 
> The table starts on page one here. Which version are you using?
> 
> Marco
> ___
> 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
> ___



tabletest.pdf
Description: Adobe PDF document
___
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] setuphead for in-paragraph head ?

2014-01-09 Thread Otared Kavian
Hi Jean Guillaume,

I guess Marco Patzer and Wolfgang Schuster gave you already the appropriate 
answers.
Nevertheless, I wanted to share with you the definitions I use for the kind of 
work you want to do:

%%% begin example-exercise.tex
%%%
% defining \startexo, \stopexo as an enumeration:
\startsetups style:simple
\defineenumeration[exo]
[alternative=hanging,
width=fit,
stopper={.},
text=Exercise, 
%   between=,
before=, 
after=\blank] 
\stopsetups % style:simple

\startsetups style:textrule
\definenumber[MyExoNumber][way=bysection,sectionumber=yes]
\setuptextrules[rulecolor=darkred]
\define\ExoCommand{\incrementnumber[MyExoNumber]
\textrule[top]{Exercise \getnumber[MyExoNumber]}
\startbackground[frame=off,leftframe=on,backgroundcolor=white,
framecolor=darkred]}

\defineenumeration[exo]
[alternative=hanging,
width=fit,
text={}, 
number=hide,
number=no,
before={\ExoCommand}, 
after={\stopbackground\blank}]
\stopsetups % style:textrule

% end defining \startexo, \stopexo as an enumeration
%%%

%defining  numbered questions
\defineconversion[exercise][\numbers]
%\setupitemize[packed]
\def\StartQuestions{%
\startitemize[exercise][width=2em,packed,style=bold,stopper=,right=)]}
\def\StopQuestions{\stopitemize}
\def\q{\item}

% trye each of the following
\setups[style:simple]
%\setups[style:textrule]

\starttext
\startexo 
Prove that for all $a,b\in {\Bbb K}$, a field of characteristic 2, one has 
$(a+b)^2 = a^2 + b^2$.
\stopexo


\startexo 
Prove that for all $a,b\in {\Bbb K}$, a field of characteristic 2, one has 
$(a+b)^4 = a^4 + b^4$.
\stopexo

\startexo
\StartQuestions
\q Prove that 
\startformula
\sum_{n=1}^\infty{1 \over n^2} = {\pi^2 \over 6}.
\stopformula

\q Prove that for any $n \geq 1$ integer one has
\startformula
\sum_{k=1}^n k^3 = \left({n(n+1) \over 2}\right)^2.
\stopformula
\StopQuestions
\stopexo

\stoptext
%%% end example-exercise.tex


Best regards: OK

On 9 janv. 2014, at 14:23, Jean-Guillaume  wrote:

> But this:
> 
> \definehead
>  [Exercise] [subsection]
>  [after=]
> \starttext
>  \startExercise [title=This is the exercise's title]
>The exercise's content.
>  \stopExercise
> \stoptext
> 
> results to:
> 
> 1 This is the exercise's title
> The exercise's content.
> 
> and I would like it to be:
> 
> 1 This is the exercise's title The exercise's content.
> 
> (When I can typeset that, I will see about formatting the number and so on.)
> 
> I'm sorry it wasn't very clear. Now I understand that I misunderstood
> \startExercise{...} for \startExercise[title=...] and that's why I was
> confused about which newline I want to get rid of.
> 
> Jean-Guillaume
> ___
> 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] setuphead for in-paragraph head ?

2014-01-09 Thread Wolfgang Schuster

Am 09.01.2014 um 14:23 schrieb Jean-Guillaume :

> But this:
> 
> \definehead
>  [Exercise] [subsection]
>  [after=]
> \starttext
>  \startExercise [title=This is the exercise's title]
>The exercise's content.
>  \stopExercise
> \stoptext
> 
> results to:
> 
> 1 This is the exercise's title
> The exercise's content.
> 
> and I would like it to be:
> 
> 1 This is the exercise's title The exercise's content.
> 
> (When I can typeset that, I will see about formatting the number and so on.)
> 
> I'm sorry it wasn't very clear. Now I understand that I misunderstood
> \startExercise{...} for \startExercise[title=...] and that's why I was
> confused about which newline I want to get rid of.

\definehead
  [Exercise]
  [subsection]
  [alternative=text,
   distance=0.5em,
   insidesection=\ignorespaces]

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] setuphead for in-paragraph head ?

2014-01-09 Thread Jean-Guillaume
But this:

\definehead
  [Exercise] [subsection]
  [after=]
\starttext
  \startExercise [title=This is the exercise's title]
The exercise's content.
  \stopExercise
\stoptext

results to:

1 This is the exercise's title
The exercise's content.

and I would like it to be:

1 This is the exercise's title The exercise's content.

(When I can typeset that, I will see about formatting the number and so on.)

I'm sorry it wasn't very clear. Now I understand that I misunderstood
\startExercise{...} for \startExercise[title=...] and that's why I was
confused about which newline I want to get rid of.

Jean-Guillaume
___
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] setuphead for in-paragraph head ?

2014-01-09 Thread Marco Patzer
On 2014–01–09 Jean-Guillaume wrote:

>  \starttext
>  \definehead[Exercise][subsection]
>  \setuphead
> [Exercise]
> [after=]
> \startExercise[]{(this is the exercise's title)}
> The exercise's content.
> \stopExercise
> \stoptext

\definehead
  [Exercise] [subsection]
  [after=]

\starttext
  \startExercise [title=This is the exercise's title]
The exercise's content.
  \stopExercise
\stoptext

Marco


signature.asc
Description: Digital signature
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] setuphead for in-paragraph head ?

2014-01-09 Thread Jean-Guillaume
Thanks for your reply, Marco.

Here is a full example:

 \starttext
 \definehead[Exercise][subsection]
 \setuphead
[Exercise]
[after=]
\startExercise[]{(this is the exercise's title)}
The exercise's content.
\stopExercise
\stoptext


After contexting it, it looks like:

1
(this is the exercise's title) The exercise's content.


Actually, I would like to have the head's number and the head's title
on the same line. That is, whith no new line.

Jean-Guillaume
___
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] latest beta and luajittex in Linux 32-bit

2014-01-09 Thread Mojca Miklavec
On Wed, Jan 8, 2014 at 8:47 PM, Pablo Rodriguez wrote:
> Dear list,
>
> could anyone using the latest beta from ConTeXt Suite in Linux 32-bit
> confirm whether compilation with the option --engine=luajittex works?

Indeed the binary doesn't even work on the same machine where it has
been compiled. Sorry for that. I get the following error:

> luajittex --version
luajittex: /lib/libc.so.6: version `GLIBC_2.3.4' not found (required
by luajittex)
luajittex: /lib/libc.so.6: version `GLIBC_2.7' not found (required by luajittex)
luajittex: /lib/libc.so.6: version `GLIBC_2.11' not found (required by
luajittex)

I added Alan's binary now, but I currently don't have a suitable linux
box to test whether it works.

On top of that I forgot to fix the auto-update script to fetch the
latest binaries (again I have an appropriate person to blame for
making me upgrade the SVN repository to the latest version, even
though that didn't really solve the problem with apparently
broken/buggy SVN ;).

Mojca
___
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] Multipage xtables starts at the wrong page

2014-01-09 Thread Marco Patzer
On 2014–01–07 Marco Pallante wrote:

> […]
> 
> What I get, however, is a table that starts at page 2 and not just after
> the chapter head.

The table starts on page one here. Which version are you using?

Marco


signature.asc
Description: Digital signature
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] Language “deo” causes “TeX capacity exceeded” when units are used

2014-01-09 Thread Marco Patzer
Hi,

the following example exceeds TeX's capacity:

\mainlanguage [deo]
\starttext
  \unit{10 square metre}
\stoptext

Marco


signature.asc
Description: Digital signature
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] \setcharactercasing misbehaviour

2014-01-09 Thread Marco Patzer
Hi,

\setcharactercasing requires a new paragraph to work. Seems like a
bug to me.

\starttext
  \setcharactercasing[Word]foo  %% Uppercase
  \setcharactercasing[Word]bar  %% lowercase

  \setcharactercasing[Word]bar  %% Uppercase
\stoptext

Marco


signature.asc
Description: Digital signature
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] setuphead for in-paragraph head ?

2014-01-09 Thread Marco Patzer
On 2014–01–09 Jean-Guillaume wrote:

> In the subsection head, I would like to suppress the newline between the
> number and the text,

That's controlled by the “after” key.

 \setuphead
  [Exercise]
  [after=]

> My purpose is to define something like:
> 
>  \definehead[Exercise][subsection]
>  \setuphead
>   [Exercise]
>   [alternative=Mine?,
>   ...,
>   numberstyle=bold]

Please provide full working examples next time. That makes it easier
for us and it's more likely you'll get a response.

> So I can typeset a list of exercises in a compact way. I could use
> enumerations but I don't think I should.

That depends on your document. You can use sections, enumerations or
Wolfgang's annotation module.

Marco


signature.asc
Description: Digital signature
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Mixing math and text font

2014-01-09 Thread Joshua Krämer
Am Thu, 09 Jan 2014 11:01:16 + schrieb Joshua Krämer:
> (2) What effect does force=yes have?  It doesn't seem to make a
> difference for me.

I've read in another mail that force=yes is now set by default, so this 
is clear to me now.

Joshua

___
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] Mixing math and text font

2014-01-09 Thread Joshua Krämer
Thanks for your hard work!  I have a few additional questions regarding 
the new system and font fallbacks.


(1) How can I replace the hyphen automatically inserted at linebreaks?  
If I use the following, only manually inserted hyphens are replaced:

\definefallbackfamily[mainface][serif][TeX Gyre Termes][range={0x0002d}]


(2) What effect does force=yes have?  It doesn't seem to make a 
difference for me.


(3) I have a typeface that uses unusual style names: "roman1", "roman2", 
"italic1", "italic2";  1 is regular, 2 is bold weight.  The following 
works:

\definefontfamily[xxxface][serif][xxx][regularfont=xxxroman1, 
italicfont=xxxitalic1, boldfont=xxxroman2]
\setupbodyfont[xxxface]
\starttext
abc {\it abc} {\bf abc}
\stoptext

This works for roman1 only:

\definefontfamily[xxxface][serif][xxx][regularfont=spec:roman1, 
italicfont=spec:italic1, boldfont=spec:roman2]

Even this works for roman1 only:

\definefontfamily[xxxface][serif][xxx][regularfont=spec:roman1, 
italicfont=xxxitalic1, boldfont=xxxroman2]


(4) Now I want to use this typeface for math fallback.  In the following 
example, the upright glyphs are replaced, but not the italic glyphs:

\definefontfamily[xxxface][serif][xxx][regularfont=xxxroman1, 
italicfont=xxxitalic1, boldfont=xxxroman2]
\definefallbackfamily[xxxface][math][xxx][regularfont=xxxroman1, 
preset=math:lowercasenormal]
\definefallbackfamily[xxxface][math][xxx][regularfont=xxxroman1, 
preset=math:uppercasenormal]
\definefallbackfamily[xxxface][math][xxx][italicfont=xxxitalic1, 
preset=math:lowercaseitalic]
\definefallbackfamily[xxxface][math][xxx][italicfont=xxxitalic1, 
preset=math:uppercaseitalic]
\definefallbackfamily[xxxface][math][xxx][regularfont=xxxroman1, 
preset=math:digitsnormal]
\definefontfamily[xxxface][math][TeX Gyre Termes Math]
\setupbodyfont[xxxface]
\starttext
$ \coprod \leftrightarrow ABC abc {\mathupright ABC abc} 123 $ 
\stoptext


Kind regards,
Joshua

___
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] setuphead for in-paragraph head ?

2014-01-09 Thread Jean-Guillaume
Hi all,
this is my first message here.

In the subsection head, I would like to suppress the newline between the
number and the text, so it behaves like some kind of numbered subsubject.
I tried to modify some examples from the wiki, but without success. In
http://wiki.contextgarden.net/Command/setuphead , most of the options are
not explained.

My purpose is to define something like:

 \definehead[Exercise][subsection]
 \setuphead
  [Exercise]
  [alternative=Mine?,
  ...,
  numberstyle=bold]

So I can typeset a list of exercises in a compact way. I could use
enumerations but I don't think I should.

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
___