[NTG-context] Referencing formulas doesn't work?

2020-02-09 Thread Jon Wong
MWE:

\starttext

The famous result (and again) is given by
\placeformula[formulalabel]
\startformula
c^2 = a^2 + b^2.
\stopformula
And now we can refer to formula \ref[][formulalabel].

\stoptext

There is a blank where the formula label should be at “now we can refer to 
formula ---“.

Regards
Jon
___
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] Entity to receive donations?

2019-12-27 Thread Jon Wong
Thanks! So if I wanna write a book about ConTeXt, and want to give half of book 
sales proceeds to ConTeXt group, the official beneficiary I should list is 
“ConTeXt Group”?

> On 27 Dec 2019, at 3:55 PM, Henri Menke  wrote:
> 
> On 12/27/19 4:49 PM, Jon Wong wrote:
>> Is there a formal entity for ConTeXt to receive donations? What about 
>> receiving earnings?
> 
> https://group.contextgarden.net/payment.shtml
> 
>> ___
>> 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
>> ___
> ___
> 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
> ___
___
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] Entity to receive donations?

2019-12-26 Thread Jon Wong
Is there a formal entity for ConTeXt to receive donations? What about receiving 
earnings?
___
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] Watermark is behind \externalfigure

2019-12-26 Thread Jon Wong
Any way to put the watermark in front?
___
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] Using TestBackground inside Offset

2019-12-23 Thread Jon Wong
Is it possible? I get “missing endgroup inserted” error.
___
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] Macro expansion macros not defined

2019-12-20 Thread Jon Wong
expandtwoargsafter
___
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] How to get subsubject to show numbering in TOC?

2019-12-20 Thread Jon Wong
Is it \setuplist[subsubject][headnumber=yes]?
___
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] Formatting spaces for \placelistof ?

2019-12-12 Thread Jon Wong
Sorry for the noise. \setupsynonyms[term][width=X].

But I can’t get textstyle to work. Tried bold too.

How do I insert a blank line between entries?

> On Dec 13, 2019, at 3:23 PM, Jon Wong  wrote:
> 
> Space between the term (left column) and the definition (right column) is too 
> small.
> 
> \definesynonyms[term][terms][\deffull]
> \setupsynonyms[term][textstyle=cap]
> \placelistofterms

___
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] Formatting spaces for \placelistof ?

2019-12-12 Thread Jon Wong
Space between the term (left column) and the definition (right column) is too 
small.

\definesynonyms[term][terms][\deffull]
\setupsynonyms[term][textstyle=cap]
\placelistofterms
___
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] Textbackground inside Layer?

2019-12-05 Thread Jon Wong
\setupwhitespace[line] % A line's spacing between paragraphs.

\starttext

\definetextbackground[InfoText][
  location=paragraph, frame=on]

\definelayer[testlayer]
\setlayer[testlayer][x=1cm,y=3cm]{%
  \startInfoText
  \stopInfoText
}
\flushlayer[testlayer]

\stoptext

Doesn’t work. Only works if I put text inside the layer.
___
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] Place externalfigure anywhere on page

2019-12-04 Thread Jon Wong
A real float. Is that possible?
___
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] doifsomething vs iffirstargument in TABLE?

2019-09-12 Thread Jon Wong
Hi all,

If I use iffirstargument, the optional (first argument) is always seen as false.

If I use doifsomething, it works, but the “else” part is never executed when it 
should.

MWE:

\starttext

% \def\MyRow{\dosingleempty\doMyRow}
% \def\doMyRow[#1]#2#3#4#5{%
%   \bTR \bTD #2 \eTD %
%   \iffirstargument
% \bTD Replaced! \eTD %
%   \else
% \bTD #3 \eTD %
%   \fi
%   \bTD #4 \eTD \bTD #5 \eTD \eTR
% }

