Re: [NTG-context] Orphans and widows in Natural Tables

2016-06-09 Thread Wolfgang Schuster

Pavneet Arora 
9. Juni 2016 um 22:21
Related to my previous enquiry, I have the same issue with another part
of the report card that uses Natural Tables.

I'd like to keep two rows together as a unit, and not have the table
split between them. Is that possible, and how?

advTHANKSance



\definefontfamily[mainface][rm][Latin Modern Roman]
\definefontfamily[mainface][ss][Latin Modern Sans]
\definefontfamily[mainface][tt][Latin Modern Typewriter]
\definefontfamily[mainface][mm][Latin Modern Math]
%\definefontfamily[mainface][rm][Andada][sc=file:AndadaSC-Regular.otf]
%\definefontfamily[mainface][ss][Fira Sans]
%\definefontfamily[mainface][tt][Inconsolata]
%\definefontfamily[mainface][mm][Latin Modern Math]

\setupbodyfont[mainface,9pt]

\starttext
\setupTABLE[frame=off, split=repeat]
\setupTABLE[r][last][bottomframe=on]
\setupTABLE[c][1][width=3.0in]
\setupTABLE[c][2][width=0.5in, align=flushright]
\setupTABLE[c][3][width=0.5in, align=flushright]
\setupTABLE[c][4][width=2.5in]
\bTABLE
\bTABLEhead
\bTR[topframe=on, bottomframe=on]
\bTH {\bf Unit Description} \eTH
\bTH {\bf Weight} \eTH
\bTH {\bf Mark} \eTH
\bTH \eTH
\eTR
\eTABLEhead
\bTABLEbody
\dorecurse{10}{
%% Need to keep Unit description row and comment row together.
\bTR[topframe=on]
\bTD {\sc Unit } \eTD
\bTD 10 \eTD
\bTD 99 \eTD
\bTD \eTD
\eTR
\bTR

\bTR[samepage=before]

\bTD[nc=4] \input lorem.tex \eTD
\eTR
}
\eTABLEbody
\eTABLE
\stoptext

 MWE

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] Simple font size changes command

2016-06-09 Thread josephcanedo
Dear all,


In a simple document using only 1 font but with different sizes what are the 
easiest switch commands to change font size locally ? I am aware of \tfa, \tfx 
etc …. but they do not seem to size in absolute size but rather relatively to 
current font size. In the following MWE :


\starttext


{\tfd Foo {\tfx Bar1}} {\tfx Bar2} Baz.


\stoptext



Bar1 is typeset much larger than Bar2.


I’d look to write something like but don’t know who to get \BigSize and 
\SmallSize defined (and have Bar1 and Bar2 of same size) :


{\BigSize Foo {\SmallSize Bar1}} {\SmallSize Bar2} Baz. 


Many thanks for any hint.


Best regards


Joseph Canedo___
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] Specifying font style variant with \definefontfamily

2016-06-09 Thread Wolfgang Schuster

Pavneet Arora 
9. Juni 2016 um 22:37
I'm still a bit at a loss on how one goes about correctly specifying the
variants in \definefontfamily using the default form given in the wiki.
Usually adding "* Light", etc. is sufficient (see commented line using
Junction font).

(As an aside, is it also possible to combine \sc\bf? I haven't been
able to figure that out).

