[NTG-context] wrong itemize indenting

2010-10-06 Thread Andreas Harder
Hi all,

I mentioned it already but so far I couldn't find a solution. Here is an 
example of my problem:

\starttext  \showframe \overfullrule=4pt
\startbuffer
  \startitemize[n,fit][left={Abb. },distance=.5em]
  \item \dorecurse{20}{eins }
  \item \dorecurse{20}{zwei }
  \item \dorecurse{20}{drei }
  \stopitemize
\stopbuffer
\getbuffer % -> correct indenting
\bTABLE 
\bTR\bTD \getbuffer \eTD\eTR
\eTABLE
\getbuffer % -> wrong indenting
\stoptext

If one uses an itemize environment with the "fit"-option in a TABLE the further 
itemize environments getting disturbed.

Is this a bug or is there a workaround? 

I appreciate your help.

Andreas
___
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] framed getbuffer

2007-03-21 Thread Wolfgang Werners-Lucchini
Hallo!

The following simple example doesn't compile
(ConTeXt ver. 2007.01.02 and Live ConTeXt).

What am I doing wrong?

\starttext
\startbuffer
\startformula
x^2 = x\cdot x
\stopformula
\stopbuffer
\framed{\getbuffer}
\stoptext


Wolfgang
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] \CAP command does not work

2004-08-09 Thread Salman Khilji
Why don't I see capitals in the following example?

\setupbodyfont  [cmr,12pt]

\starttext

\startbuffer[test]
The quick brown fox jumps over the lazy dog.
\stopbuffer

\getbuffer[test]

\CAP{\getbuffer[test]}

\stoptext

___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] (no subject)

2004-02-01 Thread Vit Zyka
Hallo ConTeXt debater,

this buffer storage works perfectly:

\starttext
 \startbuffer[TMP]
 Bla
 \stopbuffer
 \getbuffer[TMP]
\stoptext


but why not this one?


\starttext
\def\tmp{%
  \startbuffer[TMP]
  Bla
  \stopbuffer
}
  \tmp
  \getbuffer[TMP]
\stoptext


Thanks
Vit Zyka

___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] \CAP command does not work

2004-08-10 Thread Henning Hraban Ramm
Am 10.08.2004 um 05:09 schrieb Salman Khilji:
Why don't I see capitals in the following example?
\CAP{\getbuffer[test]}
Try {\sc\getbuffer...

Grüßlis vom Hraban!
---
http://www.fiee.net/texnique/
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] Parallel texts: verse with blanks between stanzas via tabulate

2022-08-26 Thread Denis Maier via ntg-context
Hi,

I need to typeset two poems side by side. Usually, I use the tabulate 
environment for typesetting parallel texts. However, for poems this does not 
quite work as tabulate does not seem to allow blanks between the stanzas. See 
MWE below. Am I missing someting? Is there a better way to achieve this?

Best,
Denis

%%%
\startbuffer[lines]
\startlines[after={\blank}]
this
is
a
poem

with
two
stanzas
\stoplines
\stopbuffer

\starttext

With a blank between the stanzas:
\getbuffer[lines]

Without a blank between the stanzas:
\starttabulate[|p|p|]
\NC \getbuffer[lines]
\NC \getbuffer[lines]
\NC\NR
\stoptabulate
\stoptext
%%%

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

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Problems with setups module

2018-11-26 Thread Tommaso Gordini
Sorry, the correct code is the following:

\usemodule [setups]


\starttext


\startbuffer

\framed [width=3cm,height=1cm] {testo}

\stopbuffer


\typebuffer

\getbuffer


\cmdfullsetup [setuppapersize]


\startbuffer[foo]

\framed [width=3cm,height=1cm] {testo}

\stopbuffer


\typebuffer[foo]

\getbuffer[foo]


\cmdfullsetup [setuppapersize]


\stoptext

Il giorno lun 26 nov 2018 alle ore 11:08 Tommaso Gordini <
illinguista1...@gmail.com> ha scritto:

> Hi everyone.
>
> The following code gives different results by commenting and decommending
> the indicated lines.
>
> Could it be a problem with the setups module?
>
> Thanks in advance
> Tommy
>
> \usemodule [setups]
>
>
> \starttext
>
>
> %\startbuffer
>
> %\framed [width=3cm,height=1cm] {testo}
>
> %\stopbuffer
>
> %
>
> %\typebuffer
>
> %\getbuffer
>
>
> \cmdfullsetup [setuppapersize]
>
>
> \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
___

Re: [NTG-context] Styling of included buffers or files

2020-05-18 Thread Jan U. Hasecke
Am 17.05.20 um 19:04 schrieb Marco Patzer:

>>
>> Is it somehow possible to apply styles to all buffers that gets
>> included via \getbuffer by defining a special getbuffer-style?
> 
> \setupbuffer has before and after keys which can be used. Example:
> 
> \setupbuffer
>  [before=\blank\blackrule\startnarrower\BufferStyle,
>   after=\stopnarrower\blackrule\blank]
> 
> %% alternatively define custom buffers
> \definebuffer
>  [foobar]
> 
> \setupblackrules
>   [width=1cm,
>height=1pt,
>color=gray]
> 
> \definehighlight
>   [BufferStyle]
>   [style=smallitalic,
>color=blue]
> 
> \startbuffer
>   \samplefile{knuth}
> \stopbuffer
> 
> \starttext
>   \samplefile{knuth}
>   \getbuffer
>   \samplefile{knuth}
> 
> \stoptext
> 

So easy! I am humbled. For some reason I wasn't able to find this in
setup-en.pdf.

Thanks a lot.

juh

___
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] Why does every new \setupTABLE add more whitespace to the left of table?

2007-07-04 Thread Wolfgang Schuster
2007/7/4, Hamid Kamrani <[EMAIL PROTECTED]>:
> This is what I meant:
>
> \starttext
> \startbuffer

\startsetups table

> \setupTABLE[c][1][align=right]
> \setupTABLE[c][1][align=right]
> \setupTABLE[c][1][align=right]
> \setupTABLE[c][1][align=right]
> \setupTABLE[c][1][align=right]
> \setupTABLE[r][1][topframe=on,bottomframe=on]
> \bTABLE
>  \bTR\bTD \input knuth \relax \eTD\eTR
> \eTABLE
> \stopbuffer

\stopsetups

>
> % vertical mode
> \getbuffer
>
> % horizontal mode
> %\dontleavehmode\getbuffer
>
> \placetable[frame=off]
>{whow}
>{\placelegend[align={right}]
>   {\dontleavehmode\getbuffer}

{\setups{table}} % the second argument is a hbox

>   {NOTE: hmode or not hmode the legend is still off to the left}
>}
>
> \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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] framedtext in naturaltables

2009-10-04 Thread Wolfgang Schuster


Am 02.10.2009 um 20:57 schrieb Xan:


It does not work at all. The bullet is at top of the framedtext.


Interesting result.

\setupcolors[state=start]

\startbuffer[startframedtext]
\bTABLE
   \bTR
   \bTD
   \startitemize
   \item \startframedtext 
[location=top,frame=off,background=color,backgroundcolor=gray,width= 
\dimexpr\hsize-2em\relax]
   {\bf \em Estructura interna fixa i ordenada}. Les  
partícules que formen els minerals estan
   {\bf \em \red{ordenades}} i ocupen un {\bf \em \red 
{lloc fix}} a l'espai. Qualsevol mostra

   d'un mateix mineral sempre té la mateixa estructura.
   \stopframedtext
   \stopitemize
   \eTD
   \bTD
   text
   \eTD
   \eTR
\eTABLE
\stopbuffer

\startbuffer[framedtext]
\bTABLE
   \bTR
   \bTD
   \startitemize
   \item \framedtext 
[location=top,frame=off,background=color,backgroundcolor=gray,width= 
\dimexpr\hsize-2em\relax]
   {{\bf \em Estructura interna fixa i ordenada}. Les  
partícules que formen els minerals estan
   {\bf \em \red{ordenades}} i ocupen un {\bf \em \red 
{lloc fix}} a l'espai. Qualsevol mostra

   d'un mateix mineral sempre té la mateixa estructura.}
   \stopitemize
   \eTD
   \bTD
   text
   \eTD
   \eTR
\eTABLE
\stopbuffer

\starttext

\subject{Floats}

\subsubject{Framedtext environment}

\placefigure[none]{}{\getbuffer[startframedtext]}

\subsubject{Framedtext command}

\placefigure[none]{}{\getbuffer[framedtext]}

\subject{Inline tables}

\subsubject{Framedtext environment}

\getbuffer[startframedtext]

\subsubject{Framedtext command}

\getbuffer[framedtext]

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


Re: [NTG-context] framedtext in naturaltables

2009-10-04 Thread Xan

En/na Wolfgang Schuster ha escrit:


Am 02.10.2009 um 20:57 schrieb Xan:


It does not work at all. The bullet is at top of the framedtext.


Interesting result.

\setupcolors[state=start]

\startbuffer[startframedtext]
\bTABLE
   \bTR
   \bTD
   \startitemize
   \item 
\startframedtext[location=top,frame=off,background=color,backgroundcolor=gray,width=\dimexpr\hsize-2em\relax] 

   {\bf \em Estructura interna fixa i ordenada}. Les 
partícules que formen els minerals estan
   {\bf \em \red{ordenades}} i ocupen un {\bf \em 
\red{lloc fix}} a l'espai. Qualsevol mostra

   d'un mateix mineral sempre té la mateixa estructura.
   \stopframedtext
   \stopitemize
   \eTD
   \bTD
   text
   \eTD
   \eTR
\eTABLE
\stopbuffer

\startbuffer[framedtext]
\bTABLE
   \bTR
   \bTD
   \startitemize
   \item 
\framedtext[location=top,frame=off,background=color,backgroundcolor=gray,width=\dimexpr\hsize-2em\relax] 

   {{\bf \em Estructura interna fixa i ordenada}. Les 
partícules que formen els minerals estan
   {\bf \em \red{ordenades}} i ocupen un {\bf \em 
\red{lloc fix}} a l'espai. Qualsevol mostra

   d'un mateix mineral sempre té la mateixa estructura.}
   \stopitemize
   \eTD
   \bTD
   text
   \eTD
   \eTR
\eTABLE
\stopbuffer

\starttext

\subject{Floats}

\subsubject{Framedtext environment}

\placefigure[none]{}{\getbuffer[startframedtext]}

\subsubject{Framedtext command}

\placefigure[none]{}{\getbuffer[framedtext]}

\subject{Inline tables}

\subsubject{Framedtext environment}

\getbuffer[startframedtext]

\subsubject{Framedtext command}

\getbuffer[framedtext]

\stoptext

Wolfgang


It works.

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


[NTG-context] Problems with "mathalign"

2007-01-03 Thread Mojca Miklavec
Hello,

I wanted to keep Aditya busy now that he finished his wonderful new
module ;), so ...


I first wanted to ask how to number subformulas in a certain way, but
that I figured out that numbering is already causing some problems on
its own.


Consider the following examples:

\starttext

This is almost OK, but has one formula number too much here:

\startbuffer
\placeformula
\startformula
\startalign[m=2,distance=3cm]
  a & =b
& A & =B \\
  c & =d
& C & =D \\
\stopalign
\stopformula
\stopbuffer
\typebuffer
\getbuffer

This results in a very weird formula numbering

\startbuffer
\placeformula
\startformula
\startalign[m=2,distance=3cm]
\NC a \NC =b
\NC A \NC =B \NR
\NC c \NC =d
\NC C \NC =D \NR
\stopalign
\stopformula
\stopbuffer
\typebuffer
\getbuffer

Adding [+] helps, but than we have the same problem as at the beginning:

\startbuffer
\placeformula
\startformula
\startalign[m=2,distance=3cm]
\NC a \NC =b
\NC A \NC =B \NR[+]
\NC c \NC =d
\NC C \NC =D \NR[+]
\stopalign
\stopformula
\stopbuffer
\typebuffer
\getbuffer

Without placeforumla, but with [+] we don't get any numbering at all:

\startbuffer
\startformula
\startalign[m=2,distance=3cm]
\NC a \NC =b
\NC A \NC =B \NR[+]
\NC c \NC =d
\NC C \NC =D \NR[+]
\stopalign
\stopformula
\stopbuffer
\typebuffer
\getbuffer

\stoptext

CtxTools | context version: 2006.12.27 11:34
(After running "ctxtools --update" I just managed to break everything.)

Any clue?

Thanks,
Mojca
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Fielstack and Layers for Presentation

2006-10-13 Thread Renaud AUBIN

Hi all,

After several trial-error experiments, I obtained what I want with the
attached code. I use only one background for the frames within
definesymbol because the use of several background "failed" (only the
last one is eventually displayed). Now, I would like to know if it is
possible to obtain a deterministic random-like shapes, i.e. to get
always the same shape for Overlay1...

Renaud

PS: Thanks to Peter, Andrea and Hans for the thread absolute positioning
of figures ;)

\setupcolors[state=start]
\usemodule[pre-original]

