[NTG-context] Customize grid layout

2016-02-28 Thread Zhichu Chen

Dear TeXers,

Is it possible to define the layout like:
\setuplayout
  [grid=yes%
  ,lines=6%
  ,gridstyle={1,1,1,3.5,1,1}%
  ]
so that I can have 6 lines per page, but the 4th line skips will be 
3.5\baselineskip.
For your information, the blank between the first 3 lines and the rest 
ones is used to

display the page number (it's not a joke although April is close).

I was thinking putting an invisible rule after each CJK glyph as a font 
feature, and
the height of the rule changes every 6 lines starting from 4. But 
\linenumber seems to

be an MKII-only counter.

Any suggestions?

--
Best regards,
ℤhichu ℂhen

Shanghai Institute of Applied Physics
No. 2019, Jialuo Road
Jiading, Shanghai, P.R.China
Tel: +86-21-39194888

___
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] math with Unicode characters

2016-02-28 Thread Pablo Rodriguez
Dear list,

I have the following sample:

\definefallbackfamily[mainface][rm][TeX Gyre Pagella][range={⋀}]
\definefontfamily[mainface][rm][EB Garamond]
\starttext
⋀
\stoptext

Is there any way to have the Unicode character on the final PDF document
without having to edit the text?

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] Controlling \at output

2016-02-28 Thread Wolfgang Schuster

Aidan Nichol 
28. Februar 2016 um 16:08
Thanks for the reply. \thispage is producing no output in all the 
places it is being invoked

Which ConTeXt version do you use?

I tested the example with the newest beta and has no problems with it.

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] \setupsectionblock and \setupbackgrounds page-break problem

2016-02-28 Thread Wolfgang Schuster

robin.kirk...@csiro.au 
28. Februar 2016 um 14:49
Folks,

I want \startfrontmatter to trigger a background image, but I can only 
get this to appear if I use page=yes (see example below).


However, I don’t want any page break between the front-matter and 
body-matter. If I use page=no (as in the line commented out) this page 
break disappears — but so does the background image!


How can I get the background behind the page where the front-matter 
text appears, but with no page break before the body-matter?

Set the page background outside of the sectionblock.

\setupexternalfigures[location=default]

\definelayer[frontbackground]

\setupbackgrounds[page][background=frontbackground]

\startsectionblockenvironment[frontpart]

\setlayer[frontbackground]{\externalfigure[mill][width=\paperwidth,height=\paperheight]}

\stopsectionblockenvironment

\setupsectionblock[frontpart][page=no]
\setupsectionblock[bodypart][page=no]

\starttext

\startfrontmatter
Should be on a first page
\stopfrontmatter

\startbodymatter
Should follow frontmatter with no page break
\stopbodymatter

\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] problem with page number on last page

2016-02-28 Thread Wolfgang Schuster

Alan Bowen 
28. Februar 2016 um 20:27
To prevent empty pages in a double-sided page environment, I have been 
using

\setuppagenumbering[page=].

This does not work as it should, however, when there is no body text 
but only a continuing footnote on the last page. Then, though there 
are still no empty pages, the pagenumber on the last page is the same 
as that on the preceding page.


Consider
\setuppagenumbering[alternative=doublesided]
\setuppagenumbering[page=]

\starttext
\dorecurse{3}{\input knuth}\footnote{\dorecurse{3}{\input knuth}}
%\input knuth
\stoptext

with and without the line currently commented out.

You can add the following lines at the begin of your document.

\appendtoks
  \noheaderandfooterlines
\to \everystoptext

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] problem with page number on last page

2016-02-28 Thread Alan Bowen
To prevent empty pages in a double-sided page environment, I have been using
\setuppagenumbering[page=].

This does not work as it should, however, when there is no body text but
only a continuing footnote on the last page. Then, though there are still
no empty pages, the pagenumber on the last page is the same as that on the
preceding page.

Consider
\setuppagenumbering[alternative=doublesided]
\setuppagenumbering[page=]

\starttext
\dorecurse{3}{\input knuth}\footnote{\dorecurse{3}{\input knuth}}
%\input knuth
\stoptext