My application is using the (free) Andada font family, and I need to
point the smallcaps style to the correct font
(https://www.fontsquirrel.com/fonts/andada).

In the following MWE I tried the following without success:

1. [sc=* SC Regular]
2. [sc=Andada SC Regular]
3. [sc=* SC-Regular]
4. [sc=Andada SC-Regular]

All give the following (or similar) error to stdout:

...ext/tex/texmf-context/tex/context/base/mkiv/font-sel.lua:121: 
attempt to index local 'file' (a nil value)

stack traceback:
...ext/tex/texmf-context/tex/context/base/mkiv/font-sel.lua:121: in 
function 'selectfont_savefile'
...ext/tex/texmf-context/tex/context/base/mkiv/font-sel.lua:151: in 
function <...ext/tex/texmf-context/tex/context/base/mkiv/font-sel.lua:142>
...ext/tex/texmf-context/tex/context/base/mkiv/font-sel.lua:526: in 
function 'registerfiles'
...ext/tex/texmf-context/tex/context/base/mkiv/font-sel.lua:567: in 
function 'action1'
[string "local function scan1()..."]:55: in function <[string "local 
function scan1()..."]:42>


1 \definefontfamily[mainface][rm][Latin Modern]
2 >> \definefontfamily[mainface][rm][Andada][sc=Andada SC Regular]


I end up finally settling on the form using the explicit file:
[sc=file:AndadaSC-Regular.otf], which does work.

But I really would like to understand how the first form as given in the
wiki should be used properly? What patterns should I be looking for?

There was a bug in the code but I fixed 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] Orphans and widows in Natural Tables

2016-06-09 Thread Aditya Mahajan

On Thu, 9 Jun 2016, Pavneet Arora wrote:

Related to my previous enquiry, I have the same issue with another part 
of the report card that uses Natural Tables.


I'd like to keep two rows together as a unit, and not have the table 
split between them.  Is that possible, and how?


advTHANKSance



MWE


\definefontfamily[mainface][rm][Latin Modern Roman]
\definefontfamily[mainface][ss][Latin Modern Sans]
\definefontfamily[mainface][tt][Latin Modern Typewriter]
\definefontfamily[mainface][mm][Latin Modern Math]
%\definefontfamily[mainface][rm][Andada][sc=file:AndadaSC-Regular.otf]
%\definefontfamily[mainface][ss][Fira Sans]
%\definefontfamily[mainface][tt][Inconsolata]
%\definefontfamily[mainface][mm][Latin Modern Math]

\setupbodyfont[mainface,9pt]

\starttext
   \setupTABLE[frame=off, split=repeat]
   \setupTABLE[r][last][bottomframe=on]
   \setupTABLE[c][1][width=3.0in]
   \setupTABLE[c][2][width=0.5in, align=flushright]
   \setupTABLE[c][3][width=0.5in, align=flushright]
   \setupTABLE[c][4][width=2.5in]
   \bTABLE
   \bTABLEhead
   \bTR[topframe=on, bottomframe=on]
   \bTH {\bf Unit Description} \eTH
   \bTH {\bf Weight} \eTH
   \bTH {\bf Mark} \eTH
   \bTH \eTH
   \eTR
   \eTABLEhead
   \bTABLEbody
   \dorecurse{10}{
   %% Need to keep Unit description row and comment row together.
   \bTR[topframe=on]
   \bTD {\sc Unit } \eTD
   \bTD 10 \eTD
   \bTD 99 \eTD
   \bTD \eTD
   \eTR


(Untested): Add

\noindent{\blank[samepage]}


   \bTR
   \bTD[nc=4] \input lorem.tex \eTD
   \eTR
   }
   \eTABLEbody
   \eTABLE
\stoptext


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
___

[NTG-context] Specifying font style variant with \definefontfamily

2016-06-09 Thread Pavneet Arora
I'm still a bit at a loss on how one goes about correctly specifying the 
variants in \definefontfamily using the default form given in the wiki.  
Usually adding "* Light", etc. is sufficient (see commented line using 
Junction font).

(As an aside, is it also possible to combine \sc\bf?  I haven't been 
able to figure that out).

My application is using the (free) Andada font family, and I need to 
point the smallcaps style to the correct font 
(https://www.fontsquirrel.com/fonts/andada).

In the following MWE I tried the following without success:

1.  [sc=* SC Regular]
2.  [sc=Andada SC Regular]
3.  [sc=* SC-Regular]
4.  [sc=Andada SC-Regular]

All give the following (or similar) error to stdout:

...ext/tex/texmf-context/tex/context/base/mkiv/font-sel.lua:121: attempt to 
index local 'file' (a nil value)
stack traceback:
  ...ext/tex/texmf-context/tex/context/base/mkiv/font-sel.lua:121: in function 
'selectfont_savefile'
  ...ext/tex/texmf-context/tex/context/base/mkiv/font-sel.lua:151: in function 
<...ext/tex/texmf-context/tex/context/base/mkiv/font-sel.lua:142>
  ...ext/tex/texmf-context/tex/context/base/mkiv/font-sel.lua:526: in function 
'registerfiles'
  ...ext/tex/texmf-context/tex/context/base/mkiv/font-sel.lua:567: in function 
'action1'
  [string "local function scan1()..."]:55: in function <[string "local function 
scan1()..."]:42>

 1 \definefontfamily[mainface][rm][Latin Modern]
 2 >>  \definefontfamily[mainface][rm][Andada][sc=Andada SC Regular]


I end up finally settling on the form using the explicit file: 
[sc=file:AndadaSC-Regular.otf], which does work.

But I really would like to understand how the first form as given in the 
wiki should be used properly?  What patterns should I be looking for?

An output of 'strings' on the font .otf file yields:

"... with Reserved Font Name 'Andada'Andada SCRegular"
"AndadaSC-Regular"

advTHANKSance.

 MWE

\definefontfamily[mainface][rm][Latin Modern]
\definefontfamily[mainface][rm][Andada][sc=Andada SC Regular]
%\definefontfamily[mainface][rm][Andada][sc=file:AndadaSC-Regular.otf]
%\definefontfamily[mainface][ss][Junction][tf=* Light,bf=* Regular]
\definefontfamily[mainface][ss][Fira Sans]
\definefontfamily[mainface][tt][Inconsolata]
\definefontfamily[mainface][mm][Latin Modern Math]

\setupbodyfont[mainface,9pt]

\starttext
\sc Test of Small Caps.
\stoptext

 MWE

-- 
Pavneet Arora   m: +1 (647) 406-6843
Waroc Informatikt: +1 (416) 937-9276
___
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] Orphans and widows for specific paragraph groups

2016-06-09 Thread Pavneet Arora
I have a couple of questions about preventing orphans for specific 
document blocks.

These all relate to a web-based report card application I have written 
for a study abroad school client of mine.  The ConTeXt file is being 
generated and processed out of a PHP Laravel framework app.

I have stripped away most of the details as well as the application 
fonts, but the issue that I am facing is related to keeping the course 
header (done as a paragraph environment), \hairline, and the teacher's 
comment for that course together as a unit.

At a minimum, I would like the three elements as a grouped and pushed to 
the following page.  Ideally, and this is more for my own learning, I'd 
like to be able to have finer control---say the header, \hairline, and a 
set number of comment lines would be acceptable at the bottom of a page.

What would be the best practices for this?

advTHANKSance

 MWE

\definefontfamily[mainface][rm][Latin Modern Roman]
\definefontfamily[mainface][ss][Latin Modern Sans]
\definefontfamily[mainface][tt][Latin Modern Typewriter]
\definefontfamily[mainface][mm][Latin Modern Math]

\setupbodyfont[mainface,9pt]

% Set up default paragraph indenting and spacing.
\setupindenting[yes,
medium,
next]
\setupwhitespace[small]

% Set up paragraph environment for subject header.
\defineparagraphs 
[subjectpar][
n=2,
before={\blank[2*big]}]
\setupparagraphs
[subjectpar]
[1]
[width=.3\textwidth]

\starttext
\blank[8*big, force]
\dorecurse{10}{
\blank[2*big]
\noindentation
\startsubjectpar
{\ss\tfc ENG4U}
\subjectpar
%% Need to keep the following together as a unit.
{\ss\tfc English (Grade 12)}
\stopsubjectpar
\noindentation
\vskip-2em\hairline
\setupindenting[yes,
medium,
next]
\dorecurse{1}{
\input lorem.tex

}
}
\stoptext

 MWE

-- 
Pavneet Arora   m: +1 (647) 406-6843
Waroc Informatikt: +1 (416) 937-9276
___
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] Orphans and widows in Natural Tables

2016-06-09 Thread Pavneet Arora
Related to my previous enquiry, I have the same issue with another part 
of the report card that uses Natural Tables.

I'd like to keep two rows together as a unit, and not have the table 
split between them.  Is that possible, and how?

advTHANKSance


 MWE

\definefontfamily[mainface][rm][Latin Modern Roman]
\definefontfamily[mainface][ss][Latin Modern Sans]
\definefontfamily[mainface][tt][Latin Modern Typewriter]
\definefontfamily[mainface][mm][Latin Modern Math]
%\definefontfamily[mainface][rm][Andada][sc=file:AndadaSC-Regular.otf]
%\definefontfamily[mainface][ss][Fira Sans]
%\definefontfamily[mainface][tt][Inconsolata]
%\definefontfamily[mainface][mm][Latin Modern Math]

\setupbodyfont[mainface,9pt]

\starttext
\setupTABLE[frame=off, split=repeat]
\setupTABLE[r][last][bottomframe=on]
\setupTABLE[c][1][width=3.0in]
\setupTABLE[c][2][width=0.5in, align=flushright]
\setupTABLE[c][3][width=0.5in, align=flushright]
\setupTABLE[c][4][width=2.5in]
\bTABLE
\bTABLEhead
\bTR[topframe=on, bottomframe=on] 
\bTH {\bf Unit Description} \eTH
\bTH {\bf Weight} \eTH
\bTH {\bf Mark} \eTH
\bTH \eTH
\eTR
\eTABLEhead
\bTABLEbody
\dorecurse{10}{
%% Need to keep Unit description row and comment row together.
\bTR[topframe=on] 
\bTD {\sc Unit } \eTD
\bTD 10 \eTD
\bTD 99 \eTD
\bTD \eTD
\eTR
\bTR
\bTD[nc=4] \input lorem.tex \eTD
\eTR
}
\eTABLEbody
\eTABLE
\stoptext

 MWE

-- 
Pavneet Arora   m: +1 (647) 406-6843
Waroc Informatikt: +1 (416) 937-9276
___
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] placetable with location=split produces error