\def\MyRow{\dosingleempty\doMyRow}
\def\doMyRow[#1]#2#3#4#5{%
  \bTR \bTD #2 \eTD %
  \doifsomething{#1}
{\bTD Replaced! \eTD }%
{\bTD #3 \eTD }%
  \bTD #4 \eTD \bTD #5 \eTD \eTR
}

\bTABLE
\bTABLEbody
\MyRow{A}{B}{C}{D}
\MyRow[optional]{A}{B}{C}{D}
\eTABLEbody
\eTABLE

\stoptext


Regards
Jon

___
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] Loading OTF fonts?

2019-09-12 Thread Jon Wong
Hi all,

Oops. I think I’m failing at understanding font lookup folder. Maybe I need 
pointers on OSFONTDIR?

Specifying the full path works.

Regards
Jon


> On Sep 12, 2019, at 6:42 PM, Jon Wong  wrote:
> 
> Hi all,
> 
> I tried following this tex.sx answer: 
> https://tex.stackexchange.com/questions/453143/noto-cjk-font-not-usable-with-context
>  
> <https://tex.stackexchange.com/questions/453143/noto-cjk-font-not-usable-with-context>
> 
> Can someone give me an explanation of what I did wrong? Hit me with all the 
> technical concepts. I’m competent with fontspec on XeTeX.
> 
> Step 1: Copy NotoSerifCJKsc-Regular.otf to ~/context/tex/texmf-local/fonts
> 
> Step 2: Run `mtxrun --script font --convert NotoSerifCJKsc-Regular.otf'
> 
> Step 3: Run `mtxrun —script fonts --reload’
> 
> Step 4: Run `context test.tex’
> 
> The error:
> 
> fonts   > defining > unknown font 'NotoSerifCJKsc-Regular', loading 
> aborted
> 
> Regards
> Jon
> 

___
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] Loading OTF fonts?

2019-09-12 Thread Jon Wong
Hi all,

I tried following this tex.sx answer: 
https://tex.stackexchange.com/questions/453143/noto-cjk-font-not-usable-with-context
 


Can someone give me an explanation of what I did wrong? Hit me with all the 
technical concepts. I’m competent with fontspec on XeTeX.

Step 1: Copy NotoSerifCJKsc-Regular.otf to ~/context/tex/texmf-local/fonts

Step 2: Run `mtxrun --script font --convert NotoSerifCJKsc-Regular.otf'

Step 3: Run `mtxrun —script fonts --reload’

Step 4: Run `context test.tex’

The error:

fonts   > defining > unknown font 'NotoSerifCJKsc-Regular', loading 
aborted

Regards
Jon

___
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] hypertarget and hyperlink in ConTeXt?

2019-08-31 Thread Jon Wong
Hi all,

I’m having trouble getting \textreference to show up.

MWE:

\starttext

\textreference[bleh]{\bf Ref One}.

\page

\textreference[blah]{\bf Ref Two}.

\at[bleh].

\at[blah].

\stoptext


Regards
Jon


> On Aug 28, 2019, at 7:40 PM, Jon Wong  wrote:
> 
> Hi all,
> 
> Any way to do hypertarget and hyperlink in ConTeXt?
> 
> From https://www.contextgarden.net/Command/textreference: 
> <https://www.contextgarden.net/Command/textreference:> I see that the name of 
> the anchor is also the displayed text (“houses”).
> 
> Regards
> Jon
> 

___
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] My own marks

2019-08-31 Thread Jon Wong
Hi all,

Sorry, I corrected my MWE. As you can see, \currentitemnumber seems strange 
when used for \marking inside a nested itemize.

MWE:

\definemarking[M]

\startsetups S
  default=(\getmarking[M])~
  first=(\getmarking[M][first])~
  last=(\getmarking[M][last])~
  previous=(\getmarking[M][previous])~
  both=(\getmarking[M][both])~
  all=(\getmarking[M][all])~
  current=(\getmarking[M][current])
\stopsetups

\setupheadertexts[text]
  [\setups{S}][]
  [\setups{S}][]

\setuppagenumbering[location=footer]

\starttext

\startitemize[a]

\item
  \startitemize[n]
  \item \marking[M]{\currentitemnumber} \input{knuth}
  \item \marking[M]{\currentitemnumber} \input{knuth}
  \item \marking[M]{\currentitemnumber} \input{zapf}
  \item \marking[M]{\currentitemnumber} \input{knuth}
  \item \marking[M]{\currentitemnumber} \input{zapf}
  \stopitemize

\item
  \startitemize[n]
  \item \marking[M]{\currentitemnumber} \input{knuth}
  \item \marking[M]{\currentitemnumber} \input{knuth}
  \item \marking[M]{\currentitemnumber} \input{zapf}
  \item \marking[M]{\currentitemnumber} \input{knuth}
  \item \marking[M]{\currentitemnumber} \input{zapf}
  \stopitemize