with and without the line currently commented out.

Any suggestions will be greatly appreciated.

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
___

[NTG-context] Math fractions

2016-02-28 Thread Aditya Mahajan

Something is wrong in the current implmentation of \tfrac.

If we take away all the bells and whistles provided by 
\definemathfraction,


* \tfrac#1#2 should be equal to {\textstyle #2 \over #1}
* \dfrac#1#2 should be equal to {\displaystyle #2 \over #1}
* \frac should be equal to \tfrac in inline math and \dfrac in display 
math.


In the current implmentation \frac works correctly, but \tfrac does not. 
For example:


\startbuffer
  \frac 12 \tfrac 12 \dfrac 12
\stopbuffer

\starttext
$\getbuffer$
\startformula  \getbuffer \stopformula
\stoptext

The output of \frac and \dfrac is correct in both inline and display mode.

The output of \tfrac is wrong in both modes. In both modes, \tfrac should 
equal the current output of \frac in inline mode.


Although I don't completely understand the code, my guess is that there is 
a bug in how mathstyle=text is implemented (really, mathstyle=text should 
be equivalent to mathstyle=empty in inline math mode).


Thanks,
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] Controlling \at output

2016-02-28 Thread Aidan Nichol
Thanks for the reply. \thispage is producing no output in all the places it is 
being invoked

Aidan 

> On 24 Feb 2016, at 15:35, ntg-context-requ...@ntg.nl wrote:
> 
> startsetups[referenceformat:thispage]
>\doifelse{\filterreference{page}}{\rawcountervalue[userpage]}
>{{\tttf !?}}
>{\filterreference{page}}
> \stopsetups
> 
> \definereferenceformat[thispage][setups=referenceformat:thispage]
> 
> \starttext
> 
> \chapter[one]{First chapter}
> 
> First: \thispage[one]
> 
> Second: \thispage[two]
> 
> \chapter[two]{Second chapter}
> 
> First: \thispage[one]
> 
> Second: \thispage[two]

___
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] \setupsectionblock and \setupbackgrounds page-break problem

2016-02-28 Thread Robin.Kirkham
Folks,

I want \startfrontmatter to trigger a background image, but I can only get this 
to appear if I use page=yes (see example below).

However, I don’t want any page break between the front-matter and body-matter. 
If I use page=no (as in the line commented out) this page break disappears — 
but so does the background image!

How can I get the background behind the page where the front-matter text 
appears, but with no page break before the body-matter?

Robin

 
\setupexternalfigures[location=default]

\definelayer[frontbackground]
\setlayer[frontbackground]{%
\externalfigure[mill.png]
[width=\paperwidth,height=\paperheight]
}

\unexpanded\def\frontpartbefore{
\setupbackgrounds[page]
[background=frontbackground]
}

\setupsectionblock[frontpart][page=yes,before=\frontpartbefore]
%\setupsectionblock[frontpart][page=no,before=\frontpartbefore]
\setupsectionblock[bodypart][page=no]

\starttext

\startfrontmatter
Should be on a first page
\stopfrontmatter

\startbodymatter
Should follow frontmatter with no page break
\stopbodymatter

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

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

[NTG-context] Getting file name of \externalfigure in the header/footer (mkii)

2016-02-28 Thread Gerben Wierda
Hi folks,

I have a file that I use to combine PDF files in one bigger file. The pages are 
A4 or A3, rotated or not. This results in a mixed A4/A3 document that I can 
print and distribute.

Example page:

\page\setuppapersize[A4,portrait][A4,portrait]
\setuplayout[backspace=10mm,topspace=10mm,width=277mm,height=190mm,header=5mm,footer=1mm]
\rotate[rotation=90]{\externalfigure[Exercise-1a-B2B-web-site-Anna-A.pdf][width=\hsize]}

I'd like to have the name of the external file in the header. Can I do that?

G

PS. I'm still using mkii for my production (only used mkiv for a transformation 
to EPUB 1.5 ears ago).___
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
___