Re: [NTG-context] formatting index entries: alphabetical order in Unicode

2019-08-21 Thread Richard Mahoney | Indica et Buddhica
Robert,

In IV one can do something such as this:

% Registers (Indices)

\defineregister[TIB]

\setupregister[TIB][indicator=yes,compress=yes]

and then in the body:

\TIB[don du gner ba]{don du gñer ba : patthanā : wish}don du gñer ba'i
phyir rdzogs par byed do

\TIB[non mons]{ñon moṅs : kilesa : defilements}ñon moṅs pa śin tu che
ba yin-no


Richard


-- 
Richard Mahoney | Indica et Buddhica
 
Littledene  Bay Road  Oxford  NZ 
T: +6433121699  M: +64210640216 
r.maho...@indica-et-buddhica.org 

https://indica-et-buddhica.org/ 

-Original Message-
From: Robert Zydenbos 
Reply-To: mailing list for ConTeXt users 
To: mailing list for ConTeXt users 
Subject: [NTG-context] formatting index entries: alphabetical order in
Unicode
Date: Thu, 22 Aug 2019 01:42:40 +0200
Mailer: 

I seem to have a problem with Unicode in the indexing function for my
book: a word like āyitu (beginning with an 'a' with a macron over it)
is considered a word that starts with a 'y'; the word īga (beginning
with an i with a macron) is placed as if it is 'ga'.

Is there any way to tell the indexing function how to deal with such
special characters?

Robert

__
_
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] formatting index entries: alphabetical order in Unicode

2019-08-21 Thread Robert Zydenbos
I seem to have a problem with Unicode in the indexing function for my book: a 
word like āyitu (beginning with an 'a' with a macron over it) is considered a 
word that starts with a 'y'; the word īga (beginning with an i with a macron) 
is placed as if it is 'ga'.

Is there any way to tell the indexing function how to deal with such special 
characters?

Robert

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

2019-08-21 Thread Robert Zydenbos
Strange, in MkIV I get an error message which I do not understand, because by 
the look of it, your code (I called the file 'indexpablo.tex') seems in order – 
but in MkII (which I need) it works.

The MkIV error log:

This is LuaTeX, Version 1.07.0 (TeX Live 2018) 
 system commands enabled.
open source > level 1, order 1, name 
'/usr/local/texlive/2018/texmf-dist/tex/context/base/mkiv/cont-yes.mkiv'
system  > 
system  > ConTeXt  ver: 2018.04.04 00:51 MKIV beta  fmt: 2018.5.13  
int: english/english
system  > 
system  > 'cont-new.mkiv' loaded
open source > level 2, order 2, name 
'/usr/local/texlive/2018/texmf-dist/tex/context/base/mkiv/cont-new.mkiv'
close source> level 2, order 2, name 
'/usr/local/texlive/2018/texmf-dist/tex/context/base/mkiv/cont-new.mkiv'
system  > files > jobname 'indexpablo', input './indexpablo', result 
'indexpablo'
fonts   > latin modern fonts are not preloaded
languages   > language 'en' is active
system  > synctex functionality is enabled, expect 5-10 pct runtime 
overhead!
open source > level 2, order 3, name 
'/Users/rz/Documents/work/Kannada-manual-compile-klad/indexpablo.tex'
fonts   > preloading latin modern fonts (second stage)
fonts   > 'fallback modern-designsize rm 12pt' is loaded
structure   > sectioning > chapter @ level 2 : 0.1 -> \headtext {index}

tex error   > tex error on line 50 in file 
/Users/rz/Documents/work/Kannada-manual-compile-klad/indexpablo.tex: ! Missing 
} inserted

 
}
 
\endgroup 
l.50 \stopregisterentry
 
\strc_registers_place_indeed ...\c!pagesegments }}
  \relax 
\strc_registers_place ...c_registers_place_indeed 
  \stopmixedcolumns \else \s...
\strc_registers_complete ...\currentregister ][#2]
  \page [\v!yes ]\stopnameds...
...
l.5\stoptext
  

> On 21. Aug 2019, at 17:10, Pablo Rodriguez  wrote:
> 
> On 8/21/19 10:59 AM, Robert Zydenbos wrote:
>> Dear list members,
>> 
>> In my book I am creating an index. I know that there are commands
>> for formatting index entries, like:
>> 
>> \index{sl::īga}
>> [...]
>> \index{īga+emphasized}
>> [...]
>> Any suggestions?
> 
> Hi Robert,
> 
> this worked in MkIV/XL (I don’t know what might happen in MkII):
> 
>\starttext
>\index[īga]{{\em īga}}
>\index[īga+emphasized]{{\em īga+emphasized}}
>\completeindex
>\stoptext
> 
> Just in case it helps,
> 
> 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] formatting index entries