\defineoverlay[FunnyFrame][\useMPgraphic{FunnyFrame}]
\defineframedtext[FunnyText][frame=off,background=FunnyFrame]
\def\StartFrame{\startFunnyText}
\def\StopFrame {\stopFunnyText }
\def\FrameTitle#1%
{\setMPtext{FunnyFrame}{\hbox spread 1em{\hss\strut#1\hss}}}
\setMPtext{FunnyFrame}{\hbox spread 1em{\hss\strut{TEST}\hss}} %
initialize the text variable
\startuseMPgraphic{FunnyFrame}
picture p ; numeric o ; path a, b ; pair c ;
p := textext.rt(\MPstring{FunnyFrame}) ;
a := unitsquare xyscaled(OverlayWidth,OverlayHeight) ;
o := BodyFontSize ;
p := p shifted (2o,OverlayHeight-ypart center p) ;
drawoptions (withpen pencircle scaled 1pt withcolor .625red) ;
b := a randomized (o/2) ;
fill b withcolor .85white ; draw b ;
c := center p ;
c := b intersectionpoint (c shifted (0,-o)--c shifted(0,o)) ;
p := p shifted (c-center p) ;
b := (boundingbox p) randomized (o/8) ;
fill b withcolor .85white ; draw b ;
draw p withcolor black;
setbounds currentpicture to a ;
\stopuseMPgraphic

\starttext

\Topic{Stacks \& Layers}

\startbuffer[buf1]
  \FrameTitle{Overlay1}
  \StartFrame[width=.75\textwidth]
This is the first funny frame !
  \StopFrame
\stopbuffer

\startbuffer[buf2]
  \FrameTitle{Overlay2}
  \StartFrame[width=.75\textwidth]
This is the second funny frame !
  \StopFrame
\stopbuffer

\startbuffer[buf3]
  \FrameTitle{Overlay3}
  \StartFrame[width=.75\textwidth]
This is the third funny frame !
  \StopFrame
\stopbuffer

\definelayer[layer1][]
\definelayer[layer2][]
\definelayer[layer3][]

\setlayer[layer1][x=.05\textwidth,y=.05\textheight,location=br]{\getbuffer[buf1]}

\setlayer[layer2][x=.05\textwidth,y=.05\textheight,location=br]{\getbuffer[buf1]}
\setlayer[layer2][x=.1\textwidth,y=.1\textheight,location=br]{\getbuffer[buf2]}

\setlayer[layer3][x=.05\textwidth,y=.05\textheight,location=br]{\getbuffer[buf1]}
\setlayer[layer3][x=.1\textwidth,y=.1\textheight,location=br]{\getbuffer[buf2]}
\setlayer[layer3][x=.15\textwidth,y=.15\textheight,location=br]{\getbuffer[buf3]}

\defineoverlay[overlay1][{\placelayer[layer1]}]
\defineoverlay[overlay2][{\placelayer[layer2]}]
\defineoverlay[overlay3][{\placelayer[layer3]}]

\definesymbol[one][{\framed[width=\textwidth,height=.3\textheight,background=overlay1,frame=off]{}}]
\definesymbol[two][{\framed[width=\textwidth,height=.3\textheight,background=overlay2,
align=right,frame=off]{}}]
\definesymbol[three][{\framed[width=\textwidth,height=.3\textheight,background=overlay3,
align=right,frame=off]{}}]

\definefieldstack[sequence][one,two,three][height=fit,width=fit,frame=off,offset=overlay,clickin=JS(Walk_Field{sequence})]

{{\fieldstack[sequence]}}
\goto{next}[JS(Walk_Field{sequence})]

\stoptext

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] Re: Fwd: Re: how to apply gradient color to a piece of text?

2024-04-09 Thread seyal zavira
seams this code means to put a hidden text with same size behind metapost
shape.
but it does not work properly for me (current version: 2024.04.01 08:59)
and produce empty page but with searchable hidden text.
also when i edit the code and replace metapost part like this:

\startMPcode
 draw lmt_outline [
 kind = "outline",
 text = "\getbuffer[MyText]",
  ]
 withcolor red
  ;
\stopMPcode

it produces a selectable hidden text on top of body and red text that drawn
by metapost below of that.

How can this problem be solved?

i attached the codes and pdf results.

On Mon, Apr 8, 2024 at 4:37 AM Hans Hagen  wrote:

> On 4/8/2024 8:22 AM, seyal zavira wrote:
> > thank you Harban and Keith McKay.
> >
> > \startMPpage
> >picture tt ; tt := lmt_outline [
> >kind = "path",
> >text = "\definedfont[name:texgyrepagellabold*default]foo
> > f o o",
> >] ;
> >
> >fill
> >   for i within tt : pathpart i && endfor cycle
> >   withshademethod "linear"
> >   withshadedirection down
> >   withshadecolors (red, blue) ;
> > \stopMPpage
> >
> > I'll add this:
> >
> > \startMPpage
> >   draw lmt_outline [
> >   kind = "outline",
> >   text = "\definedfont[name:texgyrepagellabold*default]foo f
> > o o",
> >   ]
> >   withshademethod "linear"
> >   withshadedirection down
> >   withshadecolors (red, blue)
> >   ;
> > \stopMPpage
> >
> > so a single path option (no picture)
> >
> > Hans
> >
> >
> > Thank you so much for the sample examples
> > it would be great to also make text select able in output pdf
> > the third example currently does not work. did you mean you will add
> > this feature for next updates?
> we're talking outlines so that is paths which implies no search but you
> can do this (Keith and/or Hraban will explain and/or wikify it)
>
> \starttext
>
> \startbuffer[MyText]
>  \definedfont[name:texgyrepagellabold*default]foo f o o%
> \stopbuffer
>
> \startbuffer[MyText]
>  \framed[align=normal,frame=off]{\input{tufte}}%
> \stopbuffer
>
> \setbox\scratchbox\hbox\bgroup
>  \startMPcode
>   draw lmt_outline [
>   kind = "outline",
>   text = "\getbuffer[MyText]",
>   ]
>   withshademethod "linear"
>   withshadedirection down
>   withshadecolors (red, blue)
>   ;
>  \stopMPcode
> \egroup
>
> \startoverlay
>
>
> {\scale[height=\htdp\scratchbox,width=\wd\scratchbox]{\effect[hidden]{\getbuffer[MyText]}}}
>  {\box\scratchbox}
> \stopoverlay
>
> \stoptext
>
>
>
>
> -
>Hans Hagen | PRAGMA ADE
>Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
> tel: 038 477 53 69 | www.pragma-ade.nl | 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 /
> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive  : https://github.com/contextgarden/context
> wiki : https://wiki.contextgarden.net
>
> ___
>
\starttext

\startbuffer[MyText]
 \definedfont[name:texgyrepagellabold*default]foo f o o%
\stopbuffer

\startbuffer[MyText]
 \framed[align=normal,frame=off]{a sample text}%
\stopbuffer

\setbox\scratchbox\hbox\bgroup
 \startMPcode
  draw lmt_outline [
  kind = "outline",
  text = "\getbuffer[MyText]",
  ]
  withshademethod "linear"
  withshadedirection down
  withshadecolors (red, blue)
  ;
 \stopMPcode
\egroup

\startoverlay

{\scale[height=\htdp\scratchbox,width=\wd\scratchbox]{\effect[hidden]{\getbuffer[MyText]}}}
 {\box\scratchbox}
\stopoverlay

\stoptext


test1.pdf
Description: Adobe PDF document
\starttext

\startbuffer[MyText]
 \definedfont[name:t

Re: [NTG-context] (no subject)

2004-02-02 Thread Giuseppe Bilotta
Sunday, February 1, 2004 Vit Zyka wrote:

> Hallo ConTeXt debater,

> this buffer storage works perfectly:
> 
> \starttext
>  \startbuffer[TMP]
>  Bla
>  \stopbuffer
>  \getbuffer[TMP]
> \stoptext
> 

> but why not this one?

> 
> \starttext
> \def\tmp{%
>   \startbuffer[TMP]
>   Bla
>   \stopbuffer
> }
>   \tmp
>   \getbuffer[TMP]
> \stoptext
> 

Because buffers are verbatim-like environments.

-- 
Giuseppe "Oblomov" Bilotta

___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] Additional font variants

2021-08-01 Thread Henning Hraban Ramm via ntg-context
Hi, I’m trying to set up a “handwriting” font.

In the example below I’m using Comic Sans, because probably everyone has it 
available, IRL I’m using the commercial “Supernett Cn” that has more styles. 
(Also, I’m using Alegreya Serif + Sans.)

If I name it "ss/sans/Sans", it works as expected, but with 
"hw/handwriting/Handwriting" it only uses the regular font, never other styles.

"mtxrun --script fonts ..." shows that the configured files are found.

Is this a limitation in ConTeXt, or what did I wrong?

Hraban


\starttypescript [handwriting] [comicsans]
  %\setups[font:fallback:serif]
  \definefontsynonym[ComicSans-Regular]  [file:comic.ttf]
  \definefontsynonym[ComicSans-Italic]   [file:comicbd.ttf]
  \definefontsynonym[ComicSans-Bold] [file:comicbd.ttf]
  \definefontsynonym[ComicSans-BoldItalic]   [file:comicbd.ttf]
\stoptypescript

\starttypescript [handwriting] [comicsans] [name]
  %\setups[font:fallback:handwriting]
  \definefontsynonym [Handwriting]   [ComicSans-Regular]  
[features=default]
  \definefontsynonym [HandwritingItalic] [ComicSans-Italic]   
[features=default]
  \definefontsynonym [HandwritingBold]   [ComicSans-Bold] 
[features=default]
  \definefontsynonym [HandwritingBoldItalic] [ComicSans-BoldItalic]   
[features=default]
\stoptypescript

\starttypescript [ka]
  \definetypeface [ka] [rm] [serif] [modern] [default]
  \definetypeface [ka] [ss] [sans]  [modern]  [default]
  \definetypeface [ka] [tt] [mono]  [modern]   [default]
  \definetypeface [ka] [mm] [math]  [modern]   [default]
  \definetypeface [ka] [hw] [handwriting]  [comicsans]   [default]
\stoptypescript

\setupbodyfont[ka,rm,18pt]
\setupbodyfontenvironment[default][em=italicface]
\definehighlight[emph][style={\em}]
\definehighlight[strong][style=boldface]

\starttext

\startbuffer
Some Text \emph{emphasized} normal \strong{strong} \emph{emph \emph{inner emph} 
end}.
\stopbuffer

\getbuffer

{\switchtobodyfont[ss]\getbuffer}

{\hw\getbuffer}

{\switchtobodyfont[hw]\getbuffer}

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


Re: [NTG-context] Unwanted whitespace for tables and enumerations after \inmargin headings

2014-04-18 Thread Rik Kabel

On 2014-04-18 17:36, Aditya Mahajan wrote:

On Fri, 18 Apr 2014, Thangalin wrote:


Hi Rik,

The example isn't quite as minimal as it could be... Here is a
simplified version demonstrating the problem:

\setuplayout[backspace=4cm]

\define[2]\MarginHead{\inmargin{#1 #2}}

\setuphead[section][
 alternative=text,
 command=\MarginHead,
]

\defineitemgroup[itemz]
\setupitemgroup[itemz][each][joinedup]

\startbuffer[Item]
 \startitemz
   \item Item
   \item Item
 \stopitemz
\stopbuffer

\starttext
 \section{No Whitespace}
 No extra whitespace before items.
 \getbuffer[Item]

 \section{Extra Whitespace}
 \getbuffer[Item]
 Unexpected extra whitespace before items.
\stoptext


Here is one way to get rid of the extra white-space. I could not 
figure out a clean way of adding this signal to the setup.


\setuplayout[backspace=6cm, leftmargin=5.5cm]

\define[2]\MarginHead{\inmargin{#1 #2}}

\setuphead[section]
  [
command=\MarginHead,
alternative=text,
distance=\zeropoint,
  ]

\unprotect
  \def\SIGNAL{\hskip\d_strc_itemgroups_signal}
\protect
\defineitemgroup[itemz]
\setupitemgroup[itemz][each][joinedup]

\startbuffer[Item]
  \startitemz
\item Item
\item Item
  \stopitemz
\stopbuffer

\starttext
  \section{No Whitespace}
  No extra whitespace before items.
  \getbuffer[Item]

  \section{Extra Whitespace} \SIGNAL
  \getbuffer[Item]
  Unexpected extra whitespace before items.
\stoptext


Pretty ugly, but thank you for that, Aditya.

Is there a similar kludge for tabulate? (That was part of my original 
problem, removed in the subsequent simplification of the example.)


--
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] Why does every new \setupTABLE add more whitespace to the left of table?

2007-07-03 Thread Hamid Kamrani
Got it. Thanks. I didn't know that the chars after setupTABLE could
disturb the alignment.

On 7/3/07, Wolfgang Schuster <[EMAIL PROTECTED]> wrote:
> 2007/7/2, Hamid Kamrani <[EMAIL PROTECTED]>:
> > What's the reaosn for this behaviour?
> >
> > Try:
> >
> > \starttext
> > \startbuffer
> > \start
> > \setupTABLE[frame=on]
> > \bTABLE\bTR\bTD text \eTD\eTR\eTABLE
> > \stop
> > \stopbuffer
> > \framed[offset=overlay]{\getbuffer}
> >
> > \startbuffer
> > \start
> > \setupTABLE[frame=on]
> > \setupTABLE[c][1][align=right]
> > \bTABLE\bTR\bTD text \eTD\eTR\eTABLE
> > \stop
> > \stopbuffer
> > \framed[offset=overlay]{\getbuffer}
> >
> > \startbuffer
> > \start
> > \setupTABLE[frame=on]
> > \setupTABLE[c][1][align=right]
> > \setupTABLE[c][1][align=right]
> > \bTABLE\bTR\bTD text \eTD\eTR\eTABLE
> > \stop
> > \stopbuffer
> > \framed[offset=overlay]{\getbuffer}
> >
> > \startbuffer
> > \start
> > \setupTABLE[frame=on]
> > \setupTABLE[c][1][align=right]
> > \setupTABLE[c][1][align=right]
> > \setupTABLE[c][1][align=right]
> > \bTABLE\bTR\bTD text \eTD\eTR\eTABLE
> > \stop
> > \stopbuffer
> > \framed[offset=overlay]{\getbuffer}
> > \stoptext
>
> Hi,
>
> you comment chars after your \setupTABLE commands.
>
> Your \start/\stop pair can also be removed in your examples,
> \framed keeps the \setups local.
>
> 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  : https://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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Concatenate buffers without newline

2021-06-22 Thread Wolfgang Schuster

Pascal Pascali schrieb am 22.06.2021 um 20:21:

Hello!

Is there a way to concatenate predefined blocks or buffers without ConTeXt 
printing newlines between them?

I'd like to have something like:

\startBitOfData [name1]
Some part of paragraph here.
\stopBitOfData

\startBitOfData [name2]
Some more going on here.
\stopBitOfData


And then:

\getBitOfData [name1]
\getBitOfData [name2]

Outputting:
Some part of paragraph here. Some more going on here.

Not outputting:
Some part of paragraph here.
Some more going on here.


Thank you for any tip!


Please send a *working* minimal example next time.

\starttext

\startbuffer[first]
First paragraph.
\stopbuffer

\startbuffer[second]
Second paragraph.
\stopbuffer

\start
  \setupbuffer[before=,after=]
  \getbuffer[first]%
  \getbuffer[second]
\stop

\blank

\getbuffer[first,second]

\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] Linenumering inside floats

2015-08-04 Thread Aditya Mahajan

On Tue, 4 Aug 2015, Hans Hagen wrote:


On 8/4/2015 4:52 PM, Aditya Mahajan wrote:

On Wed, 29 Jul 2015, Hans Hagen wrote:


On 6/30/2015 7:56 PM, Aditya Mahajan wrote:

Hi,

I am forwarding a feature request for the t-vim module:
https://github.com/adityam/filter/issues/21

Is there a way to enable line numbering inside floats:

\definefloat[sourcecode][sourcecodes]

\startbuffer
\startlinenumbering
   \input tufte
\stoplinenumbering
\stopbuffer

\starttext
 \startplacesourcecode
   \getbuffer
 \stopplacesourcecode

 \getbuffer
\stoptext


in next beta (somewhat experimental as i needed to adapt an important
helper for framed)


The example posted above does not work with the beta 2015.08.04.


you need to wrap it in framed

 \startplacesourcecode
   \framed[align=normal,frame=off]{\getbuffer}
 \stopplacesourcecode


Ah, 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
___

[NTG-context] Another indenting problem

2010-12-03 Thread Andreas Harder
Hi all,

it took me a while to track this down. It seems that if one uses \in[…] and 
\footnote{…} in the same paragraph the following \noindentation-command is 
ignored. Here is an example:

\setupindenting[big,yes]
\setupdelimitedtext[blockquote][before=\noindentation]

\starttext  \showframe[text][text]
\startbuffer
\startblockquote
  Is this paragraph indented? It should not!
  Is this paragraph indented? It should not!
\stopblockquote
\stopbuffer

Test \in[someref] test\footnote{footnote}.  \getbuffer
Test test\footnote{footnote}.   \getbuffer
Test \in[someref] test. \getbuffer
\stoptext


Thanks in advance
Andreas

PS. I don't think is has something to do with the problem in 
http://archive.contextgarden.net/message/20101201.120250.6f268216.en.html but 
it would be nice if both could be fixed.

___
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] footnotes by chapter

2013-02-24 Thread Meer, H. van der
I would like to have my footnotes typeset by chapter, using the following input:

\startbuffer
This is some text\footnote{First footnote}.
Followed by more and more text having a footnote\footnote{Second footnote}.
Again some text. Again some text. Again some text. Again some text.
\stopbuffer
\setupfootnotes[location=text,way=bychapter]
\starttext
\chapter{Chapter One}\getbuffer\placefootnotes
\chapter{Chapter Two}\getbuffer\placefootnotes
\chapter{Chapter Three}\getbuffer\placefootnotes
\stoptext

Note the setup parameter "way=bychapter" but the numbering is not restarted 
with the chapter! Instead they go on and on. See the example output.

How to restart the footnote numbering per chapter if that way= parameter 
doesn't do it?

Hans van der Meer


ConTeXt  ver: 2013.01.27 21:24 MKIV  fmt: 2013.1.28  int: english/english


bychapter.pdf
Description: bychapter.pdf
___
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] bug in beta: extra \else

2006-10-16 Thread Aditya Mahajan

On Mon, 16 Oct 2006, Aditya Mahajan wrote:


On Sun, 15 Oct 2006, Vit Zyka wrote:

Great, thank you Hans!

Let us process to teh next two problems also visible in the test file.

1. [snip]



2. Accented characters inside \typebuffer are type set as
  \dochar {225}


This seems to be a bug. In utf-8 encoding, if an accented character is
the first character of a buffer, it gets typed correctly. All other
accented charaters come out as \dochar {225}. \getbuffer works fine.


I forgot to attach the test file. I am attaching it, hoping that the 
encoding will come out correctly.




Can TeX choose the input encoding while writing files? If not, there
may be really no robust way to solve this problem.

Aditya\enableregime[utf]
\starttext
\startbuffer
ábout Whát
\stopbuffer
\typebuffer \getbuffer

\startbuffer
Whát 
\stopbuffer
\typebuffer \getbuffer
\stoptext
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] beta

2013-09-09 Thread Hans Hagen

Hi,

I uploaded a beta with additional bidi code. There are now three methods:

default : the original one, the fastest, wil be improved a bit
one : unicode bidi, derived from khaleds t-bidi, cleaned up and 
optimized plus some thingies, but in working still close to the original

two : unicode bidi, the version that will evolve

All methods come with the usual context kind of tracing.

Some of these methods have different options (default has local and 
global behaviour), one has no options, and for two one can disable fancy 
fences heuristics. More will follow once we have investigated all
upcoming changes, circulating wishes, conflicting demands etc. 
Eventually there will be a manual about these matters.


Here is an example (follow up on some post about hebrew on this list):

\starttext

\definefont[arabicfont][arabtype*arabic at 20pt]
\definefont[hebrewfont][arial*hebrewat 12pt]

\startbuffer[fences]
\hebrewfont
ש)ל(אnone\par
ש(ל]אnone\par
ש(ל)א2-4\par
ש(ל[א)כ] 2-6\par
ש(ל]א)כ  2-6\par
ש(ל)א)כ  2-4\par
ש(ל(א)כ  4-6\par
ש(ל(א)כ) 2-8, 4-6\par
ש(ל[א]כ) 2-8, 4-6\par
\stopbuffer

\startbuffer[junk]
\hebrewfont
\dorecurse{100}{
\dorecurse{20}{
שלום (אני) כותבשלום (אני) $ $ כותבשלום (אני) $x$ כותבשלום (אני) 
\ruledhbox {hans כותבשלום}
(אני) כותבשלום (אני) כותבשלום (אני) כותבשלום (אני) כותבשלום 
(אני) כותבשלום (אני) כותבשלום (אני) כותב

}
\par
}
\stopbuffer

\setupalign[r2l,verytolerant]

\start
\setupdirections[bidi=global,method=default]
\getbuffer[fences] \blank
\stop

\start
\setupdirections[bidi=global,method=one]
\enabletrackers[typesetters.directions.one]
\enabletrackers[typesetters.directions.one.details]
\getbuffer[fences] \blank
\disabletrackers[typesetters.directions.one]
\disabletrackers[typesetters.directions.one.details]
\stop

\start
\setupdirections[bidi=global,method=two,fences=yes]
\enabletrackers[typesetters.directions.two]
\enabletrackers[typesetters.directions.two.details]
\getbuffer[fences] \blank
\disabletrackers[typesetters.directions.two]
\disabletrackers[typesetters.directions.two.details]
\stop

\start
\setupdirections[bidi=global,method=two,fences=no]
\enabletrackers[typesetters.directions.two]
\enabletrackers[typesetters.directions.two.details]
\getbuffer[fences] \blank
\disabletrackers[typesetters.directions.two]
\disabletrackers[typesetters.directions.two.details]
\stop

\page

\start
\setupdirections[bidi=global,method=two]
\getbuffer[junk] \blank
\stop

\stoptext


-
  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] math align