\item
  \startitemize[n]
  \item \marking[M]{\currentitemnumber} \input{knuth}
  \item \marking[M]{\currentitemnumber} \input{knuth}
  \item \marking[M]{\currentitemnumber} \input{zapf}
  \item \marking[M]{\currentitemnumber} \input{knuth}
  \item \marking[M]{\currentitemnumber} \input{zapf}
  \stopitemize

\stopitemize

\stoptext


Regards
Jon


> On Aug 31, 2019, at 9:28 PM, Jon Wong  wrote:
> 
> Hi all,
> 
> It seems that \currentitemnumber won’t work for \marking if inside a nested 
> itemize?
> 
> MWE:
> 
> \definemarking[M]
> 
> \startsetups S
>  default=(\getmarking[M])~
>  first=(\getmarking[M][first])~
>  last=(\getmarking[M][last])~
>  previous=(\getmarking[M][previous])~
>  both=(\getmarking[M][both])~
>  all=(\getmarking[M][all])~
>  current=(\getmarking[M][current])
> \stopsetups
> 
> \setupheadertexts[text]
>  [\setups{S}][]
>  [\setups{S}][]
> 
> \setuppagenumbering[location=footer]
> 
> \starttext
> 
> \startitemize[n]
> 
> \item
>  \startitemize[a]
>  \item \marking{\currentitemnumber} [\currentitemnumber] \input{knuth}
>  \item \marking{\currentitemnumber} [\currentitemnumber] \input{knuth}
>  \item \marking{\currentitemnumber} [\currentitemnumber] \input{zapf}
>  \stopitemize
> 
> \item
>  \startitemize[a]
>  \item \marking{\currentitemnumber} [\currentitemnumber] \input{knuth}
>  \item \marking{\currentitemnumber} [\currentitemnumber] \input{knuth}
>  \item \marking{\currentitemnumber} [\currentitemnumber] \input{zapf}
>  \stopitemize
> 
> \stopitemize
> 
> \stoptext
> 
> 
> Regards
> Jon
> 
> 
>> On Aug 31, 2019, at 8:46 PM, Jon Wong  wrote:
>> 
>> Hi all,
>> 
>> How does \marking really work? Can’t seem to get \currentitemnumber into it.
>> 
>> MWE:
>> 
>> \definemarking[M]
>> 
>> \startsetups S
>> \getmarking[M]
>> \stopsetups
>> 
>> \setupheadertexts[\setups{S}][][][\setups{S}]
>> 
>> \starttext
>> 
>> \startitemize[n]
>> 
>> \item First item
>> \marking[M]{Really? \currentitemnumber}[\currentitemnumber]
>> \page
>> 
>> \item Second item
>> \marking[M]{Really? \currentitemnumber}[\currentitemnumber]
>> \page
>> 
>> \item Third item
>> \marking[M]{Really? \currentitemnumber}[\currentitemnumber]
>> 
>> \stopitemize
>> 
>> \stoptext
>> 
>> Regards
>> Jon
>> 
> 

___
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] My own marks

2019-08-31 Thread Jon Wong
Hi all,

It seems that \currentitemnumber won’t work for \marking if inside a nested 
itemize?

MWE:

\definemarking[M]

\startsetups S
  default=(\getmarking[M])~
  first=(\getmarking[M][first])~
  last=(\getmarking[M][last])~
  previous=(\getmarking[M][previous])~
  both=(\getmarking[M][both])~
  all=(\getmarking[M][all])~
  current=(\getmarking[M][current])
\stopsetups

\setupheadertexts[text]
  [\setups{S}][]
  [\setups{S}][]

\setuppagenumbering[location=footer]

\starttext

\startitemize[n]

\item
  \startitemize[a]
  \item \marking{\currentitemnumber} [\currentitemnumber] \input{knuth}
  \item \marking{\currentitemnumber} [\currentitemnumber] \input{knuth}
  \item \marking{\currentitemnumber} [\currentitemnumber] \input{zapf}
  \stopitemize

\item
  \startitemize[a]
  \item \marking{\currentitemnumber} [\currentitemnumber] \input{knuth}
  \item \marking{\currentitemnumber} [\currentitemnumber] \input{knuth}
  \item \marking{\currentitemnumber} [\currentitemnumber] \input{zapf}
  \stopitemize

\stopitemize

\stoptext


Regards
Jon


