Re: [NTG-context] how to insert symbols into document?

2015-04-18 Thread Csikos Bela
Wolfgang Schuster írta:

 Am 13.04.2015 um 01:29 schrieb Csikos Bela:

LONG CUT - See previous messages

Otared, Wolfgang:

Thank you for your suggestions.

The symbols in the file symb-imp-mis.mkiv are loaded by default because 
context uses
them for the itemise environment but a few of them have to be enabled before 
you can
use them and even then you need a font which contains them, e.g. DejaVu.

 begin example
\setupbodyfont[dejavu]

\setupsymbolset[text]

\starttext

\starttabulate[|l|c|]
\NC \bf Name  \NC \bf Symbol  \NC\NR
\TB
\NC bullet\NC \symbol [bullet]\NC\NR
\NC dash  \NC \symbol [dash]  \NC\NR
\NC star  \NC \symbol [star]  \NC\NR
\NC triangle  \NC \symbol [triangle]  \NC\NR
\NC circle\NC \symbol [circle]\NC\NR
\NC square\NC \symbol [square]\NC\NR
\NC diamond   \NC \symbol [diamond]   \NC\NR
\TB
\NC blacktriangle \NC \symbol [blacktriangle] \NC\NR
\NC blacksquare   \NC \symbol [blacksquare]   \NC\NR
\NC blackdiamond  \NC \symbol [blackdiamond]  \NC\NR
\TB
\NC 1 \NC \symbol [1] \NC\NR
\NC 2 \NC \symbol [2] \NC\NR
\NC 3 \NC \symbol [3] \NC\NR
\NC 4 \NC \symbol [4] \NC\NR
\NC 5 \NC \symbol [5] \NC\NR
\NC 6 \NC \symbol [6] \NC\NR
\NC 7 \NC \symbol [7] \NC\NR
\NC 8 \NC \symbol [8] \NC\NR
\stoptabulate

\stoptext
 end example

OK, I see that neither the default font nor Tex Gyre Pagella has black diamod 
symbol, therefore it can't be shown. 

When you need characters like the mentioned losenge you should better look for 
a font
which contains it and create a new typeface for it or set a fallback font 
which add the
characters to the main font of your document.

Before answering I wanted to find out how to make this fallback: Using a given 
font
and fall back to only one (or a few) specific characters in another font. For 
example
using Tex Gyre Pagella and fall back to Dejavu's black diamond, but not to any 
other
characters.

To learn how to do this, in the last few days I read most of (if not all) the 
related pages on
the wiki site, and browsed the indicated pdf documents too. Unfortunately I 
find the wiki
pages confusing, and I couldn't find out how to solve the problem yet, but I 
did not want
to wait longer with the answer. I will study further the docs.

Thanks once more for your help,

bcsikos

___
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] imposition not working in latest beta

2015-04-18 Thread Pablo Rodriguez
On 04/18/2015 01:39 PM, Hans Hagen wrote:
 On 4/18/2015 12:18 PM, Pablo Rodriguez wrote:
 [...]
 It doesn’t work with (.log file attached):

 contextjit --extra=arrange --printformat=2UP
 --paperformat=A4*A3,landscape a.pdf
 
 unrelated ... this is a forgotten argument
 
 in luat-ini.mkiv:
 
 \def\getdocumentargument #1{\clf_getdocumentargument{#1}{}}
 
 or wait for a new upload

Many thanks for the fix and the new beta, Hans.


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] how to insert symbols into document?

2015-04-18 Thread Wolfgang Schuster

 Am 18.04.2015 um 13:51 schrieb Hans Hagen pra...@wxs.nl:
 
 On 4/18/2015 1:21 PM, Csikos Bela wrote:
 
 Before answering I wanted to find out how to make this fallback: Using a 
 given font
 and fall back to only one (or a few) specific characters in another font. 
 For example
 using Tex Gyre Pagella and fall back to Dejavu's black diamond, but not to 
 any other
 characters.
 
 To learn how to do this, in the last few days I read most of (if not all) 
 the related pages on
 the wiki site, and browsed the indicated pdf documents too. Unfortunately I 
 find the wiki
 pages confusing, and I couldn't find out how to solve the problem yet, but I 
 did not want
 to wait longer with the answer. I will study further the docs.
 
 search for 'fallbacks' in the test suite
 
 (you can have fallback ranges but also individual characters)


Fallbacks don’t work when you use \iffontchar to check if the character is in 
the font
even though it is available in the fallback font.

\definefallbackfamily [testfont] [rm] [DejaVu Serif] [range=0x25C6]
\definefontfamily [testfont] [rm] [TeX Gyre Pagella]

\setupbodyfont[dejavu]

\starttext

◆ : \checkedtextchar{25C6}{{\tttf ??}}

\switchtobodyfont[testfont]

◆ : \checkedtextchar{25C6}{{\tttf ??}}

\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
___

Re: [NTG-context] how to insert symbols into document?

2015-04-18 Thread Wolfgang Schuster

 Am 18.04.2015 um 13:21 schrieb Csikos Bela bcsikos...@freemail.hu:
 
 When you need characters like the mentioned losenge you should better look 
 for a font
 which contains it and create a new typeface for it or set a fallback font 
 which add the
 characters to the main font of your document.
 
 Before answering I wanted to find out how to make this fallback: Using a 
 given font
 and fall back to only one (or a few) specific characters in another font. For 
 example
 using Tex Gyre Pagella and fall back to Dejavu's black diamond, but not to 
 any other
 characters.
 
 To learn how to do this, in the last few days I read most of (if not all) the 
 related pages on
 the wiki site, and browsed the indicated pdf documents too. Unfortunately I 
 find the wiki
 pages confusing, and I couldn't find out how to solve the problem yet, but I 
 did not want
 to wait longer with the answer. I will study further the docs.