2006-01-15 Thread David Arnold
mp;1}}%
   \def\EQ{&=}
   \def\NR{&\dodoubleempty\doalignNR}%
   % amstex compatibility mode: (ugly)
   \def\notag{\def\\{&\crcr}}%
   \doifelse{#1}{*}{\def\\{&\crcr}}{\def\\{&\doalignNR[+][]\crcr}}%
   % end of compatibility mode
   \numberedeqalign{#2}}

%D \startbuffer
%D \placeformula \startformula \eqalignno {
%D  a &= b & \formulanumber \cr
%D  c &= d \cr
%D&= e \cr
%D&= f & \formulanumber
%D } \stopformula
%D \stopbuffer
%D
%D \typebuffer \getbuffer
%D
%D \startbuffer
%D \placeformula \startformula \startalign
%D \NC  a \EQ b \NR[+]
%D \NC  c \EQ d \NR
%D \NC\EQ f \NR[for:hans]
%D \NC\EQ g \NR[for:whoelse][a]
%D \NC\EQ h \NR[for:whomore][b]
%D \NC\EQ i \NR
%D \stopalign \stopformula
%D \stopbuffer
%D
%D \typebuffer \getbuffer
%D
%D \startbuffer
%D \placeformula \startformula \startalign
%D \NC a \EQ b \NR[+]
%D \NC c \EQ d \NR
%D \NC   \EQ f \NR
%D \NC   \EQ g \NR
%D \NC   \EQ h \NR
%D \NC   \EQ i \NR[+]
%D \stopalign \stopformula
%D \stopbuffer
%D
%D \typebuffer \getbuffer
%D
%D \startbuffer
%D \placeformula \startformula \startalign
%D a &= b \\
%D c &= d \notag \\
%D   &= e \notag \\
%D   &= f \\
%D \stopalign \stopformula
%D \stopbuffer
%D
%D \typebuffer \getbuffer
%D
%D \startbuffer
%D \placeformula \startformula \startalign
%D a &= b \NR[+]
%D c &= d \NR
%D   &= e \NR
%D   &= f \NR[+]
%D \stopalign \stopformula
%D \stopbuffer
%D
%D \typebuffer \getbuffer
%D
%D \startbuffer
%D \placeformula \startformula \startalign
%D \NC  a \NC \eq  b \NR[+]
%D \NC  c \NC \neq d \NR
%D \NC\NC \neq f \NR[for:hans]
%D \NC\NC \geq g \NR[for:whoelse][a]
%D \NC\NC \leq h \NR[for:whomore][b]
%D \NC\NC \neq i \NR
%D \stopalign \stopformula
%D \stopbuffer
%D
%D \typebuffer \getbuffer
%D
%D \startbuffer
%D \placeformula \startformula \startalign[*]
%D a &= b \\
%D c &= d \notag \\
%D   &= e \notag \\
%D   &= f \\
%D \stopalign \stopformula
%D \stopbuffer
%D
%D \typebuffer \getbuffer
%D
%D \startbuffer
%D \placeformula \startformula \startalign
%D x &= y \\
%D a &= b \\
%D \stopalign \stopformula
%D \stopbuffer
%D
%D \typebuffer \getbuffer
%D
%D \startbuffer
%D \placeformula \startformula \startalign[m=3]
%D x &= y & x &= y & z &= t \\
%D a &= b & p &= q & w &= s \\
%D \stopalign \stopformula
%D \stopbuffer
%D
%D \typebuffer \getbuffer
%D
%D \startbuffer
%D \placeformula \startformula \startalign[m=3,distance=0pt]
%D x &= y &= x &= y &= z &= t \\
%D a &= b &= p &= q &= w &= s \\
%D \stopalign \stopformula
%D \stopbuffer
%D
%D \typebuffer \getbuffer
%D
%D \startbuffer
%D \placeformula \startformula \startalign[n=5,distance=0pt]
%D x &= yy &= xx &= yy &= zz \\
%D a &= b  &= p  &= q  &= w  \\
%D \stopalign \stopformula
%D \stopbuffer
%D
%D \typebuffer \getbuffer

\protect \endinput
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] math align

2006-01-16 Thread Hans Hagen
##1}}%
   \def\EQ{&=}%
   \def\NR{&\doxxdoubleempty\doalignNR}%
   % amstex compatibility mode: (ugly)
   \def\notag{\def\\{&\crcr}}%
   \doifelse{#2}{*}{\def\\{&\crcr}}{\def\\{&\doalignNR[+][]\crcr}}%
   % end of compatibility mode
   \numberedeqalign}

\let\dostopmathalign\finishalignno

\def\definemathalign
  {\dodoubleempty\dodefinemathalign}

\def\dodefinemathalign[#1]% [#2]%
  {\setvalue{\e!start#1}{\dodoubleempty\dostartmathalign[#1]}%
   \setvalue{\e!stop #1}{\dostopmathalign}%
   \setupmathalign[#1]}% [#2]

\definemathalign[align] % default case

% \def\startsplit
%   {\startalign[*]} % no number by default
%
% \def\stopsplit
%   {&\doalignNR[+][]\crcr % for a number on last line
%\stopalign}

%D \startbuffer
%D \placeformula \startformula \eqalignno {
%D  a &= b & \formulanumber \cr
%D  c &= d \cr
%D&= e \cr
%D&= f & \formulanumber
%D } \stopformula
%D \stopbuffer
%D
%D \typebuffer \getbuffer
%D
%D \startbuffer
%D \placeformula \startformula \startalign
%D \NC  a \EQ b \NR[+]
%D \NC  c \EQ d \NR
%D \NC\EQ f \NR[for:demo-a-1]
%D \NC\EQ g \NR[for:demo-a-2][a]
%D \NC    \EQ h \NR[for:demo-a-3][b]
%D \NC\EQ i \NR
%D \stopalign \stopformula
%D \stopbuffer
%D
%D \typebuffer \getbuffer
%D
%D \startbuffer
%D \placeformula \startformula \startalign
%D \NC a \EQ b \NR[+]
%D \NC c \EQ d \NR
%D \NC   \EQ f \NR
%D \NC   \EQ g \NR
%D \NC   \EQ h \NR
%D \NC   \EQ i \NR[+]
%D \stopalign \stopformula
%D \stopbuffer
%D
%D \typebuffer \getbuffer
%D
%D \startbuffer
%D \placeformula \startformula \startalign
%D a &= b \\
%D c &= d \notag \\
%D   &= e \notag \\
%D   &= f \\
%D \stopalign \stopformula
%D \stopbuffer
%D
%D \typebuffer \getbuffer
%D
%D \startbuffer
%D \placeformula \startformula \startalign
%D a &= b \NR[+]
%D c &= d \NR
%D   &= e \NR
%D   &= f \NR[+]
%D \stopalign \stopformula
%D \stopbuffer
%D
%D \typebuffer \getbuffer
%D
%D \startbuffer
%D \placeformula \startformula \startalign
%D \NC  a \NC \eq  b \NR[+]
%D \NC  c \NC \neq d \NR
%D \NC\NC \neq f \NR[for:demo-b-1]
%D \NC\NC \geq g \NR[for:demo-b-2][a]
%D \NC\NC \leq h \NR[for:demo-b-3][b]
%D \NC\NC \neq i \NR
%D \stopalign \stopformula
%D \stopbuffer
%D
%D \typebuffer \getbuffer
%D
%D \startbuffer
%D \placeformula \startformula \startalign[*]
%D a &= b \\
%D c &= d \\
%D   &= e \\
%D   &= f \\
%D \stopalign \stopformula
%D \stopbuffer
%D
%D \typebuffer \getbuffer
%D
%D \startbuffer
%D \placeformula \startformula \startalign
%D x &= y \\
%D a &= b \\
%D \stopalign \stopformula
%D \stopbuffer
%D
%D \typebuffer \getbuffer
%D
%D \startbuffer
%D \placeformula \startformula \startalign[m=3]
%D x &= y & x &= y & z &= t \\
%D a &= b & p &= q & w &= s \\
%D \stopalign \stopformula
%D \stopbuffer
%D
%D \typebuffer \getbuffer
%D
%D \startbuffer
%D \placeformula \startformula \startalign[m=3,distance=0pt]
%D x &= y &= x &= y &= z &= t \\
%D a &= b &= p &= q &= w &= s \\
%D \stopalign \stopformula
%D \stopbuffer
%D
%D \typebuffer \getbuffer
%D
%D \startbuffer
%D \placeformula \startformula \startalign[n=5,distance=0pt]
%D x &= yy &= xx &= yy &= zz \\
%D a &= b  &= p  &= q  &= w  \\
%D \stopalign \stopformula
%D \stopbuffer
%D
%D \typebuffer \getbuffer

\protect \endinput
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re[2]: [NTG-context] A side by side float that takes advantage of the margin

2005-09-17 Thread Giuseppe Bilotta
Friday, September 16, 2005 Hans Hagen wrote:

> \startbuffer[table]
> ...
> \stopbuffer

> \startbuffer[figure]
> ...
> \figure

> \placetable
> [here][label]
> {caption}
> {\centerline
>    {\placesidebyside
>   {\getbuffer[table]}
>   {\getbuffer[figure]}}}

Could help, but I've chosen to try a different layout
(separate thread). Can you give it a shot?

-- 
Giuseppe "Oblomov" Bilotta

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] weekend update

2024-06-21 Thread Hans Hagen via ntg-context

Hi,

I uploaded a new version:

-- fix for hraban's svg image (one character patch)

-- more verbose link comments for pablo (for experimenting)

-- support for stacking at the tex end (maybe for presentations)

\starttext

\definestacking[one]
\definestacking[two]

\startbuffer
This is a test \stacking [one] {and a proof} of \stacking [two] 
{concept} indeed
\stacking [one] {\blackrule [width=4cm]} is it and the question is how 
\stacking

[two] {\scale [s=2] {fancy}} we can go

\startstacking[one]
\startformula
\sqrt{1+x}
\stopformula
\stopstacking

and how useful \stacking[two]{\inframed{it}} is.
\stopbuffer

\startstackingsteps[one,two,{one,two}]
\startTEXpage[offset=1ts]
\getbuffer
\stopTEXpage
\stopstackingsteps

\startTEXpage[offset=1ts] \setupstacking[criterium={one}] \getbuffer 
\stopTEXpage
\startTEXpage[offset=1ts] \setupstacking[criterium={two}] \getbuffer 
\stopTEXpage
\startTEXpage[offset=1ts] \setupstacking[criterium={one,two}] \getbuffer 
\stopTEXpage


\stoptext

-- support for more private pdf

\enabledirectives[backend.pdf.nounicode=noai]
\enabledirectives[backend.pdf.nounicode=nopilot]
\enabledirectives[backend.pdf.nounicode=justread]
\enabledirectives[backend.pdf.nounicode=✅]
\enabledirectives[backend.pdf.nounicode=✅❌]
\enabledirectives[backend.pdf.nounicode=❌]

\startTEXpage[offset=1ts]
\input tufte
\stopTEXpage

The last option can be handy when you don't want to make harvesting your 
documents too easy for these ai bots (as in cloud based pdf stuff). It's 
the first outcome of the multi-year, multi-stage, very scientific 
'inacessible pdf' project that Mikael S. and I recently started.


Hans


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | 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 / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


Re: [NTG-context] TikZ and wrong drawing order

2015-06-11 Thread Aditya Mahajan

On Thu, 11 Jun 2015, Mojca Miklavec wrote:


On Thu, Jun 11, 2015 at 7:59 PM, Aditya Mahajan wrote:

On Thu, 11 Jun 2015, Mojca Miklavec wrote:


Hi,

I would like to ask for help for either finding a fix or some clever
workaround for the following problem.

If I use a TikZ picture as item symbol and additionally use background
text, then the first symbol in itemize environment gets covered by the
background. Here's an example:



Workaround (though I have no idea why this should work).



   background={foreground,color}


While it works in the sense that it gives a consistent look, it
doesn't really lead to the desired result, at least not for me. The
reason for using background colour in my case was to make text
"visible" on a dark background photo. It doesn't really help if the
main text gets hidden behind the semi-transparent layer.


I have no idea what tikz is doing:

\usemodule[tikz]

\definecolor[light][s=1,a=1,t=0.1]
\definecolor[dark] [s=1,a=1,t=0.95]

\defineframedtext[normal] [width=4cm, background=color]
\defineframedtext[reverse][width=4cm, background={foreground,color}]

\startbuffer
\tikz\fill[color=blue] (0,0) circle (.2cm);
\startMPcode fill fullcircle scaled (.4cm) withcolor \MPcolor{blue}; \stopMPcode
\stopbuffer

\starttext

\startnormal[backgroundcolor=light] \getbuffer \stopnormal
\startnormal[backgroundcolor=dark] \getbuffer  \stopnormal

\blank[3*line]

\startreverse[backgroundcolor=light] \getbuffer \stopreverse
\startreverse[backgroundcolor=dark] \getbuffer  \stopreverse
\stoptext

Aditya

test.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
___

[NTG-context] fontfamily not loaded anymore

2018-12-09 Thread Pablo Rodriguez
Dear list,

I have the following source:

\definefontfamily[mainface][rm][GFS Bodoni]
\definefontfamily[mainface][hw][GFS Artemisia]
\definefontfamily[mainface][ss][GFS Neohellenic]
\definefontfamily[mainface][tt][GFS Didot]
%[tf=file:{GFSDidot-Regular.otf}]
\setupbodyfont[mainface]
\startbuffer
  α β γ δ ε ζ\\
  {\em α β γ δ ε ζ}\\
  {\bf α β γ δ ε ζ}\\
  {\bf α β γ δ ε ζ}\\
\stopbuffer
\starttext
  \startTEXpage[offset=1em]
\getbuffer
\tt\getbuffer
\ss\getbuffer
\hw\getbuffer
  \stopTEXpage
\stoptext

All typefaces are loaded fine, except GFS Didot. Unless I specify the
file for tf, any GFS Didot font isn’t loaded. I’m experiencing this with
the latest betas.

The error I get from ConTeXt is:

selectfont  > The requested font 'GFS Didot' has no files for the
'tf' alternative, Latin Modern is used instead.

"mtxrunjit --script --fonts --list --all" shows in the relevant lines:

gfsartemisiabold  gfsartemisia   gfsartemisiabold   GFSArtemisiaBold.otf
gfsartemisiabolditalic   gfsdidot  gfsartemisiabolditalic
GFSArtemisiaBoldIt.otf
gfsartemisiaitalic  gfsartemisia   gfsartemisiaitalicGFSArtemisiaIt.otf
gfsartemisianormal  gfsartemisia   gfsartemisiaregular   GFSArtemisia.otf
gfsartemisiaregulargfsartemisia   gfsartemisiaregular   GFSArtemisia.otf
gfsbodonibold   gfsbodoni gfsbodoniboldGFSBodoniBold.otf
gfsbodonibolditalicgfsbodoni gfsbodonibolditalic   GFSBodoniBoldIt.otf
gfsbodoniitalic   gfsbodoni gfsbodoniitalic  GFSBodoniIt.otf
gfsbodoninormal   gfsbodoni gfsbodoniregular   GFSBodoni.otf
gfsbodoniregular  gfsbodoni gfsbodoniregular   GFSBodoni.otf
gfsdidotboldgfsdidot  gfsdidotbold   GFSDidotBold.otf
gfsdidotbolditalic  gfsdidot  gfsdidotbolditalicGFSDidotBoldItalic.otf
gfsdidotitalicgfsdidot  gfsdidotitalic   GFSDidotItalic.otf
gfsdidotnormalgfsdidot  gfsdidotregular  GFSDidot-Regular.otf
gfsdidotregular   gfsdidot  gfsdidotregular  GFSDidot-Regular.otf
gfsneohellenicbold  gfsneohellenic   gfsneohellenicbold
GFSNeohellenicBold.otf
gfsneohellenicbolditalic   gfsneohellenic   gfsneohellenicbolditalic
GFSNeohellenic-BoldItalic.otf
gfsneohellenicitalic   gfsneohellenic   gfsneohellenicitalic
GFSNeohellenicIt.otf
gfsneohellenicnormal   gfsneohellenic   gfsneohellenicregular
GFSNeohellenic.otf
gfsneohellenicregulargfsneohellenic   gfsneohellenicregular
GFSNeohellenic.otf

Why is the specification of the file for the tf style with GFS Didot needed?

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

Re: [NTG-context] issue with beta from 2019.11.29 21:47 in Windows

2019-12-02 Thread Pablo Rodriguez
On 12/2/19 6:01 PM, Wolfgang Schuster wrote:
> Pablo Rodriguez schrieb am 02.12.2019 um 16:18:
>>  \starttext
>>  \executesystemcommand{contextjit --purgeall
>> --arguments="OptionThis={\ThisOption},OptionThat={\ThatOption}" second.tex}
>
> Limited alternative (no rerun when second.pdf exists and by default the
> resulting PDF is loaded as image).
>
> \typesetfile[second.tex][--arguments="OptionThis={\ThisOption},OptionThat={\ThatOption}"][object=no]

Many thanks for your reply, Wolfgang.

This is an interesting way to avoid the issue.

>> Could anyone confirm the issue I’m describing in Windows?
>
> I get the same results with MkIV but LMTX works.

I’d love to switch to LMTX, but this isn’t an option for me. It has an
issue with some fonts (I already reported).

In this sample \ss and \cg fonts cannot be used, even invoking them by
file name:

\definefontfamily[mainface][rm][TeX Gyre Heros]
\definefontfamily[mainface][mm][TeX Gyre Termes Math]
\definefontfamily[mainface][ss][Gill Sans MT][tf=file:GIL_.TTF]
\definefontfamily[mainface][tt][Cousine]
\definefontfamily[mainface][cg][Arial Narrow][tf=file:ARIALN.TTF]
\setupbodyfont[mainface]
\startbuffer
\ConTeXt\ is awesome!\par
\stopbuffer
\starttext
    \startTEXpage[offset=1em]
\getbuffer
\ss\getbuffer
\tt\getbuffer
\cg\getbuffer
\stopTEXpage
\stoptext

https://mailman.ntg.nl/pipermail/ntg-context/2019/094953.html
https://mailman.ntg.nl/pipermail/ntg-context/2019/095353.html

>> Is there any ConTeXt command (or Lua function) that translates non-ASCII
>> chars to their ASCII values?
>
> Lua: characters.shaped(...)

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


Re: [NTG-context] issue with beta from 2019.11.29 21:47 in Windows

2019-12-02 Thread Wolfgang Schuster


Pablo Rodriguez schrieb am 02.12.2019 um 18:46:

Could anyone confirm the issue I’m describing in Windows?

I get the same results with MkIV but LMTX works.

I’d love to switch to LMTX, but this isn’t an option for me. It has an
issue with some fonts (I already reported).

In this sample \ss and \cg fonts cannot be used, even invoking them by
file name:

 \definefontfamily[mainface][rm][TeX Gyre Heros]
 \definefontfamily[mainface][mm][TeX Gyre Termes Math]
 \definefontfamily[mainface][ss][Gill Sans MT][tf=file:GIL_.TTF]
 \definefontfamily[mainface][tt][Cousine]
 \definefontfamily[mainface][cg][Arial Narrow][tf=file:ARIALN.TTF]
 \setupbodyfont[mainface]
 \startbuffer
 \ConTeXt\ is awesome!\par
 \stopbuffer
 \starttext
 \startTEXpage[offset=1em]
 \getbuffer
 \ss\getbuffer
 \tt\getbuffer
 \cg\getbuffer
 \stopTEXpage
 \stoptext


LMTX finds the fonts and loads them but nothing appears in the final PDF.

\nopdfcompression

\starttext
\definedfont[file:arialn.ttf*default]Arial Narrow
\stoptext


A alternative to Arial Narrow is Arial Nova which has condensed variant 
and comes as part of the pan-european font pack in windows 10.


\startmkivmode

    \definefontfamily [arial-narrow] [ss] [Arial Narrow]

    \definefontfamily [gill-sans] [ss] [Gill Sans MT]

\stopmkivmode

\startlmtxmode

    \definefontfamily [arial-narrow] [ss] [Arial Nova]
    [tf=style:condensed,
 it=style:condenseditalic,
 bf=style:condensedbold,
 bi=style:condensedbolditalic]

    \definefontfamily [gill-sans] [ss] [Gill Sans Nova]

\stoplmtxmode

\starttext

regular \italic{italic} \bold{bold} \bolditalic{bolditalic}

\switchtobodyfont[arial-narrow]

regular \italic{italic} \bold{bold} \bolditalic{bolditalic}

\switchtobodyfont[gill-sans]

regular \italic{italic} \bold{bold} \bolditalic{bolditalic}

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


[NTG-context] Fielstack and Layers for Presentation

2006-10-12 Thread Renaud AUBIN




Hi all,

I would use fieldstack with \getbuffer and overlays... Why the
following code doesn't work ? Is there another way to do that ?

TIA


Renaud

%%% stack.tex

\setupcolors[state=start]
\usemodule[pre-original]

\defineoverlay[FunnyFrame][\useMPgraphic{FunnyFrame}]
\defineframedtext[FunnyText][frame=off,background="">
\def\StartFrame{\startFunnyText}
\def\StopFrame {\stopFunnyText }
\def\FrameTitle#1%
{\setMPtext{FunnyFrame}{\hbox spread 1em{\hss\strut#1\hss}}}
\setMPtext{FunnyFrame}{} % initialize the text variable
\startuseMPgraphic{FunnyFrame}
picture p ; numeric o ; path a, b ; pair c ;
p := textext.rt(\MPstring{FunnyFrame}) ;
a := unitsquare xyscaled(OverlayWidth,OverlayHeight) ;
o := BodyFontSize ;
p := p shifted (2o,OverlayHeight-ypart center p) ;
drawoptions (withpen pencircle scaled 1pt withcolor .625red) ;
b := a randomized (o/2) ;
fill b withcolor .85white ; draw b ;
c := center p ;
c := b intersectionpoint (c shifted (0,-o)--c shifted(0,o)) ;
p := p shifted (c-center p) ;
b := (boundingbox p) randomized (o/8) ;
fill b withcolor .85white ; draw b ;
draw p withcolor black;
setbounds currentpicture to a ;
\stopuseMPgraphic

\definelayer[bglayer][position=yes]
\setupbackgrounds[text][background="">
\setuplayer[bglayer][position=no,corner=bottom,height=\paperheight]


\starttext

\startbuffer[first]
  \setlayer[bglayer][x=.55\textwidth,y=.9\textheight,location=b]{
    \FrameTitle{Knuth}
    \StartFrame[width=.75\textwidth]
  \input knuth
    \StopFrame
  }
\stopbuffer
  
\startbuffer[second]
  \setlayer[bglayer][x=.625\textwidth,y=.8\textheight,location=b]{
    \FrameTitle{Zapf}
    \StartFrame[width=.75\textwidth]
  \input zapf
    \StopFrame
  }
\stopbuffer

\startbuffer[third]
  \setlayer[bglayer][x=.70\textwidth,y=.7\textheight,location=b]{
    \FrameTitle{Tufte}
    \StartFrame[width=.75\textwidth]
  \input tufte
    \StopFrame
  }
\stopbuffer

  \definesymbol[empty][]
  \definesymbol[one][{\getbuffer[first]}]
  \definesymbol[two][{\getbuffer[first,second]}]
  \definesymbol[three][{\getbuffer[first,second,third]}]


\Topic{Stacks \& Layers}

{\setupbodyfont[12pt]

\definefieldstack[sequence]
  [one,two,three]
  [frame=off,
   offset=none,
   clickin=JS(Walk_Field{sequence})]

{\fieldstack[sequence]}

\goto{next}[JS(Walk_Field{sequence})]
}

\stoptext



___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] typesetting a formula as a figure

2007-11-25 Thread Wolfgang Schuster
On Sat, 24 Nov 2007 14:56:30 +0900
Jeong Dalyoung <[EMAIL PROTECTED]> wrote:

> Dear Idris,
> 
> I have used buffers and \plcadefigures to display formula and figure  
> together. Here is my short sample file.
> 
> \startbuffer[one]
> \startformula \startmatrix
> \NC \NC e_1 \NC e_2 \NC e_3 \NC e_5 \NC e_5 \NR
> \NC   u \NC 0 \NC 1 \NC 1 \NC 0 \NC 1 \NR
> \NC  v \NC 1 \NC 0 \NC 1 \NC 0 \NC 0 \NR
> \NC   w \NC 1 \NC 1 \NC 0 \NC 1 \NC 0 \NR
> \NC   x \NC 0 \NC 0 \NC 1 \NC 0 \NC 1 \NR
> \NC   y \NC 1 \NC 0 \NC 0 \NC 1 \NC 0 \NR
> \stopmatrix \stopformula
> \stopbuffer
> 
> \starttext
> 
> \placefigure[here][fig:test]{Test of buffers}
> {\startcombination[2*2]
> {\externalfigure[7starmagic1][width=.25\makeupwidth]}{G}
> {\externalfigure[one.tmp]}{AA}
> {\externalfigure[one.tmp]}{BB}
> {\externalfigure[one.tmp]}{CC}
> \stopcombination}
> 
> \stoptext
> 
> Then, I got a strange output(fig 1: wide blank spaces between  
> columns). If I use \getbuffer instead of \externalfigure, I got  
> somewhat proper output(fig 2), but the figure is located much higher  
> than the matrix(horizontal alignment is bad).
> 
> What is wrong in my sample? Is there any option for \startcombination?

\placefigure[here][fig:test]{Test of buffers}
  {\startcombination[2*2]
   {\vcenter{\externalfigure[7starmagic1][width=.25\makeupwidth]}}{G}
   {\getbuffer[one]}{AA}
   {\getbuffer[one]}{BB}
   {\getbuffer[one]}{CC}
  \stopcombination}

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


Re: [NTG-context] AntykwaTorunska fonts: how to use ?

2005-02-17 Thread Hans Hagen
VnPenguin wrote:
Hi all,
Until now, following the guide at http://contextgarden.net/Vietnamese
I can use vietnamese UTF-8:
---
\enableregime[utf]
\setupencoding[default=t5]
\usetypescript[palatino][t5]
\setupbodyfont[palatino,12pt]
\starttext
Vietnamese UTF8 text here 
\stoptext
---

Just found that the font AntykwaTorunska has also t5 enc (vietnamese
support confirmed by font's author too): in file
map/dvips/antt/t5-antt.map I see:
t5-anttb AntykwaTorunska-Bold "enct5-antt ReEncodeFont" 
But unfortunately I don't know how to use it ? I have a look at
mfonts.pdf but this document is too "technical" for a ConTeXt's newbie
like me :)
Anyone could give me some help to use AntykwaTorunska fonts with t5
encoding please.
just add t5 to: (in type-enc)
\starttypescript [serif] 
[antykwa-torunska,antykwa-torunska-light,antykwa-torunska-cond,antykwa-torunska-lightcond] 
[texnansi,qx,t5,t2a,t2b,t2c]

\starttypescript [serif] 
[antykwa-torunska,antykwa-torunska-light,antykwa-torunska-cond,antykwa-torunska-lightcond] 
[texnansi,qx,t5]

and the following should work:
\definetypeface[TestA][rm][serif][antykwa-torunska]   
[default][encoding=t5]
\definetypeface[TestB][rm][serif][antykwa-torunska-light] 
[default][encoding=t5]
\definetypeface[TestC][rm][serif][antykwa-torunska-cond]  
[default][encoding=t5]
\definetypeface[TestD][rm][serif][antykwa-torunska-lightcond] 
[default][encoding=t5]
\setupbodyfont[TestA] \mainlanguage[vn]
\startbuffer
\labeltext {sunday} --
\labeltext {monday} --
\labeltext {tuesday} --
\labeltext {wednesday} --
\labeltext {thursday} --
\labeltext {friday} --
\labeltext {saturday}
\stopbuffer
\starttext
\startTEXpage[offset=10pt] \setupalign[middle]
{antikwa torunska: \TestA \getbuffer}\blank
{antikwa torunska light: \TestB \getbuffer}\blank
{antikwa torunska condensed: \TestC \getbuffer}\blank
{antikwa torunska light condensed: \TestD \getbuffer}
\stopTEXpage
\stoptext
(of course you need the latest antykwa fonts)
Hans
-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] howto \getbuffer inside of \startTEX ... \stopTEX

2005-04-04 Thread VnPenguin
On Apr 3, 2005 9:32 PM, h h extern <[EMAIL PROTECTED]> wrote:
> 
> just \typebuffer as in:
> 
> \setupcolors[state=start] \setuptyping[option=TEX]
> 
> \starttext
> 
> \startbuffer
> \bTABLE
> \bTR
>\bTH title1 \eTH
>\bTH title2 \eTH
> \eTR
> \bTR
>\bTD data1 \eTD
>\bTD data2 \eTD
> \eTR
> \eTABLE
> \stopbuffer
> 
> \typebuffer
> 
> \getbuffer
> 
> \stoptext
> 
Oh, works well.
Thank you a lot,
Regards,
Q.
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Linenumering inside floats

2015-08-04 Thread Hans Hagen

On 8/4/2015 4:52 PM, Aditya Mahajan wrote:

On Wed, 29 Jul 2015, Hans Hagen wrote:


On 6/30/2015 7:56 PM, Aditya Mahajan wrote:

Hi,

I am forwarding a feature request for the t-vim module:
https://github.com/adityam/filter/issues/21

Is there a way to enable line numbering inside floats:

\definefloat[sourcecode][sourcecodes]

\startbuffer
\startlinenumbering
   \input tufte
\stoplinenumbering
\stopbuffer

\starttext
 \startplacesourcecode
   \getbuffer
 \stopplacesourcecode

 \getbuffer
\stoptext


in next beta (somewhat experimental as i needed to adapt an important
helper for framed)


The example posted above does not work with the beta 2015.08.04.


you need to wrap it in framed

 \startplacesourcecode
   \framed[align=normal,frame=off]{\getbuffer}
 \stopplacesourcecode



--

-
  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] protrusion with opening exclamation and question marks

2018-08-29 Thread Pablo Rodriguez
Hi Hans,

I have the following sample:

\definefontfeature[default][default]
[protrusion=quality]

\setupxtable[frame=off, option=stretch]

\startbuffer[standard]
¿Cómo?

¡No!
\stopbuffer

\startbuffer[right]
\hfill¿Cómo?

\hfill¡No!
\stopbuffer

\starttext
\startTEXpage[offset=2em]
\startembeddedxtable[framecolor=red, align=hanging,
foregroundstyle={\ss\bfd}, offset=overlay]
\startxrow
\startxcell[leftframe=on] \getbuffer[standard]\stopxcell
\stopxrow
\startxrow[toffset=2em]
\startxcell[rightframe=on] \getbuffer[right]\stopxcell
\startxcell[rightframe=on, align=nothanging]
\getbuffer[right]\stopxcell
\stopxrow
\stopembeddedxtable
\stopTEXpage
\stoptext

It shows that question and exclamation marks are sligtly protruded.

Well, in Spanish (and Galician in some ortographies) there are opening
exclamation and quotation marks.

I think it would make sense to have the same protrusion values for
opening quotation and exclamation marks as for the closing ones.

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

[NTG-context] references

2011-02-11 Thread Hans Hagen

Hi,

I uploaded a beta. New:

- Improved \textxt behaviour (for Mojca's code).
- Korean labels and index tagging (with help from Jeong Dalyoung).
- Cleaned of referencing (formats).

\setupinteraction[state=start]

\startbuffer[definitions]
\definereferenceformat [PageOne]   [left=(,right=),text=sometext]
\definereferenceformat [PageTwo]   [label=page]
\definereferenceformat [PageThree] [label=*]
\definereferenceformat [PageFour]  [label=both]

\setuplabeltext[en][page=page~]
\setuplabeltext[en][chapter=chapter~]
\setuplabeltext[en][both={chapter~,~retpahc}]
\stopbuffer

\getbuffer[definitions]

\starttext

\chapter[one]{One}

\typebuffer[definitions]

\startbuffer
\PageOne[two]
\PageTwo[two]
\PageThree[two]
\PageFour[two]
\at{(}{)}[two]
\at{!}[two]
\at{page}[two]
<<\at[two]>>
\stopbuffer

\typebuffer \startlines \getbuffer \stoplines

\chapter[two]{Two}

\typebuffer[definitions]

\startbuffer
\PageOne[one]
\PageTwo[one]
\PageThree[one]
\PageFour[one]
\at{(}{)}[one]
\at{!}[one]
\at{page}[one]
<<\at[one]>>
\stopbuffer

\typebuffer \startlines \getbuffer \stoplines

\stoptext

--

-
  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] Russia (cyrillic letters)

2005-01-30 Thread h h extern
Mikael Persson wrote:
Hm, I am entering utf8 code. I am not sure how it got converted in the
email, however, when I type my .tex file I am sure that it is in
utf-8. But you mean that this example should work?
I attatch the testfile and the resulting pdf and logs and so on...
tracing shows that the utf part is okay:
\enableregime[utf]
% \definetypeface [russian]
%   [rm] [serif] [computer-modern] [default] [encoding=t2a]
%
% \setupbodyfont[russian]
\starttext
\startbuffer
Мама и Папа % Some russian characters
\stopbuffer
\chardef\utfunicodetracer=0 \blank \getbuffer \blank
\chardef\utfunicodetracer=2 \blank \getbuffer \blank
\chardef\utfunicodetracer=7 \blank \getbuffer \blank
\stoptext
but i cannot test the font part, can you send me a zip with your t2a tfm files 
and map file and enc file?

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


u-test.pdf
Description: Adobe PDF document


u-test.tex
Description: TeX document
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Math setup with Times (Termes)

2009-11-09 Thread Vyatcheslav Yatskovsky

Thank you, I'll try it.

Maybe you also know how to italize Roman letters? (like $abc$)

Vyatcheslav


\usetypescript[termes]\setupbodyfont[termes, 14pt]
\startbuffer
$αβγ$
\stopbuffer

\starttext
\getbuffer

\setupmathematics[lcgreek=normal]\getbuffer
\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] math

2006-01-17 Thread Hans Hagen
ter\noxxdoubleempty\fi#1#2}

\def\dodoxxdoubleempty#1[#2]#3%
  {\ifx#3[\else\expandafter\nonoxxdoubleempty\fi#1[#2]#3}

\def\noxxdoubleempty  #1{#1[][]}
\def\nonoxxdoubleempty#1[#2]{#1[#2][]}

\newcount\eqaligncolumn

\def\firstineqalign{\global\eqaligncolumn\plusone}
\def\nextineqalign {\global\advance\eqaligncolumn\plusone}
\def\leftofeqalign {\getvalue{\??eq:\v!left :\number\eqaligncolumn}}
\def\rightofeqalign{\getvalue{\??eq:\v!right:\number\eqaligncolumn}}

\def\doseteqaligncolumn#1%
  {\letvalue{\??eq:\v!left :\number\eqaligncolumn}\empty
   \letvalue{\??eq:\v!right:\number\eqaligncolumn}\empty
   \doif{#1}\v!left  {\letvalue{\??eq:\v!right:\number\eqaligncolumn}\hfill}%
   \doif{#1}\v!right {\letvalue{\??eq:\v!left :\number\eqaligncolumn}\hfill}%
   \doif{#1}\v!middle{\letvalue{\??eq:\v!right:\number\eqaligncolumn}\hfill
  \letvalue{\??eq:\v!left :\number\eqaligncolumn}\hfill}}

\def\dodoalignNC
  {\gdef\doalignNC##1{&##1}}

\def\doalignNR[#1][#2]%
  {\doifsomething{#1}
 {\doifelse{#1}{+}
{\doformulanumber[][#2][]{}}
{\doformulanumber[#1][#2][]{}}}%
   \crcr}

\def\dostartmathalign[#1][#2]%
  {\pushmacro\doalignNC
   \edef\currentmathalign{#1}%
   \doifassignmentelse{#2}{\setupmathalign[#1][#2]}\donothing
   \def\NC{\doalignNC}%
   \global\let\doalignNC\dodoalignNC
   \def\EQ{&=}%
   \def\NR{&\global\let\doalignNC\dodoalignNC\doxxdoubleempty\doalignNR}%
   % amstex compatibility mode: (ugly)
   \def\notag{\def\\{&\crcr}}%
   \doifelse{#2}{*}{\def\\{&\crcr}}{\def\\{&\doalignNR[+][]\crcr}}%
   % end of compatibility mode
   \eqaligncolumn\zerocount
   \processcommacommand[\mathalignparameter\c!align]{\advance\eqaligncolumn\plusone\doseteqaligncolumn}%
   % the real action
   \global\eqaligncolumn\plusone
   \numberedeqalign}

\def\dostopmathalign
  {\finishalignno
   \popmacro\doalignNC}

\def\definemathalign
  {\dodoubleempty\dodefinemathalign}

\def\dodefinemathalign[#1]% [#2]%
  {\setvalue{\e!start#1}{\dodoubleempty\dostartmathalign[#1]}%
   \setvalue{\e!stop #1}{\dostopmathalign}%
   \setupmathalign[#1]}% [#2]

\definemathalign[align] % default case

% \def\startsplit
%   {\startalign[*]} % no number by default
%
% \def\stopsplit
%   {&\doalignNR[+][]\crcr % for a number on last line
%\stopalign}

%D \startbuffer
%D \placeformula \startformula \eqalignno {
%D  a &= b & \formulanumber \cr
%D  c &= d \cr
%D&= e \cr
%D&= f & \formulanumber
%D } \stopformula
%D \stopbuffer
%D
%D \typebuffer \getbuffer
%D
%D \startbuffer
%D \placeformula \startformula \startalign
%D \NC  a \EQ b \NR[+]
%D \NC  c \EQ d \NR
%D \NC\EQ f \NR[for:demo-a-1]
%D \NC\EQ g \NR[for:demo-a-2][a]
%D \NC\EQ h \NR[for:demo-a-3][b]
%D \NC\EQ i \NR
%D \stopalign \stopformula
%D \stopbuffer
%D
%D \typebuffer \getbuffer
%D
%D \startbuffer
%D \placeformula \startformula \startalign
%D \NC a \EQ b \NR[+]
%D \NC c \EQ d \NR
%D \NC   \EQ f \NR
%D \NC   \EQ g \NR
%D \NC   \EQ h \NR
%D \NC   \EQ i \NR[+]
%D \stopalign \stopformula
%D \stopbuffer
%D
%D \typebuffer \getbuffer
%D
%D \startbuffer
%D \placeformula \startformula \startalign
%D a &= b \\
%D c &= d \notag \\
%D   &= e \notag \\
%D   &= f \\
%D \stopalign \stopformula
%D \stopbuffer
%D
%D \typebuffer \getbuffer
%D
%D \startbuffer
%D \placeformula \startformula \startalign
%D \NC  a \NC \eq  b \NR[+]
%D \NC  c \NC \neq d \NR
%D \NC\NC \neq f \NR[for:demo-b-1]
%D \NC\NC \geq g \NR[for:demo-b-2][a]
%D \NC\NC \leq h \NR[for:demo-b-3][b]
%D \NC\NC \neq i \NR
%D \stopalign \stopformula
%D \stopbuffer
%D
%D \typebuffer \getbuffer
%D
%D \startbuffer
%D \placeformula \startformula \startalign[*]
%D a &= b \\
%D c &= d \\
%D   &= e \\
%D   &= f \\
%D \stopalign \stopformula
%D \stopbuffer
%D
%D \typebuffer \getbuffer
%D
%D \startbuffer
%D \placeformula \startformula \startalign
%D x &= y \\
%D a &= b \\
%D \stopalign \stopformula
%D \stopbuffer
%D
%D \typebuffer \getbuffer
%D
%D \startbuffer
%D \placeformula \startformula \startalign[m=3]
%D x &= y & x &= y & z &= t \\
%D a &= b & p &= q & w &= s \\
%D \stopalign \stopformula
%D \stopbuffer
%D
%D \typebuffer \getbuffer
%D
%D \startbuffer
%D \placeformula \startformula \startalign[m=3,distance=0pt]
%D x &= y &= x &= y &= z &= t \\
%D a &= b &= p &= q &= w &= s \\
%D \stopalign \stopformula
%D \stopbuffer
%D
%D \typebuffer \getbuffer
%D
%D \startbuffer
%D \placeformula \startformula \startalign[n=5,distance=0pt]
%D x &= yy &= xx &= yy &= zz \\
%D a &= b  &= p  &= q  &= w  \\
%D \stopalign \stopformula
%D \stopbuffer
%D
%D \typebuffer \getbuffer
%D
%D \startbuffer
%D \placeformula \startformula \startalign[n=3,align={left,middle,right}]
%D \NC   l \NC = \NC r \NR
%D \NCleft \NC = \NC right \NR
%D \stopalign \stopfo

Re: [NTG-context] math

2006-01-20 Thread David Arnold
n\empty

\def\mathalignparameter#1%
  {\executeifdefined{\??eq\currentmathalign#1}{\executeifdefined{\?? 
eq#1}\empty}}


\setupmathalign
  [\c!n=2,
   \c!m=1,
   \c!distance=1em]

\def\numberedeqalign
  {\doifelse\@@fmlocation\v!left\alignleqalignno\aligneqalignno}

\def\doxxdoubleempty#1#2%
  {\ifx#2[\expandafter\dodoxxdoubleempty\else\expandafter 
\noxxdoubleempty\fi#1#2}


\def\dodoxxdoubleempty#1[#2]#3%
  {\ifx#3[\else\expandafter\nonoxxdoubleempty\fi#1[#2]#3}

\def\noxxdoubleempty  #1{#1[][]}
\def\nonoxxdoubleempty#1[#2]{#1[#2][]}

\newcount\eqaligncolumn

\def\firstineqalign{\global\eqaligncolumn\plusone}
\def\nextineqalign {\global\advance\eqaligncolumn\plusone}
\def\leftofeqalign {\getvalue{\??eq:\v!left :\number\eqaligncolumn}}
\def\rightofeqalign{\getvalue{\??eq:\v!right:\number\eqaligncolumn}}

\def\doseteqaligncolumn#1%
  {\letvalue{\??eq:\v!left :\number\eqaligncolumn}\empty
   \letvalue{\??eq:\v!right:\number\eqaligncolumn}\empty
   \doif{#1}\v!left  {\letvalue{\??eq:\v!right:\number 
\eqaligncolumn}\hfill}%
   \doif{#1}\v!right {\letvalue{\??eq:\v!left :\number 
\eqaligncolumn}\hfill}%
   \doif{#1}\v!middle{\letvalue{\??eq:\v!right:\number 
\eqaligncolumn}\hfill
  \letvalue{\??eq:\v!left :\number 
\eqaligncolumn}\hfill}}


\def\dodoalignNC
  {\gdef\doalignNC##1{&##1}}

\def\doalignNR[#1][#2]%
  {\doifsomething{#1}
 {\doifelse{#1}{+}
{\doformulanumber[][#2][]{}}
{\doformulanumber[#1][#2][]{}}}%
   \crcr}

\def\dostartmathalign[#1][#2]%
  {\pushmacro\doalignNC
   \edef\currentmathalign{#1}%
   \doifassignmentelse{#2}{\setupmathalign[#1][#2]}\donothing
   \def\NC{\doalignNC}%
   \global\let\doalignNC\dodoalignNC
   \def\EQ{&=}%
   \def\NR{&\global\let\doalignNC\dodoalignNC\doxxdoubleempty 
\doalignNR}%

   % amstex compatibility mode: (ugly)
   \def\notag{\def\\{&\crcr}}%
   \doifelse{#2}{*}{\def\\{&\crcr}}{\def\\{&\doalignNR[+][]\crcr}}%
   % end of compatibility mode
   \eqaligncolumn\zerocount
   \processcommacommand[\mathalignparameter\c!align]{\advance 
\eqaligncolumn\plusone\doseteqaligncolumn}%

   % the real action
   \global\eqaligncolumn\plusone
   \numberedeqalign}

\def\dostopmathalign
  {\finishalignno
   \popmacro\doalignNC}

\def\definemathalign
  {\dodoubleempty\dodefinemathalign}

\def\dodefinemathalign[#1]% [#2]%
  {\setvalue{\e!start#1}{\dodoubleempty\dostartmathalign[#1]}%
   \setvalue{\e!stop #1}{\dostopmathalign}%
   \setupmathalign[#1]}% [#2]

\definemathalign[align] % default case

% \def\startsplit
%   {\startalign[*]} % no number by default
%
% \def\stopsplit
%   {&\doalignNR[+][]\crcr % for a number on last line
%\stopalign}

%D \startbuffer
%D \placeformula \startformula \eqalignno {
%D  a &= b & \formulanumber \cr
%D  c &= d \cr
%D&= e \cr
%D&= f & \formulanumber
%D } \stopformula
%D \stopbuffer
%D
%D \typebuffer \getbuffer
%D
%D \startbuffer
%D \placeformula \startformula \startalign
%D \NC  a \EQ b \NR[+]
%D \NC  c \EQ d \NR
%D \NC\EQ f \NR[for:demo-a-1]
%D \NC\EQ g \NR[for:demo-a-2][a]
%D \NC\EQ h \NR[for:demo-a-3][b]
%D \NC\EQ i \NR
%D \stopalign \stopformula
%D \stopbuffer
%D
%D \typebuffer \getbuffer
%D
%D \startbuffer
%D \placeformula \startformula \startalign
%D \NC a \EQ b \NR[+]
%D \NC c \EQ d \NR
%D \NC   \EQ f \NR
%D \NC   \EQ g \NR
%D \NC   \EQ h \NR
%D \NC   \EQ i \NR[+]
%D \stopalign \stopformula
%D \stopbuffer
%D
%D \typebuffer \getbuffer
%D
%D \startbuffer
%D \placeformula \startformula \startalign
%D a &= b \\
%D c &= d \notag \\
%D   &= e \notag \\
%D   &= f \\
%D \stopalign \stopformula
%D \stopbuffer
%D
%D \typebuffer \getbuffer
%D
%D \startbuffer
%D \placeformula \startformula \startalign
%D \NC  a \NC \eq  b \NR[+]
%D \NC  c \NC \neq d \NR
%D \NC\NC \neq f \NR[for:demo-b-1]
%D \NC\NC \geq g \NR[for:demo-b-2][a]
%D \NC\NC \leq h \NR[for:demo-b-3][b]
%D \NC\NC \neq i \NR
%D \stopalign \stopformula
%D \stopbuffer
%D
%D \typebuffer \getbuffer
%D
%D \startbuffer
%D \placeformula \startformula \startalign[*]
%D a &= b \\
%D c &= d \\
%D   &= e \\
%D   &= f \\
%D \stopalign \stopformula
%D \stopbuffer
%D
%D \typebuffer \getbuffer
%D
%D \startbuffer
%D \placeformula \startformula \startalign
%D x &= y \\
%D a &= b \\
%D \stopalign \stopformula
%D \stopbuffer
%D
%D \typebuffer \getbuffer
%D
%D \startbuffer
%D \placeformula \startformula \startalign[m=3]
%D x &= y & x &= y & z &= t \\
%D a &= b & p &= q & w &= s \\
%D \stopalign \stopformula
%D \stopbuffer
%D
%D \typebuffer \getbuffer
%D
%D \startbuffer
%D \placeformula \startformula \startalign[m=3,distance=0pt]
%D x &= y &= x &= y &= z &= t \\
%D a &= b &= p &= q &= w &= s \\
%D \stopalign \stopformula
%D \stopbuffer
%D
%D \typebuffer \getbuffer
%D
%D \startbuffer
%D \placeformula \startformula \startalign[n=5,distance

Re: [NTG-context] TeX-figures

2011-01-30 Thread Peter Münster
Steffen Wolfrum  writes:

> [...]
> 
> \getbuffer
>
> Works great for me ...

Sure, but it's really not the same ;)

Compare:

\starttext
\startbuffer
\startTEXpage[width=5cm]
\input tufte
\stopTEXpage
\stopbuffer
\getbuffer

\startbuffer[testbuf]
\input tufte
\stopbuffer
\savebuffer[testbuf][testbuf.tmp]
\externalfigure[testbuf.tmp][width=5cm]
\stoptext

Cheers,
-- 
   Peter
___
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] \typebuffer with typing style

2009-06-08 Thread Matthijs Kooijman
Hi all,

>  since \startFOO \getbuffer[bar] \stopFOO gives me compile errors. 
Actually, that turned out to be my own typo. However, this doesn't give me
what I want, but just a verbatim "\getbuffer[bar]"...

Gr.

Matthijs


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


Re: [NTG-context] Math setup with Times (Termes)

2009-11-08 Thread Aditya Mahajan

On Sun, 8 Nov 2009, Vyatcheslav Yatskovsky wrote:

1) Greek letters are slanted, while they supposed by our standards to be 
straight.


\usetypescript[termes]\setupbodyfont[termes, 14pt]
\startbuffer
$αβγ$
\stopbuffer

\starttext
\getbuffer

\setupmathematics[lcgreek=normal]\getbuffer
\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
___


Re: [NTG-context] source code and result side by side

2017-07-29 Thread Pablo Rodriguez
On 07/29/2017 10:58 AM, Pablo Rodriguez wrote:
> On 07/29/2017 12:57 AM, Aditya Mahajan wrote:
>> [...]
>> \placesidebyside
>>  {\typebuffer[example-1]}
>>  {\getbuffer[setups, example-1]}
> [...]
> Is there now hay to avoid the forced horizontal mode on both sides?

Replying to my own question, a fast fix (although far from perfect)
would be using xtables:

\def\replacesidebyside#1{%
\blank\startembeddedxtable[frame=off, option=stretch]
\startxrow
\startxcell\typebuffer[#1][option=TEX]\stopxcell
\startxcell\getbuffer[setups, #1]\stopxcell
\stopxrow
\stopembeddedxtable\blank}

\def\replaceontopofeachother#1{%
\blank\startembeddedxtable[frame=off, option=stretch]
\startxrow
\startxcell\typebuffer[#1][option=TEX]\stopxcell
\stopxrow
\startxrow[toffset=1em, split=yes]
\startxcell\getbuffer[setups, #1]\stopxcell
\stopxrow
\stopembeddedxtable\blank}

\starttext
\startbuffer[example-1]
\setupexternalfigures[location=default]
\starttext
\ConTeXt\ is awesome!

\externalfigure[cow.pdf][scale=250]
\stoptext
\stopbuffer

Frames won’t be split accross pages. There may be other issues, but none
tham I’m aware of ;-).

Just in case it helps,

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
___

Re: [NTG-context] ligature exceptions

2017-10-07 Thread Pablo Rodriguez
On 10/07/2017 01:25 PM, Henning Hraban Ramm wrote:
> I rejoiced too early:
> While the ligature exception handling works with some of the default
> fonts (lm, termes, pagella), it fails with the Alegreya fonts that I’m
> using.

The Brill fonts don’t work either (http://www.brill.com/about/brill-fonts).

\definefontfamily[mainfont][rm][Alegreya]
\definefontfamily[otherfont][rm][Brill]
\setupbodyfont [mainfont,16pt]

\starttext
\startTEXpage[offset=1em]
\startbuffer
falsch: Auflage Kampffront

richtig: Au\noligature{fl}age Kamp\noligature{ff}ront

\setreplacements[eka]
richtig: Auflage Kampffront

f ft fl fk fb ff

f f\/t f\/l f\/k f\/b f\/f
\resetreplacements
\stopbuffer

    \getbuffer

\setupbodyfont[times]\getbuffer

\setupbodyfont[otherfont]\getbuffer
\stopTEXpage
\stoptext

Both Alegreya and Brill don’t replace the ligature with a single glyph,
but replace the first glyph (only, as far as I know).

I don’t know which is the way to solve it, but this might be the cause.

Just in case it helps,

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] Bug in maths prime (derivative)

2013-09-16 Thread Otared Kavian
Hi Hans,

I noticed that recently a discrepancy in the way the prime is positioned in the 
presence of an index as in $f'_n$ or $f_n'$ (please see the attached PDF). 
However the positioning is correct in expressions such as $u^k_n$.
The problem shows up only in mkiv, and as far as I can say the differnece 
between the results in mkii and mkiv appeared recently (unfortunately I can't 
say when…).

 begin minimal-example.tex
\starttext
\startbuffer[math]
If for $n \geq 1$ we consider $f_{n} : {\Bbb R} \longrightarrow {\Bbb R}$ a 
real valued function, and $u_{n} : {\Bbb Z} \longrightarrow {\Bbb Z}$ then we 
denote
\startformula
f'_{n}(x) := \lim_{h\to 0}{f_{n}(x + h) - f_{n}(x) \over 
h}\qquad\mbox{and}\quad u^k_{n} := u_{n}(k)
\stopformula
\stopbuffer

\getbuffer[math]

\switchtobodyfont[times]
\getbuffer[math]

\switchtobodyfont[palatino]
\getbuffer[math]

\stoptext
 end  minimal-example.tex


bug-prime.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
___

[NTG-context] metafonts

2013-10-01 Thread Hans Hagen

Hi,

Another new feature (side effect of ctx meeting):


%D \module
%D   [   file=demo-symbols.mp,
%Dversion=2013.09.06,
%D  title=\CONTEXT\ \METAPOST\ graphics,
%D   subtitle=demo font,
%D author=Hans Hagen,
%D   date=\currentdate,
%D  copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.

passvariable("fontname","demo-symbols") ;
passvariable("fontversion","1.004") ;

beginglyph(9754,2,4,0) ; % high voltage
interim ahlength := 1 ;
drawarrow (1,4) -- (0,2) -- (2,3) -- (1,0) withcolor darkred ;
endglyph ;

\starttext

\definemetafont[demo-symbols][demo-symbols.mp]

\startbuffer
watch this: {\demo\char"261A}
\stopbuffer

\definefont[demo][demo@demo-symbols]

\getbuffer \blank

\definefont[demo][demo@demo-symbols at \the\dimexpr3\exheight]

\getbuffer \blank

\definefont[demo][demo@demo-symbols at \the\dimexpr4\exheight]

\getbuffer \blank

\stoptext


-
  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] ConTeXt gobble my mind

2014-11-08 Thread Wolfgang Schuster

> Am 08.11.2014 um 00:00 schrieb Pierre-François Bonnefoi :
> 
> Just before going to bed, I've found a solution with all your help and the 
> help of Taco Hoekwater through the ntg mail archive :
> 
> \def\startSlide%
> {\def\stopSlide{\checkSlide\doif{\getvariable{temp}{publish}}{yes}{\page\getbuffer[Slide]}}%
> \dostartbuffer[Slide][startSlide][stopSlide]}
> 
> Let me know if it's my philosopher's stone...
> I've tried it and it works so far.
> 
> No more ugly gobbling, my mind is free.

Below are two other methods.


Method 1
===

\newconditional\SkipSlide \setfalse\SkipSlide

\definebuffer[Slide]

\def\stopSlide
  {\ifconditional\SkipSlide \else
 \page \getbuffer[\thedefinedbuffer{Slide}]%
   \fi
   \setfalse\SkipSlide}

\starttext

\startSlide
First Slide
\stopSlide

\settrue\SkipSlide
\startSlide
Second Slide
\stopSlide

\startSlide
Third Slide
\stopSlide

\stoptext


Method 2
===

\def\startSlide
  {\dosingleempty\dostartSlide}

\def\dostartSlide[#1]%
  {\doifelse{#1}{-}
 {\let\stopSlide\stopSlideNop}
 {\let\stopSlide\stopSlideYes}%
   \grabbufferdata[Slide][startSlide][stopSlide]}

\let\stopSlideNop\relax

\def\stopSlideYes
  {\page
   \getbuffer[Slide]}

\starttext

\startSlide
First Slide
\stopSlide

\startSlide[-]
Second Slide
\stopSlide

\startSlide
Third Slide
\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] What happened to \reference

2008-07-30 Thread Taco Hoekwater

Hoi Gerben,

Gerben Wierda wrote:
> I have started (after a hiatus) to compile my project again using an  
> updated ConTeXt
> 
> ConTeXt  ver: 2008.03.03 00:34 MKII  fmt: 2008.3.4  int: english/english
> 
> and something that used to work has stopped working:
> 
> \reference[logic:implicationprogram] 
> {\getbuffer[logic:implicationprogram]}
> 
> gives an empty result. This used to (say a year ago) get me the  
> contents of the buffer I set up earlier.

I tried with 2007.07.25 (the last pre-mkiv release) and that doesn't
work either. Afaics, in that version (and all versions since) it was
not meant to work.  It could be an ever earlier regression, but I
do not have runnable versions of all those older context releases.

That said, it is easy to get this working (again), just add this
at the start of your document

  \unexpanded\def\GWgetbuffer{\getbuffer}

(and use \GWgetbuffer instead of \getbuffer, of course)

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


[NTG-context] Header spoils X(HT)ML export

2011-12-06 Thread Andreas Harder
Hi Hans,

please consider the following example.

\setupbackend[export=yes,xhtml=yes,css=yes]
\setupheadertexts[{\startelement[header] test \stopelement}]

\starttext

\startbuffer
  \startparagraph
\input tufte
  \stopparagraph
  \startparagraph
\input ward
  \stopparagraph
\stopbuffer

\startsection[title=first head]
  \getbuffer
\stopsection

\startsection[title=second head]
  \getbuffer
\stopsection

%% try to comment this section
\startsection[title=third head]
  \getbuffer
\stopsection

\stoptext

The section-title order is now 3, 1, 2 (in the XHTML output). This problem 
appears only if there is a page break. After commenting the last section the 
XHTML output looks like expected. 


Best wishes
Andreas


PS. I’ve encountered another export problem. Perhaps it is because of an not 
intending using of \settaggedmetadata … Here is an example.

\setupbackend[export=yes,xhtml=yes,css=yes]

\startsetups document:start
  \settaggedmetadata[title=\documentvariable{title}]
\stopsetups

\startdocument
  [title=This document title is wrapped in section-tags]

\startsection[title=test]
  \startparagraph
\input tufte
  \stopparagraph
\stopsection

\stopdocument

___
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] Line numbering in two column layout conflicts with marking

2019-12-02 Thread Oliver von Criegern

Dear list members,

line numbering in a two column layout apparently conflicts with the 
marking mechanism.


Consider the following example:


\setupcolumns[n=2]

\setuplinenumbering
    [
    step=5,
    method=page,
    align=flushright,
    ]

\definemarking[Test]

\setupheadertexts[{\fetchmark[Test][top] -- \fetchmark[Test][bottom]}]

\startbuffer
\dorecurse{12}{words }
\stopbuffer

\starttext
\startcolumns
\startlinenumbering
\marking[Test]{ONE}ONE \dorecurse{12}{\getbuffer}\par
\marking[Test]{TWO}TWO \dorecurse{29}{\getbuffer}\par
\marking[Test]{THREE}THREE \dorecurse{12}{\getbuffer}\par
\stoplinenumbering
\stopcolumns
\stoptext


In the result, the header of the first page reads "ONE -- THREE", 
despite marking "THREE" being placed in the third line of the second page.


Without linenumbering, the header of the first page reads "ONE -- TWO", 
as is to be expected.


Best regards,
Oliver


--
Dr. Oliver von Criegern
Referat für IT und Digital Humanities
Bayerische Akademie der Wissenschaften
Alfons-Goppel-Str. 11
80539 München
Tel.: 089-23031-1310

___
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] Styling of included buffers or files

2020-05-18 Thread Wolfgang Schuster

Marco Patzer schrieb am 17.05.2020 um 19:04:

On Sun, 17 May 2020 18:16:13 +0200
"Jan U. Hasecke"  wrote:


I am currently writing a text where I want to include text snippets
either by including files or including buffers.

What is the best way to style all these included buffers?

I know that I can do something like this:

\startcolumns
\getbuffer[Muenchen]
\stopcolumns

Or do something with \defineparagraph

Is it somehow possible to apply styles to all buffers that gets
included via \getbuffer by defining a special getbuffer-style?


\setupbuffer has before and after keys which can be used. Example:

\setupbuffer
  [before=\blank\blackrule\startnarrower\BufferStyle,
   after=\stopnarrower\blackrule\blank]

[...]

\definehighlight
   [BufferStyle]
   [style=smallitalic,
color=blue]


Use the highlight-environment or create a new startstop-environment to 
apply style and color settings to the buffer.


\definestartstop
  [BufferStyle]
  [style=smallitalic,
   color=blue]

\setupbuffer
 [before={... \startBufferStyle ...},
   after={... \stopBufferStyle  ...}]

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] \switchtobodyfont behaves differenctly with splitted parameters

2020-11-08 Thread Pablo Rodriguez
On 11/8/20 2:35 AM, Sylvain Hubert wrote:
> Dear List,
>
> after hours of debugging, I finally found out that
> \switchtobodyfont[face, 20pt] does NOT behave the same with
> \switchtobodyfont[face]\switchtobodyfont[20pt]. In my case the latter is
> the correct one, while the former does nothing but falling back to
> latinmodern.
>
> Does anyone know when or why \switchtobodyfont behaves differently with
> splitted and joined parameters?

Hi Sylvain,

as a general rule, it helps when there is a minimal sample that provides
the problematic behavior.

I don’t get diffferent results:

  \definefontfamily[mainface][rm][TeX Gyre Pagella]
  \definefontfamily[face][rm][TeX Gyre Heros]
  \setupbodyfont[mainface]
  \startbuffer
  In my case, the latter is the correct one, while the former does
  nothing but falling back to latinmodern.\par
  \stopbuffer

  \starttext
  \getbuffer
  \switchtobodyfont[face]\switchtobodyfont[20pt]
  \getbuffer
  \switchtobodyfont[face, 20pt]
  \getbuffer
  \stoptext

Correct the sample to show what I got wrong from your message.

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] small lmtx update

2021-02-02 Thread Hans Hagen

Hi,

In the perspective of fancyfying context I made an alternative rendering 
for missing glyphs (and in the process also made the visualization 
italic and bold aware which is of course feature creepifying).


\replacemissingcharacters

\startbuffer
\startlines[before=,after=]
\strut {\tf test \char 12345\ test \char 12346\ test}
\strut {\bf test \char 12345\ test \char 12346\ test}
\strut {\it test \char 12345\ test \char 12346\ test}
\strut {\bi test \char 12345\ test \char 12346\ test}
\strut {test ὀ ρ φ α ν ῖ ο ς test}
\stoplines
\stopbuffer

\starttext
\startTEXpage[offset=2pt,strut=no]
\getbuffer
\switchtobodyfont[pagella]
\getbuffer
\switchtobodyfont[dejavu]
\getbuffer
\stopTEXpage
\stoptext

This is dedicated to Jano who wants to be able to search and these are 
proper glyphs (so one can search, assuming a sane viewer).


It also fits the "new mechanisms should reduce code" bill,

Hans



-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] hyphenated url

2010-10-28 Thread Wolfgang Schuster

Am 28.10.2010 um 08:53 schrieb Taco Hoekwater:

> On 10/27/2010 02:43 PM, Wolfgang Schuster wrote:
>> 
>> Am 27.10.2010 um 12:35 schrieb Steffen Wolfrum:
>> 
>>> Hi Hans and other catcode wizards,
>>> 
>>> isn't there a way to make this kind of catcode trickery only be available 
>>> *inside* \hyphenatedurl{} environment?
>> 
>> It’s useless in this case because the „%“ is read from the footnote before 
>> \hyphenatedurl can see it and any local catcode changes have therefore no 
>> effect.
> 
> This works:
> 
> \startbuffer [comurl] \catcode`\%=12
> \hyphenatedurl{http://www.kommers.se/upload/Analysarkiv/In%20English/Analyses/Woolcock%20paper%20on%20impact%20of%20Lisbontreaty%20on%20tradepolicy.pdf}
> \stopbuffer
> 
> \setupinteraction
>   [state=start]
> 
> \starttext
> 
> test\footnote{test \getbuffer[comurl] text.} text.
> 
> \stoptext

Sure but \getbuffer isn’t expanded when the footnote text is read by tex, when 
you look at the tuc file you can see the entry for the footnote is:

  titledata={
   title="test \\getbuffer [comurl] text.",
  },

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] footnotes by chapter

2013-02-24 Thread Wolfgang Schuster

Am 24.02.2013 um 12:17 schrieb "Meer, H. van der" :

> I would like to have my footnotes typeset by chapter, using the following 
> input:
> 
> \startbuffer
> This is some text\footnote{First footnote}.
> Followed by more and more text having a footnote\footnote{Second footnote}.
> Again some text. Again some text. Again some text. Again some text.
> \stopbuffer
> \setupfootnotes[location=text,way=bychapter]
> \starttext
> \chapter{Chapter One}\getbuffer\placefootnotes
> \chapter{Chapter Two}\getbuffer\placefootnotes
> \chapter{Chapter Three}\getbuffer\placefootnotes
> \stoptext
> 
> Note the setup parameter "way=bychapter" but the numbering is not restarted 
> with the chapter! Instead they go on and on. See the example output.
> 
> How to restart the footnote numbering per chapter if that way= parameter 
> doesn't do it?

Use \setupnotation[footnote][way=bychapter].

When you use \startchapter … \stopchapter you can flush the footnotes at the end
of each chapter with \setuphead[chapter][aftersection={\placenotes[footnote]}].

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] About 'repeat' option of \startitemize

2005-12-21 Thread Hans Hagen

Radhelorn wrote:


Hello All!
A while ago Hans introduced 'repeat' option for \startitemize to make 
nested items. I've decided to give it a try:


next time give it a try when i just made it; it took some time to figure 
out what was wrong (rather tricky code)


\unprotect

\def\checkforrepeatedlistitem
 {\ifnum\itemlevel=\plusone
\initializeboxstack{item}%
  \fi
  \ifconditional\repeatlistitem
 \savebox{item}{\itemlevel}{\hbox{\copy8}}%
 \setbox8\hbox to \wd8
  {\setbox\scratchbox\hbox
 {\scratchcounter\itemlevel
  \advance\scratchcounter\minusone
  \dorecurse\scratchcounter{\foundbox{item}{\recurselevel}}}%
   \ifnum\itemlevel>\plusone
 \ifdim\wd\scratchbox>\zeropoint
   \hskip-\dimen2
   \box\scratchbox
 \fi
   \fi
   \box8 }%
  \fi}

\showframe

\starttext

\startbuffer
\item
 \startitemize[n]
 \item item 1.1
 \item item 1.2
 \startitemize[n]
 \item item 1.2.1
 \item item 1.2.2
 \stopitemize
 \item item 1.3
 \stopitemize
\item
 \startitemize[n]
 \item item 2.1
 \item item 2.2
 \stopitemize
\item item 3
 \startitemize[n]
 \item item 3.1
 \item item 3.2
 \stopitemize
\item
 \startitemize[n]
 \item item 4.1
 \item item 4.2
 \stopitemize
\stopbuffer

\startitemize[n,repeat,6*broad,packed]
\getbuffer
\stopitemize
\blank[3*big]
\startitemize[n,repeat,packed]
\getbuffer
\stopitemize
\blank[3*big]
\setupitemize[each][atmargin][width=3em]
\startitemize[n,repeat,packed]
\getbuffer
\stopitemize

\stoptext

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] ConTeXt, Charts, and transparency

2006-07-12 Thread Idris Samawi Hamid
Dear syndicate,

So it's not a graphical charts module but I'm curious anyway: Could  
someone explain why the following sample file apparently does not work or  
what I am missing?

:-)

Best
Idris

> =
> % output=pdf interface=en
>
> \usemodule[m-steps]
>
> % A simple paragraph-flow test:
>
> \starttext
>
> \startbuffer
> \startSTEPchart
> \cells {A} {B}
> \cells {one}   {five}  \texts{$+2$}{$-2$}
> \cells {two}   {four}  \texts{$+3$}{$-3$}
> \cells {three} {three} \texts{$+4$}{$-4$}
> \cells {four}  {two}   \texts{$+5$}{$-5$}
> \cells {five}  {one}
> \stopSTEPchart
> \stopbuffer
>
> \getbuffer
>
> \startnarrower \getbuffer \stopnarrower
>
> \placefigure[left]{}{} \getbuffer
>
> \stoptext
> =
>
> log file:
>
> =
> (chart-test-mpgraph.mp
> (c:\ConTeXt\tex\texmf-local/metapost/context/base/mp-step
> .mp)
>>> (0.5,0.5,0.5)
>>> 2.5
> ! Not implemented: (color)scaled(known numeric).
> 
> ;
> pen_size->...epath(top.origin--bot.origin)(TEXT2);
>
> (ypart.urcorner.p-ypart.lr...
> set_ahlength->...:=(ahfactor*pen_size(_op_(TEXT0))
>);
> arrowheadonpath->...;set_ahlength(scaled.ahfactor)
>
> ;arrowhead(EXPR2)if(EXPR3)...
> drawline->...R2)=1:draw.arrowheadonpath((EXPR3),1)
>
> ;elseif(EXPR2)=2:draw.arro...
> image->...ture;currentpicture:=nullpicture;(TEXT2)
>;currentpicture.endgroup
> l.145 ...e(2,2), 1.79993pt, (scaledgray(.5,1)) ) )
>; lines[b][2][2] :=
> image(...
> ?
> =

-- 
Professor Idris Samawi Hamid
Department of Philosophy
Colorado State University
Fort Collins, CO 80523

--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] numbered subitems

2007-09-30 Thread Aditya Mahajan
On Sun, 30 Sep 2007, Alan Bowen wrote:

> I need to produce an lengthy itemization of the form:
> 1.
>   1.1 
>   1.2 
> 2.
>   2.1 
>
> I can get:
> 1.
>   1 
>   2 
> 2.
>   1 
> easily enough, but how can I get the main division number to repeat in the 
> subitem numeration?


>From core-itm.tex

% \startbuffer
% \item
%   \startitemize[n]
%   \item item 1.1
%   \item item 1.2
%   \startitemize[n] \item item 1.2.1 \item item 1.2.2 \stopitemize
%   \item item 1.3
%   \stopitemize
% \item
%   \startitemize[n] \item item 2.1 \item item 2.2 \stopitemize
% \item item 3
%   \startitemize[n] \item item 3.1 \item item 3.2 \stopitemize
% \item
%   \startitemize[n] \item item 4.1 \item item 4.2 \stopitemize
% \stopbuffer
%
% \startitemize[n,repeat,6*broad,packed] \getbuffer \stopitemize 
\blank[3*big]
% \startitemize[n,repeat,packed] \getbuffer \stopitemize 
\blank[3*big]
% \setupitemize[each][atmargin][width=3em]
% \startitemize[n,repeat,packed] \getbuffer \stopitemize

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


[NTG-context] Size of fences, factor key

2018-04-21 Thread Mikael P. Sundqvist
Dear Hans and others,

I'm usually use the \big, \Big, \bigg etc to get the size of parentheses,
brackets and braces to be the size I want. I realize that the fences
machinery is probably a cleaner way of doing this.

I tried it a bit, and it usually gives the result I like. But sometimes
not, and it seems that the way to change the size of the
parentheses/brackets/braces is to use the factor key.

1) Are the different options none, auto NUMBER explained somehere?
2) Could one have, for exceptional cases where the default is not
satisfactory, a keyword like factor=big for example, to get the same size
as if one would have used \big?

I am a bit confused. See the example below, with output (from latest
standalone) attached.

/Mikael

PS: I would suggest to have
 italic   = { feature = 'ss01', value = 1, comment = "Mathematical
Alternative Lowercase Italic" },
set in lucida-opentype-math.lfg. In all books (on math) I have seen, I
think this is what is used.

%%% Example file:

\setupbodyfont[lucidaot]

\definemathfence[Set][left="007B,right="007D,command=yes]

\startbuffer
\startformula
\Set{x\in\mathbb R~:~x^2=1}
\stopformula
\stopbuffer


\startTEXpage[offset=3bp]

\startformula
\{x\in\mathbb R~:~ x^2=1\}%Too small
\stopformula

\startformula
\bigl\{x\in\mathbb R~:~ x^2=1\bigr\}%I like this one
\stopformula

\startformula
\Bigl\{x\in\mathbb R~:~ x^2=1\Bigr\}%Too big
\stopformula

\getbuffer

\setupmathfence[Set][factor=1]%I like this one
\getbuffer

\setupmathfence[Set][factor=auto]%Too big
\getbuffer

%\setupmathfence[Set][factor=big]%Perhaps this could work? Or size=big or
something
%\getbuffer
\stopTEXpage


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

Re: [NTG-context] Unwanted whitespace for tables and enumerations after \inmargin headings

2014-04-19 Thread Wolfgang Schuster

Am 19.04.2014 um 02:11 schrieb Rik Kabel :

> On 2014-04-18 17:36, Aditya Mahajan wrote:
>> On Fri, 18 Apr 2014, Thangalin wrote:
>> 
>>> Hi Rik,
>>> 
>>> The example isn't quite as minimal as it could be... Here is a
>>> simplified version demonstrating the problem:
>>> 
>>> \setuplayout[backspace=4cm]
>>> 
>>> \define[2]\MarginHead{\inmargin{#1 #2}}
>>> 
>>> \setuphead[section][
>>> alternative=text,
>>> command=\MarginHead,
>>> ]
>>> 
>>> \defineitemgroup[itemz]
>>> \setupitemgroup[itemz][each][joinedup]
>>> 
>>> \startbuffer[Item]
>>> \startitemz
>>>   \item Item
>>>   \item Item
>>> \stopitemz
>>> \stopbuffer
>>> 
>>> \starttext
>>> \section{No Whitespace}
>>> No extra whitespace before items.
>>> \getbuffer[Item]
>>> 
>>> \section{Extra Whitespace}
>>> \getbuffer[Item]
>>> Unexpected extra whitespace before items.
>>> \stoptext
>> 
>> Here is one way to get rid of the extra white-space. I could not figure out 
>> a clean way of adding this signal to the setup.
>> 
>> \setuplayout[backspace=6cm, leftmargin=5.5cm]
>> 
>> \define[2]\MarginHead{\inmargin{#1 #2}}
>> 
>> \setuphead[section]
>>  [
>>command=\MarginHead,
>>alternative=text,
>>distance=\zeropoint,
>>  ]
>> 
>> \unprotect
>>  \def\SIGNAL{\hskip\d_strc_itemgroups_signal}
>> \protect
>> \defineitemgroup[itemz]
>> \setupitemgroup[itemz][each][joinedup]
>> 
>> \startbuffer[Item]
>>  \startitemz
>>\item Item
>>\item Item
>>  \stopitemz
>> \stopbuffer
>> 
>> \starttext
>>  \section{No Whitespace}
>>  No extra whitespace before items.
>>  \getbuffer[Item]
>> 
>>  \section{Extra Whitespace} \SIGNAL
>>  \getbuffer[Item]
>>  Unexpected extra whitespace before items.
>> \stoptext
> 
> Pretty ugly, but thank you for that, Aditya.
> 
> Is there a similar kludge for tabulate? (That was part of my original 
> problem, removed in the subsequent simplification of the example.)

\setuphead
  [section]
  [alternative=text,
   command=\SectionCommand,
   distance=0pt,
   insidesection={\blank[overlay]}]

\define[2]\SectionCommand
  {\inmargin{#1 – #2}}

\setuplayout[backspace=4cm]

\starttext

\startsection[title={First}]

\input ward

\stopsection

\startsection[title={Second}]

\startitemize
\item One
\item Two
\stopitemize

\stopsection

\startsection[title={Third}]

\starttabulate
\NC Knuth \NC \input{knuth} \NC\NR
\NC Tufte \NC \input{tufte} \NC\NR
\stoptabulate

\stopsection

\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] math symbol: blacktriangle

2012-07-18 Thread Andreas Mang
Hi,

Thanks Hans. It works for me :) Relating the output (\blacktriangleright and 
\blacktriangle) to some figure I have created with latex + tikz I do not see 
any difference. 

Cheers,
Andreas
 
Am Jul 18, 2012 um 10:37 AM schrieb Hans Hagen:

> Hi,
> 
> I uploaded a new beta .. still not ok I guess:
> 
> \setuplayout[header=0pt,footer=0pt,height=middle,width=middle]
> \setupbodyfont[dejavu,10pt]
> 
> \startbuffer
> \starttabulate[|||pT|]
> \HL
> \NC \type{\blacktriangle } \NC \blacktriangle  \NC 
> \meaning\blacktriangle  \NC \NR
> \NC \type{\blacktriangledown } \NC \blacktriangledown  \NC 
> \meaning\blacktriangledown  \NC \NR
> \NC \type{\blacktriangleleft } \NC \blacktriangleleft  \NC 
> \meaning\blacktriangleleft  \NC \NR
> \NC \type{\blacktriangleright} \NC \blacktriangleright \NC 
> \meaning\blacktriangleright \NC \NR
> \HL
> \NC \type{\triangle }  \NC \triangle   \NC 
> \meaning\triangle   \NC \NR
> \NC \type{\bigtriangleup}  \NC \bigtriangleup  \NC 
> \meaning\bigtriangleup  \NC \NR
> \NC \type{\triangledown }  \NC \triangledown   \NC 
> \meaning\triangledown   \NC \NR
> \NC \type{\bigtriangledown}\NC \bigtriangledown\NC 
> \meaning\bigtriangledown\NC \NR
> \NC \type{\triangleleft }  \NC \triangleleft   \NC 
> \meaning\triangleleft   \NC \NR
> \NC \type{\triangleright}  \NC \triangleright  \NC 
> \meaning\triangleright  \NC \NR
> \HL
> \stoptabulate
> \stopbuffer
> 
> \starttext
> 
> \switchtobodyfont[modern-designsize] \subject{modern-designsize} 
> \getbuffer \blank
> \switchtobodyfont[modern]\subject{modern} 
> \getbuffer \blank
> \switchtobodyfont[xits]  \subject{xits} 
> \getbuffer \blank
> \switchtobodyfont[pagella]   \subject{pagella} 
> \getbuffer \blank
> 
> \stoptext
> 
> I tend to taking xits as reference.
> 
> 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
> -

--
Andreas Mang, MSc
  Research Associate

UNIVERSITY OF LUEBECK
  INSTITUTE OF MEDICAL ENGINEERING

  Division of Computer Science, 
  Engineering and Natural Sciences

  Ratzeburger Allee 160, Building 64
  23562 Luebeck, Germany

  Phone: +49 (0) 451 500 5416
  Fax:   +49 (0) 451 500 5403
  m...@imt.uni-luebeck.de
  http://www.imt.uni-luebeck.de

___
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] new tricks in beta

2013-02-20 Thread Hans Hagen

Hi Aditya,

I made a mathstyle mechanism ... used in fences first:

\starttext

\startTEXpage[offset=1ex]

\def\TestMe#1%
  {\NC \ttbf #1
   \NC \ruledhbox{$\setupmathstyle[#1]x + x_j^2 + x_i^{e^2} + \frac{1}{x}$}
   \NC \ruledhbox{$\setupmathstyle[#1,small]x + x_j^2 + x_i^{e^2} + 
\frac{1}{x}$}

   \NC \NR}

\starttabulate[|l|r|l|]
\HL
\NC \NC \NC \ttbf ...,small \NC \NR
\HL
\TestMe{text}
\TestMe{text,cramped}
\TestMe{script}
\TestMe{script,cramped}
\TestMe{scriptscript}
\TestMe{scriptscript,cramped}
\TestMe{display}
\TestMe{display,cramped}
\HL
\stoptabulate

\stopTEXpage

\startTEXpage

$x\begingroup\setupmathstyle[script]x\endgroup x$ \par
$x{\setupmathstyle[script]x}x$ \par
$x\startmathstyle[script]x\stopmathstyle x$

\stopTEXpage

\definemathfence [scriptbracket] [bracket] 
[command=yes,color=red,mathstyle=script]
\definemathfence [smallbracket]  [bracket] 
[command=yes,color=green,mathstyle=small]

\definemathfence [normalbracket] [bracket] [command=yes,color=blue]

\startTEXpage[offset=1ex]

\startbuffer
test 
$a\frac{1}{normal}\scriptbracket{\frac{1}{script}}\normalbracket{\frac{1}{normal}}\smallbracket{\frac{1}{small}}c$ 
test \par

\stopbuffer

\getbuffer \setupmathfences [color=red] \getbuffer

\stopTEXpage

\stoptext

\starttext

\definemathfence [fancybracket] [bracket] [command=yes,color=blue]

test $|x|$ test \par
test $||x||$ test (okay) \par
test $a\left|\frac{1}{b}\right|c$ test \par
test $a\left||\frac{1}{b}\right||c$ test (not okay) \par

\startbuffer
test $a\fenced[bar]{\frac{1}{b}}c$ test \par
test $a\fenced[doublebar]{\frac{1}{b}}c$ test \par
test $a\fenced[bracket]{\frac{1}{b}}c$ test \par
test $a\fancybracket{\frac{1}{b}}c$ test \par
\stopbuffer

\getbuffer \setupmathfences [color=red] \getbuffer

\stoptext

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] math problems in last beta (cont-en and cont-xp)

2009-03-23 Thread Aditya Mahajan

On Mon, 23 Mar 2009, Lutz Haseloff wrote:


Hi Hans, hi Taco, hi all,

testing math with the latest ConTeXt beta i found some problems.
My test file is:

\usetypescriptfile[type-buy]
\def\currentfontname
{\ctxlua{tex.print(font.getfont(font.current()).fullname)}}
\starttext
\startbuffer[mathbuffer]
\currentfontname

$a^2 + b^2 = c^2$

$E = mc^2 \bigotimes \sum$

$α^2 + β^2 = γ^2$
\blank[big]
\stopbuffer
\getbuffer[mathbuffer]
\usetypescript[lucida][texnansi]
\setupbodyfont[lucida]
\getbuffer[mathbuffer]
\usetypescript[cambria]
\switchtotypeface[cambria]
\getbuffer[mathbuffer]
\usetypescript[palatino]
\switchtotypeface[palatino]
\getbuffer[mathbuffer]
\stoptext


For using old type-1 math fonts, you need to create virtual fonts.


Latin Modern and Palatino/px work very fine.


For LM, Palatino, and Times, the virtual fonts are created in math-vfu.lua


Lucida lacks greek and some operators. I found no embedded LucidaNewMath
fonts
in the resulting pdf.


There are no virtual fonts for Lucida math. In principle, one just needs 
to translate math-lbr to lua syntax. I will try to do that, but I need 
someone to test the results, since I do not have Lucida fonts myself.



Cambria has a very ugly spacing.


Luatex does not do kerning for utf math right now. This will be handled 
correcrly in the future.



btw. in the wiki is described a ConTeXt command \showmathcharacters.
This seems not to work anymore. The related file math-run.tex is not
input at the time of format generation.


\ShowCompleteFont{name:Cambria-Math}{10pt}{1}


P.S. will the key [texnansi] (or [ec]) remain necessary to switch to
LucidaBright?


For text fonts, yes. Normally math fonts use an independent encoding.

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


Re: [NTG-context] Problems with "mathalign"

2007-01-03 Thread Aditya Mahajan
On Wed, 3 Jan 2007, Mojca Miklavec wrote:

> Hello,
> 
> I wanted to keep Aditya busy now that he finished his wonderful new
> module ;), so ...
> 
> 
> I first wanted to ask how to number subformulas in a certain way, but
> that I figured out that numbering is already causing some problems on
> its own.
> 
> 
> Consider the following examples:
> 
> \starttext
> 
> This is almost OK, but has one formula number too much here:
> 
> \startbuffer
> \placeformula
> \startformula
> \startalign[m=2,distance=3cm]
> a & =b
>   & A & =B \\
> c & =d
>   & C & =D \\
> \stopalign
> \stopformula
> \stopbuffer
> \typebuffer
> \getbuffer

Do not use the latex syntax.

> This results in a very weird formula numbering

Something is broken. AFAIK, this should not give you any number.

> \startbuffer
> \placeformula
> \startformula
> \startalign[m=2,distance=3cm]
>   \NC a \NC =b
>   \NC A \NC =B \NR
>   \NC c \NC =d
>   \NC C \NC =D \NR
> \stopalign
> \stopformula
> \stopbuffer
> \typebuffer
> \getbuffer
> 
> Adding [+] helps, but than we have the same problem as at the beginning:

Adding [+] is necessary.

> \startbuffer
> \placeformula
> \startformula
> \startalign[m=2,distance=3cm]
>   \NC a \NC =b
>   \NC A \NC =B \NR[+]
>   \NC c \NC =d
>   \NC C \NC =D \NR[+]
> \stopalign
> \stopformula
> \stopbuffer
> \typebuffer
> \getbuffer

I can confirm that there is an extra number. I do not know what is 
causing this. I am not aware of anything in core-mat has changed.

I compiled My Way on mathalign, and everything has an extra number. 
hmm...

> Without placeforumla, but with [+] we don't get any numbering at all:

Yes you need the placefurmula.

> 
> \startbuffer
> \startformula
> \startalign[m=2,distance=3cm]
>   \NC a \NC =b
>   \NC A \NC =B \NR[+]
>   \NC c \NC =d
>   \NC C \NC =D \NR[+]
> \stopalign
> \stopformula
> \stopbuffer
> \typebuffer
> \getbuffer
> 
> \stoptext
> 
> CtxTools | context version: 2006.12.27 11:34
> (After running "ctxtools --update" I just managed to break everything.)
> 
> Any clue?

Something is broken.

Aditya
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Interlinear translations in Context

2018-12-03 Thread Hans Hagen

On 12/3/2018 10:29 AM, Huseyin Özoguz wrote:

Hello,

I have now the challenge in a book to set an interlinear translation. 
That is two languages word-by-word (original above translation), so the 
sentence structure follows the originals language, like its common in 
many scientific bible translations.


My problem: The TABLES are not suitable, because

1. I have to determine in advance, how many words are in the row, which 
depens obviously on the page-width and widths of the words.


2. Its not readable and well editable, because in Context (and most 
other languages) one has to write the table in rows and not in columns, 
as I need it for interlinear translations.


Example:

\bTABLE
\bTR \bTD word 1, language 1\eTD \bTD word 2, language 1\eTD \bTD word 
3, language 1\eTD \eTR
\bTR \bTD word 1, language 2\eTD \bTD word 2, language 2\eTD \bTD word 
3, language 2\eTD \eTR

\eTABLE

So I can not make this into and simple macro \interlinear{#1}{#2}, which 
I could use this way:


\interlinear{word 1, language 1}{word 1, language 2}
\interlinear{word 2, language 1}{word 2, language 2}
\interlinear{word 3, language 1}{word 3, language 2}

(all three blocks in the same horizontal line, if no linebreak is needed)

On top of this, the language 1 (arabic) is right-to-left (so language 2 
(german) must follow), it should be compatible with right-to-left 
reading someway. I tried with \framed, but failed, because the framed 
blocks are set one under the other, not side by side. How can I achieve 
a nice way with this simple readable macros?

Processing this might give you some ideas:

\usemodule[art-01]\setupbodyfont[dejavu,12pt]

\defineruby[auto]  [align=auto,color=darkred]
\defineruby[left]  [align=flushleft,color=darkred]
\defineruby[right] [align=flushright,color=darkred]
\defineruby[spread][stretch=yes]

\showframe \showglyphs \showfontkerns \setupinterlinespace[22pt]

\starttext

\startbuffer
\dorecurse{20}{\ruby{XYZ}{a|bc|d} }\par
\dorecurse{20}{\ruby{PQR}{p|q|r} }\par
\dorecurse{20}{\ruby{XYZ}{1|22|333} }\par
\dorecurse{20}{\ruby{XYZ}{111|222|333} }\par
\dorecurse{20}{\ruby{XYZ}{foobar} }\par
\dorecurse{20}{\ruby{XYZ}{fooledbar} }\par
\dorecurse{20}{\ruby[spread]{XYZ}{fooledbar} }\par
\dorecurse{20}{\ruby{extremely}{wide} }\par
\dorecurse{20}{\ruby{wide}{extremely} }\par
 stopbuffer

\testfeatureonce{1}{\start \setupinterlinespace[16pt] 
\setupruby[location=none]   \getbuffer \stop \page}
\testfeatureonce{1}{\start \setupinterlinespace[16pt] 
\setupruby[location=right]  \getbuffer \stop \page}
\testfeatureonce{1}{\start \setupinterlinespace[28pt] 
\setupruby[align=auto,color=darkred]\getbuffer \stop \page}
\testfeatureonce{1}{\start \setupinterlinespace[28pt] 
\setupruby[align=flushleft,color=darkgreen] \getbuffer \stop \page}
\testfeatureonce{1}{\start \setupinterlinespace[28pt] 
\setupruby[align=flushright,color=darkblue] \getbuffer \stop \page}
\testfeatureonce{1}{\start \setupinterlinespace[28pt] 
\setupruby[align=middle,color=darkyellow]   \getbuffer \stop \page}


\stoptext

--

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Reg. fonts and math

2006-01-13 Thread Hans Hagen

Aditya Mahajan wrote:


No, I mean the complicated math is much harder in context. Consider

\begin{align}
 a &= b \\
 c &= d \notag \\
   &= f \notag \\
   &= g
\end{align}

which will typeset as

 a = b(1)
 c = d
   = f
   = g(2)

\begin{subequations}
\begin{align}
 a &= b \\
 c &= d
\end{align}
\end{subequations}

Compare this from how to do this in context (see the wiki). You have 
to *manually* set the number of the subequation. Actually, for 
equation numbering and refering, the context way is rather limited. 
Consider something like an align environment


a &= b\\
c &= d\\
e &= f

Suppose, I want to refer to the second equation.  In latex, I can 
simply add \label{eq:2} and the end of c&= d and then \ref{eq:2}. For 
context, the reference label goes at the top, with \placeformula[eqs]. 
But I am not sure, how to give individual labels to each equations.


this 'loose label' is one of the ugliest concept i can think of -)

i'm willing to implement anything reasonable but since i  hardly use 
such math i only act on 'i want to achieve this' kind of specs (i have 
no time to read tons of tex documents)


much if this 'complicated' math is not that complicated to support,see 
attached file


btw, defaulting to numbers and then using \notag is messy; i prefer 
readable code, even if it takes more  bytes;  inventing a formula takes 
more time than keying it in.  Also, more structure,  means more hooks 
for configurability


Hans





% some simple math constructs

\unprotect

\def\numberedeqalign
  {\doifelse\@@fmlocation\v!left\leqalignno\eqalignno}

\def\doalignNR[#1][#2]%
  {\doifsomething{#1}
 {\doifelse{#1}{+}
{\doformulanumber[][#2][]{}}
{\doformulanumber[#1][#2][]{

\long\def\startalign#1\stopalign
  {\def\NC{\crcr\def\NC1{&1}}%
   \def\EQ{&=}
   \def\NR{&\dodoubleempty\doalignNR}%
   % amstex compatibility mode:
   \def\notag{\def\\{&\crcr}}%
   \def\\{&\doalignNR[+][]\crcr}%
   % end of compatibility mode
   \numberedeqalign{#1\relax}}

%D \startbuffer
%D \placeformula \startformula \eqalignno {
%D  a &= b & \formulanumber \cr
%D  c &= d \cr
%D&= e \cr
%D&= f & \formulanumber
%D } \stopformula
%D \stopbuffer
%D
%D \typebuffer \getbuffer
%D
%D \startbuffer
%D \placeformula \startformula \startalign
%D \NC  a \EQ b \NR[+]
%D \NC  c \EQ d \NR
%D \NC\EQ f \NR[for:hans]
%D \NC\EQ g \NR[for:whoelse][a]
%D \NC    \EQ h \NR[for:whomore][b]
%D \NC\EQ i \NR
%D \stopalign \stopformula
%D \stopbuffer
%D
%D \typebuffer \getbuffer
%D
%D \startbuffer
%D \placeformula \startformula \startalign
%D \NC a \EQ b \NR[+]
%D \NC c \EQ d \NR
%D \NC   \EQ f \NR
%D \NC   \EQ g \NR
%D \NC   \EQ h \NR
%D \NC   \EQ i \NR[+]
%D \stopalign \stopformula
%D \stopbuffer
%D
%D \typebuffer \getbuffer
%D
%D \startbuffer
%D \placeformula \startformula \startalign
%D a &= b \\
%D c &= d \notag \\
%D   &= e \notag \\
%D   &= f \\
%D \stopalign \stopformula
%D \stopbuffer
%D
%D \typebuffer \getbuffer
%D
%D \startbuffer
%D \placeformula \startformula \startalign
%D a &= b \NR[+]
%D c &= d \NR
%D   &= e \NR
%D   &= f \NR[+]
%D \stopalign \stopformula
%D \stopbuffer
%D
%D \typebuffer \getbuffer
%D
%D \startbuffer
%D \placeformula \startformula \startalign
%D \NC  a \NC \eq  b \NR[+]
%D \NC  c \NC \neq d \NR
%D \NC\NC \neq f \NR[for:hans]
%D \NC\NC \geq g \NR[for:whoelse][a]
%D \NC\NC \leq h \NR[for:whomore][b]
%D \NC\NC \neq i \NR
%D \stopalign \stopformula
%D \stopbuffer
%D
%D \typebuffer \getbuffer

\protect \endinput
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Fielstack and Layers for Presentation

2006-10-14 Thread Peter Rolf
Hi Renaud,

I tried your example code and it is really fun. But you should exchange
the buffers with setups to minimize runtime. On my machine it's 4x
faster this way. I'll better not imagine, how often you have compiled
your example code, before it reached this nice and clean state ;)

Renaud AUBIN wrote:
> Hi all,
> 
> After several trial-error experiments, I obtained what I want with the
> attached code. I use only one background for the frames within
> definesymbol because the use of several background "failed" (only the
> last one is eventually displayed). Now, I would like to know if it is
> possible to obtain a deterministic random-like shapes, i.e. to get
> always the same shape for Overlay1...
>
What I can think of is to initialize the random seed value of MP (name?)
with the same value, every time before you fill a new layer. Another way
would be to add the 'random' parameters to your FrameTitle macro. But I
don't have much experience with random stuff, so there maybe better ways.

Greetings, Peter

> Renaud
> 
> PS: Thanks to Peter, Andrea and Hans for the thread absolute positioning
> of figures ;)
> 
> \setupcolors[state=start]
> \usemodule[pre-original]
> 
> \defineoverlay[FunnyFrame][\useMPgraphic{FunnyFrame}]
> \defineframedtext[FunnyText][frame=off,background=FunnyFrame]
> \def\StartFrame{\startFunnyText}
> \def\StopFrame {\stopFunnyText }
> \def\FrameTitle#1%
> {\setMPtext{FunnyFrame}{\hbox spread 1em{\hss\strut#1\hss}}}
> \setMPtext{FunnyFrame}{\hbox spread 1em{\hss\strut{TEST}\hss}} %
> initialize the text variable
> \startuseMPgraphic{FunnyFrame}
> picture p ; numeric o ; path a, b ; pair c ;
> p := textext.rt(\MPstring{FunnyFrame}) ;
> a := unitsquare xyscaled(OverlayWidth,OverlayHeight) ;
> o := BodyFontSize ;
> p := p shifted (2o,OverlayHeight-ypart center p) ;
> drawoptions (withpen pencircle scaled 1pt withcolor .625red) ;
> b := a randomized (o/2) ;
> fill b withcolor .85white ; draw b ;
> c := center p ;
> c := b intersectionpoint (c shifted (0,-o)--c shifted(0,o)) ;
> p := p shifted (c-center p) ;
> b := (boundingbox p) randomized (o/8) ;
> fill b withcolor .85white ; draw b ;
> draw p withcolor black;
> setbounds currentpicture to a ;
> \stopuseMPgraphic
> 
> \starttext
> 
> \Topic{Stacks \& Layers}
> 
> \startbuffer[buf1]
>   \FrameTitle{Overlay1}
>   \StartFrame[width=.75\textwidth]
> This is the first funny frame !
>   \StopFrame
> \stopbuffer
> 
> \startbuffer[buf2]
>   \FrameTitle{Overlay2}
>   \StartFrame[width=.75\textwidth]
> This is the second funny frame !
>   \StopFrame
> \stopbuffer
> 
> \startbuffer[buf3]
>   \FrameTitle{Overlay3}
>   \StartFrame[width=.75\textwidth]
> This is the third funny frame !
>   \StopFrame
> \stopbuffer
> 
> \definelayer[layer1][]
> \definelayer[layer2][]
> \definelayer[layer3][]
> 
> \setlayer[layer1][x=.05\textwidth,y=.05\textheight,location=br]{\getbuffer[buf1]}
> 
> \setlayer[layer2][x=.05\textwidth,y=.05\textheight,location=br]{\getbuffer[buf1]}
> \setlayer[layer2][x=.1\textwidth,y=.1\textheight,location=br]{\getbuffer[buf2]}
> 
> \setlayer[layer3][x=.05\textwidth,y=.05\textheight,location=br]{\getbuffer[buf1]}
> \setlayer[layer3][x=.1\textwidth,y=.1\textheight,location=br]{\getbuffer[buf2]}
> \setlayer[layer3][x=.15\textwidth,y=.15\textheight,location=br]{\getbuffer[buf3]}
> 
> \defineoverlay[overlay1][{\placelayer[layer1]}]
> \defineoverlay[overlay2][{\placelayer[layer2]}]
> \defineoverlay[overlay3][{\placelayer[layer3]}]
> 
> \definesymbol[one][{\framed[width=\textwidth,height=.3\textheight,background=overlay1,frame=off]{}}]
> \definesymbol[two][{\framed[width=\textwidth,height=.3\textheight,background=overlay2,
> align=right,frame=off]{}}]
> \definesymbol[three][{\framed[width=\textwidth,height=.3\textheight,background=overlay3,
> align=right,frame=off]{}}]
> 
> \definefieldstack[sequence][one,two,three][height=fit,width=fit,frame=off,offset=overlay,clickin=JS(Walk_Field{sequence})]
> 
> {{\fieldstack[sequence]}}
> \goto{next}[JS(Walk_Field{sequence})]
> 
> \stoptext
> 
> ___
> ntg-context mailing list
> ntg-context@ntg.nl
> http://www.ntg.nl/mailman/listinfo/ntg-context
> 
> 

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] Linenumering inside floats

2015-06-30 Thread Aditya Mahajan

Hi,

I am forwarding a feature request for the t-vim module:
https://github.com/adityam/filter/issues/21

Is there a way to enable line numbering inside floats:

\definefloat[sourcecode][sourcecodes]

\startbuffer
\startlinenumbering
  \input tufte
\stoplinenumbering
\stopbuffer

\starttext
\startplacesourcecode
  \getbuffer
\stopplacesourcecode

\getbuffer
\stoptext

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
___

[NTG-context] xtable (\getbuffer vs. \processxtablebuffer)

2011-11-24 Thread Andreas Harder
Hi Hans,

it seems \processtablebuffer ignores the table settings (at least the 
stretch-option).

\starttext

\startbuffer[my:xtable]
  \startxtable[option=stretch]
\startxrow
  \startxcell alpha \stopxcell
  \startxcell beta  \stopxcell
  \startxcell gamma \stopxcell
\stopxrow
  \stopxtable
\stopbuffer

\getbuffer[my:xtable]\blank
\processxtablebuffer[my:xtable]

\stoptext


Regards
Andreas
___
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] Dividing dimensions

2009-03-23 Thread Wolfgang Schuster


Am 23.03.2009 um 08:15 schrieb Alan BRASLAU:


Can someone explain this?
The solutions posted in lua seem more complicated
than that using \dimexpr

I will add further examples to
http://wiki.contextgarden.net/Expressions
(or someone else can do this directly, of course)
once I understand the advantages and limitations.



Here is a example document.

Wolfgang


\starttext

\setupwhitespace[line]

Our todays question is how to divide two dimension and compare their
result with the result of another division, to do this we assign values
two four dimensions.

\startbuffer
\dimen0=15pt
\dimen2=20pt
\dimen4=15pt
\dimen6=30pt
\stopbuffer

\typebuffer \getbuffer

Because we can use \ETEX\ functions with \CONTEXT\ let's try to use  
them,

the following example should work:

\startbuffer
\ifdim\dimexpr\dimen0/\dimen2\relax<\dimexpr\dimen4/\dimen6\relax
Second number is bigger.
\else
First number is bigger.
\fi
\stopbuffer

\typebuffer \getbuffer

This seems to be working but did it also work when the first result of
the second division is bigger.

\startbuffer
\dimen6=15pt

\ifdim\dimexpr\dimen0/\dimen2\relax<\dimexpr\dimen4/\dimen6\relax
Second number is bigger.
\else
First number is bigger.
\fi
\stopbuffer

\typebuffer \getbuffer

This seems to be weird because we still get as result that the first  
number
is bigger but why did this happen? Let's take a closer look at the  
real values

of the dimensions and their results after the divison.

Dimen0 has a value of \the\dimen0{} which is \number\dimen0{} in  
scaled points.
Only the second value in scaled points is important for our  
calculation, we wan't
to also know what the value of the second dimensions is: \number 
\dimen2. The last
we want to know is the result of the division from the two number,  
this is

\number\dimexpr\dimen0/\dimen2\relax.

Before I want to say if this number is or good let's see what the  
value of
the second number is before we changed the value for dimension 6 and  
after

we changed it:

\startlines
Before: \dimen6=30pt \number\dimexpr\dimen4/\dimen6\relax
After:  \dimen6=15pt \number\dimexpr\dimen4/\dimen6\relax
\stoplines

The result is always 1 and not very helpful for us, you can see, if  
you to divide
two number which are nearly equal the result in \TEX\ is not ver  
helpful, to compensate
this we can multiply the first number in the division to get a better  
result.


We try this first with the pure number before we include this in the  
\type{\ifdim}

text we wanted.

\startlines
Result 1: \number\dimexpr\dimen0*100/\dimen2\relax
Result 2: \number\dimexpr\dimen4*100/\dimen6\relax
\stoplines

This gives us now to higher number we can compare with reliable results.
We will now try to test both this with our number above again.

\startbuffer
\dimen6=30pt

\ifdim\dimexpr\dimen0*100/\dimen2\relax<\dimexpr 
\dimen4*100/\dimen6\relax

Second number is bigger.
\else
First number is bigger.
\fi
\stopbuffer

\typebuffer \getbuffer

\startbuffer
\dimen6=15pt

\ifdim\dimexpr\dimen0*100/\dimen2\relax<\dimexpr 
\dimen4*100/\dimen6\relax

Second number is bigger.
\else
First number is bigger.
\fi
\stopbuffer

\typebuffer \getbuffer

You can see both tests give us a correct result after we multiplied  
the first
number in each division by 100 but should we rely on such limitations  
in \TEX\

when we can also use \LUATEX\ to get a correct result.

The \type{tex.dimen} function allows us to access the dimen register  
from \TEX\ in Lua.


\startbuffer
\dimen6=30pt

\startluacode
if tex.dimen[0] / tex.dimen[2] < tex.dimen[4] / tex.dimen[6] then
tex.sprint("Second number is bigger.")
else
tex.sprint("First number is bigger.")
end
\stopluacode
\stopbuffer

\typebuffer \getbuffer

\startbuffer
\dimen6=15pt

\startluacode
if tex.dimen[0] / tex.dimen[2] < tex.dimen[4] / tex.dimen[6] then
tex.sprint("Second number is bigger.")
else
tex.sprint("First number is bigger.")
end
\stopluacode
\stopbuffer

\typebuffer \getbuffer

The output is now correct in both values without any tricks.

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


[NTG-context] buffering inside xmlsetups

2016-10-11 Thread Meer, Hans van der
A problem I am obviously not able to solve.
It can be described as follows.

I have an xmlsetup .. that typesets texcode embedded in an xml 
document. Now it is needed to embed initializing a buffer and typesetting 
lateron with \getbuffer. Alas, doing the following does not woek:

\startbuffer[name]
bufferdata
\stopbuffer

because the TeX input hangs. My guess being that the \stopbuffer fails to 
terminate the data intake.

I then tried to split off the buffer filling with a separate xmlsetup. But here 
too, the TeX input halts:

% Usage: 
\startxmlsetups xmlcommon:buffer
\startbuffer[name=\xmlatt{#1}{name}]
\xmlflush{#1}
\stopbuffer
\stopxmlsetups
% Usage: 
\startxmlsetups xmlcommon:getbuffer
\xmlflushcontext{\getbuffer[name=\xmlatt{#1}{name}]}
\stopxmlsetups

and as input: inputdata followed by .
The getbuffer setup is not even reached, as is obvious.

I tried \xmltofile to put the data into an intermediate file, but to no avail 
because it produces the following, leading at best to recursion when processed 
by \xmlprocessfile.




bufferdata


Is there a solution to this?

Hans van der Meer




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

Re: [NTG-context] buffering inside xmlsetups

2016-10-11 Thread Wolfgang Schuster

Meer, Hans van der <mailto:h.vanderm...@uva.nl>
11. Oktober 2016 um 14:43
A problem I am obviously not able to solve.
It can be described as follows.

I have an xmlsetup .. that typesets texcode embedded in an 
xml document. Now it is needed to embed initializing a buffer and 
typesetting lateron with \getbuffer. Alas, doing the following does 
not woek:


\startbuffer[name]
bufferdata
\stopbuffer

because the TeX input hangs. My guess being that the \stopbuffer fails 
to terminate the data intake.


I then tried to split off the buffer filling with a separate xmlsetup. 
But here too, the TeX input halts:


% Usage: 
\startxmlsetups xmlcommon:buffer
\startbuffer[name=\xmlatt{#1}{name}]
\xmlflush{#1}
\stopbuffer
\stopxmlsetups
% Usage: 
\startxmlsetups xmlcommon:getbuffer
\xmlflushcontext{\getbuffer[name=\xmlatt{#1}{name}]}
\stopxmlsetups

and as input: inputdata followed by .
The getbuffer setup is not even reached, as is obvious.

I tried \xmltofile to put the data into an intermediate file, but to 
no avail because it produces the following, leading at best to 
recursion when processed by \xmlprocessfile.





bufferdata


Is there a solution to this?

\setbuffer[]...\endbuffer

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

Re: [NTG-context] Line numbering in two column layout conflicts with marking

2019-12-09 Thread Oliver von Criegern

Any suggestions, how to solve this problem?

Am 02.12.19 um 20:06 schrieb Oliver von Criegern:

Dear list members,

line numbering in a two column layout apparently conflicts with the 
marking mechanism.


Consider the following example:


\setupcolumns[n=2]

\setuplinenumbering
    [
    step=5,
    method=page,
    align=flushright,
    ]

\definemarking[Test]

\setupheadertexts[{\fetchmark[Test][top] -- \fetchmark[Test][bottom]}]

\startbuffer
\dorecurse{12}{words }
\stopbuffer

\starttext
\startcolumns
\startlinenumbering
\marking[Test]{ONE}ONE \dorecurse{12}{\getbuffer}\par
\marking[Test]{TWO}TWO \dorecurse{29}{\getbuffer}\par
\marking[Test]{THREE}THREE \dorecurse{12}{\getbuffer}\par
\stoplinenumbering
\stopcolumns
\stoptext


In the result, the header of the first page reads "ONE -- THREE", 
despite marking "THREE" being placed in the third line of the second 
page.


Without linenumbering, the header of the first page reads "ONE -- 
TWO", as is to be expected.


Best regards,
Oliver



--
Dr. Oliver von Criegern
Referat für IT und Digital Humanities
Bayerische Akademie der Wissenschaften
Alfons-Goppel-Str. 11
80539 München
Tel.: 089-23031-1310

___
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] wrong heights in TABLE

2010-03-09 Thread Peter Münster
Hello,

Here a better minimal example-test-file:

\startbuffer
\setupTABLE[c][1,2,3][height=4ex]
\bTABLE[width=0.2\textwidth]
\bTR
\bTH 1. col\eTH
\bTH 2. col\eTH
\doifmode{wa2}{\bTH 3. col\eTH}
\eTR
\bTR
\bTD 1 row in 1. col\eTD
\bTD[nr=2] 2 rows in 2. col\eTD
\doifmode{wa2}{\bTD\eTD}
\eTR
\bTR
\bTD[nr=2] 2 rows in 1. col\eTD
\doifmode{wa2}{\bTD\eTD}
\eTR
\bTR
\doifmodeelse{wa1}{\bTD[nr=2] 2 rows in 2. col\eTD}{%
  \bTD[nr=4] 4 rows in 2. col\eTD}
\doifmode{wa2}{\bTD\eTD}
\eTR
\bTR
\bTD[nr=2] 2 rows in 1. col\eTD
\doifmode{wa2}{\bTD\eTD}
\eTR
\bTR
\doifmode{wa1}{\bTD[nr=2] 2 rows in 2. col\eTD}
\doifmode{wa2}{\bTD\eTD}
\eTR
\bTR
\bTD 1 row in 1. col\eTD
\doifmode{wa2}{\bTD\eTD}
\eTR
\eTABLE
\stopbuffer
\starttext
Problem:\blank
\getbuffer\blank
Workaround 1:\blank
\enablemode[wa1]
\getbuffer\blank
Workaround 2:\blank
\disablemode[wa1]
\enablemode[wa2]
\getbuffer
\stoptext

TIA for any hint!
Cheers, Peter

-- 
Contact information: http://pmrb.free.fr/contact/


___
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] new upload

2022-12-27 Thread Floris van Manen via ntg-context

i get an error running the sample code:


\starttext

\defineorientation[test][orientation=down,vertical=top]

\startbuffer[b]
\definetabulatemove[a][xoffset=40pt]
\definetabulatemove[b][orientation=test,yoffset=depth]

\starttabulate[|c|c|]
\TM[a] \NC \darkred   cell one   \NC \darkgray cell one   \NC \NR
\TM[b] \NC \darkgreen cell one   \NC \darkblue cell one   \NC \NR
\TM[a] \NC \darkred   cell two   \NC \darkgray cell two   \NC \NR
\TM[b] \NC \darkgreen cell two   \NC \darkblue cell two   \NC \NR
\TM[a] \NC \darkred   cell three \NC \darkgray cell three \NC \NR
\TM[b] \NC \darkgreen cell three \NC \darkblue cell three \NC \NR
\TM[a] \NC \darkred   cell four  \NC \darkgray cell four  \NC \NR
\TM[b] \NC \darkgreen cell four  \NC \darkblue cell four  \NC \NR
\stoptabulate
\stopbuffer

\start \showmakeup[line] \showstruts \ruledvbox{\getbuffer[b]} \stop
\start   \showstruts \ruledvbox{\getbuffer[b]} \stop
\start   \ruledvbox{\getbuffer[b]} \stop

\startbuffer[b]
\definetabulatemove[a][xoffset=20pt]

\starttabulate[|p|p|]
\TM[a] \NC \darkred   \samplefile{tufte} \NC \darkgray \samplefile{ward} 
\NC \NR
   \NC \darkgreen \samplefile{tufte} \NC \darkblue 
\samplefile{ward} \NC \NR
\TM[a] \NC \darkred   \samplefile{tufte} \NC \darkgray \samplefile{ward} 
\NC \NR
   \NC \darkgreen \samplefile{tufte} \NC \darkblue 
\samplefile{ward} \NC \NR

\stoptabulate
\stopbuffer

\start \small \small \showmakeup[line] \showstruts \getbuffer[b] \stop

\stoptext








$ context context\ 17.tex
resolvers   | globbing | confusing filename, name: 'CHANGELOG', 
lower: 'changelog', already: 'ChangeLog'


resolvers   | formats | executing runner 'run luametatex format': 
/home/vm/context/tex/texmf-linux-64/bin/luametatex --jobname="./context 
17.tex" 
--fmt=/home/vm/context/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.fmt 
--lua=/home/vm/context/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.lui 
 --c:currentrun=1 --c:fulljobname="./context 17.tex" 
--c:input="./context 17.tex" --c:kindofrun=1 --c:maxnofruns=9 
--c:texmfbinpath="/home/vm/context/tex/texmf-linux-64/bin"

Segmentation fault (core dumped)

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

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Size of fences, factor key

2018-04-24 Thread Mikael P. Sundqvist
On Sat, Apr 21, 2018 at 7:30 PM, Mikael P. Sundqvist 
wrote:

> Dear Hans and others,
>
> I'm usually use the \big, \Big, \bigg etc to get the size of parentheses,
> brackets and braces to be the size I want. I realize that the fences
> machinery is probably a cleaner way of doing this.
>
> I tried it a bit, and it usually gives the result I like. But sometimes
> not, and it seems that the way to change the size of the
> parentheses/brackets/braces is to use the factor key.
>
> 1) Are the different options none, auto NUMBER explained somehere?
> 2) Could one have, for exceptional cases where the default is not
> satisfactory, a keyword like factor=big for example, to get the same size
> as if one would have used \big?
>
> I am a bit confused. See the example below, with output (from latest
> standalone) attached.
>
> /Mikael
>
> PS: I would suggest to have
>  italic   = { feature = 'ss01', value = 1, comment = "Mathematical
> Alternative Lowercase Italic" },
> set in lucida-opentype-math.lfg. In all books (on math) I have seen, I
> think this is what is used.
>
> %%% Example file:
>
> \setupbodyfont[lucidaot]
>
> \definemathfence[Set][left="007B,right="007D,command=yes]
>
> \startbuffer
> \startformula
> \Set{x\in\mathbb R~:~x^2=1}
> \stopformula
> \stopbuffer
>
>
> \startTEXpage[offset=3bp]
>
> \startformula
> \{x\in\mathbb R~:~ x^2=1\}%Too small
> \stopformula
>
> \startformula
> \bigl\{x\in\mathbb R~:~ x^2=1\bigr\}%I like this one
> \stopformula
>
> \startformula
> \Bigl\{x\in\mathbb R~:~ x^2=1\Bigr\}%Too big
> \stopformula
>
> \getbuffer
>
> \setupmathfence[Set][factor=1]%I like this one
> \getbuffer
>
> \setupmathfence[Set][factor=auto]%Too big
> \getbuffer
>
> %\setupmathfence[Set][factor=big]%Perhaps this could work? Or size=big or
> something
> %\getbuffer
> \stopTEXpage
>

I hate to do this, but a small *bump*

(If it is unclear what I'm asking for, I could try to clarify)

/Mikael
___
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] fontfamily not loaded anymore

2018-12-09 Thread Wolfgang Schuster

Hi Pablo,

where did you get the files for GFS Didot from because all packages
I found use the name GFSDidot.otf for the upright style of the font while
you have a file with the name GFSDidot-Regular.otf on your system.

Wolfgang


Pablo Rodriguez schrieb am 09.12.18 um 09:02:

Dear list,

I have the following source:

 \definefontfamily[mainface][rm][GFS Bodoni]
 \definefontfamily[mainface][hw][GFS Artemisia]
 \definefontfamily[mainface][ss][GFS Neohellenic]
 \definefontfamily[mainface][tt][GFS Didot]
 %[tf=file:{GFSDidot-Regular.otf}]
 \setupbodyfont[mainface]
 \startbuffer
   α β γ δ ε ζ\\
   {\em α β γ δ ε ζ}\\
   {\bf α β γ δ ε ζ}\\
   {\bf α β γ δ ε ζ}\\
 \stopbuffer
 \starttext
   \startTEXpage[offset=1em]
 \getbuffer
 \tt\getbuffer
 \ss\getbuffer
 \hw\getbuffer
   \stopTEXpage
 \stoptext

All typefaces are loaded fine, except GFS Didot. Unless I specify the
file for tf, any GFS Didot font isn’t loaded. I’m experiencing this with
the latest betas.

The error I get from ConTeXt is:

selectfont  > The requested font 'GFS Didot' has no files for the
'tf' alternative, Latin Modern is used instead.

"mtxrunjit --script --fonts --list --all" shows in the relevant lines:

gfsartemisiabold  gfsartemisia   gfsartemisiabold   GFSArtemisiaBold.otf
gfsartemisiabolditalic   gfsdidot  gfsartemisiabolditalic
GFSArtemisiaBoldIt.otf
gfsartemisiaitalic  gfsartemisia   gfsartemisiaitalicGFSArtemisiaIt.otf
gfsartemisianormal  gfsartemisia   gfsartemisiaregular   GFSArtemisia.otf
gfsartemisiaregulargfsartemisia   gfsartemisiaregular   GFSArtemisia.otf
gfsbodonibold   gfsbodoni gfsbodoniboldGFSBodoniBold.otf
gfsbodonibolditalicgfsbodoni gfsbodonibolditalic   GFSBodoniBoldIt.otf
gfsbodoniitalic   gfsbodoni gfsbodoniitalic  GFSBodoniIt.otf
gfsbodoninormal   gfsbodoni gfsbodoniregular   GFSBodoni.otf
gfsbodoniregular  gfsbodoni gfsbodoniregular   GFSBodoni.otf
gfsdidotboldgfsdidot  gfsdidotbold   GFSDidotBold.otf
gfsdidotbolditalic  gfsdidot  gfsdidotbolditalicGFSDidotBoldItalic.otf
gfsdidotitalicgfsdidot  gfsdidotitalic   GFSDidotItalic.otf
gfsdidotnormalgfsdidot  gfsdidotregular  GFSDidot-Regular.otf
gfsdidotregular   gfsdidot  gfsdidotregular  GFSDidot-Regular.otf
gfsneohellenicbold  gfsneohellenic   gfsneohellenicbold
GFSNeohellenicBold.otf
gfsneohellenicbolditalic   gfsneohellenic   gfsneohellenicbolditalic
GFSNeohellenic-BoldItalic.otf
gfsneohellenicitalic   gfsneohellenic   gfsneohellenicitalic
GFSNeohellenicIt.otf
gfsneohellenicnormal   gfsneohellenic   gfsneohellenicregular
GFSNeohellenic.otf
gfsneohellenicregulargfsneohellenic   gfsneohellenicregular
GFSNeohellenic.otf

Why is the specification of the file for the tf style with GFS Didot needed?

Many thanks for your help,

Pablo


___
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] simpleslides help needed

2012-07-24 Thread Pavneet Arora

Ah, I got it now!

\quotation is quite different from \{start|stop}quotation.  I was attempting to 
affect the changes using just \quotation{}, which has no (or in my case 
asymmetrical and strange) effects on the margins, at least within simpleslides.


Now, I don't know whether there should be a difference in behaviour, but there 
definitely is.  When I simply integrated your \setupdelimitedtext and 
\{start|stop}narrower into my existing slide presentation, there was no change. 
 As I kept reducing the presentation there still was no change in behaviour 
until the only thing staring up at me was \quotation{}.


Glad I chased this down even though it might have been painful for others to 
read of my bumbling about.  It gives me another core piece for doing my 
presentations.


Cheers.


On 12-07-24 12:22 AM, Wolfgang Schuster wrote:


You’re doing to wrong, below you can see two different ways to have a quotation 
with margins. The first method uses the quotation environment where you can 
control the margin with the leftmargin and “rightmargin keys, the second method 
uses the quotation command which is put in a narrower environment to create the 
margins/offset.

\showframe[text][text]

\startbuffer
Pito Salas, a developer at ATG, decided to attack this problem.
After a few months of studying existing real-world examples,
it became clear that the data, views of that data, and the
formulas that acted on that data were very separate concepts.
Yet in every case, the existing spreadsheet programs required
the user to type all of these items into the same (typically
single) sheet’s cells.%
\stopbuffer

\starttext

\startquotation \getbuffer \stopquotation

\setupdelimitedtext[quotation][leftmargin=3cm]

\startquotation \getbuffer \stopquotation

\quotation{\getbuffer}

\startnarrower[3*middle]
\quotation{\getbuffer}
\stopnarrower

\stoptext

Wolfgang



--
-
- Pavneet Arora

Waroc Fine Audio + Custom Home Cinema
www.waroc.com  416.937.WAROC (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
___


Re: [NTG-context] numbered subitems

2007-09-30 Thread Alan Bowen

Thanks, Aditya, I have adapted this as follows—
\startbuffer
\item item 1
\startitemize[n,stopper={},width=1em]
\item item 1.1
   \item item 1.2
   \item item 1.3
\stopitemize
\item item 2
 \startitemize[n,stopper={},width=1em]
  \item item 2.1
   \item  item 2.2
   \item item 2.3
  \stopitemize
\item item 3
\startitemize[n,stopper={},width=1em]
   \item  item 3.1
   \item  item 3.2
  \stopitemize
\stopbuffer
%
\setupitemize[n,serried,packed,joinedup]
\startitemize[repeat]\getbuffer\stopitemize

and everything works, except that I cannot seems get the subitems  
indented. Right now they fall directly beneath the main items.


All best, Alan




On Sep 30, 2007, at 12:28 PM, Aditya Mahajan wrote:


On Sun, 30 Sep 2007, Alan Bowen wrote:


I need to produce an lengthy itemization of the form:
1.
1.1 
1.2 
2.
2.1 

I can get:
1.
1 
2 
2.
1 
easily enough, but how can I get the main division number to  
repeat in the

subitem numeration?




From core-itm.tex


% \startbuffer
% \item
%   \startitemize[n]
%   \item item 1.1
%   \item item 1.2
%   \startitemize[n] \item item 1.2.1 \item item 1.2.2 \stopitemize
%   \item item 1.3
%   \stopitemize
% \item
%   \startitemize[n] \item item 2.1 \item item 2.2 \stopitemize
% \item item 3
%   \startitemize[n] \item item 3.1 \item item 3.2 \stopitemize
% \item
%   \startitemize[n] \item item 4.1 \item item 4.2 \stopitemize
% \stopbuffer
%
% \startitemize[n,repeat,6*broad,packed] \getbuffer \stopitemize
\blank[3*big]
% \startitemize[n,repeat,packed] \getbuffer \stopitemize
\blank[3*big]
% \setupitemize[each][atmargin][width=3em]
% \startitemize[n,repeat,packed] \getbuffer \stopitemize

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


Re: [NTG-context] beta

2011-07-15 Thread Wolfgang Schuster

Am 15.07.2011 um 13:43 schrieb Andreas Harder:

> If I'm getting you right, this should work?
> 
> \startbuffer
>  \setupbodyfont[modern]
>  \setupblank[medium]
>  \showframe
> \stopbuffer
> 
>  \getbuffer % \setupblank[medium] not applied
> \starttext
> % \getbuffer % \setupblank[medium] applied
> 
>  \dorecurse{17}{\dorecurse{35}{test }\par\blank}
> \stoptext

No, there are a few settings which can only be set *after* \starttext because
ConTeXt resets them at this point.

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] Export \thinspace

2011-11-07 Thread Andreas Harder
Hi Hans!

If one uses the HZ-algorithm the behavior of (the exported) \thinspace depends 
on the line break.

\definefontfeature[default][default][expansion=quality] \setupalign[hz]
\setupbackend[export=yes,css=yes,xhtml=yes]

\starttext
  \startbuffer
narrow\,nonbreaking\,space 
  \stopbuffer
  \getbuffer \par \dorecurse{10}{\getbuffer}
\stoptext

exports to:

narrownonbreakingspace
  
narrow nonbreaking …

Would it be possible to export \, to  ?


Regards
Andreas
___
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] buffers

2006-08-01 Thread Hans van der Meer

On Aug 1, 2006, at 0:21, Aditya Mahajan wrote:

> On Mon, 31 Jul 2006, Hans van der Meer wrote:
>
>> The ConTeXt manual tells me on page 237:
>>
>>  You can define your own buffer with:
>>  \definebuffer[...]
>>  ... name
>>  After this command /getbuffer and \typebuffer are available where
>> buffer is the name of the buffer.
>>
>
> If you just want to "tag" buffers, you do not need to define new ones.
> You can simply do
>
> \startbuffer[test]
> Hello world
> \stopbuffer
>
> \typebuffer[test]
>
> \getbuffer[test]
>

Thanks, that solved it.

Hans van der Meer



___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] new beta

2015-08-03 Thread Hans Hagen

Hi,

I uploaded a new beta. The reported bidi issue with footnotes had to do 
with some unhboxing that doesn't play well with the bidi analyzers, i.e. 
in case of


  

the done text is already treated. I now use a slightly different 
implementation.


I also added the arabicdecimals conversion.

There is also a new feature called profiling which is very experimental 
and falls into the 'over the top' category (it's not the fastest 
mechanism around).


\setupbodyfont[dejavu]

% methods: none strict fixed|haldfixed|quaterfixed|eightsfixed
% where fixed also adapts to grid snapping

\defineprofile
  [myprofile]
  [method=quarterfixed,
   height=\strutht,
   depth=\strutdp,
   distance=3pt]

\startbuffer
\dostepwiserecurse{1}{400}{5}{just a test #1 $\frac{x}{#1}^{#1}$ and 
}done\par

\stopbuffer

\starttext

\startTEXpage[align=normal,strut=no]
\getbuffer
\stopTEXpage

\startTEXpage[align=normal,strut=no,profile=myprofile]
\getbuffer
\stopTEXpage

\enabletrackers[profiling.show]
\startTEXpage[align=normal,strut=no,profile=myprofile]
\getbuffer
\stopTEXpage
\disabletrackers[profiling.show]

\stoptext

In everyday use this feature is not that interesting but for special 
cases it might come in handy.


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] protrusion with opening exclamation and question marks

2018-08-29 Thread Hans Hagen

On 8/29/2018 10:12 PM, Pablo Rodriguez wrote:

Hi Hans,

I have the following sample:

 \definefontfeature[default][default]
 [protrusion=quality]

 \setupxtable[frame=off, option=stretch]

 \startbuffer[standard]
 ¿Cómo?

 ¡No!
 \stopbuffer

 \startbuffer[right]
 \hfill¿Cómo?

 \hfill¡No!
 \stopbuffer

 \starttext
 \startTEXpage[offset=2em]
 \startembeddedxtable[framecolor=red, align=hanging,
 foregroundstyle={\ss\bfd}, offset=overlay]
 \startxrow
 \startxcell[leftframe=on] \getbuffer[standard]\stopxcell
 \stopxrow
 \startxrow[toffset=2em]
 \startxcell[rightframe=on] \getbuffer[right]\stopxcell
 \startxcell[rightframe=on, align=nothanging]
 \getbuffer[right]\stopxcell
 \stopxrow
 \stopembeddedxtable
 \stopTEXpage
 \stoptext

It shows that question and exclamation marks are sligtly protruded.

Well, in Spanish (and Galician in some ortographies) there are opening
exclamation and quotation marks.

I think it would make sense to have the same protrusion values for
opening quotation and exclamation marks as for the closing ones.

you need to patch font-imp-quality.lua:

vectors['punctuation'] = {

[0x003F] = { 0,0.20 }, -- ?
[0x00BF] = { 0.20, 0}, -- ¿
[0x0021] = { 0,0.20 }, -- !
[0x00A1] = { 0.20, 0,   }, -- ¡





-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Line numbering in two column layout conflicts with marking

2019-12-18 Thread Oliver von Criegern

So there seems to be no solution for this?

Am 09.12.19 um 15:18 schrieb Oliver von Criegern:

Any suggestions, how to solve this problem?

Am 02.12.19 um 20:06 schrieb Oliver von Criegern:

Dear list members,

line numbering in a two column layout apparently conflicts with the 
marking mechanism.


Consider the following example:


\setupcolumns[n=2]

\setuplinenumbering
    [
    step=5,
    method=page,
    align=flushright,
    ]

\definemarking[Test]

\setupheadertexts[{\fetchmark[Test][top] -- \fetchmark[Test][bottom]}]

\startbuffer
\dorecurse{12}{words }
\stopbuffer

\starttext
\startcolumns
\startlinenumbering
\marking[Test]{ONE}ONE \dorecurse{12}{\getbuffer}\par
\marking[Test]{TWO}TWO \dorecurse{29}{\getbuffer}\par
\marking[Test]{THREE}THREE \dorecurse{12}{\getbuffer}\par
\stoplinenumbering
\stopcolumns
\stoptext


In the result, the header of the first page reads "ONE -- THREE", 
despite marking "THREE" being placed in the third line of the second 
page.


Without linenumbering, the header of the first page reads "ONE -- 
TWO", as is to be expected.


Best regards,
Oliver



--
Dr. Oliver von Criegern
Referat für IT und Digital Humanities
Bayerische Akademie der Wissenschaften
Alfons-Goppel-Str. 11
80539 München
Tel.: 089-23031-1310

___
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] Another indenting problem

2010-12-03 Thread Andreas Harder

Am 03.12.2010 um 15:45 schrieb Wolfgang Schuster:

> 
> Am 03.12.2010 um 13:03 schrieb Andreas Harder:
> 
>> Hi all,
>> 
>> it took me a while to track this down. It seems that if one uses \in[…] and 
>> \footnote{…} in the same paragraph the following \noindentation-command is 
>> ignored. Here is an example:
> 
> You’re wrong, the indentation for the blockquote comes from the leftmargin 
> setting which indents the whole paragraph at the left and the right margin, 
> you can change this and the real indentation with
> 
> \setupdelimitedtext[blockquote][indenting=no,leftmargin=no]

Hello Wolfgang,

thanks for replying.  That's not what I want; I've made a new example. The 
problem occurs only in the first case (with \in[] and \footnote{} in the 
paragraph)

\setupindenting[big,yes]
\setupdelimitedtext[blockquote][indenting={yes,next},style=red]
% \setupdelimitedtext[blockquote][before=\noindentation,style=red]

\starttext  \showframe[text][text]
\startbuffer
\startblockquote
  \dorecurse{3}{Is this paragraph indented? It should not!}\par
  \dorecurse{3}{Is this paragraph indented? It should! }
\stopblockquote
\stopbuffer

Test \in[someref] test\footnote{footnote}.  \getbuffer % not OK!
Test test\footnote{footnote}.   \getbuffer % OK
Test \in[someref] test. \getbuffer % OK
\stoptext

Greeting
Andreas___
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] buffers (append)

2013-01-14 Thread Alan BRASLAU
On Mon, 14 Jan 2013 09:34:08 +0100
Wolfgang Schuster  wrote:

> 
> Am 14.01.2013 um 09:00 schrieb Alan BRASLAU :
> 
> > Hello,
> > 
> > In addition to \startbuffer \stopbuffer
> > it would be nice to have \startappendbuffer \stopappendbuffer.
> > 
> > I see that the lua function buffer.append() exists but I have not
> > worked-out how to add this functionality cleanly as conTeXt macros.
> > I imagine that this might be quite trivial for our TeX programming
> > experts... (for once, a [useful?] suggestion that in the end will
> > not entail many hours of work? :)
> 
> 
> \startbuffer[a]
> Line 1
> \stopbuffer
> 
> \startbuffer[b]
> Line 2
> \stopbuffer
> 
> \starttext
> 
> \startlines
> \getbuffer[a,b]
> \stoplines
> 
> \stoptext
> 
> Wolfgang

Thank you Wolfgang, this is useful.

However, it would still be helpful to be able to generically add to a
buffer without having to rename a new one. Shouldn't be very difficult
but I did not find that anything like this already exists. I often
think this way when I teach, adding steps to an example while repeating
the previous steps.

\startbuffer[a]
Line 1
\stopbuffer

\getbuffer[a]

\startaddtobuffer[a]
Line 2
\stopaddtobuffer

\getbuffer[a]

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] \typebuffer with typing style

2009-06-08 Thread Matthijs Kooijman
Hi,

I'm trying to use a buffer together with a custom typing style using the
latest beta with MkIV, but so far I've only managed to do this using \startFOO
and \stopFOO inside the buffer:

\definetyping[FOO][option=FOO]

\startbuffer[bar]
\startFOO
baz
\stopFOO
\stopbuffer

\getbuffer[bar]


Since the \getbuffer is really inside some self-defined command, I'd like to
put the startFOO / stopFOO in there as well. However, I can't seem to find a
way to do this, since \startFOO \getbuffer[bar] \stopFOO gives me compile
errors. It seems the canonical way to define typing and buffers is using
\typebuffer, but that only seems to work with the default typing style. I'd
like to do the following:

\definetyping[FOO][option=FOO]

\startbuffer[bar]
baz
\stopbuffer

\typebuffer[FOO][bar]

From looking at buff-ini.mkiv it seems typebuffer has some code to handle a
second argument, but it seems to always throw it away (as far as I can
understand this Tex stuff... :-).

Is there some way to achieve this? Would it be good to make \typebuffer
support this if there isn't?

Gr.

Matthijs


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


Re: [NTG-context] expansion problem with \getbuffer again (mkiv)

2009-10-01 Thread Hans Hagen

Peter Rolf wrote:

Hi,

the attached example works with mkii, but breaks with mkiv. Here is the 
error message I get (beta 28.09.2009):


systems : begin file test at line 1
! Missing \endgroup inserted.

   \endgroup

  \vskip
\stopblankhandling ...ional \someblankdone \vskip
 \blankskip \fi \endgroup
l.3 \stopblankhandling
\dovspacing ...argument #1\else \s!default \fi ")}

  \leavevmode

l.20 \setlayer[FOO]{\getbuffer[FOO]}
  ?
! Emergency stop.

   \endgroup

  \vskip
\stopblankhandling ...ional \someblankdone \vskip
 \blankskip \fi \endgroup
l.3 \stopblankhandling
\dovspacing ...argument #1\else \s!default \fi ")}

  \leavevmode

l.20 \setlayer[FOO]{\getbuffer[FOO]}
  !  ==> Fatal error occurred, no output 
PDF file produced!MTXrun | run 1: luatex 
--fmt="r:/tex/texmf-cache/luatex-cache/context/d0b787cd25b9175dc4eaa276af366360/formats/cont-en" 
--lua="r:/tex/texmf-cache/luatex-cache/context/d0b787cd25b9175dc4eaa276af366360/formats/cont-en.lui" 
--backend=pdf "./test"

MTXrun | fatal error, return code: 1


here is a patch (can't update right now, in the middle of something else)

\def\startblankhandling
  {\par
   \ifvmode
 \expandafter\dostartblankhandling
   \else
 \expandafter\nostartblankhandling
   \fi}

\def\nostartblankhandling#1\stopblankhandling
  {}

\def\dostartblankhandling
  {\begingroup
   \setfalse\someblankdone
   \the\everybeforeblankhandling}


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] XeConTeXt and Euler

2007-03-18 Thread nicola
Hi,
I'm pretty new to ConTeXt, so please bear with me if the following has 
already been asked (I have not found any answer in the archives, though).

My goal is to use an arbitrary text font together with the Euler math 
font. I am able to use a few combinations in ConTeXt, e.g. Palatino with 
Euler, without problems. But when I switch to XeConTeXt (to use my 
system's fonts), some Euler's math accents do not show up properly 
(\hat) or not at all (\acute, \grave, \bar, \breve, \dot, \ddot, \tilde, 
\check).

I guess the problem is the different encoding (and possibly the use of 
virtual fonts), but I know that Euler works in XeTeX: is it possible to 
make it work in XeConTeXt? Below you find my sample code.

Nicola

%!TEX TS-program = XeConTeXt
%!TEX encoding = UTF-8 Unicode

\definetypeface[Charis][rm][Xserif][Charis SIL][default][encoding=uc]
\definetypeface[Doulos][rm][Xserif][Doulos SIL][default][encoding=uc]
\definetypeface[Gentium][rm][Xserif][Gentium][default][encoding=uc]

\definetypeface[Charis][mm][math][euler][euler] % encoding???
\definetypeface[Doulos][mm][math][euler][euler]
\definetypeface[Gentium][mm][math][euler][euler]

\startbuffer
Unicode text works fine here, but formulas do not:
\startformula
\breve x^n + \bar y^n = \hat z^n.
\stopformula
\stopbuffer

\starttext
\switchtobodyfont[Charis] \getbuffer
\switchtobodyfont[Doulos] \getbuffer
\switchtobodyfont[Gentium] \getbuffer
\showmathcharacters
\stoptext
\end

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] International characters in math

2005-07-02 Thread Radhelorn

Adam Lindsay wrote:

\definetypeface[somename][mm][math][euler][euler]
\setupbodyfont[somename]
\starttext
$$\sqrt{\acute{a}+\bar{b}+\dot{c}}$$
\stoptext

I don't get any accents. Am I doing something wrong?



No, I am.

You can verify further by adding:
\loadmapfile[original-ams-base]
\showmathcharacters

The normal text-ish accents are not present in the eulervm fonts. I
suppose the rationale is that these are never to be used for text (but
it becomes questionable when you don't have an overbar or dot!) 


I have tried to figure out how to get them from other fonts, but am at a
loss, in terms of the general case.

No one has mentioned it before now, so I didn't try that hard. :) 


Anyone have any suggestions on what approach to take, or what they'd
like to see?


Apart from creating some new virtual euler font with accents I can not 
see any solution. Beforementioned commands (\acute ...) do not work in 
\mbox and \hbox in math mode (writes about '{' and '}' missing).


Another strange thing. After this sequence:

\usetypescript [modern-base] [t2a] % just for example
\setupbodyfont [modern]

\definetypeface[mytf][mm][math][euler][euler]

\startbuffer
$$\sqrt{\acute{a}+\bar{b}+\dot{c}}$$
\stopbuffer

\starttext
\getbuffer
\switchtobodyfont[mytf]
\getbuffer
\switchtobodyfont[modern]
\getbuffer
\stoptext

Third formula remains roman. Why so?


--
Radhelorn <[EMAIL PROTECTED]>

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] Re: Toggling the symbol for the zero-width joiner and related Unicode control characters

2023-09-22 Thread Hans Hagen

Hi,

I found it ...

\startbuffer
\definedfont[almfixed*default]hello w\zwnj o\zwj r\zwnj l\zwj d
\stopbuffer

\getbuffer

\start
\setcharacterstripping[1]
\getbuffer
\stop

so now, being its only user, you have to wikify it ...

Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | 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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Center two frames

2015-01-14 Thread Wolfgang Schuster

> Am 14.01.2015 um 13:14 schrieb Pablo Rodriguez :
> 
> \defineframed
>   [Myframed]
>   [width=0.6\textwidth,
>foregroundstyle={\switchtobodyfont[10pt]},
>align={high,flushleft},
>frame=off,
>framecolor=0.625white,
>background=borderline,
>]

You can replace the framed command with a framed text environment, e.g.

\defineframedtext
  [Myframed]
  [width=0.6\textwidth,
   foregroundstyle={\switchtobodyfont[10pt]},
   align={high,flushleft},
   frame=off,
   framecolor=0.625white,
   background=borderline,
   location=middle,
   offset=.5ex]

and change

> \startmidaligned
> \Myframed{\getbuffer}
> \stopmidaligned

to

\startMyframed
\getbuffer
\stopMyframed

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] next beta

2017-06-12 Thread Hans Hagen

Hi,

experimental in next beta:

\starttext

test

\startbuffer
\placeformula
\startformula
x\dorecurse{100}{+#1x^{#1x}}=10
\stopformula

test

\startformula
x\dorecurse{100}{+#1x^{#1x}}=10
\stopformula

test
\stopbuffer

\par \setupformula[split=no]  \getbuffer \par
\par \setupformula[split=yes] \getbuffer \par

\stoptext

i.e. (poor mans) multiline display math

Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Buffer within a \def

2018-08-10 Thread Wolfgang Schuster



Procházka Lukáš Ing. schrieb am 10.08.18 um 13:31:

Hello,

I'm not very familiar with using buffers, so a basic question:

Is it possible to use buffers within a \def?


No.


The following sample doesn't compile:


\def\T{
  \startbuffer[Buf]
a b ccc
d e f
  \stopbuffer
  \getbuffer[Buf]
}


\def\T
  {\setbuffer[Buf]a b ccc d e f\endbuffer
   \getbuffer[Buf]}

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
___

[NTG-context] Test for existence of a Ctx buffer by Lua

2011-01-28 Thread Procházka Lukáš Ing . - Pontex s . r . o .

Hello,

how to test by Lua whether a Ctx buffer exists?

---
\startbuffer[A]
  Aaa aaa
\stopbuffer

\starttext
  \getbuffer[A]
  Test
  %\getbuffer[NonExisting]
  Vvv
\stoptext
---

To get something like 'context.buffers.A' -> no-nil and 
'context.buffers.NonExisting' -> nil?

Best regards,

Lukas


--
Ing. Lukáš Procházka [mailto:l...@pontex.cz]
Pontex s. r. o.  [mailto:pon...@pontex.cz] [http://www.pontex.cz]
Bezová 1658
147 14 Praha 4

Tel: +420 244 062 238
Fax: +420 244 461 038

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


<    1   2   3   4   5   6   7   8   9   10   >