Re: [NTG-context] Tent style cards

2019-12-21 Thread Pablo Rodriguez
On 12/21/19 11:08 PM, Pavneet Arora wrote:
> Hello.
>
> I am trying to do up some tent style table place holder cards for my
> daughter's wedding, and have been wracking my brain for a solution for a
> couple of days now.
>
> Having tried many alternatives, this is the closest I have come up with.
> But mirroring doesn't work.  If I use \setuparranging[2*4] mirroring
> works, but I only need tent style (1*2 head-to-head) so that I can trim
> to size.
>
> Any template that could be suggested would be most helpful as the
> wedding is on Mon (yikes!).

Hi Paavnet,

I think this could achieve what you might need:

\definepapersize[tblcard][width=4in,height=3in]

\setuppapersize[tblcard][letter,portrait]
\setuparranging[2TOP]

\setuplayout[
height=3in,
width=4in,
topspace=0in,
header=0in,
bottomspace=0in,
footer=0in,
backspace=0.0in,
%%
location=middle,
marking=on,
]

\startbuffer[tblcard]
\startframedtext
[frame=off, width=\textwidth, height=\textheight,
  align={lohi, middle}]
\tfd A Name
\stopframedtext
\stopbuffer

\starttext
%~ \showframe
\rotate[rotation=180]{\getbuffer[tblcard]}
\page
\getbuffer[tblcard]
\stoptext

I hope it goes on time ;-),

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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] Disappearing font feature

2019-12-21 Thread Rik Kabel

List,

I have a strange case of a font feature disappearing when many fonts are 
used.