2019-08-21 Thread Robert Zydenbos
Sorry, that works fine in MkIV, but not in MkII, which I need to use.

Robert

> On 21. Aug 2019, at 17:33, Wolfgang Schuster 
>  wrote:
> 
> Robert Zydenbos schrieb am 21.08.2019 um 10:59:
>> Dear list members,
>> 
>> In my book I am creating an index. I know that there are commands for 
>> formatting index entries, like:
>> 
>> \index{sl::īga}
>> 
>> if I want the word 'īga' to be printed in slanted type. I also know that we 
>> can create sub-entries, like
>> 
>> \index{īga+emphasized}
>> 
>> But now I want the word 'īga' to be slanted, but not the word 'emphasized'. 
>> I have tried things like \index{sl::īga+rm::emphasized}, but I can't figure 
>> this out.
>> 
>> Any suggestions?
> 
> \defineprocessor [sl] [style=slanted]
> \defineprocessor [bf] [style=bold]
> 
> \starttext
> 
> \dontleavehmode\index{sl->īga}
> 
> \dontleavehmode\index{īga+normal}
> 
> \dontleavehmode\index{bf->īga+bold}
> 
> \placeindex[balance=no]
> 
> \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] balanced vertical spaces under \startcolumnset

2019-08-21 Thread Sytse Knypstra
Dear Jeong Dal,

I use the following functions to control the start and end of columns in a 
columnset:


\setuplayout[grid=yes]
\emptylines[...] % see the command \emptylines in ConTeXtgarden
\setupcolumnsetstart[...][...][...][...] % see the manual COLUMNS, page 9
\setupcolumnsetlines[...][...][...][...] % see the manual COLUMNS, page 9
%\showgrid % uncomment if you want to see the grid lines and line numbers

You find the manual COLUMNS under the heading 'Layout' on
https://wiki.contextgarden.net/Manuals.

With kind regards,

Sytse


> Op 20 augustus 2019 om 12:37 schreef Jeong Dal :
> 
> 
> Dear all,
> 
> I use the following code to make test.
> To make the same height blank spaces after the problems, I use \vfill before 
> \column.
> The problem is that the second \column creates extra blank page.
> But, without the second \column, the height of blank spaces of the second 
> column are different.
> 
> Is there a way to make the blank spaces height same while not to create a 
> blank page?
> 
> Thank you for reading.
> 
> Best regards,
> 
> Dalyoung
> 
> 
> \usetypescriptfile[type-siz]
> \usemodule[units]
> \setupbodyfont[10pt,rm]
> \definecolumnset
>  [exam]
>  [n=2]
> 
> \starttext
> 
> \startcolumnset[exam]
> 
> \startitemize[n]
> \item Answer to the questions:
>   \vfill
> 
>\item Answer to the questions:
>   \vfill
> 
> \column
> 
> \item Answer to the questions:
>   \vfill
> 
>\item Answer to the questions:
>   \vfill
> 
> %\column
> 
> \stopitemize
> \stopcolumnset
> 
> \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] Use Visual studio code

2019-08-21 Thread Hans Hagen

On 8/21/2019 9:44 PM, Julian Gompper wrote:

Hello,


I too use vscode as my editor, and recently wanted to use it for ConTeXt
as well.

Patrick Gundlach created a tmLanguage file for ConTeXt:
https://github.com/pgundlach/context.tmbundle/blob/master/Syntaxes/ConTeXt.tmLanguage

I just finished packaging and publishing said file in a vscode extension.

You can find it on GitHub:
https://github.com/JulianGmp/vscode-context-syntax

Or on the vscode marketplace:
https://marketplace.visualstudio.com/items?itemName=JulianGmp.context-syntax


As the name suggests, the extension only provides syntax highlighting. I
might add snippets or build macros in the future, though I would
probably implement these things in a seperate extension.


I wrote (reasonable advanced) lexers for all the languages that matter 
for context (tex, mp, lua, etc), also with support for embedded lexing 
as well as highlighting of categories of keywords (updates when new 
betas are pushed). These lexers are mostly compatible with my reference 
lexers for scite. So that should work anyway. They are poart of the 
distribution and activated when one starts vscode from the command line 
with the right switches or when one puts thexe lexers someplace known.


So, I didn't make some 'installable package' (also because i actually 
want to use a different color scheme and less clutter in the editor) so 
the idea is to have a independent start up without interference with an 
existing install.


But it works ok here (apart from adbaced suffix based runners, but i can 
run tex; ok, i could make mtxrun more clever and cheat but it would be a 
hack).


(The problem that I have with editors is that they keep adding stuff and 
become more complex over time while in practice I only need avery few 
features.)