\definefallbackfamily [documentfont] [rm] [DejaVu Serif] [range=0x25C6]
\definefontfamily [documentfont] [rm] [TeX Gyre Pagella]
\definefontfamily [documentfont] [tt] [Latin Modern Mono] [features=none]
\definefontfamily [documentfont] [mm] [TeX Gyre Pagella Math]

\setupbodyfont[documentfont]

% \setupsymbolset[text]
%
% Using the predefined symbol for blackdiamond doesn’t work
% because context tests if the symbol exists in the text font
% before it displays it but we take it from the fallback font
% and therefore nothing is shown. To avoid this you can define
% your own symbol or just put the character in your document
% without the \symbol command.

\definesymbol[blackdiamond][◆]

\starttext

direct input: ◆

\type{\symbol[blacktriangle]}: \symbol[blackdiamond]

\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
___

Re: [NTG-context] how to insert symbols into document?

2015-04-18 Thread Hans Hagen

On 4/18/2015 4:09 PM, Wolfgang Schuster wrote:



Am 18.04.2015 um 13:51 schrieb Hans Hagen pra...@wxs.nl
mailto:pra...@wxs.nl:

On 4/18/2015 1:21 PM, Csikos Bela wrote:


Before answering I wanted to find out how to make this fallback:
Using a given font
and fall back to only one (or a few) specific characters in another
font. For example
using Tex Gyre Pagella and fall back to Dejavu's black diamond, but
not to any other
characters.

To learn how to do this, in the last few days I read most of (if not
all) the related pages on
the wiki site, and browsed the indicated pdf documents too.
Unfortunately I find the wiki
pages confusing, and I couldn't find out how to solve the problem
yet, but I did not want
to wait longer with the answer. I will study further the docs.


search for 'fallbacks' in the test suite

(you can have fallback ranges but also individual characters)


Fallbacks don’t work when you use \iffontchar to check if the character
is in the font
even though it is available in the fallback font.

\definefallbackfamily [testfont] [rm] [DejaVu Serif] [range=0x25C6]
\definefontfamily [testfont] [rm] [TeX Gyre Pagella]

\setupbodyfont[dejavu]

\starttext

◆ : \checkedtextchar{25C6}{{\tttf ??}}

\switchtobodyfont[testfont]

◆ : \checkedtextchar{25C6}{{\tttf ??}}

\stoptext


ok, i'll include the fallback sin the test (next beta)

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] Howto typeset physical half-life

2015-04-18 Thread Hans Hagen

On 4/18/2015 11:28 AM, Alan BRASLAU wrote:

On Fri, 17 Apr 2015 23:51:56 +0200
Hans Hagen pra...@wxs.nl wrote:


Anyway, I've added a checker so that at least it gets reported
(assuming the use of one math collection):

mkiv lua stats   unknown math characters: ½ (U+000BD) (n=3)


This will be quite useful.

A question in general for the mailing list: should missing math (and
text) characters simply not appear or should some placeholder (such as
a box) be rendered in its place? This could help with proofreading.

Nevertheless, having missing characters reported in the log file is a
good diagnostic.


we already have

\enabletrackers[fonts.missing=replace] % top of file

which should show something with

\starttext
\m{T_α}
\m{T_½}
\m{T½_½}
test \char3211 test
\stoptext

I've extended that to math so that you will get a placeholder there too 
(more visible with this option, otherwise a ? will be used as 
replacement).


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] imposition not working in latest beta

2015-04-18 Thread Hans Hagen

On 4/18/2015 12:18 PM, Pablo Rodriguez wrote:

On 04/17/2015 12:22 AM, Hans Hagen wrote:

On 4/16/2015 11:21 PM, Pablo Rodriguez wrote:

Hans,

I’m afraid that imposition is not working with latest beta.


indeed, also side effect of the mp upgrade .. fixed in next beta


Many thanks for your fix, Hans.

I’m afraid that it only works with the code sample I sent.

It doesn’t work with (.log file attached):

contextjit --extra=arrange --printformat=2UP
--paperformat=A4*A3,landscape a.pdf


unrelated ... this is a forgotten argument

in luat-ini.mkiv:

\def\getdocumentargument #1{\clf_getdocumentargument{#1}{}}

or wait for a new upload

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] Hidden chapter header? ... was: Change counter of chapters

2015-04-18 Thread Jaroslav Hajtmar
Thanks Pablo 
for workable solutions. Both solutions are working, as I imagined.
Anyway, fortunately I do not work with Word itself, but for example. 
Colleagues, friends and acquaintances. It is sometimes necessary make something 
 in ConTeXt when Word is not enough on it. So fortunately there is no 
condemnation to me, but to someone else:-).


Greeting Jaroslav Hajtmar