> On Aug 31, 2019, at 8:46 PM, Jon Wong  wrote:
> 
> Hi all,
> 
> How does \marking really work? Can’t seem to get \currentitemnumber into it.
> 
> MWE:
> 
> \definemarking[M]
> 
> \startsetups S
>  \getmarking[M]
> \stopsetups
> 
> \setupheadertexts[\setups{S}][][][\setups{S}]
> 
> \starttext
> 
> \startitemize[n]
> 
>  \item First item
>  \marking[M]{Really? \currentitemnumber}[\currentitemnumber]
>  \page
> 
>  \item Second item
>  \marking[M]{Really? \currentitemnumber}[\currentitemnumber]
>  \page
> 
>  \item Third item
>  \marking[M]{Really? \currentitemnumber}[\currentitemnumber]
> 
> \stopitemize
> 
> \stoptext
> 
> Regards
> Jon
> 

___
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] setupinterlinespace affects headers and footers

2019-08-31 Thread Jon Wong
Hi Wolfgang!

Sadly, it still didn’t work:

\startsetups[headertext]
  \startframed[frame=off,align=flushright,width=fit]
\setuplocalinterlinespace[12pt]
\the\baselineskip\\
abc
  \stopframed
\stopsetups

\setupheadertexts[\directsetup{headertext}]

\starttext

\setupinterlinespace[12pt]

{
\setuplocalinterlinespace[24pt]

\input{knuth}

\page

\input{knuth}

\page

\input{knuth}

}

\stoptext


Regards
Jon


> On Aug 31, 2019, at 9:05 PM, Wolfgang Schuster 
>  wrote:
> 
> Jon Wong schrieb am 31.08.2019 um 14:59:
>> Hi,
>> 
>> Yikes! Erm…
> For a local change of the interlinespace in the document use the 
> \setuplocalinterlinespace command.
> 
> 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] setupinterlinespace affects headers and footers

2019-08-31 Thread Jon Wong
Hi,

Yikes! Erm…

MWE:

\startsetups[headertext]
  \startframed[frame=off,align=flushright,width=fit]
{
\setupinterlinespace[12pt]
\the\baselineskip\\
abc

}
  \stopframed
\stopsetups

\setupheadertexts[\directsetup{headertext}]

\starttext

{
\setupinterlinespace[24pt]

\input{knuth}

\page

\input{knuth}

\page

\input{knuth}

}

\stoptext

Only the last page is immune to the double-spacing.

Regards
Jon


> On Aug 31, 2019, at 8:54 PM, Wolfgang Schuster 
>  wrote:
> 
> Jon Wong schrieb am 31.08.2019 um 09:25:
>> Hi all,
>> 
>> Can I limit \setupinterlinespace to body text only?
> 
> Example?
> 
> 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] My own marks

2019-08-31 Thread Jon Wong
Hi all,

How does \marking really work? Can’t seem to get \currentitemnumber into it.

MWE:

\definemarking[M]

\startsetups S
  \getmarking[M]
\stopsetups

\setupheadertexts[\setups{S}][][][\setups{S}]

\starttext

\startitemize[n]

  \item First item
  \marking[M]{Really? \currentitemnumber}[\currentitemnumber]
  \page

  \item Second item
  \marking[M]{Really? \currentitemnumber}[\currentitemnumber]
  \page

  \item Third item
  \marking[M]{Really? \currentitemnumber}[\currentitemnumber]

\stopitemize

\stoptext

Regards
Jon

___
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] setupinterlinespace affects headers and footers

2019-08-31 Thread Jon Wong
Hi all,

Can I limit \setupinterlinespace to body text only?

Regards
Jon

___
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] hypertarget and hyperlink in ConTeXt?

2019-08-28 Thread Jon Wong
Hi all,

Any way to do hypertarget and hyperlink in ConTeXt?

From https://www.contextgarden.net/Command/textreference: 
 I see that the name of 
the anchor is also the displayed text (“houses”).

Regards
Jon

___
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] startnarrower and framed?

2019-08-21 Thread Jon Wong
Hi all,

I’m so so sorry for yet another message in this thread. I’ve solved it, but 
still don’t quite understand why it works. I post the solution here so that 
nobody has to spend any time crafting the solution. But I still have 1 key 
question.

Key question: Why does \setwhitespace[line] prevent \blank[-0.5em] from working 
after a \framed?