2016-06-09 Thread Christoph Reller
Hi,

Can anybody tell me why the following MWE does not work:

\starttext
  \dorecurse{9}{\input ward}
  \startplacetable[location=split]
\bTABLE
  \bTR \bTD \input tufte \eTD \eTR
\eTABLE
  \stopplacetable
\stoptext

The error message is:

! Undefined control sequence
 ...ixednumber {\currentfloat }\currentfloatnumber
  \relax
\thecurrentfloatnum...
\flushbothlabelclass #1#2#3->#1#3
 #2
\namedtaggedlabeltexts ...\dostarttagged {#1}{#2}}
  \dostoptagged \endgroup
\thecurrentfloatnumber ...rentfloatnumbersuffix }}
  \fi \fi \fi
\strc_floats_make_complete_caption ...floatnumber
  }\ifnofloatcaption \else
\...
\strc_floats_check_caption_content ...ete_caption
  }\ifdim \wd
\b_strc_floats...
...

Any feedback is welcome!

Cheers,
Christoph
___
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] Wrong ToUnicode table for ZapfDingbats font

2016-06-09 Thread Christoph Reller
Hi,

Consider the following MWE, that displays a ZapfDingbats check mark:

\definefontsynonym[ZapfDingbats][file:ZapfDingbats][features=dingbats]
\definefont[zapfdingbats][ZapfDingbats]
\starttext
\getnamedglyphdirect{ZapfDingbats*dingbats}{a19}
\stoptext

In earlier versions, e.g., 2016.03.13, the font in the PDF contains a
correct ToUnicode table with:
...
1 beginbfchar
<0013> <2713>
endbfchar
...

In the currently newest version, 2016.06.08, the ToUnicode table lacks the
entry for the check mark:
...
0 beginbfchar
endbfchar
...

Hence, the check mark cannot be copy pasted from the PDF.

I fear this may be a bug. Or am I missing something? Any feedback is
welcome.

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