In creating a sampler for the Jost* font (free at 
https://indestructibletype.com/Jost.html) and using its feature ss01 to 
get single-storey lower-case a, the font reverts to the default 
two-storey a when many weights are shown. When I create the fonts with 
\definefontfamily, the upright weights are fine and the italic weights 
revert. When I create the fonts with \definefont, the reverse is the case.


Below is the demonstration for the \definefont variation and a snip of 
the failing result.


   \definebodyfontenvironment[13pt]
 [interlinespace=15pt]

   \setuplayout [backspace=0pt,
  topspace=30pt,
  width=middle,
  height=middle,
  location=middle,
  header=0pt,
  footer=0pt]

   \setuppagenumbering  [location=]

   \definefontfeature   [default]
 [default]
 [ss01=yes]

   \definefont  [JHair] [jost-100-hairline]
   \definefont  [JThin] [jost-200-thin]
   \definefont  [JLigh] [jost-300-light]
   \definefont  [JBook] [jost-400-book]
   \definefont  [JMedi] [jost-500-medium]
   \definefont  [JSemi] [jost-600-semi]
   \definefont  [JBold] [jost-700-bold]
   \definefont  [JHeav] [jost-800-heavy]
   \definefont  [JBlac] [jost-900-black]

   \definefont  [JHairI][jost-100-hairlineitalic]
   \definefont  [JThinI][jost-200-thinitalic]
   \definefont  [JLighI][jost-300-lightitalic]
   \definefont  [JBookI][jost-400-bookitalic]
   \definefont  [JMediI][jost-500-mediumitalic]
   \definefont  [JSemiI][jost-600-semiitalic]
   \definefont  [JBoldI][jost-700-bolditalic]
   \definefont  [JHeavI][jost-800-heavyitalic]
   \definefont  [JBlacI][jost-900-blackitalic]

   \startbuffer [Sampler]
 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
 a b c d e f g h i j k l m n o p q r s t u v w x y z à ë í ô ç
 1 2 3 4 5 6 7 8 9 0 ` \texttilde\ - = !  @ \# \$ \letterpercent\ ^ \&
 * ( ) _ + [ ] \textbackslash\ ; ' , . / \{ \} \| : " < > ?
 \fontname\font
   \blank   [line]
   \stopbuffer

   \setupalign  [middle]

 
   \starttext

   \obeylines

   \JHair \getbuffer[Sampler]
   \JThin \getbuffer[Sampler]
   \JLigh \getbuffer[Sampler]
   \JBook \getbuffer[Sampler]
   \JMedi \getbuffer[Sampler]
   \JSemi \getbuffer[Sampler]
   \JBold \getbuffer[Sampler]
   \JHeav \getbuffer[Sampler]
   \JBlac \getbuffer[Sampler]
   \page
   \JHairI\getbuffer[Sampler]
   \JThinI\getbuffer[Sampler]
   \JLighI\getbuffer[Sampler]
   \JBookI\getbuffer[Sampler]
   \JMediI\getbuffer[Sampler]
   \JSemiI\getbuffer[Sampler]
   \JBoldI\getbuffer[Sampler]
   \JHeavI\getbuffer[Sampler]
   \JBlacI\getbuffer[Sampler]

   \stoptext

Below is the demonstration for the \definefontfamily variation and a 
snip of the expected result, although the italics fail.


   \definebodyfontenvironment[13pt]
 [interlinespace=15pt]

   \setuplayout [backspace=0pt,
  topspace=15pt,
  width=middle,
  height=middle,
  location=middle,
  header=0pt,
  footer=0pt]

   \setuppagenumbering  [location=]

   \definefontfeature   [default]
 [default]
 [ss01=yes]
   \definefontfamily[up-one]
 [sansserif]
 [Jost]
 [tf={style:hairline,features},
  bf={style:thin,features},
  bi={style:light,features},
  it={style:book,features}]
   \definefontfamily[up-two]
 [sansserif]
 [Jost]
 [tf={style:medium,features},
  bf={style:semi,features},
  bi={style:bold,features},
  it={style:heavy,features}]
   \definefontfamily[up-three]
 [sansserif]
 [Jost]
 [tf={style:black,features},
  bf={style:black,features},
  bi={style:black,features},
  it={style:black,features}]
   \definefontfamily[it-one]
 [sansserif]
 [Jost]
 [tf={style:hairlineitalic,features},
  bf={style:thinitalic,features},
  bi={style:lightitalic,features},
  

[NTG-context] Tent style cards

2019-12-21 Thread Pavneet Arora
Hello.

I am trying to do up some tent style table place holder cards for my 
daughter's wedding, and have been wracking my brain for a solution for a 
couple of days now.

Having tried many alternatives, this is the closest I have come up with.  
But mirroring doesn't work.  If I use \setuparranging[2*4] mirroring 
works, but I only need tent style (1*2 head-to-head) so that I can trim 
to size.

Any template that could be suggested would be most helpful as the 
wedding is on Mon (yikes!).

advTHANKSance.

>>>MWE<<<

\definepapersize[tblcard][width=4in,height=3in]

\setuppapersize[tblcard][letter,portrait]
\setuparranging[2TOP]

\setuplayout[
height=3in,
width=4in,
topspace=0in,
header=0in,
bottomspace=0in,
footer=0in,
backspace=0.0in,
%%
location=middle,
marking=on,
]

\startbuffer[tblcard]
\strut
\tfd A Name
\stopbuffer

\starttext
\showframe
\adaptpapersize[tblcard,mirrored][letter,portrait]\getbuffer[tblcard]
\page
\getbuffer[tblcard]
\stoptext

-- 
Pavneet Arora   m: +1 647-406-6843
Waroc Informatike: pavneet_ar...@waroc.com
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] blank[\lineheight] works with LMTX, fails with MkIV

2019-12-21 Thread Wolfgang Schuster

mf schrieb am 21.12.2019 um 11:07:

Il 20/12/19 20:04, Rik Kabel ha scritto:


MkIV fails with

tex error   > tex error on line 3 in file 
c://Users/micro/Desktop/fail.tex: ! Missing \endcsname inserted

given the following mwe:

\starttext
a
\blank[\lineheight]
z
\stoptext

Not critical as there are lots of ways to do this, but it seems 
strange that it should work in one and not the other.




\starttext
a
\blank[\the\lineheight]
z
\stoptext


To understand the differenecs between MkIV adn LMTX you should know how 
\blank handles the arguments.



1. MkII

ConTeXt processes the argument list in TeX and checks first if the 
argument is a valid name (e.g. big) which is then expanded, when the 
argument isn't a valid name it is handled as a dimension which is added 
to the skip value. Since everything happens in TeX length registers 
(e.g. \lineheight) are allowed in the argument.



2. MkIV

ConTeXt passes the complete list with all arguments to Lua where a loop 
iterates over all entries. The problem here is that Lua can't deal with 
\lineheight because it expects the value of the register and you have to 
pass the length as \the\lineheight which delivers the current value for 
the line height.



3. LMTX

The same things as MkIV but there is a additional check on the TeX end 
before the arguments are passed to Lua where ConTeXt checks if the 
argument is a dimension. The reason why this is only done for LMTX is 
that a new command (\ifchkdim) in the engine was needed for this and 
many of these new helpers exist only here.


Be aware that this check works only when a length register is the 
*first* argument in the list because every other case the check fails.



\starttext

line 1

\blank[line]

line 2

\blank[\lineheight] % works

line 3

\blank[preference,line]

line 4

\blank[preference,\lineheight] % fails

line 5

\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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] blank[\lineheight] works with LMTX, fails with MkIV

2019-12-21 Thread mf

Il 20/12/19 20:04, Rik Kabel ha scritto:


MkIV fails with

tex error   > tex error on line 3 in file 
c://Users/micro/Desktop/fail.tex: ! Missing \endcsname inserted

given the following mwe:

\starttext
a
\blank[\lineheight]
z
\stoptext

Not critical as there are lots of ways to do this, but it seems 
strange that it should work in one and not the other.




\starttext
a
\blank[\the\lineheight]
z
\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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___