(Ok. I better sleep before I pollute the mailing list further.)

Apparent Solution:

\usecolors[xwi]
\setupwhitespace[line]

\starttext
\definetextbackground[secondary][
  location=always,
  background=color,
  backgroundcolor=lightgray,
  leftoffset=.5\bodyfontsize,
  rightoffset=.5\bodyfontsize,
  topoffset=.5\bodyfontsize,
  bottomoffset=.5\bodyfontsize,
  frame=off,]

\input knuth

{

\blank[line]

\setupwhitespace[none]

\startnarrower
  \dontleavehmode\framed[
width=local, corner=03, background=color, backgroundcolor=cyan,
frame=off
  ]{My header!}

  \blank[-0.5em]

  \startsecondary
  {

  \setupwhitespace[line]

\input knuth

  }
  \stopsecondary
\stopnarrower

}

\input knuth
\stoptext


> On Aug 21, 2019, at 10:21 PM, Jon Wong  wrote:
> 
> Hi all,
> 
> Ok, last message in this topic, I promise. I’ve crafted a MWE.
> 
> If I \setupwhitespace[line], the \blank[-0.5em] stops working. I’m sure I 
> need to revise my TeX notes. For now, can somebody give me a little 
> encouragement and tell me the answer? :-P
> 
> \usecolors[xwi]
> % \setupwhitespace[line]
> 
> \starttext
> \definetextbackground[secondary][
>   location=always,
>   background=color,
>   backgroundcolor=lightgray,
>   leftoffset=.5\bodyfontsize,
>   rightoffset=.5\bodyfontsize,
>   topoffset=.5\bodyfontsize,
>   bottomoffset=.5\bodyfontsize,
>   frame=off,]
> 
> \input knuth
> 
> \startnarrower
>   \dontleavehmode\framed[
> width=local, corner=03, background=color, backgroundcolor=cyan,
> frame=off
>   ]{My header!}
> 
>   \blank[-0.5em]
> 
>   \startsecondary
> \input knuth
>   \stopsecondary
> \stopnarrower
> 
> \input knuth
> \stoptext
> 
> Regards
> Jon
> 
> 
>> On Aug 21, 2019, at 9:37 PM, Jon Wong > <mailto:jhannw...@gmail.com>> wrote:
>> 
>> Hi all,
>> 
>> Ah, found the solution in TextBackground. At here: 
>> https://www.contextgarden.net/TextBackground 
>> <https://www.contextgarden.net/TextBackground>
>> 
>> Can I have a 2-segment (2 vboxes) TextBackground (presumably with 2 
>> TextBackgrounds, zero vspace between them)?
>> 
>> For the top segment, I want rounded corners only for top corners (corner=03 
>> with \framed).
>> 
>> Seems I really should dig into MetaFun and TextBackground. Looks really fun 
>> and useful.
>> 
>> Sorry for the noise. Am a little carried away exploring the Garden. :-P
>> 
>> Regards
>> Jon
>> 
>> 
>>> On Aug 21, 2019, at 9:25 PM, Jon Wong >> <mailto:jhannw...@gmail.com>> wrote:
>>> 
>>> Hi all,
>>> 
>>> Sorry, my solution didn’t work.
>>> 
>>> My purpose of using \startnarrower is to have some paragraphs of text 
>>> inside the \framed. Unfortunately, it seems \framed doesn’t take paragraphs.
>>> 
>>> \startframedtext doesn’t have as many border options as \framed.
>>> 
>>> Should I use overlays? Or layers? It seems layers require absolutely 
>>> positioning, and can’t be logically contained inside a \startnarrower?
>>> 
>>> Regards
>>> Jon
>>> 
>>> 
>>>> On Aug 21, 2019, at 8:53 PM, Jon Wong >>> <mailto:jhannw...@gmail.com>> wrote:
>>>> 
>>>> Hi all,
>>>> 
>>>> I got some progress!
>>>> 
>>>> \setupnarrower[left=2cm, right=2cm] % what does middle do, actually?
>>>> \startnarrower
>>>> \dontleavehmode\framed[width=local]{testing}
>>>> 
>>>> Since this works for left offset: \framed[width=local]{testing}
>>>> \endnarrower
>>>> 
>>>> So, how do I do a gradient background? Yeah, I know I have to dive into 
>>>> MetaPost and MetaFun some time. Is that where the solution is?
>>>> 
>>>> Regards
>>>> Jon
>>>> 
>>>>> On Aug 21, 2019, at 8:14 PM, Jon Wong >>>> <mailto:jhannw...@gmail.com>> wrote:
>>>>> 
>>>>> Hi all,
>>>>> 
>>>>> I want to have a \startnarrower effect. But I also want that segment to 
>>>>> have a border (hopefully a gradient background color too!).
>>>>> 
>>>>> I tried:
>>>>> 
>>>>> \startnarrower
>>>>> \framed{testing}
>>>>> 
>>>>> Seems framed doesn’t observe startnarrower commands.
>>>>> \endnarrower
>>>>> 
>>>>> How do I achieve that?
>>>>> 
>>>>> Regards
>>>>> Jon
>>>> 
>>> 
>> 
> 