Also, if you want to build the document with a keybinding, you could
define a build task in your tasks.json:
https://gist.github.com/JulianGmp/a2b38212878c23d71de3d977214f2bf7
The problem is not to have key bindings (I can do that) but to have 
different ones per filetype (i want to run lua files with mtxrun 
--script for instance) and also because there can be multiple nindings 
per suffix. As far as I can see this is not yet possible (when i looked 
into it and searched abit i got the impression that this was a general 
known shortcoming but also that it was on some agenda to deal with it) 
and I don't want to ship/maintain a lot of fragile/moving target 
javascript (and node js) code.


Anyway, the files are in the distribuition to play with. And 
occasionally I see when it becomes more useable for me. It's currently 
mostly a fallback for when scite stops working (unfortunately the lua 
lexer support is is not build into scite and the (small) lib is 
unmaintained ... ok, i could do that when needed).


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] Use Visual studio code

2019-08-21 Thread Julian Gompper
Hello,


I too use vscode as my editor, and recently wanted to use it for ConTeXt
as well.

Patrick Gundlach created a tmLanguage file for ConTeXt:
https://github.com/pgundlach/context.tmbundle/blob/master/Syntaxes/ConTeXt.tmLanguage

I just finished packaging and publishing said file in a vscode extension.

You can find it on GitHub:
https://github.com/JulianGmp/vscode-context-syntax

Or on the vscode marketplace:
https://marketplace.visualstudio.com/items?itemName=JulianGmp.context-syntax


As the name suggests, the extension only provides syntax highlighting. I
might add snippets or build macros in the future, though I would
probably implement these things in a seperate extension.


Best regards,

Julian


Also, if you want to build the document with a keybinding, you could
define a build task in your tasks.json:
https://gist.github.com/JulianGmp/a2b38212878c23d71de3d977214f2bf7


Am 19.08.2019 um 22:08 schrieb Eric Détrez:
> Hello
>
> Is it possible to use VScode as IDE for ConTeXt ?
>
>
>
> --
> Eric Détrez
> Informatique
> Lycée Faidherbe, Lille
> Documents de cours en pdf : eric-detrez.fr
> ___
> 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
___


Re: [NTG-context] formatting index entries

2019-08-21 Thread Wolfgang Schuster

Robert Zydenbos schrieb am 21.08.2019 um 10:59:

Dear list members,

In my book I am creating an index. I know that there are commands for 
formatting index entries, like:

\index{sl::īga}

if I want the word 'īga' to be printed in slanted type. I also know that we can 
create sub-entries, like

\index{īga+emphasized}

But now I want the word 'īga' to be slanted, but not the word 'emphasized'. I 
have tried things like \index{sl::īga+rm::emphasized}, but I can't figure this 
out.

Any suggestions?


\defineprocessor [sl] [style=slanted]
\defineprocessor [bf] [style=bold]

\starttext

\dontleavehmode\index{sl->īga}

\dontleavehmode\index{īga+normal}

\dontleavehmode\index{bf->īga+bold}

\placeindex[balance=no]

\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] formatting index entries

2019-08-21 Thread Pablo Rodriguez
On 8/21/19 10:59 AM, Robert Zydenbos wrote:
> Dear list members,
>
> In my book I am creating an index. I know that there are commands
> for formatting index entries, like:
>
> \index{sl::īga}
> [...]
> \index{īga+emphasized}
> [...]
> Any suggestions?

Hi Robert,

this worked in MkIV/XL (I don’t know what might happen in MkII):

\starttext
\index[īga]{{\em īga}}
\index[īga+emphasized]{{\em īga+emphasized}}
\completeindex
\stoptext

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] 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 > > wrote:
>> 
>> Hi all,
>> 
>> Ah, found the solution in TextBackground. At here: 
>> 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,

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

Ah, found the solution in TextBackground. At here: 
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
___


Re: [NTG-context] startnarrower and framed?

2019-08-21 Thread Hans Hagen

On 8/21/2019 2:14 PM, Jon Wong wrote:

\startnarrower
   \framed{testing}

   Seems framed doesn’t observe startnarrower commands.
\endnarrower

\starttext

Seems framed doesn’t observe startnarrower commands.

\startnarrower
\dontleavehmode \framed{testing}

Seems framed doesn’t observe startnarrower commands.

\startlinecorrection
\dontleavehmode \framed{testing}
\stoplinecorrection
\stopnarrower

\stoptext

for gradients, see metafun and example sin test suite

--

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


[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] formatting index entries

2019-08-21 Thread Robert Zydenbos
Dear list members,

In my book I am creating an index. I know that there are commands for 
formatting index entries, like:

\index{sl::īga}

if I want the word 'īga' to be printed in slanted type. I also know that we can 
create sub-entries, like

\index{īga+emphasized}

But now I want the word 'īga' to be slanted, but not the word 'emphasized'. I 
have tried things like \index{sl::īga+rm::emphasized}, but I can't figure this 
out.

Any suggestions?

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