From: ntg-context ntg-context-boun...@ntg.nl
To: mailing list for ConTeXt users ntg-context@ntg.nl
Cc: 
Date: Sat, 18 Apr 2015 09:23:51 +0200
Subject: Re: [NTG-context] Hidden chapter header? ... was: Change counter of 
chapters


 On 04/18/2015 07:22 AM, Jaroslav Hajtmar wrote:
  Hello ConTeXist
  My last Subject contribution maybe  so misleading that it nobody react.
  I'll try therefore to bring different view:
  Exist any possibility of creating some kind of hidden chapters
  (sections, subsections)?  
  The command would increase the counter of chapters (sections,
  subsections). Maybe it seems as rape of ConTeXt, but in certain moments
  this option would help me. 
  In my case it is the integration of practical part of project (worked in
  ConTeXt) into Word project:-(...
  
  For example I need to start writing any text from 53 page and such from
  the 5th chapter (or section). 
  It is possible in a similar way as I set the start page number set also
  the counter of chapters (sections)?
 
 Hi Jaroslav,
 
 adding the following commands before \startext does the work:
 
   \definehead[hiddenchapter][chapter]
   \setuphead[hiddenchapter][placehead=no]
 
 But there is a proper way to set the chapter number:
 
   \setupheadnumber[chapter][56] % +2 or -5 also accepted
 
 By the way, going from ConTeXt to Word you know you are on the road to
 perdition, don’t you? ;-)
 
 I hope it helps,
 
 
 Pablo
 
 
 
  Here is my minimal example:
  
  \starttext
  %\hiddenchapter{Fictive chapter}
  %\hiddenchapter{Fictive chapter}
  %\hiddenchapter{Fictive chapter}
  %\hiddenchapter{Fictive chapter}
  
  \page
  
  \setcounter[userpage][53]
  
  \chapter{Fifth (actually first) nonfictive chapter}
  
  blablabla
  
  \stoptext
 
 
 -- 
 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
 __
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] how to insert symbols into document?

2015-04-18 Thread Hans Hagen

On 4/18/2015 1:21 PM, Csikos Bela wrote:

Wolfgang Schuster írta:



Am 13.04.2015 um 01:29 schrieb Csikos Bela:


LONG CUT - See previous messages

Otared, Wolfgang:

Thank you for your suggestions.


The symbols in the file symb-imp-mis.mkiv are loaded by default because context 
uses
them for the itemise environment but a few of them have to be enabled before 
you can
use them and even then you need a font which contains them, e.g. DejaVu.

 begin example
\setupbodyfont[dejavu]

\setupsymbolset[text]

\starttext

\starttabulate[|l|c|]
\NC \bf Name  \NC \bf Symbol  \NC\NR
\TB
\NC bullet\NC \symbol [bullet]\NC\NR
\NC dash  \NC \symbol [dash]  \NC\NR
\NC star  \NC \symbol [star]  \NC\NR
\NC triangle  \NC \symbol [triangle]  \NC\NR
\NC circle\NC \symbol [circle]\NC\NR
\NC square\NC \symbol [square]\NC\NR
\NC diamond   \NC \symbol [diamond]   \NC\NR
\TB
\NC blacktriangle \NC \symbol [blacktriangle] \NC\NR
\NC blacksquare   \NC \symbol [blacksquare]   \NC\NR
\NC blackdiamond  \NC \symbol [blackdiamond]  \NC\NR
\TB
\NC 1 \NC \symbol [1] \NC\NR
\NC 2 \NC \symbol [2] \NC\NR
\NC 3 \NC \symbol [3] \NC\NR
\NC 4 \NC \symbol [4] \NC\NR
\NC 5 \NC \symbol [5] \NC\NR
\NC 6 \NC \symbol [6] \NC\NR
\NC 7 \NC \symbol [7] \NC\NR
\NC 8 \NC \symbol [8] \NC\NR
\stoptabulate

\stoptext
 end example


OK, I see that neither the default font nor Tex Gyre Pagella has black diamod 
symbol, therefore it can't be shown.


When you need characters like the mentioned losenge you should better look for 
a font
which contains it and create a new typeface for it or set a fallback font which 
add the
characters to the main font of your document.


Before answering I wanted to find out how to make this fallback: Using a given 
font
and fall back to only one (or a few) specific characters in another font. For 
example
using Tex Gyre Pagella and fall back to Dejavu's black diamond, but not to any 
other
characters.

To learn how to do this, in the last few days I read most of (if not all) the 
related pages on
the wiki site, and browsed the indicated pdf documents too. Unfortunately I 
find the wiki
pages confusing, and I couldn't find out how to solve the problem yet, but I 
did not want
to wait longer with the answer. I will study further the docs.


search for 'fallbacks' in the test suite

(you can have fallback ranges but also individual characters)

Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

[NTG-context] vertical spacing and makeups

2015-04-18 Thread Pablo Rodriguez
Dear list,

I have the following sample:

\showgrid
\setupinteraction[option=max]
\setuppapersize[S6]
\setuppagenumbering[location=]
\setupbodyfont[100pt]
\setupwhitespace[big]
\startsetups[setups:slides]
\setupwhitespace[big]
\stopsetups
\setupmakeup[pagestate=start]
\definemakeup[slides][setups=setups:slides]
\definemakeup[slide]
\starttext
\startmakeup[slides]\ConTeXt\stopmakeup
\startmakeup[slide]\ConTeXt\stopmakeup
\page\ConTeXt
\startmakeup[slides]program\stopmakeup
\startmakeup[slides]descender\stopmakeup
\startmakeup[slide]program\stopmakeup
\startmakeup[slide]descender\stopmakeup
\page program
\page descender
\stoptext

The first page shows that \setupwhitespace[big] affects to a single line
in a makeup. Shouldn’t white space be added only between paragraphs? The
second page is right vertically centered. And the third page shows that
the white space isn’t added before the first paragraph in a normal page
(no makeup).

This is the first issue, isn’t it a bug? Or what am I missing?

The second issue is about the line height. If I didn’t get it wrong from
Hans some days ago, line height is the x-height, plus ascender and
descender heights.

In vertical centering for makeups, why does ascender or descender height
affect to basline position? Sorry, but this is a problem for
readability. And it think it is better to center the line instead than a
group of glyphs.

Or am I missing something in this second issue too?

Many thanks for your help,


Pablo
-- 
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

Re: [NTG-context] A macro which gives a random name