___
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] startnarrower and framed?

2019-08-21 Thread Jon Wong
Hi all,

Ok, last message in this topic, I promise. I’ve crafted a MWE.

If I \setupwhitespace[line], the \blank[-0.5em] stops working. I’m sure I need 
to revise my TeX notes. For now, can somebody give me a little encouragement 
and tell me the answer? :-P

\usecolors[xwi]
% \setupwhitespace[line]

\starttext
\definetextbackground[secondary][
  location=always,
  background=color,
  backgroundcolor=lightgray,
  leftoffset=.5\bodyfontsize,
  rightoffset=.5\bodyfontsize,
  topoffset=.5\bodyfontsize,
  bottomoffset=.5\bodyfontsize,
  frame=off,]

\input knuth

\startnarrower
  \dontleavehmode\framed[
width=local, corner=03, background=color, backgroundcolor=cyan,
frame=off
  ]{My header!}

  \blank[-0.5em]

  \startsecondary
\input knuth
  \stopsecondary
\stopnarrower

\input knuth
\stoptext

Regards
Jon


> On Aug 21, 2019, at 9:37 PM, Jon Wong  wrote:
> 
> Hi all,
> 
> Ah, found the solution in TextBackground. At here: 
> https://www.contextgarden.net/TextBackground 
> <https://www.contextgarden.net/TextBackground>
> 
> Can I have a 2-segment (2 vboxes) TextBackground (presumably with 2 
> TextBackgrounds, zero vspace between them)?
> 
> For the top segment, I want rounded corners only for top corners (corner=03 
> with \framed).
> 
> Seems I really should dig into MetaFun and TextBackground. Looks really fun 
> and useful.
> 
> Sorry for the noise. Am a little carried away exploring the Garden. :-P
> 
> Regards
> Jon
> 
> 
>> On Aug 21, 2019, at 9:25 PM, Jon Wong > <mailto:jhannw...@gmail.com>> wrote:
>> 
>> Hi all,
>> 
>> Sorry, my solution didn’t work.
>> 
>> My purpose of using \startnarrower is to have some paragraphs of text inside 
>> the \framed. Unfortunately, it seems \framed doesn’t take paragraphs.
>> 
>> \startframedtext doesn’t have as many border options as \framed.
>> 
>> Should I use overlays? Or layers? It seems layers require absolutely 
>> positioning, and can’t be logically contained inside a \startnarrower?
>> 
>> Regards
>> Jon
>> 
>> 
>>> On Aug 21, 2019, at 8:53 PM, Jon Wong >> <mailto:jhannw...@gmail.com>> wrote:
>>> 
>>> Hi all,
>>> 
>>> I got some progress!
>>> 
>>> \setupnarrower[left=2cm, right=2cm] % what does middle do, actually?
>>> \startnarrower
>>> \dontleavehmode\framed[width=local]{testing}
>>> 
>>> Since this works for left offset: \framed[width=local]{testing}
>>> \endnarrower
>>> 
>>> So, how do I do a gradient background? Yeah, I know I have to dive into 
>>> MetaPost and MetaFun some time. Is that where the solution is?
>>> 
>>> Regards
>>> Jon
>>> 
>>>> On Aug 21, 2019, at 8:14 PM, Jon Wong >>> <mailto:jhannw...@gmail.com>> wrote:
>>>> 
>>>> Hi all,
>>>> 
>>>> I want to have a \startnarrower effect. But I also want that segment to 
>>>> have a border (hopefully a gradient background color too!).
>>>> 
>>>> I tried:
>>>> 
>>>> \startnarrower
>>>> \framed{testing}
>>>> 
>>>> Seems framed doesn’t observe startnarrower commands.
>>>> \endnarrower
>>>> 
>>>> How do I achieve that?
>>>> 
>>>> Regards
>>>> Jon
>>> 
>> 
> 

___
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] startnarrower and framed?

2019-08-21 Thread Jon Wong
Hi all,

Ah, found the solution in TextBackground. At here: 
https://www.contextgarden.net/TextBackground 
<https://www.contextgarden.net/TextBackground>

Can I have a 2-segment (2 vboxes) TextBackground (presumably with 2 
TextBackgrounds, zero vspace between them)?

For the top segment, I want rounded corners only for top corners (corner=03 
with \framed).

Seems I really should dig into MetaFun and TextBackground. Looks really fun and 
useful.

Sorry for the noise. Am a little carried away exploring the Garden. :-P

Regards
Jon


> On Aug 21, 2019, at 9:25 PM, Jon Wong  wrote:
> 
> Hi all,
> 
> Sorry, my solution didn’t work.
> 
> My purpose of using \startnarrower is to have some paragraphs of text inside 
> the \framed. Unfortunately, it seems \framed doesn’t take paragraphs.
> 
> \startframedtext doesn’t have as many border options as \framed.
> 
> Should I use overlays? Or layers? It seems layers require absolutely 
> positioning, and can’t be logically contained inside a \startnarrower?
> 
> Regards
> Jon
> 
> 
>> On Aug 21, 2019, at 8:53 PM, Jon Wong  wrote:
>> 
>> Hi all,
>> 
>> I got some progress!
>> 
>> \setupnarrower[left=2cm, right=2cm] % what does middle do, actually?
>> \startnarrower
>> \dontleavehmode\framed[width=local]{testing}
>> 
>> Since this works for left offset: \framed[width=local]{testing}
>> \endnarrower
>> 
>> So, how do I do a gradient background? Yeah, I know I have to dive into 
>> MetaPost and MetaFun some time. Is that where the solution is?
>> 
>> Regards
>> Jon
>> 
>>> On Aug 21, 2019, at 8:14 PM, Jon Wong  wrote:
>>> 
>>> Hi all,
>>> 
>>> I want to have a \startnarrower effect. But I also want that segment to 
>>> have a border (hopefully a gradient background color too!).
>>> 
>>> I tried:
>>> 
>>> \startnarrower
>>> \framed{testing}
>>> 
>>> Seems framed doesn’t observe startnarrower commands.
>>> \endnarrower
>>> 
>>> How do I achieve that?
>>> 
>>> Regards
>>> Jon
>> 
> 

___
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] startnarrower and framed?

2019-08-21 Thread Jon Wong
Hi all,

Sorry, my solution didn’t work.

My purpose of using \startnarrower is to have some paragraphs of text inside 
the \framed. Unfortunately, it seems \framed doesn’t take paragraphs.

\startframedtext doesn’t have as many border options as \framed.

Should I use overlays? Or layers? It seems layers require absolutely 
positioning, and can’t be logically contained inside a \startnarrower?

Regards
Jon


> On Aug 21, 2019, at 8:53 PM, Jon Wong  wrote:
> 
> Hi all,
> 
> I got some progress!
> 
> \setupnarrower[left=2cm, right=2cm] % what does middle do, actually?
> \startnarrower
>  \dontleavehmode\framed[width=local]{testing}
> 
>  Since this works for left offset: \framed[width=local]{testing}
> \endnarrower
> 
> So, how do I do a gradient background? Yeah, I know I have to dive into 
> MetaPost and MetaFun some time. Is that where the solution is?
> 
> Regards
> Jon
> 
>> On Aug 21, 2019, at 8:14 PM, Jon Wong  wrote:
>> 
>> Hi all,
>> 
>> I want to have a \startnarrower effect. But I also want that segment to have 
>> a border (hopefully a gradient background color too!).
>> 
>> I tried:
>> 
>> \startnarrower
>> \framed{testing}
>> 
>> Seems framed doesn’t observe startnarrower commands.
>> \endnarrower
>> 
>> How do I achieve that?
>> 
>> Regards
>> Jon
> 

___
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] startnarrower and framed?

2019-08-21 Thread Jon Wong
Hi all,

I got some progress!