2015-04-18 Thread Wolfgang Schuster

 Am 18.04.2015 um 18:55 schrieb Otared Kavian ota...@gmail.com:
 
 Hi everyone,
 
 In the example below I define a macro which chooses at random a name from a 
 list of names. But I wonder whether this can be done in a more clever way 
 without using a numerical macro created with math.random in Lua. The 
 shortcoming of the macro below is that before hand I must know the nomber of 
 elements in the list of names (for instance 5 in the example below), while it 
 may happen that I need to create as many as random names that there are 
 elements in the list, but sometimes I don’t know what is this number.
 
 Thanks for any insight and help.
 Best regards: OK
  begin random-names.tex
 \setuprandomize[2015] % set a seed
 
 \starttext
 
 \startluacode
   Name = {'F', 'G', 'u', 'v', 'W'}
 \stopluacode
 
 \define[3]\RandomName{%
   \setevalue{Named#1}{\ctxlua{tex.print(math.random(#2,#3))}}}
 \define\RandomFunctionName{\ctxlua{tex.print(Name[\NamedFunctionNumber])}}
 
 \dorecurse{10}{\RandomName{FunctionNumber}{1}{5}%
 Give an example of a function $\RandomFunctionName : {\Bbb R} \longrightarrow 
 {\Bbb R}$ which has a derivative only at the origin, and such that 
 $\RandomFunctionName(0) = 1$.\par \hairline\par}
 
 \stoptext
  begin random-names.tex

You can access the size of your Name table with #Name but have to replace # 
with \letterhash when you use it in a TeX command because # is already taken 
for the TeX arguments.

\starttext

\startluacode
Name = {'F', 'G', 'u', 'v', 'W'}
\stopluacode

\define\RandomFunctionName
  {\startlua
   local listsize= \letterhash Name ;
   local randomvalue = math.random(1,listsize) ;
   context(Name[randomvalue])
   \stoplua}

\dorecurse{10}{Give an example of a function $\RandomFunctionName : {\Bbb R} 
\longrightarrow {\Bbb R}$ which has a derivative only at the origin, and such 
that $\RandomFunctionName(0) = 1$.\par \hairline\par}

\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
___

Re: [NTG-context] vertical spacing and makeups

2015-04-18 Thread Pablo Rodriguez
On 04/18/2015 07:15 PM, Wolfgang Schuster wrote:
 Am 18.04.2015 um 18:43 schrieb Pablo Rodriguez:
 [...]
 The first page shows that \setupwhitespace[big] affects to a single line
 in a makeup. Shouldn’t white space be added only between paragraphs? The
 second page is right vertically centered. And the third page shows that
 the white space isn’t added before the first paragraph in a normal page
 (no makeup).

 This is the first issue, isn’t it a bug? Or what am I missing?
 
 TeX inserts the \parskip value which is set by \setupwhitespace
 before your text in the makeup environment. Note that this happens
 only when you have skip before the text (e.g. with the default top=\vss
 setting) at the begin of the environment.
 
 The following low level example demonstrates this:
 
 \setuppapersize[A6]
 
 \starttext
 
 \dontleavehmode
 \ruledvbox to 3cm{\hsize=4cm text}
 \ruledvbox to 3cm{\hsize=4cm\parskip=2ex\relax text}
 
 \dontleavehmode
 \ruledvbox to 3cm{\hsize=4cm\vss text\vss}
 \ruledvbox to 3cm{\hsize=4cm\parskip=2ex\relax\vss text\vss}
 
 \stoptext

Many thanks for your reply, Wolfgang.

So the a workaround would be to use \blank instead of \par or a blank
line, wouldn’t it be?

 The second issue is about the line height. If I didn’t get it wrong from
 Hans some days ago, line height is the x-height, plus ascender and
 descender heights.
 
 TeX has only a concept for the distance between the baseline of two lines,
 to get a certain line height and depth at the begin and end of your text
 you have to the \strut or \begstrut and \endstrut commands.
 
 \def\startSlide
   {\grabbufferdata[SlideContent][startSlide][stopSlide]}
 
 \def\stopSlide
   {\startmakeup[standard][align=middle]
\begstrut\getbufferdata[SlideContent]\endstrut
\stopmakeup}

I tried to use struts with the first issue and I thought they didn’t
work sith makeups.

Many thanks for your code excerpted above. I would have never thought of
this in a decade.

Many thanks for your highly instructive explanation also,


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
___

[NTG-context] A macro which gives a random name

2015-04-18 Thread Otared Kavian
Hi everyone,

In the example below I define a macro which chooses at random a name from a 
list of names. But I wonder whether this can be done in a more clever way 
without using a numerical macro created with math.random in Lua. The 
shortcoming of the macro below is that before hand I must know the nomber of 
elements in the list of names (for instance 5 in the example below), while it 
may happen that I need to create as many as random names that there are 
elements in the list, but sometimes I don’t know what is this number.

Thanks for any insight and help.
Best regards: OK
 begin random-names.tex
\setuprandomize[2015] % set a seed

\starttext

\startluacode
Name = {'F', 'G', 'u', 'v', 'W'}
\stopluacode

\define[3]\RandomName{%
\setevalue{Named#1}{\ctxlua{tex.print(math.random(#2,#3))}}}
\define\RandomFunctionName{\ctxlua{tex.print(Name[\NamedFunctionNumber])}}

\dorecurse{10}{\RandomName{FunctionNumber}{1}{5}%
Give an example of a function $\RandomFunctionName : {\Bbb R} \longrightarrow 
{\Bbb R}$ which has a derivative only at the origin, and such that 
$\RandomFunctionName(0) = 1$.\par \hairline\par}

\stoptext
 begin random-names.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] vertical spacing and makeups

2015-04-18 Thread Wolfgang Schuster

 Am 18.04.2015 um 18:43 schrieb Pablo Rodriguez oi...@gmx.es:
 
 Dear list,
 
 I have the following sample:
 
\showgrid
\setupinteraction[option=max]
\setuppapersize[S6]
\setuppagenumbering[location=]
\setupbodyfont[100pt]
\setupwhitespace[big]
\startsetups[setups:slides]
\setupwhitespace[big]
\stopsetups
\setupmakeup[pagestate=start]
\definemakeup[slides][setups=setups:slides]
\definemakeup[slide]
\starttext
\startmakeup[slides]\ConTeXt\stopmakeup
\startmakeup[slide]\ConTeXt\stopmakeup
\page\ConTeXt
\startmakeup[slides]program\stopmakeup
\startmakeup[slides]descender\stopmakeup
\startmakeup[slide]program\stopmakeup
\startmakeup[slide]descender\stopmakeup
\page program
\page descender
\stoptext
 
 The first page shows that \setupwhitespace[big] affects to a single line
 in a makeup. Shouldn’t white space be added only between paragraphs? The
 second page is right vertically centered. And the third page shows that
 the white space isn’t added before the first paragraph in a normal page
 (no makeup).
 
 This is the first issue, isn’t it a bug? Or what am I missing?

TeX inserts the \parskip value which is set by \setupwhitespace
before your text in the makeup environment. Note that this happens
only when you have skip before the text (e.g. with the default top=\vss
setting) at the begin of the environment.

The following low level example demonstrates this:

\setuppapersize[A6]

\starttext

\dontleavehmode
\ruledvbox to 3cm{\hsize=4cm text}
\ruledvbox to 3cm{\hsize=4cm\parskip=2ex\relax text}

\dontleavehmode
\ruledvbox to 3cm{\hsize=4cm\vss text\vss}
\ruledvbox to 3cm{\hsize=4cm\parskip=2ex\relax\vss text\vss}

\stoptext

 The second issue is about the line height. If I didn’t get it wrong from
 Hans some days ago, line height is the x-height, plus ascender and
 descender heights.

TeX has only a concept for the distance between the baseline of two lines,
to get a certain line height and depth at the begin and end of your text
you have to the \strut or \begstrut and \endstrut commands.

 In vertical centering for makeups, why does ascender or descender height
 affect to basline position? Sorry, but this is a problem for
 readability. And it think it is better to center the line instead than a
 group of glyphs.

\def\startSlide
  {\grabbufferdata[SlideContent][startSlide][stopSlide]}

\def\stopSlide
  {\startmakeup[standard][align=middle]
   \begstrut\getbufferdata[SlideContent]\endstrut
   \stopmakeup}

\setuppapersize[S8]
\setupbodyfont[100pt]

\showgrid

\starttext

\startSlide
program
\stopSlide

\startSlide
descender
\stopSlide

\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
___

Re: [NTG-context] Hidden chapter header? ... was: Change counter of chapters

2015-04-18 Thread Pablo Rodriguez
On 04/18/2015 12:34 PM, Jaroslav Hajtmar wrote:
 Thanks Pablo 
 for workable solutions. Both solutions are working, as I imagined.
 Anyway, fortunately I do not work with Word itself, but for example.
 Colleagues, friends and acquaintances. It is sometimes necessary make
 something  in ConTeXt when Word is not enough on it. So fortunately
 there is no condemnation to me, but to someone else:-).

Hi Jaroslav,

at least in the Spanish version, it seems that Office 2010 comes with
letter as default paper size. A4 is the default paper size in Spain. It
is a bug, but the vast majority of Word users don’t realize this.

Proably ConTeXt is too much for them, but a word processor may not be
the best option either. I guess a light-weight markup (such as Markdown
in pandoc) would be better even to output .docx files.

And just out of curiosity: how do you integrate both ConTeXt and Word
outputs?


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] A macro which gives a random name

2015-04-18 Thread Otared Kavian
Hi Wolfgang,

Thanks for your attention, but the problem with your solution is that each 
instance of \RandomFunctionName changes the name chosen, but I need something 
wihich remains the same name within a given situation (say each problem) but 
changes from problem to problem. 

For instance when using your solution with the source code

Give an example of a function $\RandomFunctionName : {\Bbb R} 
\longrightarrow {\Bbb R}$ which has a 
derivative only at the origin, and such that $\RandomFunctionName(0) = 
1$.
gives:
Give an example of a function 퐺 : R ⟶ R which has a derivative only at 
the origin, and such that 푊(0) = 1. 

while what I need is 
Give an example of a function 퐺 : R ⟶ R which has a derivative only at 
the origin, and such that G(0) = 1. 

(The macro I sent earlier does this, but unfortunately it cannot use the 
solution you sent).
Is there a solution ?

Best regards: OK

 On 18 Apr 2015, at 19:23, Wolfgang Schuster schuster.wolfg...@gmail.com 
 wrote:
 
 
 Am 18.04.2015 um 18:55 schrieb Otared Kavian ota...@gmail.com:
 
 Hi everyone,
 
 In the example below I define a macro which chooses at random a name from a 
 list of names. But I wonder whether this can be done in a more clever way 
 without using a numerical macro created with math.random in Lua. The 
 shortcoming of the macro below is that before hand I must know the nomber of 
 elements in the list of names (for instance 5 in the example below), while 
 it may happen that I need to create as many as random names that there are 
 elements in the list, but sometimes I don’t know what is this number.
 
 Thanks for any insight and help.
 Best regards: OK
  begin random-names.tex
 \setuprandomize[2015] % set a seed
 
 \starttext
 
 \startluacode
  Name = {'F', 'G', 'u', 'v', 'W'}
 \stopluacode
 
 \define[3]\RandomName{%
  \setevalue{Named#1}{\ctxlua{tex.print(math.random(#2,#3))}}}
 \define\RandomFunctionName{\ctxlua{tex.print(Name[\NamedFunctionNumber])}}
 
 \dorecurse{10}{\RandomName{FunctionNumber}{1}{5}%
 Give an example of a function $\RandomFunctionName : {\Bbb R} 
 \longrightarrow {\Bbb R}$ which has a derivative only at the origin, and 
 such that $\RandomFunctionName(0) = 1$.\par \hairline\par}
 
 \stoptext
  begin random-names.tex
 
 You can access the size of your Name table with #Name but have to replace # 
 with \letterhash when you use it in a TeX command because # is already taken 
 for the TeX arguments.
 
 \starttext
 
 \startluacode
   Name = {'F', 'G', 'u', 'v', 'W'}
 \stopluacode
 
 \define\RandomFunctionName
  {\startlua
   local listsize= \letterhash Name ;
   local randomvalue = math.random(1,listsize) ;
   context(Name[randomvalue])
   \stoplua}
 
 \dorecurse{10}{Give an example of a function $\RandomFunctionName : {\Bbb R} 
 \longrightarrow {\Bbb R}$ which has a derivative only at the origin, and such 
 that $\RandomFunctionName(0) = 1$.\par \hairline\par}
 
 \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] A macro which gives a random name

2015-04-18 Thread Hans Hagen

On 4/18/2015 10:24 PM, Otared Kavian wrote:

Hi again Wolfgang,

Thanks to your hint, I could solve the problem…
In case someone else would encounter a similar problem to solve, below is a 
macro which chooses an element from a list, it creates a control sequence (CS) 
containing that element and it keeps the CS until the next time the macro is 
invoked again to choose another element.

Thanks again and best regards: OK

 begin choose-element.tex
\setuprandomize[1989] % set a seed

\starttext

% here is a list from which a name is chosen
\startluacode
ListOfNames = {'F', 'G', 'u', 'v', 'W'}
\stopluacode

% this macro has two arguments:
% the first argument is the control sequence name attached to Chosen,
% the second argument is the name of the list from which something is chosen
\define[2]\RandomChoice{%
\setevalue{Chosen#1}{\ctxlua{%
local listsize = \letterhash #2 ;
local LName = #2 ;
tex.print(LName[math.random(1,listsize)])}}}

\dorecurse{10}{\RandomChoice{Function}{ListOfNames}%
Give an example of a function $\ChosenFunction : {\Bbb R} \longrightarrow {\Bbb 
R}$ which has a derivative only at the origin, and such that 
${\ChosenFunction}'(0) = 1$.\par \hairline\par}

\stoptext
 end choose-element.tex


\starttext

\startluacode
local FunctionNames = { G , W }
local FunctionName  = FunctionNames[1]

function document.SetFunctionNames(list)
FunctionNames = utilities.parsers.settings_to_array(list)
end
function document.GetFunctionName(new)
if new then
FunctionName = FunctionNames[math.random(1,#FunctionNames)]
end
context(FunctionName)
end
\stopluacode

\def\SetFunctionNames[#1]{\ctxlua{document.SetFunctionNames(#1)}}
\def\NewFunctionName {\ctxlua{document.GetFunctionName(true)}}
\def\GetFunctionName {\ctxlua{document.GetFunctionName()}}

\SetFunctionNames[a,b,c,d]

\dorecurse{10}{
Give an example of a function
$\NewFunctionName : {\Bbb R} \longrightarrow {\Bbb R}$
which has a derivative only at the origin, and such that
$\GetFunctionName(0) = 1$.
\par \hairline\par
}


\stoptext




On 18 Apr 2015, at 19:23, Wolfgang Schuster schuster.wolfg...@gmail.com wrote:



Am 18.04.2015 um 18:55 schrieb Otared Kavian ota...@gmail.com:

Hi everyone,

In the example below I define a macro which chooses at random a name from a 
list of names. But I wonder whether this can be done in a more clever way 
without using a numerical macro created with math.random in Lua. The 
shortcoming of the macro below is that before hand I must know the nomber of 
elements in the list of names (for instance 5 in the example below), while it 
may happen that I need to create as many as random names that there are 
elements in the list, but sometimes I don’t know what is this number.

Thanks for any insight and help.
Best regards: OK
 begin random-names.tex
\setuprandomize[2015] % set a seed

\starttext

\startluacode
Name = {'F', 'G', 'u', 'v', 'W'}
\stopluacode

\define[3]\RandomName{%
\setevalue{Named#1}{\ctxlua{tex.print(math.random(#2,#3))}}}
\define\RandomFunctionName{\ctxlua{tex.print(Name[\NamedFunctionNumber])}}

\dorecurse{10}{\RandomName{FunctionNumber}{1}{5}%
Give an example of a function $\RandomFunctionName : {\Bbb R} \longrightarrow 
{\Bbb R}$ which has a derivative only at the origin, and such that 
$\RandomFunctionName(0) = 1$.\par \hairline\par}

\stoptext
 begin random-names.tex


You can access the size of your Name table with #Name but have to replace # 
with \letterhash when you use it in a TeX command because # is already taken 
for the TeX arguments.

\starttext

\startluacode
Name = {'F', 'G', 'u', 'v', 'W'}
\stopluacode

\define\RandomFunctionName
  {\startlua
   local listsize= \letterhash Name ;
   local randomvalue = math.random(1,listsize) ;
   context(Name[randomvalue])
   \stoplua}

\dorecurse{10}{Give an example of a function $\RandomFunctionName : {\Bbb R} 
\longrightarrow {\Bbb R}$ which has a derivative only at the origin, and such 
that $\RandomFunctionName(0) = 1$.\par \hairline\par}

\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 / 

Re: [NTG-context] A macro which gives a random name

2015-04-18 Thread Otared Kavian
Hi again Wolfgang,

Thanks to your hint, I could solve the problem…
In case someone else would encounter a similar problem to solve, below is a 
macro which chooses an element from a list, it creates a control sequence (CS) 
containing that element and it keeps the CS until the next time the macro is 
invoked again to choose another element.

Thanks again and best regards: OK

 begin choose-element.tex
\setuprandomize[1989] % set a seed

\starttext

% here is a list from which a name is chosen
\startluacode
ListOfNames = {'F', 'G', 'u', 'v', 'W'}
\stopluacode

% this macro has two arguments:
% the first argument is the control sequence name attached to Chosen,
% the second argument is the name of the list from which something is chosen
\define[2]\RandomChoice{%
\setevalue{Chosen#1}{\ctxlua{%
local listsize = \letterhash #2 ;
local LName = #2 ; 
tex.print(LName[math.random(1,listsize)])}}}

\dorecurse{10}{\RandomChoice{Function}{ListOfNames}%
Give an example of a function $\ChosenFunction : {\Bbb R} \longrightarrow {\Bbb 
R}$ which has a derivative only at the origin, and such that 
${\ChosenFunction}'(0) = 1$.\par \hairline\par}

\stoptext
 end choose-element.tex

 On 18 Apr 2015, at 19:23, Wolfgang Schuster schuster.wolfg...@gmail.com 
 wrote:
 
 
 Am 18.04.2015 um 18:55 schrieb Otared Kavian ota...@gmail.com:
 
 Hi everyone,
 
 In the example below I define a macro which chooses at random a name from a 
 list of names. But I wonder whether this can be done in a more clever way 
 without using a numerical macro created with math.random in Lua. The 
 shortcoming of the macro below is that before hand I must know the nomber of 
 elements in the list of names (for instance 5 in the example below), while 
 it may happen that I need to create as many as random names that there are 
 elements in the list, but sometimes I don’t know what is this number.
 
 Thanks for any insight and help.
 Best regards: OK
  begin random-names.tex
 \setuprandomize[2015] % set a seed
 
 \starttext
 
 \startluacode
  Name = {'F', 'G', 'u', 'v', 'W'}
 \stopluacode
 
 \define[3]\RandomName{%
  \setevalue{Named#1}{\ctxlua{tex.print(math.random(#2,#3))}}}
 \define\RandomFunctionName{\ctxlua{tex.print(Name[\NamedFunctionNumber])}}
 
 \dorecurse{10}{\RandomName{FunctionNumber}{1}{5}%
 Give an example of a function $\RandomFunctionName : {\Bbb R} 
 \longrightarrow {\Bbb R}$ which has a derivative only at the origin, and 
 such that $\RandomFunctionName(0) = 1$.\par \hairline\par}
 
 \stoptext
  begin random-names.tex
 
 You can access the size of your Name table with #Name but have to replace # 
 with \letterhash when you use it in a TeX command because # is already taken 
 for the TeX arguments.
 
 \starttext
 
 \startluacode
   Name = {'F', 'G', 'u', 'v', 'W'}
 \stopluacode
 
 \define\RandomFunctionName
  {\startlua
   local listsize= \letterhash Name ;
   local randomvalue = math.random(1,listsize) ;
   context(Name[randomvalue])
   \stoplua}
 
 \dorecurse{10}{Give an example of a function $\RandomFunctionName : {\Bbb R} 
 \longrightarrow {\Bbb R}$ which has a derivative only at the origin, and such 
 that $\RandomFunctionName(0) = 1$.\par \hairline\par}
 
 \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] Caption location with vertical \startplacefigure

2015-04-18 Thread Rik

On 2015-04-16 23:12, Rik Kabel wrote:
How can I get the caption for the vertical figures (figures 2 and 4 in 
the example) aligned below the figures with the caption width limited 
to the figure width? Sorry for the noise -- I am sure I am missing 
something simple, but I cannot find it at this point. (Running current 
beta and earlier versions, so it does not appear to be a regression.)


Nevermind. A night's sleep and coffee in the AM, and all is well.

--
Rik

___
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] Howto typeset physical half-life

2015-04-18 Thread Christian Prim
Hi Hans

thanks for the checker, that surely helps. So I could find a solution
(perhaps not the best) for my problem:

\m{T_{\text{½}}}

Thanks again
Christian



2015-04-17 23:51 GMT+02:00 Hans Hagen pra...@wxs.nl:

 On 4/17/2015 9:41 PM, Christian Prim wrote:

 Hi

 a year or so before one could simply typeset the physical half-life as
 shown in MWE:

 \usetypescript[palatino]
 \setupbodyfont[palatino]
 \starttext
  ½ α
  \m{T_α}
  \m{T_½}
 \stoptext

 The greek letter is just to show, that utf-8 works as expected. In
 actual beta (and probably longer before) this doesn't work anymore. What
 have I missed?


 Are you sure? palatino doesn't have that character in its math repertoire
 (it might have been present in the alternative that uses px fonts combined
 with a pagella text font in which case they're coming from text). The math
 subsystem of context does to some extend accept super and subscript
 characters but not (at least not now) these fractions. Is this really
 needed? It can be done but quite some extra overhead for bad practice.

 Anyway, I've added a checker so that at least it gets reported (assuming
 the use of one math collection):

 mkiv lua stats   unknown math characters: ½ (U+000BD) (n=3)

 Hans



 -
   Hans Hagen | PRAGMA ADE
   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
  | www.pragma-pod.nl
 -

 ___
 If your question is of interest to others as well, please add an entry to
 the Wiki!

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

 ___
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

Re: [NTG-context] Hidden chapter header? ... was: Change counter of chapters

2015-04-18 Thread Pablo Rodriguez
On 04/18/2015 07:22 AM, Jaroslav Hajtmar wrote:
 Hello ConTeXist
 My last Subject contribution maybe  so misleading that it nobody react.
 I'll try therefore to bring different view:
 Exist any possibility of creating some kind of hidden chapters
 (sections, subsections)?  
 The command would increase the counter of chapters (sections,
 subsections). Maybe it seems as rape of ConTeXt, but in certain moments
 this option would help me. 
 In my case it is the integration of practical part of project (worked in
 ConTeXt) into Word project:-(...
 
 For example I need to start writing any text from 53 page and such from
 the 5th chapter (or section). 
 It is possible in a similar way as I set the start page number set also
 the counter of chapters (sections)?

Hi Jaroslav,

adding the following commands before \startext does the work:

  \definehead[hiddenchapter][chapter]
  \setuphead[hiddenchapter][placehead=no]

But there is a proper way to set the chapter number:

  \setupheadnumber[chapter][56] % +2 or -5 also accepted

By the way, going from ConTeXt to Word you know you are on the road to
perdition, don’t you? ;-)

I hope it helps,


Pablo



 Here is my minimal example:
 
 \starttext
 %\hiddenchapter{Fictive chapter}
 %\hiddenchapter{Fictive chapter}
 %\hiddenchapter{Fictive chapter}
 %\hiddenchapter{Fictive chapter}
 
 \page
 
 \setcounter[userpage][53]
 
 \chapter{Fifth (actually first) nonfictive chapter}
 
 blablabla
 
 \stoptext


-- 
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] Howto typeset physical half-life

2015-04-18 Thread Alan BRASLAU
On Fri, 17 Apr 2015 23:51:56 +0200
Hans Hagen pra...@wxs.nl wrote:

 Anyway, I've added a checker so that at least it gets reported
 (assuming the use of one math collection):
 
 mkiv lua stats   unknown math characters: ½ (U+000BD) (n=3)

This will be quite useful.

A question in general for the mailing list: should missing math (and
text) characters simply not appear or should some placeholder (such as
a box) be rendered in its place? This could help with proofreading.

Nevertheless, having missing characters reported in the log file is a
good diagnostic.

Alan
___
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] imposition not working in latest beta

2015-04-18 Thread Pablo Rodriguez
On 04/17/2015 12:22 AM, Hans Hagen wrote:
 On 4/16/2015 11:21 PM, Pablo Rodriguez wrote:
 Hans,

 I’m afraid that imposition is not working with latest beta.
 
 indeed, also side effect of the mp upgrade .. fixed in next beta

Many thanks for your fix, Hans.

I’m afraid that it only works with the code sample I sent.

It doesn’t work with (.log file attached):

contextjit --extra=arrange --printformat=2UP
--paperformat=A4*A3,landscape a.pdf

Many thanks for your help,


Pablo
-- 
http://www.ousia.tk
$ contextjit --extra=arrange --printformat=2UP --paperformat=A4*A3,landscape a.pdf

mtx-context | processing extra: /home/ousia/ctxbeta/tex/texmf-context/tex/context/base/mtx-context-arrange.tex
mtx-context | run 1: luajittex --fmt=/home/ousia/ctxbeta/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luajittex/cont-en --jobname=mtx-context-arrange --lua=/home/ousia/ctxbeta/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luajittex/cont-en.lui --no-parse-first-line --c:currentrun=1 --c:engine=luajittex --c:extra=arrange --c:files=a.pdf --c:fulljobname=/home/ousia/ctxbeta/tex/texmf-context/tex/context/base/mtx-context-arrange.tex --c:input=/home/ousia/ctxbeta/tex/texmf-context/tex/context/base/mtx-context-arrange.tex --c:kindofrun=1 --c:maxnofruns=8 --c:paperformat=A4*A3,landscape --c:printformat=2UP --c:purgeall --c:result=context-extra /home/ousia/ctxbeta/tex/texmf-context/tex/context/base/mtx-context-arrange.tex
This is LuajitTeX, Version beta-0.80.0 (TeX Live 2015/dev) (rev 5225) 
 \write18 enabled.
open source  1  1  /home/ousia/ctxbeta/tex/texmf-context/tex/context/base/mtx-context-arrange.tex

ConTeXt  ver: 2015.04.17 02:03 MKIV beta  fmt: 2015.4.18  int: english/english

system   'cont-new.mkiv' loaded
open source  2  2  /home/ousia/ctxbeta/tex/texmf-context/tex/context/base/cont-new.mkiv
close source 2  2  /home/ousia/ctxbeta/tex/texmf-context/tex/context/base/cont-new.mkiv
system   files  jobname 'mtx-context-arrange', input '/home/ousia/ctxbeta/tex/texmf-context/tex/context/base/mtx-context-arrange', result 'context-extra'
fontslatin modern fonts are not preloaded
languageslanguage 'en' is active
open source  2  3  /home/ousia/ctxbeta/tex/texmf-context/tex/context/base/mtx-context-common.tex
close source 2  3  /home/ousia/ctxbeta/tex/texmf-context/tex/context/base/mtx-context-common.tex
close source 1  3  /home/ousia/ctxbeta/tex/texmf-context/tex/context/base/mtx-context-arrange.tex

*
(Please type a command or say `\end')
___
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
___