\setupnarrower[left=2cm, right=2cm] % what does middle do, actually?
\startnarrower
  \dontleavehmode\framed[width=local]{testing}

  Since this works for left offset: \framed[width=local]{testing}
\endnarrower

So, how do I do a gradient background? Yeah, I know I have to dive into 
MetaPost and MetaFun some time. Is that where the solution is?

Regards
Jon

> On Aug 21, 2019, at 8:14 PM, Jon Wong  wrote:
> 
> Hi all,
> 
> I want to have a \startnarrower effect. But I also want that segment to have 
> a border (hopefully a gradient background color too!).
> 
> I tried:
> 
> \startnarrower
>  \framed{testing}
> 
>  Seems framed doesn’t observe startnarrower commands.
> \endnarrower
> 
> How do I achieve that?
> 
> Regards
> Jon

___
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] startnarrower and framed?

2019-08-21 Thread Jon Wong
Hi all,

I want to have a \startnarrower effect. But I also want that segment to have a 
border (hopefully a gradient background color too!).

I tried:

\startnarrower
  \framed{testing}

  Seems framed doesn’t observe startnarrower commands.
\endnarrower

How do I achieve that?

Regards
Jon
___
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] Italic corrections?

2019-08-19 Thread Jon Wong
Hi all,

Will this work?

\usetypescript[pagella]
\setupbodyfont[pagella,12pt]
\definefontfeature
  [itlc=yes]

This {\em will} work?

Regards
Jon

___
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] LaTeX's itemsep in ConTeXt?

2019-08-19 Thread Jon Wong
Hi all,

Is there a counterpart in ConTeXt to LaTeX’s itemsep?

Regards
Jon

___
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] texexec is deprecated?

2019-08-12 Thread Jon Wong
Hi all,

I did a quick standalone install of Mark IV:

```shell
mkdir ~/context
cd ~/context
wget http://minimals.contextgarden.net/setup/first-setup.sh
sh first-setup.sh --modules=all --context=current --engine=luatex’)
```

Set the correct paths and env in `~/.bashrc':

```shell
# Add ConTeXt
platform=osx-64
PATH=~/context/bin:~/context/tex/texmf-$platform/bin:$PATH
source ~/context/tex/setuptex

export PATH
```

(By the way, the latest lmtx installer is missing the `setuptex' file.)

I was able to use `context’ but not `texexec’. The latter (`texexec —pdf 
test.tex’) tells me that some format file (`cont-en.fmt’) can’t be found.

Is `texexec’ obsolete?

The 2013 ConTeXt manual still uses it, though.

Regards
Jon

___
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] Convert SVG to MetaPost

2019-08-12 Thread Jon Wong
Hi Taco!

Very enlightening!

I’ll just use both MetaPost and SVG for their intended purposes. (SVG will come 
from workflow involving GIMP/Inkscape; MetaPost for logical, rather than 
graphical, figures.)

Regards
Jon


> On Aug 12, 2019, at 7:30 PM, luigi scarso  wrote:
> 
> 
> 
> On Mon, Aug 12, 2019 at 12:11 PM Jon Wong  <mailto:jhannw...@gmail.com>> wrote:
> Hi all,
> 
> Is it possible to convert SVG to MetaPost?
> 
> Currently, I have Bash scripts in my workflow to invoke Inkscape (converting 
> SVG to PDF). I don’t like to allow shell access to TeX.
> 
> If I can convert SVG to MetaPost, I will gladly Git-track MetaPost files 
> instead of SVG files. That will do away with having to convert SVG into PDF 
> (via Inkscape).
> 
> 
> you can check pstoedit 
> http://www.calvina.de/pstoedit/pstoedit.htm 
> <http://www.calvina.de/pstoedit/pstoedit.htm>
> 
> it can convert postscript to metapost.
> So svg->pdf->ps->mp seems to be possible.
> Of course, I am not sure if it fits in  your workflow.
> 
> -- 
> luigi
> ___
> 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
> ___

___
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] Convert SVG to MetaPost

2019-08-12 Thread Jon Wong
Hi all,

Is it possible to convert SVG to MetaPost?

Currently, I have Bash scripts in my workflow to invoke Inkscape (converting 
SVG to PDF). I don’t like to allow shell access to TeX.

If I can convert SVG to MetaPost, I will gladly Git-track MetaPost files 
instead of SVG files. That will do away with having to convert SVG into PDF 
(via Inkscape).

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