[NTG-context] enhancing documentation: initials

2024-03-05 Thread Henning Hraban Ramm
Hi, I tried to figure out what the "method" parameter of \setupinitial 
does – it changes the handling of quotation marks at the beginning of 
the text. It’s defined in context/base/mkiv/typo-drp.lua


But I found no difference between first, last, and none; just "auto" 
includes the mark in the initial, and it works only with a few 
languages, e.g. English and French, but not e.g. German or Dutch:


"""
\mainlanguage[de]
\setuppapersize[A6]
\setupinitial[n=2,color=orange,]

\starttext
\start
\setupinitial[method=first]
\placeinitial \quotation{Keine andere Kunst hat mehr Berechtigung, ihren 
Blick auf die zukünftigen Jahrhunderte zu richten als die 
Typographie.}\wordright{Giambattista Bodoni}

\stop

\start
\setupinitial[method=last]
\placeinitial \quotation{Nationalökonomie ist, wenn die Leute sich 
wundern, warum sie kein Geld haben.}\wordright{Kurt Tucholsky}

\stop

\start
\setupinitial[method=auto]
\placeinitial \quotation{Der Mensch wird auf natürlichem Wege 
hergestellt, doch empfindet er dies als unnatürlich und spricht nicht 
gern davon.}\wordright{Kurt Tucholsky}

\stop

\start
\setupinitial[method=none]
\placeinitial \quotation{Keine andere Kunst hat mehr Berechtigung, ihren 
Blick auf die zukünftigen Jahrhunderte zu richten als die 
Typographie.}\wordright{Giambattista Bodoni}

\stop

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


[NTG-context] Re: distance in \setupinitial

2024-02-09 Thread Henning Hraban Ramm

Am 09.02.24 um 22:06 schrieb Thomas Meyer:

Thank you, Pablo,

next question:
why does it say here
https://wiki.contextgarden.net/Command/setupinitial
default is 0pt?
Why does the information not match?
Crazy!


Either it changed since 2020, or Garulfo just assumed wrongly when they 
wrote it. Anyway, I changed it. You could have done it yourself.


Thank you, Pablo, for looking it up!

Hraban

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


[NTG-context] Re: distance in \setupinitial

2024-02-09 Thread Thomas Meyer

Thank you, Pablo,

next question:
why does it say here
https://wiki.contextgarden.net/Command/setupinitial
default is 0pt?
Why does the information not match?
Crazy!


Am 09.02.24 um 20:02 schrieb Pablo Rodriguez via ntg-context:

On 2/9/24 09:53, Thomas Meyer wrote:

Hi folks,

if I understand it correct it is not necessary to set default parameters.
In my example it is a difference to set it or not (distance=0pt should
be default):

Hi Thomas,

the default (as per line 65 in typo-drp.mkxl) is .125\emwidth.

This is the reason why your results differ with distance set to 0pt.

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


[NTG-context] Re: distance in \setupinitial

2024-02-09 Thread Pablo Rodriguez via ntg-context
On 2/9/24 09:53, Thomas Meyer wrote:
> Hi folks,
>
> if I understand it correct it is not necessary to set default parameters.
> In my example it is a difference to set it or not (distance=0pt should
> be default):

Hi Thomas,

the default (as per line 65 in typo-drp.mkxl) is .125\emwidth.

This is the reason why your results differ with distance set to 0pt.

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


[NTG-context] distance in \setupinitial

2024-02-09 Thread Thomas Meyer

Hi folks,

if I understand it correct it is not necessary to set default parameters.
In my example it is a difference to set it or not (distance=0pt should 
be default):


\setupinitial%[distance=0pt]

\starttext
\placeinitial
\input knuth
\stoptext

Why?

Greetings
Thomas

___
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] Protect the lettrine

2023-06-25 Thread Thangalin via ntg-context
Thanks Hans.

I've updated the wiki. I'm wondering if there's a way to also control the
indenting? Max's solution removed any indenting, allowing the text for the
second paragraph to be flush. It looks a little strange to see text
indented next to a drop-cap. The test case is the same, but with the
addition of an indenting setup:

% SOT
\setupinitial[n=2, continue=yes]

\setupindenting[medium, yes]

\setuphead[chapter][
  after={\placeinitial},
  page=no,
]

\starttext
\chapter{one}
Kermit Ruffins

Meet me at the second line.

\chapter{two}
\input knuth

Meet me at the second line.
\stoptext
% EOT
This produces an unintended side-effect, as well, whereby the following
chapter heading is indented.

See https://i.ibb.co/n8cMkM9/unintended-indented.png

Cheers!
___
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] Protect the lettrine

2023-06-16 Thread Hans Hagen via ntg-context

On 6/15/2023 8:35 AM, Max Chernoff via ntg-context wrote:

Hi Dave,


How would you instruct ConTeXt to "protect" the lettrine such that
regardless of whether the first paragraph spans multiple lines, a short
first paragraph will still prevent the second paragraph from overlapping
the lettrine?



Here's the output I'm looking to achieve:

https://i.stack.imgur.com/XeZQS.png

Note how the second line honours the lettrine's width and padding, in the
same way that the second line of the first paragraph in Knuth's quote
respects the width and padding.


Here's a questionable Lua-based solution:

\startluacode
userdata.hangindent = 0
function userdata.post_lettrine(head)
nodes.tasks.disableaction("finalizers", "userdata.post_lettrine")

if tex.prevgraf < math.abs(tex.hangafter) then

userdata.hangindent = tex.hangindent
nodes.tasks.enableaction("processors", "userdata.next_par")
end

return head

end
nodes.tasks.appendaction("finalizers", "before", "userdata.post_lettrine")
nodes.tasks.disableaction("finalizers", "userdata.post_lettrine")


function userdata.next_par(head)

nodes.tasks.disableaction("processors", "userdata.next_par")

if head.next.id == node.id("glue") and

   head.next.subtype == 20
then
head.next.width = userdata.hangindent
end

return head

end
nodes.tasks.appendaction("processors", "before", "userdata.next_par")
nodes.tasks.disableaction("processors", "userdata.next_par")


local default = typesetters.initials.actions.default

function typesetters.initials.actions.default(...)
nodes.tasks.enableaction("finalizers", "userdata.post_lettrine")
return default(...)
end
\stopluacode

\setupinitial[n=2]

[...]


Normally manipulating nodes inside the callbacks is the wrong way to do
something, but in this case, that's exactly how the standard initial
code works.

We need to modify the "default" alternative since "\setupinitial"
provides no way for us to set a different alternative. A better solution
would be to provide a new alternative so we wouldn't need to make
questionable overrides to the base code.
Indeed, and it might also sort of fragile due to the prevgraf although 
we can assume sane usage. All this stuff is also a bit order sensitive.


I'll added this:

\setupinitial[n=2,continue=yes]

But I'll also cheat a bit by adding a prevdepth field to the parstate 
that remembers the previous one (as it gets lost otherwise).


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] Protect the lettrine

2023-06-15 Thread Max Chernoff via ntg-context
Hi Dave,

> How would you instruct ConTeXt to "protect" the lettrine such that
> regardless of whether the first paragraph spans multiple lines, a short
> first paragraph will still prevent the second paragraph from overlapping
> the lettrine?

> Here's the output I'm looking to achieve:
> 
> https://i.stack.imgur.com/XeZQS.png
> 
> Note how the second line honours the lettrine's width and padding, in the
> same way that the second line of the first paragraph in Knuth's quote
> respects the width and padding.

Here's a questionable Lua-based solution:

   \startluacode
   userdata.hangindent = 0
   function userdata.post_lettrine(head)
   nodes.tasks.disableaction("finalizers", "userdata.post_lettrine")
   
   if tex.prevgraf < math.abs(tex.hangafter) then
   userdata.hangindent = tex.hangindent
   nodes.tasks.enableaction("processors", "userdata.next_par")
   end
   
   return head
   end
   nodes.tasks.appendaction("finalizers", "before", "userdata.post_lettrine")
   nodes.tasks.disableaction("finalizers", "userdata.post_lettrine")
   
   
   function userdata.next_par(head)
   nodes.tasks.disableaction("processors", "userdata.next_par")
   
   if head.next.id == node.id("glue") and
  head.next.subtype == 20
   then
   head.next.width = userdata.hangindent
   end
   
   return head
   end
   nodes.tasks.appendaction("processors", "before", "userdata.next_par")
   nodes.tasks.disableaction("processors", "userdata.next_par")
   
   
   local default = typesetters.initials.actions.default
   function typesetters.initials.actions.default(...)
   nodes.tasks.enableaction("finalizers", "userdata.post_lettrine")
   return default(...)
   end
   \stopluacode
   
   \setupinitial[n=2]
   
   [...]

Normally manipulating nodes inside the callbacks is the wrong way to do
something, but in this case, that's exactly how the standard initial
code works. 

We need to modify the "default" alternative since "\setupinitial"
provides no way for us to set a different alternative. A better solution
would be to provide a new alternative so we wouldn't need to make
questionable overrides to the base code.

-- Max
___
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] Protect the lettrine

2023-06-14 Thread linguafalsa--- via ntg-context
On Tue, Jun 13, 2023 at 08:46:59PM -0700, Thangalin via ntg-context wrote:
> Thank you for taking the time to reply, linguafalsa, I appreciate it.
> 
> The source document is written in Markdown using KeenWrite, my Markdown
> editor. Inserting typesetting instructions into the document would defeat
> the software's architecture, hence being untenable. After the Markdown is
> transformed into XHTML, a specific theme instructs ConTeXt how to typeset
> the XHTML.

Never heard of it (keenwrite), but your request is indeed, valid all along.

I haven't checked the code that lmtx uses but by just looking at the bare
macros, it seems as if `\forgetplaceinitial` is limited in what it can
and can't do. I think it's reasonable the way it was implemented but
nevertheless this is something that ought to be looked at rather than
ignore it or put aside  for later

I didn't see the video, it's distracting, but as I said, is a valid
request on your part 

Perhaps `\setuphead` can have such of a feature in the future — that
of different settings for different chapters, and if one exists now,
I'm just simply unaware of, but either way,  you're dealing mainly
here with a table and tabskips and whatnot. It seems that there's one
feature for subsubsections, written in lua, but this is entirely different

Even with something as the following I just wouldn't know how to specify
it to apply it concurrently for each particular chapter thereafter and
dissuade it from subsequently applying it to where not otherwise. I just
don't know. 


\setuphead[chapter][
  after={\placeinitial\vbox to 1cm{\relax {K{\hskip 2pt \lower 5pt \hbox{ermit 
MUffins \vbox to -0.055cm {\hskip -2.8cm \raise 1pt \hbox{meet me at the second
line}}},
  page=no, 
%]

\starttext

\startchapter[1]
\stopchapter

\forgetinitial \par

\startchapter[2]
\input knuth
\stopchapter

\stoptext


> 
> Here's a video showing how theme selection works:
> 
> https://youtu.be/3QpX70O5S30?list=PLB-WIt1cZYLm1MMx2FBG9KWzPIoWZMKu_=14
> 
> I hope this explains the situation more clearly about why changing the code
> between \starttext and \stoptext isn't an option, as you've done with
> introducing and using a macro.
> 
> Greets!

take care Tangalin 

Carlos

> 
> On Tue, Jun 13, 2023 at 7:33 PM linguafalsa--- via ntg-context <
> ntg-context@ntg.nl> wrote:
> 
> > On Tue, Jun 13, 2023 at 02:01:14PM -0700, Thangalin via ntg-context wrote:
> > > Thanks Otared,
> > >
> > > Unfortunately, that's adding content between \starttext and \stoptext,
> > > which isn't tenable in my situation. The user is writing in Markdown,
> > which
> > > is automatically converted to XHTML then passed to ConTeXt, and so the
> > > setups need to account for this scenario without modifying the source
> > > document.
> > >
> >
> > Yeah yeah yeah, tenable. A lot of things aren't tenable. Anyhow,
> > What source document are you talking about here?
> >
> > You're already sourcing the lines after chapter one. As a matter of
> > fact, if you weren't sourcing, then you'd have zilch, nada, zero, empty,
> > null, void, an space, a separation, an abstract
> >
> > Just define Kermit Muffins and it should be good to go
> >
> >
> > \setupinitial[n=2]
> >
> > \def\KermitMuffins{\vbox{Kermit Muffins\par\hskip 1.3cm \tfd Meet me at
> > the second line}}
> >
> > \setuphead[chapter][
> >   after={\placeinitial},
> >   page=no,
> > ]
> >
> > \starttext
> > \chapter{one}
> > \KermitMuffins
> >
> > \chapter{two}
> > \input knuth
> >
> > Meet me at the second line.
> > \stoptext
> >
> >
> >
> > > Cheers!
> > >
> > > On Tue, Jun 13, 2023 at 1:30 AM Otared Kavian via ntg-context <
> > > ntg-context@ntg.nl> wrote:
> > >
> > > > Hi,
> > > >
> > > > Adding \hfill\break to the short line solves the issue, but probably
> > there
> > > > is a better way to achieve the correct result.
> > > >
> > > > \setupinitial[n=2]
> > > >
> > > > \setuphead[chapter][
> > > >   after={\placeinitial},
> > > >   page=no,
> > > > ]
> > > >
> > > > \starttext
> > > > \chapter{one}
> > > > Kermit Ruffins \hfill\break % <---
> > > >
> > > > Meet me at the second line.
> > > >
> > > > \chapter{two}
> > > > \input knuth
> > > >
> > > > Meet me at the second line.
> > > > \stoptext
> > > >
> >
> >
> >
> >
> > > >
> > > > 

Re: [NTG-context] Protect the lettrine

2023-06-13 Thread Thangalin via ntg-context
Thank you for taking the time to reply, linguafalsa, I appreciate it.

The source document is written in Markdown using KeenWrite, my Markdown
editor. Inserting typesetting instructions into the document would defeat
the software's architecture, hence being untenable. After the Markdown is
transformed into XHTML, a specific theme instructs ConTeXt how to typeset
the XHTML.

Here's a video showing how theme selection works:

https://youtu.be/3QpX70O5S30?list=PLB-WIt1cZYLm1MMx2FBG9KWzPIoWZMKu_=14

I hope this explains the situation more clearly about why changing the code
between \starttext and \stoptext isn't an option, as you've done with
introducing and using a macro.

Greets!

On Tue, Jun 13, 2023 at 7:33 PM linguafalsa--- via ntg-context <
ntg-context@ntg.nl> wrote:

> On Tue, Jun 13, 2023 at 02:01:14PM -0700, Thangalin via ntg-context wrote:
> > Thanks Otared,
> >
> > Unfortunately, that's adding content between \starttext and \stoptext,
> > which isn't tenable in my situation. The user is writing in Markdown,
> which
> > is automatically converted to XHTML then passed to ConTeXt, and so the
> > setups need to account for this scenario without modifying the source
> > document.
> >
>
> Yeah yeah yeah, tenable. A lot of things aren't tenable. Anyhow,
> What source document are you talking about here?
>
> You're already sourcing the lines after chapter one. As a matter of
> fact, if you weren't sourcing, then you'd have zilch, nada, zero, empty,
> null, void, an space, a separation, an abstract
>
> Just define Kermit Muffins and it should be good to go
>
>
> \setupinitial[n=2]
>
> \def\KermitMuffins{\vbox{Kermit Muffins\par\hskip 1.3cm \tfd Meet me at
> the second line}}
>
> \setuphead[chapter][
>   after={\placeinitial},
>   page=no,
> ]
>
> \starttext
> \chapter{one}
> \KermitMuffins
>
> \chapter{two}
> \input knuth
>
> Meet me at the second line.
> \stoptext
>
>
>
> > Cheers!
> >
> > On Tue, Jun 13, 2023 at 1:30 AM Otared Kavian via ntg-context <
> > ntg-context@ntg.nl> wrote:
> >
> > > Hi,
> > >
> > > Adding \hfill\break to the short line solves the issue, but probably
> there
> > > is a better way to achieve the correct result.
> > >
> > > \setupinitial[n=2]
> > >
> > > \setuphead[chapter][
> > >   after={\placeinitial},
> > >   page=no,
> > > ]
> > >
> > > \starttext
> > > \chapter{one}
> > > Kermit Ruffins \hfill\break % <---
> > >
> > > Meet me at the second line.
> > >
> > > \chapter{two}
> > > \input knuth
> > >
> > > Meet me at the second line.
> > > \stoptext
> > >
>
>
>
>
> > >
> > > Best regards: Otared
> > >
> > > On 13 Jun 2023, at 04:43, Thangalin via ntg-context <
> ntg-context@ntg.nl>
> > > wrote:
> > >
> > > I'm using KeenWrite Themes (specifically, Boschet) to typeset a chapter
> > > wherein the first letter is a lettrine. When the first paragraph is too
> > > short, the second paragraph overlaps the lettrine.
> > >
> > > % SOT
> > > \setupinitial[n=2]
> > >
> > > \setuphead[chapter][
> > >   after={\placeinitial},
> > >   page=no,
> > > ]
> > >
> > > \starttext
> > > \chapter{one}
> > > Kermit Ruffins
> > >
> > > Meet me at the second line.
> > >
> > > \chapter{two}
> > > \input knuth
> > >
> > > Meet me at the second line.
> > > \stoptext
> > > % EOT
> > >
> > > Produces: https://i.stack.imgur.com/kNDqw.png
> > >
> > > How would you instruct ConTeXt to "protect" the lettrine such that
> > > regardless of whether the first paragraph spans multiple lines, a short
> > > first paragraph will still prevent the second paragraph from
> overlapping
> > > the lettrine?
> > >
> > > That is, the setups should work in both cases, without any knowledge
> about
> > > the first paragraph length being added between \starttext and
> \stoptext.
> > >
> > > ConTeXt LMTX version: 2023.06.04 18:58
> > >
> > > Thank you!
> > >
> > >
> ___
> > > If your question is of interest to others as well, please add an entry
> to
> > > the Wiki!
> > >
> > > maillist : ntg-context@ntg.nl /
> > >

Re: [NTG-context] Protect the lettrine

2023-06-13 Thread linguafalsa--- via ntg-context
On Tue, Jun 13, 2023 at 02:01:14PM -0700, Thangalin via ntg-context wrote:
> Thanks Otared,
> 
> Unfortunately, that's adding content between \starttext and \stoptext,
> which isn't tenable in my situation. The user is writing in Markdown, which
> is automatically converted to XHTML then passed to ConTeXt, and so the
> setups need to account for this scenario without modifying the source
> document.
> 

Yeah yeah yeah, tenable. A lot of things aren't tenable. Anyhow,
What source document are you talking about here?

You're already sourcing the lines after chapter one. As a matter of
fact, if you weren't sourcing, then you'd have zilch, nada, zero, empty,
null, void, an space, a separation, an abstract 

Just define Kermit Muffins and it should be good to go 


\setupinitial[n=2]

\def\KermitMuffins{\vbox{Kermit Muffins\par\hskip 1.3cm \tfd Meet me at
the second line}}

\setuphead[chapter][
  after={\placeinitial},
  page=no,
]

\starttext
\chapter{one}
\KermitMuffins

\chapter{two}
\input knuth

Meet me at the second line.
\stoptext



> Cheers!
> 
> On Tue, Jun 13, 2023 at 1:30 AM Otared Kavian via ntg-context <
> ntg-context@ntg.nl> wrote:
> 
> > Hi,
> >
> > Adding \hfill\break to the short line solves the issue, but probably there
> > is a better way to achieve the correct result.
> >
> > \setupinitial[n=2]
> >
> > \setuphead[chapter][
> >   after={\placeinitial},
> >   page=no,
> > ]
> >
> > \starttext
> > \chapter{one}
> > Kermit Ruffins \hfill\break % <---
> >
> > Meet me at the second line.
> >
> > \chapter{two}
> > \input knuth
> >
> > Meet me at the second line.
> > \stoptext
> >




> >
> > Best regards: Otared
> >
> > On 13 Jun 2023, at 04:43, Thangalin via ntg-context 
> > wrote:
> >
> > I'm using KeenWrite Themes (specifically, Boschet) to typeset a chapter
> > wherein the first letter is a lettrine. When the first paragraph is too
> > short, the second paragraph overlaps the lettrine.
> >
> > % SOT
> > \setupinitial[n=2]
> >
> > \setuphead[chapter][
> >   after={\placeinitial},
> >   page=no,
> > ]
> >
> > \starttext
> > \chapter{one}
> > Kermit Ruffins
> >
> > Meet me at the second line.
> >
> > \chapter{two}
> > \input knuth
> >
> > Meet me at the second line.
> > \stoptext
> > % EOT
> >
> > Produces: https://i.stack.imgur.com/kNDqw.png
> >
> > How would you instruct ConTeXt to "protect" the lettrine such that
> > regardless of whether the first paragraph spans multiple lines, a short
> > first paragraph will still prevent the second paragraph from overlapping
> > the lettrine?
> >
> > That is, the setups should work in both cases, without any knowledge about
> > the first paragraph length being added between \starttext and \stoptext.
> >
> > ConTeXt LMTX version: 2023.06.04 18:58
> >
> > Thank you!
> >
> > ___
> > 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
> >
> > ___
> >
> >
> > Otared Kavian
> > e-mail: ota...@gmail.com 
> > Phone: +33 6 88 26 70 95
> >
> >
> >
> >
> >
> > ___
> > 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
> >
> > ___
> >

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

Re: [NTG-context] Protect the lettrine

2023-06-13 Thread Thangalin via ntg-context
Here's the output I'm looking to achieve:

https://i.stack.imgur.com/XeZQS.png

Note how the second line honours the lettrine's width and padding, in the
same way that the second line of the first paragraph in Knuth's quote
respects the width and padding.

On Tue, Jun 13, 2023 at 2:01 PM Thangalin  wrote:

> Thanks Otared,
>
> Unfortunately, that's adding content between \starttext and \stoptext,
> which isn't tenable in my situation. The user is writing in Markdown, which
> is automatically converted to XHTML then passed to ConTeXt, and so the
> setups need to account for this scenario without modifying the source
> document.
>
> Cheers!
>
> On Tue, Jun 13, 2023 at 1:30 AM Otared Kavian via ntg-context <
> ntg-context@ntg.nl> wrote:
>
>> Hi,
>>
>> Adding \hfill\break to the short line solves the issue, but probably
>> there is a better way to achieve the correct result.
>>
>> \setupinitial[n=2]
>>
>> \setuphead[chapter][
>>   after={\placeinitial},
>>   page=no,
>> ]
>>
>> \starttext
>> \chapter{one}
>> Kermit Ruffins \hfill\break % <---
>>
>> Meet me at the second line.
>>
>> \chapter{two}
>> \input knuth
>>
>> Meet me at the second line.
>> \stoptext
>>
>>
>> Best regards: Otared
>>
>> On 13 Jun 2023, at 04:43, Thangalin via ntg-context 
>> wrote:
>>
>> I'm using KeenWrite Themes (specifically, Boschet) to typeset a chapter
>> wherein the first letter is a lettrine. When the first paragraph is too
>> short, the second paragraph overlaps the lettrine.
>>
>> % SOT
>> \setupinitial[n=2]
>>
>> \setuphead[chapter][
>>   after={\placeinitial},
>>   page=no,
>> ]
>>
>> \starttext
>> \chapter{one}
>> Kermit Ruffins
>>
>> Meet me at the second line.
>>
>> \chapter{two}
>> \input knuth
>>
>> Meet me at the second line.
>> \stoptext
>> % EOT
>>
>> Produces: https://i.stack.imgur.com/kNDqw.png
>>
>> How would you instruct ConTeXt to "protect" the lettrine such that
>> regardless of whether the first paragraph spans multiple lines, a short
>> first paragraph will still prevent the second paragraph from overlapping
>> the lettrine?
>>
>> That is, the setups should work in both cases, without any knowledge
>> about the first paragraph length being added between \starttext and
>> \stoptext.
>>
>> ConTeXt LMTX version: 2023.06.04 18:58
>>
>> Thank you!
>>
>> ___
>> 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
>>
>> ___
>>
>>
>> Otared Kavian
>> e-mail: ota...@gmail.com 
>> Phone: +33 6 88 26 70 95
>>
>>
>>
>>
>>
>> ___
>> 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
>>
>> ___
>>
>
___
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] Protect the lettrine

2023-06-13 Thread Thangalin via ntg-context
Thanks Otared,

Unfortunately, that's adding content between \starttext and \stoptext,
which isn't tenable in my situation. The user is writing in Markdown, which
is automatically converted to XHTML then passed to ConTeXt, and so the
setups need to account for this scenario without modifying the source
document.

Cheers!

On Tue, Jun 13, 2023 at 1:30 AM Otared Kavian via ntg-context <
ntg-context@ntg.nl> wrote:

> Hi,
>
> Adding \hfill\break to the short line solves the issue, but probably there
> is a better way to achieve the correct result.
>
> \setupinitial[n=2]
>
> \setuphead[chapter][
>   after={\placeinitial},
>   page=no,
> ]
>
> \starttext
> \chapter{one}
> Kermit Ruffins \hfill\break % <---
>
> Meet me at the second line.
>
> \chapter{two}
> \input knuth
>
> Meet me at the second line.
> \stoptext
>
>
> Best regards: Otared
>
> On 13 Jun 2023, at 04:43, Thangalin via ntg-context 
> wrote:
>
> I'm using KeenWrite Themes (specifically, Boschet) to typeset a chapter
> wherein the first letter is a lettrine. When the first paragraph is too
> short, the second paragraph overlaps the lettrine.
>
> % SOT
> \setupinitial[n=2]
>
> \setuphead[chapter][
>   after={\placeinitial},
>   page=no,
> ]
>
> \starttext
> \chapter{one}
> Kermit Ruffins
>
> Meet me at the second line.
>
> \chapter{two}
> \input knuth
>
> Meet me at the second line.
> \stoptext
> % EOT
>
> Produces: https://i.stack.imgur.com/kNDqw.png
>
> How would you instruct ConTeXt to "protect" the lettrine such that
> regardless of whether the first paragraph spans multiple lines, a short
> first paragraph will still prevent the second paragraph from overlapping
> the lettrine?
>
> That is, the setups should work in both cases, without any knowledge about
> the first paragraph length being added between \starttext and \stoptext.
>
> ConTeXt LMTX version: 2023.06.04 18:58
>
> Thank you!
>
> ___
> 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
>
> ___
>
>
> Otared Kavian
> e-mail: ota...@gmail.com 
> Phone: +33 6 88 26 70 95
>
>
>
>
>
> ___
> 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
>
> ___
>
___
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] Protect the lettrine

2023-06-13 Thread Otared Kavian via ntg-context
Hi,

Adding \hfill\break to the short line solves the issue, but probably there is a 
better way to achieve the correct result.

\setupinitial[n=2]

\setuphead[chapter][
  after={\placeinitial},
  page=no,
]

\starttext
\chapter{one}
Kermit Ruffins \hfill\break % <---

Meet me at the second line.

\chapter{two}
\input knuth

Meet me at the second line.
\stoptext


Best regards: Otared

> On 13 Jun 2023, at 04:43, Thangalin via ntg-context  
> wrote:
> 
> I'm using KeenWrite Themes (specifically, Boschet) to typeset a chapter 
> wherein the first letter is a lettrine. When the first paragraph is too 
> short, the second paragraph overlaps the lettrine.
> 
> % SOT
> \setupinitial[n=2]
> 
> \setuphead[chapter][
>   after={\placeinitial},
>   page=no,
> ]
> 
> \starttext
> \chapter{one}
> Kermit Ruffins
> 
> Meet me at the second line.
> 
> \chapter{two}
> \input knuth
> 
> Meet me at the second line.
> \stoptext
> % EOT
> 
> Produces: https://i.stack.imgur.com/kNDqw.png 
> <https://i.stack.imgur.com/kNDqw.png>
> 
> How would you instruct ConTeXt to "protect" the lettrine such that regardless 
> of whether the first paragraph spans multiple lines, a short first paragraph 
> will still prevent the second paragraph from overlapping the lettrine?
> 
> That is, the setups should work in both cases, without any knowledge about 
> the first paragraph length being added between \starttext and \stoptext.
> 
> ConTeXt LMTX version: 2023.06.04 18:58
> 
> Thank you!
> ___
> 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
> ___

Otared Kavian
e-mail: ota...@gmail.com
Phone: +33 6 88 26 70 95




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


[NTG-context] Protect the lettrine

2023-06-12 Thread Thangalin via ntg-context
I'm using KeenWrite Themes (specifically, Boschet) to typeset a chapter
wherein the first letter is a lettrine. When the first paragraph is too
short, the second paragraph overlaps the lettrine.

% SOT
\setupinitial[n=2]

\setuphead[chapter][
  after={\placeinitial},
  page=no,
]

\starttext
\chapter{one}
Kermit Ruffins

Meet me at the second line.

\chapter{two}
\input knuth

Meet me at the second line.
\stoptext
% EOT

Produces: https://i.stack.imgur.com/kNDqw.png

How would you instruct ConTeXt to "protect" the lettrine such that
regardless of whether the first paragraph spans multiple lines, a short
first paragraph will still prevent the second paragraph from overlapping
the lettrine?

That is, the setups should work in both cases, without any knowledge about
the first paragraph length being added between \starttext and \stoptext.

ConTeXt LMTX version: 2023.06.04 18:58

Thank you!
___
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] Page breaks with \defineparagraphs possible?

2023-06-05 Thread Berend de Boer via ntg-context

Hi Wolfgang,


You can use the tabulate environment to create parallel paragraphs.


Just one thing for others, this solution as the same problem as
paragraphs: \placeinitial won't work.

I.e. this:

   \setupinitial[text=#1]\placeinitial

inside the tabulate or paragraphs doesn't work (but here I simply use
a \hbox{\vbox{}\hfil\vbox{}} solution which works well enough I think,
as I only need this for the opening paragraph.

--
All the best,

Berend de Boer
___
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] \placeinitial doesn't work inside \framedtext (or \framed)

2023-05-16 Thread 李延瑞
Gerben Wierda via ntg-context  于2023年5月17日周三 06:42写道:

> I did a simple thing, replace a \framed by \framedtext to get
> \placeinitial working but that doesn't seem to work automatically:
>
> %==
> \starttext
> \setupinitial[n=2,text=Knuth]\placeinitial\input knuth
>
> \framed[align=flushleft]{\setupinitial[n=2,text=Knuth]\placeinitial\input 
> knuth
> }
>
> \framedtext[align=flushleft]{\setupinitial[n=2,text=Knuth]\placeinitial\input 
> knuth
> }
>
> \stoptext
> %==
>
>
There is a workaround:

\startframedtext
\starthanging[left,n=2]{\scale[lines=2]{\bf Knuth}}
\input knuth
\stophanging
\stopframedtext

-- 
Best regards,

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


[NTG-context] \placeinitial doesn't work inside \framedtext (or \framed)

2023-05-16 Thread Gerben Wierda via ntg-context
I did a simple thing, replace a \framed by \framedtext to get \placeinitial 
working but that doesn't seem to work automatically:

%==
\starttext
\setupinitial[n=2,text=Knuth]\placeinitial\input knuth

\framed[align=flushleft]{\setupinitial[n=2,text=Knuth]\placeinitial\input knuth 
}

\framedtext[align=flushleft]{\setupinitial[n=2,text=Knuth]\placeinitial\input 
knuth }

\stoptext
%==

Is there a way I can get a working \placeinitial inside a \framed or \frametext?

ConTeXt  ver: 2023.02.23 21:26 LMTX  fmt: 2023.2.25  int: english/english

Gerben Wierda (LinkedIn <https://www.linkedin.com/in/gerbenwierda>, Mastodon 
<https://newsie.social/@gctwnl>)
R IT Strategy <https://ea.rna.nl/> (main site)
Book: Chess and the Art of Enterprise Architecture <https://ea.rna.nl/the-book/>
Book: Mastering ArchiMate <https://ea.rna.nl/the-book-edition-iii/>

> On 15 May 2023, at 18:18, Gerben Wierda via ntg-context  
> wrote:
> 
> I'd like to use a drop cap inside a \framed, but it doesn't work.
> 
> Minimal example:
> 
> %==
> \starttext
> \setupinitial[n=2,text=Knuth]\placeinitial\input knuth
> 
> \framed[align=flushleft]{\setupinitial[n=2,text=Knuth]\placeinitial\input 
> knuth }
> \stoptext
> %==
> 
> The first drop cap works, the second is empty.
> 
> Gerben Wierda (LinkedIn <https://www.linkedin.com/in/gerbenwierda>, Mastodon 
> <https://newsie.social/@gctwnl>)
> R IT Strategy <https://ea.rna.nl/> (main site)
> Book: Chess and the Art of Enterprise Architecture 
> <https://ea.rna.nl/the-book/>
> Book: Mastering ArchiMate <https://ea.rna.nl/the-book-edition-iii/>
> 
> ___
> 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
> ___

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


[NTG-context] \placeinitial inside \framed?

2023-05-15 Thread Gerben Wierda via ntg-context
I'd like to use a drop cap inside a \framed, but it doesn't work.

Minimal example:

%==
\starttext
\setupinitial[n=2,text=Knuth]\placeinitial\input knuth

\framed[align=flushleft]{\setupinitial[n=2,text=Knuth]\placeinitial\input knuth 
}
\stoptext
%==

The first drop cap works, the second is empty.

Gerben Wierda (LinkedIn <https://www.linkedin.com/in/gerbenwierda>, Mastodon 
<https://newsie.social/@gctwnl>)
R IT Strategy <https://ea.rna.nl/> (main site)
Book: Chess and the Art of Enterprise Architecture <https://ea.rna.nl/the-book/>
Book: Mastering ArchiMate <https://ea.rna.nl/the-book-edition-iii/>

___
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] Lettrine module not working?!

2023-02-20 Thread Alan Braslau via ntg-context
On Mon, 20 Feb 2023 16:02:30 +0100
"G.C.H.M. Verhaag via ntg-context"  wrote:

> Hi,
> 
> Yes Hraban it works outside in normal text flow. When I do e.g. 
> *{\InitialCapFont test in normal text flow}* the text '/test in
> normal text flow/' is rendered correctly in the Antykwa-Poltawskiego
> font.
> 
> Found out that the following does work with the *\placeinitial*
> command:
> 
> *\setupinitial[color=MyColor,distance=6pt,n=3,font=name:antpoltcondregular*default
>  
> sa 4]*
> 
> So something weird is happening I suppose!
> 
> Regards,
> Geert Verhaag

I use:

\setupinitial
 [font=Normal cp \measure{initial:n}]

Alan
___
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] Lettrine module not working?!

2023-02-20 Thread Pablo Rodriguez via ntg-context
On 2/20/23 16:02, G.C.H.M. Verhaag via ntg-context wrote:
> [...]
> Found out that the following does work with the *\placeinitial* command:
> 
> *\setupinitial[color=MyColor,distance=6pt,n=3,font=name:antpoltcondregular*default
>  sa 4]*
> 
> So something weird is happening I suppose!

Hi Geert,

if you only provide commands, it is really hard to tell what is going on.

Please, always provide complete samples (otherwise, most of the help is
figuring out what the issue is really about).

Best,

Pablo

___
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] Lettrine module not working?!

2023-02-20 Thread Pablo Rodriguez via ntg-context
On 2/20/23 15:30, G.C.H.M. Verhaag via ntg-context wrote:
> Hi,
> 
> Yes Hraban that worked! Thanks!
> 
> My next issue is adapting the font-family, because a want to use the
> *Antykwa-Poltawskiego* font|| as my initial. I tried the following:
> 
> *\definefont[InitialCapFont][name:antpoltcondregular*default sa 4]*
> *\setupinitial[color=MyColor,distance=6pt,n=3,font=InitialCapFont]*
> 
> Has anybody any idea why this doesn't work?

Hi Geert,

this works for me:

  \definefont[InitialCapFont][name:antpoltcondregular*default sa 4]
  %\setupinitial[style={\switchtobodyfont[helvetica]}]
  \setupinitial[color=red,distance=6pt,n=3, style=\InitialCapFont]

  \starttext
  \setinitial\input zapf
  \stoptext

BTW, I think there is an issue (that might be a bug), when either style
or font are in use, size is not automatically adapted.

Could anyone confirm with the commented line?

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 / 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] Lettrine module not working?!

2023-02-20 Thread G.C.H.M. Verhaag via ntg-context

Hi,

Yes Hraban it works outside in normal text flow. When I do e.g. 
*{\InitialCapFont test in normal text flow}* the text '/test in normal 
text flow/' is rendered correctly in the Antykwa-Poltawskiego font.


Found out that the following does work with the *\placeinitial* command:

*\setupinitial[color=MyColor,distance=6pt,n=3,font=name:antpoltcondregular*default 
sa 4]*


So something weird is happening I suppose!

Regards,
Geert Verhaag___
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] Lettrine module not working?!

2023-02-20 Thread Henning Hraban Ramm via ntg-context

Am 20.02.23 um 15:30 schrieb G.C.H.M. Verhaag via ntg-context:

Hi,

Yes Hraban that worked! Thanks!

My next issue is adapting the font-family, because a want to use the 
*Antykwa-Poltawskiego* font|| as my initial. I tried the following:


*\definefont[InitialCapFont][name:antpoltcondregular*default sa 4]*

*\setupinitial[color=MyColor,distance=6pt,n=3,font=InitialCapFont]*

Has anybody any idea why this doesn't work?


Did you confirm that \InitialCapFont works outside of that setup?

I recently used initials with a simple "font=Serif at 37pt,", and that 
worked. Maybe the operator "sa" doesn’t work in this context? (IDK)


Hraban
___
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] Lettrine module not working?!

2023-02-20 Thread G.C.H.M. Verhaag via ntg-context

Hi,

Yes Hraban that worked! Thanks!

My next issue is adapting the font-family, because a want to use the 
*Antykwa-Poltawskiego* font|| as my initial. I tried the following:


*\definefont[InitialCapFont][name:antpoltcondregular*default sa 4]*

*\setupinitial[color=MyColor,distance=6pt,n=3,font=InitialCapFont]*

Has anybody any idea why this doesn't work?

Regards,

Geert Verhaag
___
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] Lettrine module not working?!

2023-02-20 Thread Henning Hraban Ramm via ntg-context

Am 20.02.23 um 10:39 schrieb G.C.H.M. Verhaag via ntg-context:

*\definecolor[MyColor] [r=.76,g=.72,b=.48]**
**\setupinitial[color=\MyColor,font=Bold sa 4,distance=0pt,n=3]*

doesn't seem to work! Is this as expected behaviour or a possible issue?


The color key generally takes color _names_, i.e. color=MyColor
I didn’t check if it works with \setupinitial.

Hraban
___
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] Lettrine module not working?!

2023-02-20 Thread Keith McKay via ntg-context

Would state=start within \setupinitial[...] help?

Best Wishes

Keith McKay

On 20/02/2023 09:39, G.C.H.M. Verhaag via ntg-context wrote:


Hi,

Thanks for your suggestion Alan! I've been using lettrine all the 
time, without knowing it was actually obsolete, sorry!


I'm now trying the \placeinitial command but coloring like:

*\definecolor[MyColor] [r=.76,g=.72,b=.48]**
**\setupinitial[color=\MyColor,font=Bold sa 4,distance=0pt,n=3]*

doesn't seem to work! Is this as expected behaviour or a possible issue?

Regards,

Gerard Verhaag


___
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
__
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] Lettrine module not working?!

2023-02-20 Thread G.C.H.M. Verhaag via ntg-context

Hi,

Thanks for your suggestion Alan! I've been using lettrine all the time, 
without knowing it was actually obsolete, sorry!


I'm now trying the \placeinitial command but coloring like:

*\definecolor[MyColor] [r=.76,g=.72,b=.48]**
**\setupinitial[color=\MyColor,font=Bold sa 4,distance=0pt,n=3]*

doesn't seem to work! Is this as expected behaviour or a possible issue?

Regards,

Gerard Verhaag
___
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] Lettrine module not working?!

2023-02-19 Thread Alan Braslau via ntg-context
In mkiv and mkxl, we use

\placeinitial

rather than the obsolete (mkii) lettrine module.

See also \setupinitial.

Alan


On Sun, 19 Feb 2023 17:12:45 +0100
"G.C.H.M. Verhaag via ntg-context"  wrote:

> Dear ConTeXt-user,
> 
> Have been using ConTeXt for quite some time now and did a fresh 
> standalone install today:
> 
> mtx-context | ConTeXt Process Management 1.04
> mtx-context |
> mtx-context | main context file: 
> /home/gverhaag/ConTeXtInstallation/tex/texmf-context/tex/context/base/mkiv/context.mkiv
> mtx-context | current version: 2023.02.14 17:44
> mtx-context | main context file: 
> /home/gverhaag/ConTeXtInstallation/tex/texmf-context/tex/context/base/mkxl/context.mkxl
> mtx-context | current version: 2023.02.14 17:44
> 
> However the *lettrine* module doesn't seem to work anymore!
> 
> I use it like this:
> 
> *\usemodule[lettrine]*
> 
> *\setuplettrine[Lines=3,Image=no,Findent=0.7em,Nindent=0pt,FontHook={\MyColor}]*
> 
> These two commands are in my setup file.
> 
> Following error:
> 
> tex error   > tex error on line 36 in file deel3/hfdst1.tex:
> Control sequence expected instead of undefined
> 
>  \m_syst_parameter_n
>      ... \the \LettrineHeight ] X}}\scratchcounter = \numexpr 
> (100*\LettrineHeight )/(\ht \Lettrinetbox /100) - \relax \ifnum 
> \scratchcounter >0 \def \tempa {1.\the \scratchcounter }\else \def 
> \tempa {1}\fi \LettrineFontHook \!!dimena
>      = \tempa \Let ...
>  \dolettrine
>      ...\Lettrinefindent =\LettrineFindent \relax \Lettrinelines 
> =\LettrineLines \relax \setbox \Lettrinelbox \hbox {{\ifx
> \LettrineImage \v!yes \doLettrineEPS {#2}\else \ifx \LettrineImage
> \v!true \doLettrineEPS {#2}\else \doLettrineFont
>      #2\fi \fi }}\ ...
> 
> \lettrine{H}{et begin} van ...
> 
> Any hint on this would be much of a help! Thanks in advance!
> 
> Regards,
> 
> Geert Verhaag
___
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
___


[NTG-context] lmtx \placeinitial with nonzero par indent?

2022-07-11 Thread Michael Urban via ntg-context
The following produces different results in mkiv and lmtx (to which I am brand 
new):



\setupinitial[distance=1pt,font=Serif at 36pt,n=2]
\setupindenting[medium,yes]

\starttext

\placeinitial
\input knuth

\stoptext





The mkiv output is the desired effect.  It works fine in lmtx if I do not 
change to medium indentation.   Is this a bug or a feature (i.e., should I 
change something to work properly in both environments)?

___
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] \placeinitial to account for quotation mark

2021-09-26 Thread Bruce Horrocks via ntg-context


> On 25 Sep 2021, at 21:45, Thangalin via ntg-context  
> wrote:
> 
> Henri Menke provided a partial solution:
> 
> \defineinitial[two][method={first,auto}]
> \setuphead[chapter][
>   after={\placeinitial[two]},
>   page=no,
> ]
> 
> \starttext
> \chapter{Harriet Tubman}
> "Every great dream begins with a dreamer. Always remember, you have within
> you the strength, the patience, and the passion to reach for the stars to
> change the world.
> \chapter{Eleanor Roosevelt}
> Great minds discuss ideas; average minds discuss events; small minds
> discuss people.
> \stoptext
> 
> However, the leading quotation mark is gobbled. Is there any generic way of 
> detecting a leading quotation mark while keeping initial caps on the first 
> character?
> 

Not really generic, and maybe not what you want, but there is this:

\chapter{Eleanor Roosevelt}
\setupinitial[text={"G}]
reat minds discuss ideas; average minds discuss events; small minds
discuss people.

—
Bruce Horrocks
Hampshire, UK

___
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] \setupinitial: style Parameter resets size

2021-07-25 Thread Axel Kielhorn
Hi,

since the lettrine module does not work with LMTX, I’ve looked into 
\setupinitial.
(There is a different thread about this.)

There is a „style“ parameter to change the style, but whenever I change the 
style, the font size is reset.
This is not what I expected.

This was the case in context before LMTX, thus it is not a regression.

% !TEX TS-program = ConTeXt (LuaTeX LMTX2021)
% !TEX encoding = UTF-8 Unicode

\starttext

\setupinitial[color=red]

\start
\setupinitial[n=2,m=1]
\placeinitial\input ward
\stop

\start
\setupinitial[style=\tf,n=2,m=1]
\placeinitial\input ward
\stop

\start
\setupinitial[font=Roman at 32 pt,n=2,m=1]
\placeinitial\input ward
\stop

\start
\setupinitial[style=\it,n=2,m=1]
\placeinitial\input ward
\stop

\start
\setupinitial[font=Italic at 32 pt,n=2,m=1]
\placeinitial\input ward
\stop

\start
\setupinitial[style=\it,font=Italic at 32 pt,n=2,m=1]
\placeinitial\input ward
\stop

\stoptext

Are my expectations wrong?

Greetings
Axel
___
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] Solution: LMTX initial (drop cap) in combination with indenting

2021-07-22 Thread Gerben Wierda

> On 21 Jul 2021, at 22:38, Nicola  wrote:
> 
> On 2021-07-21, Gerben Wierda  <mailto:gerben.wie...@rna.nl>> wrote:
>>> On 19 Jul 2021, at 09:56, Nicola  wrote:
>>> 
>>> On 2021-07-18, Gerben Wierda  wrote:
>>>> PS. switching \kap and \bf has an interesting result, the first
>>>> character of the words is not in bold. This did not happen with
>>>> lettrine in mkii
>>> 
>>> I do not have an answer to your question, but I'd like to point out that
>>> you can keep using lettrine with ConTeXt LMTX, if you wish. You just
>>> need to add the modules manually, currently:
>>> 
>>>   https://wiki.contextgarden.net/Modules#ConTeXt_LMTX
>> 
>> I’ve tried this. Installed the modules and then I get with
> 
> I was sure that I had used lettrine with MKIV in a document of mine, but
> after your reply I double checked that and, in fact, I was using
> lettrine only with MKII. On the plus side, I have recovered my settings
> for MKIV (which work with LMTX as well).
> 
> I think that the `distance` parameter of \setupinitials does what you
> want. Besides, if your font provides real small capitals, you may use
> \definefirstline.
> 
> This is how I set up things in one of my documents:
> 
> 
> \definefontfeature[default][default][protrusion=quality,expansion=quality,onum=no,lnum=yes]
> 
> % \definefirstline below requires a font that implements small capitals as
> % a feature (Latin Modern does not). I have used this:
> % \definefontfamily[mainfont][serif][Sorts Mill Goudy] [
> %   tf=name:Sorts Mill Goudy Regular,
> %   it=name:Sorts Mill Goudy Italic,
> % ]
> % If you don't have the font above, try this:
> \setupbodyfont[heros]
> 
> \setupbodyfont[mainfont,11pt]
> 
> \definemeasure[CAindent][12pt]
> \setupindenting[yes,\measure{CAindent}]
> 
> % Every chapter body text starts with a drop cap:
> \defineinitial[normal][
>  n=3,
>  m=1,
>  distance=18pt, % <== Add this 
>  state=start
> ]
> 
> % Special case: drop cap starting with a quote
> \defineinitial[quote][
>  n=3,
>  m=2,
>  distance=13pt,
>  hoffset=5pt, % Move drop cap a bit to the left
>  method=none
> ]
> 
> % Some initials may need special adjustments, depending on the font
> \defineinitial[Q][
>  voffset=2\lineheight,
>  n=3,
>  m=1,
>  distance=18pt,
>  state=start
> ]
> 
> % Full first line in small caps
> \definefirstline[smallcapsfirstline][
>  alternative=line,
>  style=smallcaps,
> ]
> 
> % First n words in small caps (three in this case)
> \definefirstline[smallcapsfirstlinethree][
>  alternative=word,
>  n=3,
>  style=smallcaps,
> ]
> 
> \starttext
> \setfirstline[smallcapsfirstlinethree]
> \setinitial[normal] Suppose we have a system for the approval of
> loans. \input knuth
> \blank[2*big]
> 
> \setfirstline[smallcapsfirstline]
> \setinitial[quote] “Suppose we have a system for the approval of
> loans.” \input knuth
> \blank[2*big]
> 
> \setfirstline[smallcapsfirstline]
> \setinitial[Q] Quo usque tandem abutere, Catilina, patientia nostra? quam diu
> etiam furor iste tuus nos1 eludet? quem ad finem sese effrenata iactabit
> audacia?
> 
> \stoptext
> 
> 
> I hope this will give you some ideas!
> 
> References:
> 
>https://wiki.contextgarden.net/Command/setupinitial 
> <https://wiki.contextgarden.net/Command/setupinitial>
>https://wiki.contextgarden.net/Command/definefirstline 
> <https://wiki.contextgarden.net/Command/definefirstline>
>https://www.fontsquirrel.com/fonts/Sorts-Mill-Goudy 
> <https://www.fontsquirrel.com/fonts/Sorts-Mill-Goudy>
> 
> Nicola

Hi Nicola,

Thanks. This solves the indentation of the initial itself. What remains is the 
indentation of the text immediately after, e.g. the 'uppose we’. Minimum 
example (also visible in your example):


% This combination of indenting and initial does not work properly, the text 
following the initial should be unindented
\definemeasure[CAindent][12pt]
\setupindenting[yes,\measure{CAindent}]
% Every chapter body text starts with a drop cap:

\defineinitial[normal][n=3,m=1,hoffset=\measure{CAindent},state=start]

\starttext
\setinitial[normal] S {\bf{\kap uppose we}} have a system for the approval of
loans. \input knuth
\stoptext
%%%%

The ‘uppose we’ should not be indented more than the lines directly

Re: [NTG-context] Use of lettrine module in LMTX

2021-07-21 Thread Nicola
On 2021-07-21, Gerben Wierda  wrote:
>> On 19 Jul 2021, at 09:56, Nicola  wrote:
>>
>> On 2021-07-18, Gerben Wierda  wrote:
>>> PS. switching \kap and \bf has an interesting result, the first
>>> character of the words is not in bold. This did not happen with
>>> lettrine in mkii
>>
>> I do not have an answer to your question, but I'd like to point out that
>> you can keep using lettrine with ConTeXt LMTX, if you wish. You just
>> need to add the modules manually, currently:
>>
>>https://wiki.contextgarden.net/Modules#ConTeXt_LMTX
>
> I’ve tried this. Installed the modules and then I get with

I was sure that I had used lettrine with MKIV in a document of mine, but
after your reply I double checked that and, in fact, I was using
lettrine only with MKII. On the plus side, I have recovered my settings
for MKIV (which work with LMTX as well).

I think that the `distance` parameter of \setupinitials does what you
want. Besides, if your font provides real small capitals, you may use
\definefirstline.

This is how I set up things in one of my documents:


\definefontfeature[default][default][protrusion=quality,expansion=quality,onum=no,lnum=yes]

% \definefirstline below requires a font that implements small capitals as
% a feature (Latin Modern does not). I have used this:
% \definefontfamily[mainfont][serif][Sorts Mill Goudy] [
%   tf=name:Sorts Mill Goudy Regular,
%   it=name:Sorts Mill Goudy Italic,
% ]
% If you don't have the font above, try this:
\setupbodyfont[heros]

\setupbodyfont[mainfont,11pt]

\definemeasure[CAindent][12pt]
\setupindenting[yes,\measure{CAindent}]

% Every chapter body text starts with a drop cap:
\defineinitial[normal][
  n=3,
  m=1,
  distance=18pt, % <== Add this 
  state=start
]

% Special case: drop cap starting with a quote
\defineinitial[quote][
  n=3,
  m=2,
  distance=13pt,
  hoffset=5pt, % Move drop cap a bit to the left
  method=none
]

% Some initials may need special adjustments, depending on the font
\defineinitial[Q][
  voffset=2\lineheight,
  n=3,
  m=1,
  distance=18pt,
  state=start
]

% Full first line in small caps
\definefirstline[smallcapsfirstline][
  alternative=line,
  style=smallcaps,
]

% First n words in small caps (three in this case)
\definefirstline[smallcapsfirstlinethree][
  alternative=word,
  n=3,
  style=smallcaps,
]

\starttext
\setfirstline[smallcapsfirstlinethree]
\setinitial[normal] Suppose we have a system for the approval of
loans. \input knuth
\blank[2*big]

\setfirstline[smallcapsfirstline]
\setinitial[quote] “Suppose we have a system for the approval of
loans.” \input knuth
\blank[2*big]

\setfirstline[smallcapsfirstline]
\setinitial[Q] Quo usque tandem abutere, Catilina, patientia nostra? quam diu
etiam furor iste tuus nos1 eludet? quem ad finem sese effrenata iactabit
audacia?

\stoptext


I hope this will give you some ideas!

References:

https://wiki.contextgarden.net/Command/setupinitial
https://wiki.contextgarden.net/Command/definefirstline
https://www.fontsquirrel.com/fonts/Sorts-Mill-Goudy

Nicola




___
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] LMTX and lettrine

2021-07-19 Thread Wolfgang Schuster

Pablo Rodriguez schrieb am 18.07.2021 um 18:16:

On 7/18/21 3:35 PM, Gerben Wierda wrote:

I am trying to find out how to move this setup in mkii

23     \usemodule[lettrine]
24 >>  \setuplettrine[Lines=3,
25                    Hang=.5,
26                    Oversize=0,
27                    Raise=0,
28                    Findent=0pt,
29                    Nindent=0em,
30                    Slope=0em,
31                    Ante=,
32                    FontHook=,
33                    TextFont=\sc,
34                    Image=no]

to lmtx. (Basically, ConTeXtgarden gives my mike info for lettrine)

Hi Gerben,

\setupinitial is your friend.

i-context.pdf (included in LMTX) contains the available options
(searching for "\setupinitial [", without quotation marks).


Both commands have different feature sets, e.g. with lettrine you can use
a image for the initial and you can also use the slope option to change the
indentation for letters like A or V.

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] drop cap (initial) and indentation

2021-07-18 Thread Gerben Wierda
With the following minimal example:

\definemeasure[CAindent][12pt]
% Every chapter body text starts with a drop cap:
\setupinitial[n=3,m=1,-\measure{CAindent}]]
\setupindenting[yes,\measure{CAindent}]

\starttext
\placeinitial S{\bf{\kap uppose we}} have a system for the approval of
loans. \input knuth
\stoptext

both the initial and the bold stuff after it is indented. With hoffset I can 
move the initial, but not what comes after. I have been experimenting but 
haven’t found a way to solve this.

Gerben Wierda (LinkedIn <https://www.linkedin.com/in/gerbenwierda>)
R Enterprise Architecture <https://ea.rna.nl/> (main site)
Book: Chess and the Art of Enterprise Architecture <https://ea.rna.nl/the-book/>
Book: Mastering ArchiMate <https://ea.rna.nl/the-book-edition-iii/>

PS. switching \kap and \bf has an interesting result, the first character of 
the words is not in bold. This did not happen with lettrine in mkii

___
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] LMTX and lettrine

2021-07-18 Thread Pablo Rodriguez
On 7/18/21 3:35 PM, Gerben Wierda wrote:
> I am trying to find out how to move this setup in mkii
>
> 23     \usemodule[lettrine]
> 24 >>  \setuplettrine[Lines=3,
> 25                    Hang=.5,
> 26                    Oversize=0,
> 27                    Raise=0,
> 28                    Findent=0pt,
> 29                    Nindent=0em,
> 30                    Slope=0em,
> 31                    Ante=,
> 32                    FontHook=,
> 33                    TextFont=\sc,
> 34                    Image=no]
>
> to lmtx. (Basically, ConTeXtgarden gives my mike info for lettrine)

Hi Gerben,

\setupinitial is your friend.

i-context.pdf (included in LMTX) contains the available options
(searching for "\setupinitial [", without quotation marks).

I hope 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] Initial caps with short paragraph

2021-07-09 Thread Hans Hagen

On 7/9/2021 1:58 AM, Thangalin wrote:
This has come up before on the mailing list, but I was wondering if LMTX 
has a more elegant solution than using a transparent/invisible capture 
of the drop-cap.


Consider:

|\setupinitial[n=2, style=\tfd, location=text] 
\setuphead[chapter][after={\placeinitial}] \starttext \chapter Hello 
world! \input ward \stoptext |


The output shows that the second paragraph is not indented beyond the 
bounding box of the drop-cap, resulting in an overlap. This isn't a 
problem when the first paragraph spans two or more lines.


Any ideas for how to resolve this without changing the content?
all is possible but in a complex system with lots of possible 
interactions it will never be robust (especially carrying over stuff 
across paragraphs and page boundaries)


I'll provide

\forgetinitial

and maybe some more clever hack but then i first have to play more with 
some new features (there are a bunch awaiting experiments).


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
___


[NTG-context] Initial caps with short paragraph

2021-07-08 Thread Thangalin
This has come up before on the mailing list, but I was wondering if LMTX
has a more elegant solution than using a transparent/invisible capture of
the drop-cap.

Consider:

\setupinitial[n=2, style=\tfd,
location=text]\setuphead[chapter][after={\placeinitial}]
\starttext
  \chapter

  Hello world!

  \input ward\stoptext

The output shows that the second paragraph is not indented beyond the
bounding box of the drop-cap, resulting in an overlap. This isn't a problem
when the first paragraph spans two or more lines.

Any ideas for how to resolve this without changing the content?

Thank you!
___
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] lmtx and defined placeinitial color

2021-05-25 Thread Hans Hagen

On 5/25/2021 2:10 AM, jbf wrote:
If I run the following in lmtx, the defined color is not recognized and 
I get black instead. If I run it as mkiv with --luatex, I get the 
darkgray I defined. Is there something else I need to do for lmtx?


\definecolor[darkgray][s=.4]

\setupinitial[color=darkgray,font=adellesemibold at 46pt,distance=3pt,n=3]

\starttext

\placeinitial{M}{\sc aking sense of the world} at any time is a fraught 
exercise...


\stoptext

fixed in next upload


-
  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] lmtx and defined placeinitial color

2021-05-24 Thread jbf
If I run the following in lmtx, the defined color is not recognized and 
I get black instead. If I run it as mkiv with --luatex, I get the 
darkgray I defined. Is there something else I need to do for lmtx?


\definecolor[darkgray][s=.4]

\setupinitial[color=darkgray,font=adellesemibold at 46pt,distance=3pt,n=3]

\starttext

\placeinitial{M}{\sc aking sense of the world} at any time is a fraught 
exercise...


\stoptext

Julian

___
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] distance parameter of \setupinitial

2020-12-14 Thread Henning Hraban Ramm
Hi,

I’d like an initial in front of the text block.
It works more or less, but I find the behaviour of the distance parameter 
confusing:

If I set it to -1em (like in the MWE below), the text lines get indented a bit 
on the right side.
With somewhat bigger values, the indent disappears, but the initial is moved to 
the left.
But the initial should nearly touch the first characters, and the text lines 
should be full width.

The behavior is the same with (latest) MkIV and LMTX.

Is there a misunderstanding of the parameters on my side, or is this a bug?


\setupinitial[
distance=-1em,
n=2,
hoffset=1em,
]
\showframe

\starttext

\placeinitial{L}orem ipsum. \input lorem

\stoptext


Hraban
___
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] lmtx update

2020-09-17 Thread Eduardo Bohoyo


El 17/9/20 a las 12:50, Eduardo Bohoyo escribió:


El 17/9/20 a las 12:35, Wolfgang Schuster escribió:

Eduardo Bohoyo schrieb am 17.09.2020 um 10:14:

Thank you for this illustrative example, Wolfgang.

So, what \forgetparagraphfreezing does is to reverse the order that 
lmtx currently imposes by default, right? In other words, 
\forgetparagraphfreezing, recovers the default behaviour of MkIV.


So, I suspect that this will not change; if we want to apply 
Lettrine to a paragraph, from now on we must wrap it up with 
\forgetparagraphfreezing and \setparagraphfreezing.


Please correct me if I'm wrong.


LMTX removes some restrictions for settings which are applies to 
paragraphs, e.g. the following example works now without problems 
with LMTX while LuaTeX needs the \dontleavehmode at the begin of the 
paragraph


\starttext

\placefigure[left]{none}{\framed[width=2cm,height=2cm]{}}
%\dontleavehmode
{\bf Tufte: }\input tufte

\stoptext

To avoid side effects from these changes LMTX freezes a few settings 
at the begin of the paragraph. In some cases commands or settings 
have to be adapted to these changes and the lettrine module is one of 
them.


The changes itself to the commands have to be made in the modules 
etc. itself and not in the documents, below is a minimal example how 
the lettrine module has to be changed to get indentation for the 
initial back.


\starttext

\hsize 10cm

\noindent
\parshape 3 1cm 9cm 1.5cm 8.5cm 0cm 10cm
\input weisman

\blank

\begingroup
\noindent
\parshape 3 1cm 9cm 1.5cm 8.5cm 0cm 10cm
\updateparagraphshapes
\endgroup
\input weisman

\stoptext

BTW: ConTeXt already provides a command to place initials as part of 
the core but it lacks a few features of the lettrine module.


Wolfgang



OK, I get it.

Oh, and yes, I knew about the \setupinitial command. Thanks for 
pointing that out.



Sorry, Wolfgag,

I forgot to sign my reply.

Eduardo

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

2020-09-17 Thread Eduardo Bohoyo


El 17/9/20 a las 12:35, Wolfgang Schuster escribió:

Eduardo Bohoyo schrieb am 17.09.2020 um 10:14:

Thank you for this illustrative example, Wolfgang.

So, what \forgetparagraphfreezing does is to reverse the order that 
lmtx currently imposes by default, right? In other words, 
\forgetparagraphfreezing, recovers the default behaviour of MkIV.


So, I suspect that this will not change; if we want to apply Lettrine 
to a paragraph, from now on we must wrap it up with 
\forgetparagraphfreezing and \setparagraphfreezing.


Please correct me if I'm wrong.


LMTX removes some restrictions for settings which are applies to 
paragraphs, e.g. the following example works now without problems with 
LMTX while LuaTeX needs the \dontleavehmode at the begin of the paragraph


\starttext

\placefigure[left]{none}{\framed[width=2cm,height=2cm]{}}
%\dontleavehmode
{\bf Tufte: }\input tufte

\stoptext

To avoid side effects from these changes LMTX freezes a few settings 
at the begin of the paragraph. In some cases commands or settings have 
to be adapted to these changes and the lettrine module is one of them.


The changes itself to the commands have to be made in the modules etc. 
itself and not in the documents, below is a minimal example how the 
lettrine module has to be changed to get indentation for the initial 
back.


\starttext

\hsize 10cm

\noindent
\parshape 3 1cm 9cm 1.5cm 8.5cm 0cm 10cm
\input weisman

\blank

\begingroup
\noindent
\parshape 3 1cm 9cm 1.5cm 8.5cm 0cm 10cm
\updateparagraphshapes
\endgroup
\input weisman

\stoptext

BTW: ConTeXt already provides a command to place initials as part of 
the core but it lacks a few features of the lettrine module.


Wolfgang



OK, I get it.

Oh, and yes, I knew about the \setupinitial command. Thanks for pointing 
that out.


___
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] Capitalize first word of first line within \startlines

2020-03-04 Thread Hans Hagen

On 3/4/2020 5:09 PM, Thangalin wrote:

Looking to uppercase the first word of a poem:

\setupindenting[yes, 0.75em]

\setupinitial[
   state=start,
   n=2,
   distance=\zeropoint,
]

% This does not appear to work?
\definealternativestyle[PoemFirstWord][\WORD][]

\definefirstline[PoemFirstLine][
   alternative=word,
   style=PoemFirstWord,
   n=1,
]

\definestartstop[poem][
   before={\startlines \setfirstline[PoemFirstLine] \placeinitial},
   after={\stoplines},
]

\setuplines[indenting=odd]

\starttext
\startpoem
Some say the world will end in fire,
Some say in ice.
 From what I've tasted of desire
I hold with those who favor fire.
But if it had to perish twice,
I think I know enough of hate
To say that for destruction ice
Is also great,
And would suffice.
\stoppoem
\stoptext

Any ideas why the first word is not capitalized?
because it is not applied to that stretch ... but i will send you 
something to play with ... kind of braindead trivial piece of code but 
it needs testing a bit


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
___


[NTG-context] Capitalize first word of first line within \startlines

2020-03-04 Thread Thangalin
Looking to uppercase the first word of a poem:

\setupindenting[yes, 0.75em]

\setupinitial[
  state=start,
  n=2,
  distance=\zeropoint,
]

% This does not appear to work?
\definealternativestyle[PoemFirstWord][\WORD][]

\definefirstline[PoemFirstLine][
  alternative=word,
  style=PoemFirstWord,
  n=1,
]

\definestartstop[poem][
  before={\startlines \setfirstline[PoemFirstLine] \placeinitial},
  after={\stoplines},
]

\setuplines[indenting=odd]

\starttext
\startpoem
Some say the world will end in fire,
Some say in ice.
From what I've tasted of desire
I hold with those who favor fire.
But if it had to perish twice,
I think I know enough of hate
To say that for destruction ice
Is also great,
And would suffice.
\stoppoem
\stoptext

Any ideas why the first word is not capitalized?

Thank you!
___
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] Grammar to parse TeX input?

2018-11-28 Thread Hans Hagen

On 11/28/2018 9:33 AM, Joseph Canedo wrote:
I’d like to change some input to modify used font but only in parts of 
it, for example to implement having first line with different font. So 
basically if I have text with macros etc…:

% firstlines-001.tex

\setupbodyfont
  [pagella]

\setupalign
  [tolerant,stretch]

\setupfirstline
  [alternative=line,
   color=darkred,
   style=\setfontfeature{smallcaps}]

\setupfirstline
  [fancy]
  [n=3]

\setupfirstline
  [fancier]
  [alternative=word,
   color=darkblue,
   style=bold,
   n=3]

\setupfirstline
  [weirder]
  [alternative=line,
   color=darkgreen,
   style=\setfontfeature{smallcaps},
   n=3]

\setupinitial
  [location=text,
   n=2,
   color=darkred,
   voffset=1.2\lineheight,
   before={\blank[2*big]}]

% \enabletrackers[typesetters.firstlines,typesetters.initials]

\starttext

\setfirstline

\input ward \par

\placeinitial

\input ward \par

\setupindenting[medium,yes]

\setinitial % \placeinitial

\input ward \par

\setinitial %  \placeinitial
\setfirstline

\input ward \par

\setfirstline[fancy]

\input ward \par

\setfirstline[fancier]

\input ward \par

\setinitial %  \placeinitial
\setfirstline[weirder]

\input ward \par

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

[NTG-context] Problems with setfirstline

2017-10-18 Thread Rik Kabel
Setfirstline does not seem to be working well with most fonts, perhaps 
all. The example below shows the issue.


   \define \Fonts
    {libertinus,ebgaramond,termes,antykwa,
 cambria,minion,bonum,heros,pagella,iwona}
   \define[1]  \Setupbodyfont{\setupbodyfont[#1,11pt]}
   \define[1] \DisplayExample{\switchtobodyfont[#1]\getbuffer}

   \setupfirstline [alternative=line,
 style=\setfontfeature{smallcaps}]
   \setupinitial   [location=text,n=2,color=darkred]

   \setuphead  [chapter][
   after={\blank[big]\setfirstline\setinitial}]
   \setuphead  [section][continue=yes,
 after=\setfirstline]

   \startbuffer
    \startchapter[title=Initial and first line: \Word{\fontclass}]
    \startparagraph
    \input darwin
    \stopparagraph
 \startsection[title=First line only]
    \startparagraph
    \input montgomery
    \stopparagraph
    \startparagraph
    \input sapolsky
    \stopparagraph
    \stopsection
    \stopchapter
   \stopbuffer

   \expandafter\processcommalist\expandafter[\Fonts]\Setupbodyfont

   \starttext

   \expandafter\processcommalist\expandafter[\Fonts]\DisplayExample

   \stoptext

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

Re: [NTG-context] Initials and short paragraph

2017-06-24 Thread Martin Oppegaard
Thank you, I think I can make something with this.

On Tue, Jun 20, 2017 at 9:45 PM, Pablo Rodriguez <oi...@gmx.es> wrote:

> On 06/20/2017 10:15 PM, Martin Oppegaard wrote:
> > Thanks for the suggestions! Is there a way to get the amount of
> > horizontal space the initial takes so that can be put in manually in
> > front of the next paragraph?
>
> Martin,
>
> how about making the initial transparent?
>
> \definecolor[transparentblue][t=0, a=1]
> \setupwhitespace[medium]
> \starttext
> \placeinitial
> Knuth writes:
>
> \placeinitial \starteffect[hidden]K\stopeffect\input knuth
> \setupinitial[color=transparentblue]
>
> \placeinitial K\input knuth
> \stoptext
>
> The sample contains two methods.
>
> 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
> 
> ___
>
___
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] Initials and short paragraph

2017-06-20 Thread Pablo Rodriguez
On 06/20/2017 10:15 PM, Martin Oppegaard wrote:
> Thanks for the suggestions! Is there a way to get the amount of
> horizontal space the initial takes so that can be put in manually in
> front of the next paragraph?

Martin,

how about making the initial transparent?

\definecolor[transparentblue][t=0, a=1]
\setupwhitespace[medium]
\starttext
\placeinitial
Knuth writes:

\placeinitial \starteffect[hidden]K\stopeffect\input knuth
\setupinitial[color=transparentblue]

\placeinitial K\input knuth
\stoptext

The sample contains two methods.

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] Initials and short paragraph

2017-06-20 Thread Martin Oppegaard
Thanks for the suggestions! Is there a way to get the amount of horizontal
space the initial takes so that can be put in manually in front of the next
paragraph?

On Tue, Jun 20, 2017 at 6:51 PM, Pablo Rodriguez <oi...@gmx.es> wrote:

> On 06/09/2017 07:05 AM, Martin Oppegaard wrote:
> > Hi,
> >
> > When placing an initial and the paragraph is short, the initial is
> > laid over the next paragraph. Example:
> >
> > \starttext
> > \placeinitial
> > Knuth writes:
> >
> > \input knuth
> > \stoptext
> >
> > Is there anything to do about this?
>
> Hi Martin,
>
> I guess initials make sense only when used inside a paragraph. It is
> problematic when you have white space defined.
>
> Having margin initials is also another approach. You may compare both
> with the following sample:
>
> \setupwhitespace[medium]
> \setupinitial[location=margin]
> \starttext
> \placeinitial
> Knuth writes:
>
> \input knuth
> \setupinitial[location=text]
> \placeinitial
> Knuth writes:\\
> \input knuth
> \stoptext
>
> I hope 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
> 
> ___
>
___
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] Initials and short paragraph

2017-06-20 Thread Pablo Rodriguez
On 06/09/2017 07:05 AM, Martin Oppegaard wrote:
> Hi,
> 
> When placing an initial and the paragraph is short, the initial is
> laid over the next paragraph. Example:
> 
> \starttext
> \placeinitial
> Knuth writes:
> 
> \input knuth
> \stoptext
> 
> Is there anything to do about this?

Hi Martin,

I guess initials make sense only when used inside a paragraph. It is
problematic when you have white space defined.

Having margin initials is also another approach. You may compare both
with the following sample:

\setupwhitespace[medium]
\setupinitial[location=margin]
\starttext
\placeinitial
    Knuth writes:

\input knuth
\setupinitial[location=text]
\placeinitial
Knuth writes:\\
\input knuth
\stoptext

I hope 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] Issue with initial (new beta)

2015-11-20 Thread josephcanedo
Dear all,


First of all, thanks for new beta. It fixes the initial feature (in previous 
beta there were not typeset at all).


But while testing (a bit somewhat extreme example to push the limits) I came up 
with some initial letter hanging in the footer (page 3). Not sure the issue is 
linked with mixedcolumns but could not reproduce in plain vanilla environment. 

Also I noticed that if the paragraph is too short the initial overwrites the 
next paragraph(s) (to reproduce simply comment out the mixedcolumns).


MWE:


\starttext


\startmixedcolumns[balance=yes]
  \dorecurse{10}{ \setupinitial[location=text, n=4] \placeinitial \input{ward} 
\setupinitial[location=text, n=6] \placeinitial \input{knuth} }
\stopmixedcolumns


\stoptext



Admitedly this example has lots of lettrines. I added some \testcolumn to fix 
that, but now some columns are not balanced (page 3)


\starttext


\startmixedcolumns[balance=yes]
  \dorecurse{10}{ \setupinitial[location=text, n=4] \testcolumn[4] 
\placeinitial \input{ward} \setupinitial[location=text, n=6] \testcolumn[6] 
\placeinitial \input{knuth} }
\stopmixedcolumns


\stoptext



I was wondering if there were any settings to try more “aggressive” balancing 
(in the example here it might be difficult). or an alternative way to let the 
initial not hang into the footer that might be more “balanced” friendly. 


Many thanks for any hint,


Best regards


Joseph___
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] \placeinitial not working

2015-11-02 Thread Alan Bowen
Hi, Pablo—

I reinstalled Context Suite/Standalone for Mac OSX and see that it comes
with luatex beta 0.80.

So I will have to wait for the next ConTeXt beta, I guess.

Alan

On Sun, Nov 1, 2015 at 12:43 PM, Pablo Rodriguez <oi...@gmx.es> wrote:

> On 11/01/2015 05:14 PM, Alan Bowen wrote:
> > Thanks, Hans.
> >
> > Will the next beta standalone from the Pragma site come with luatex0.81
> > or is this a separate download?
>
> Hi Alan,
>
> at least for Linux 32bit (I’m on Fedora 22), luatex-0.81 was included
> with latest beta (2015.10.09 21:28) from the ConTeXt Suite (aka ConTeXt
> Standalone).
>
> Just in case it might help,
>
> Pablo
>
> >
> > On Sun, Nov 1, 2015 at 9:18 AM, Hans Hagen wrote:
> >
> > On 10/31/2015 2:26 PM, Alan Bowen wrote:
> >
> > \placeinitial used to work but now does not with the latest beta.
> >
> > Try the example from http://wiki.contextgarden.net/Initials.
> >
> > \setupinitial[color=red,font=Bold sa
> 4,distance=3pt,state=start,n=3]
> >
> > \starttext
> >
> > \placeinitial \input knuth
> >
> > \stoptext
> >
> >
> > fixed in next beta (we can now probably assume the garden has luatex
> > 0.81 for all platforms)
> >
> >
>
> --
> 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://tex.aanhet.net
> archive  : http://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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] \placeinitial not working

2015-11-02 Thread Hans Hagen

On 11/1/2015 5:14 PM, Alan Bowen wrote:

Thanks, Hans.

Will the next beta standalone from the Pragma site come with luatex0.81
or is this a separate download?


just the garden


Alan

On Sun, Nov 1, 2015 at 9:18 AM, Hans Hagen <pra...@wxs.nl
<mailto:pra...@wxs.nl>> wrote:

On 10/31/2015 2:26 PM, Alan Bowen wrote:

\placeinitial used to work but now does not with the latest beta.

Try the example from http://wiki.contextgarden.net/Initials.

\setupinitial[color=red,font=Bold sa 4,distance=3pt,state=start,n=3]

\starttext

\placeinitial \input knuth

\stoptext


fixed in next beta (we can now probably assume the garden has luatex
0.81 for all platforms)


-
   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
<http://www.pragma-ade.com>
  | www.pragma-pod.nl
<http://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 <mailto: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

___




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




--

-
  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] \placeinitial not working

2015-11-01 Thread Alan Bowen
Thanks, Hans.

Will the next beta standalone from the Pragma site come with luatex0.81 or
is this a separate download?

Alan

On Sun, Nov 1, 2015 at 9:18 AM, Hans Hagen <pra...@wxs.nl> wrote:

> On 10/31/2015 2:26 PM, Alan Bowen wrote:
>
>> \placeinitial used to work but now does not with the latest beta.
>>
>> Try the example from http://wiki.contextgarden.net/Initials.
>>
>> \setupinitial[color=red,font=Bold sa 4,distance=3pt,state=start,n=3]
>>
>> \starttext
>>
>> \placeinitial \input knuth
>>
>> \stoptext
>>
>
> fixed in next beta (we can now probably assume the garden has luatex 0.81
> for all platforms)
>
>
> -
>   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
>
> ___
___
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] \placeinitial not working

2015-11-01 Thread Pablo Rodriguez
On 11/01/2015 05:14 PM, Alan Bowen wrote:
> Thanks, Hans. 
> 
> Will the next beta standalone from the Pragma site come with luatex0.81
> or is this a separate download?

Hi Alan,

at least for Linux 32bit (I’m on Fedora 22), luatex-0.81 was included
with latest beta (2015.10.09 21:28) from the ConTeXt Suite (aka ConTeXt
Standalone).

Just in case it might help,

Pablo

> 
> On Sun, Nov 1, 2015 at 9:18 AM, Hans Hagen wrote:
> 
> On 10/31/2015 2:26 PM, Alan Bowen wrote:
> 
> \placeinitial used to work but now does not with the latest beta.
> 
> Try the example from http://wiki.contextgarden.net/Initials.
> 
> \setupinitial[color=red,font=Bold sa 4,distance=3pt,state=start,n=3]
> 
> \starttext
> 
> \placeinitial \input knuth
> 
> \stoptext
> 
> 
> fixed in next beta (we can now probably assume the garden has luatex
> 0.81 for all platforms)
> 
> 

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

Re: [NTG-context] \placeinitial not working

2015-11-01 Thread Hans Hagen

On 10/31/2015 2:26 PM, Alan Bowen wrote:

\placeinitial used to work but now does not with the latest beta.

Try the example from http://wiki.contextgarden.net/Initials.

\setupinitial[color=red,font=Bold sa 4,distance=3pt,state=start,n=3]

\starttext

\placeinitial \input knuth

\stoptext


fixed in next beta (we can now probably assume the garden has luatex 
0.81 for all platforms)



-
  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] \placeinitial not working

2015-10-31 Thread Alan Bowen
\placeinitial used to work but now does not with the latest beta.

Try the example from http://wiki.contextgarden.net/Initials.

\setupinitial[color=red,font=Bold sa 4,distance=3pt,state=start,n=3]

\starttext

\placeinitial \input knuth

\stoptext

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
___

Re: [NTG-context] mkiv versus mkii: whitespace issues

2015-03-15 Thread Gerben Wierda
 started, do not worry: there is no need to know what I am
talking about here in a technical sense. You can read this without
understanding any of the technical references. Just skip over them, their
specifics are not important to the story. They are real enough, though.  You
can trust me on that, or ask your engineers.}. Our system has business rules
and for a certain class of prospective customers, an extra check is needed
(thus say the business rules).  This check involves sending a message to a
credit rating institute and waiting for the result. Our system will in those
cases use our Enterprise Service Bus (ESB) to send a message to a server
(which runs a service for this function, hence Service Oriented Architecture
or SOA) which then handles the interaction with the credit rating institute
via a dedicated secure link.  Since we only do this check in a small
percentage of cases, the server handling the requests and replies to the
credit institute is limited in size and our secure link is narrow as well.

\stoptext
\stopcomponent
=

env_cataoia.tex mkiv =
\startenvironment env_cataoia
\project project_cataoia
%
\definedescription [description]
[location=serried, width=broad, hang=fit, margin=standard,
headstyle=bold]
\definestartstop [descriptions] [before=\startpacked,
after=\stoppacked]
%
\def\SSCONTEXT {Con\kern-.15em\TeX t}
%
%
\definepapersize[smallpaperback][width=5in,height=8in]
\setuppapersize[smallpaperback][smallpaperback]
\setuplayout[location=doublesided]
\setuppagenumbering[alternative=doublesided]
\setupsectionblock[frontpart][page=no]
\setupsectionblock[bodypart][page=no]
\setupsectionblock[appendix][page=no]
\setupsectionblock[backpart][page=no]

% Every chapter body text starts with lettrine:
\usemodule[oldbibtex]
\setupinitial[font=Normal cp
\measure{initial:n},hoffset=3ex,voffset=2.1\lineheight,n=3,m=1,distance=-3ex]
%\usemodule[lettrine]
%\setuplettrine[Lines=3,
%   Hang=.5,
%   Oversize=0,
%   Raise=0,
%   Findent=0pt,
%   Nindent=0em,
%   Slope=0em,
%   Ante=,
%   FontHook=,
%   TextFont=\sc,
%   Image=no]

% Every chapter starts with a quote on the LHS page:
\setuphead
  [chapter]
  [page=,
   before={\setups[chapter:before]},
   after={\setups[chapter:after]}]

\startsetups chapter:before
\page[left]
\noheaderandfooterlines
\startalignment[left,nothyphenated]
\startnarrower[4*left]
\em \getbuffer[chapter:quote]
\stopnarrower
\stopalignment
\resetsetups[quote:text]
\page[right]
\noheaderandfooterlines
\blank[force,2*big]
\stopsetups

\startsetups chapter:after
\blank[3*big]
\stopsetups

% Mark TODO items in the text
\def\todo#1{{\red --- --- --- TODO: {#1} --- --- ---}}

%
\setuptolerance[horizontal=strict]
\setupcolors[state=start]
\setupcolor[rgb]
%
\setupquote[style=small]

\starttypescript [sans] [optima]
\setups[font:fallback:sans]
\definefontsynonym [Sans]   [file:optima.ttc(Optima Regular)]
\definefontsynonym [SansItalic] [file:optima.ttc(Optima Italic)]
\definefontsynonym [SansBold]   [file:optima.ttc(Optima Bold)]
\definefontsynonym [SansBoldItalic] [file:optima.ttc(Optima Bold
Italic)]
\stoptypescript

\definetypeface [optima] [ss] [sans] [optima] [default] [features=default]
\definetypeface [optima] [mm] [math] [modern] [default]

\setupbodyfont[optima,10pt]

\setupalign[hanging]

%

%\def\doalignline#1#2% \\ == newline
% {\ifhmode\hfil\break\fi
%  \begingroup
%  \setlocalhsize % new
%  \def\\{\egroup\par\doalignline{#1}{#2}\bgroup}%
%  \dowithnextbox
%{\noindent
% \hbox to \localhsize
%   {\ifcase\alignstrutmode\or\strut\fi
% #1\unhbox\nextbox#2}\endgroup}
%\hbox}

\def\startBookQuote
 {\par\bgroup
  \setupnarrower[before=]\startnarrower\indenting[never]\tfx}
\def\stopBookQuote{\stopnarrower\egroup}
%
\startmode[standalone]
  \setupfootertexts[pagenumber][{\jobname-\filename{\currentcomponent}}]
  \def\maybeendnotes
 {\subsubject{Notes} \placenotes[endnote] \subsubject{Bibliography}
\switchtobodyfont[9pt]
\placepublications[criterium=all]}
  \appendtoks \maybeendnotes \to \everystoptext
\stopmode
%
\setupcaption[figure][style=small]
\setupinteraction[state=start]

\definemeasure[CAindent][12pt]
\setupindenting[yes,\measure{CAindent}]
\setupnarrower
  [ left=\measure{CAindent},
right=\measure{CAindent},
   middle=\measure{CAindent}]
\setupitemize[each][margin=\measure{CAindent},width=\measure{CAindent}]

\defineenumeration[Step][headstyle=slanted,
location=hanging,width=fit,stopper=:,margin=\measure{CAindent},]
\defineenumeration[Phase][headstyle=slanted,
location=hanging,width=fit,stopper=:,margin=\measure{CAindent},]
\definedescription[Member

Re: [NTG-context] mkiv and lettrine

2015-03-10 Thread Hans Hagen

On 3/10/2015 10:51 PM, Gerben Wierda wrote:

After studying that, I’ve been unable to find out how to do the following.

\starttext
\placeinitial {``L}{\kap{\bf et me}} tell you a little
story.\index{Wittgenstein+ice floor analogy} There was once a
young man who dreamed of reducing the world to pure logic. Because he was a
very clever young man, he actually managed to do it. When he had
finished his
work, he stood back and admired it. It was beautiful! A world purged of
imperfection and indetermenency. Countless acres of gleaming ice
stretching to
the horizon.  So the clever young man looked around the world he had created
and decided to explore it. He took one step forward and fell flat on his
back.
You see, he had forgotten about friction! The ice was smooth and level and
stainless, but you couldn't walk there. So the clever young man sat down and
wept bitter tears. But as he grew into a wise old man, he came to understand
that roughness and ambiguity aren't imperfections, they are what make the
\stoptext

I’d like to
- Have ``L in the initial (quote mark + L)
- Have the initial a bit in the margin, but not fully
- Have the top of the initial not rise above the top of the first line


\setupbodyfont[dejavu]

\starttext

\setupinitial[font=Bold cp 
\measure{initial:n},hoffset=2ex,voffset=1\lineheight,n=2,m=2,distance=-1ex]

\placeinitial `What is this. \input ward \par

\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] mkiv and lettrine

2015-03-01 Thread Hans Hagen

On 3/1/2015 11:39 AM, Gerben Wierda wrote:

Nobody?

On 27 Feb 2015, at 18:01, Gerben Wierda gerben.wie...@rna.nl
mailto:gerben.wie...@rna.nl wrote:


I am using lettrine in mkii. I am trying to convert a project to mkiv.
I’d like to use lettrine here too.

\usemodule[lettrine]
\setuplettrine[Lines=3,
   Hang=.5,
   Oversize=0,
   Raise=0,
   Findent=0pt,
   Nindent=0em,
   Slope=0em,
   Ante=,
   FontHook=,
   TextFont=\sc,
   Image=no]

\lettrine{S}{\kap{\bf uppose we}} have a system

What do I have to change for mkiv?


search for 'initials' (probably on the wiki somewhere) .. from the sources:

%D \starttyping
%D \placeinitial \input ward \par \input ward \par \placeinitial \input 
tufte

%D
%D \setupinitial
%D   [location=text,
%Dn=2,
%Dcolor=darkred,
%Ddistance=-1em,
%Dhoffset=1em,
%Dvoffset=-3ex,
%Dbefore=\blank]
%D
%D \placeinitial \input ward \par \input ward \placeinitial \input tufte

% \setupbodyfont[dejavu,9pt]
%
% \startbuffer
% \setinitial[two]D. E. Knuth   \ignorespaces\input knuth \par
% \setinitial[two]  Knuth   \ignorespaces\input knuth \par
% \setinitial[two] \quotation{D. E. Knuth}  \ignorespaces\input knuth \par
% \setinitial[two] \quotation  {Knuth}  \ignorespaces\input knuth \par
% \setinitial[two]  [text={D.E. Knuth}] \ignorespaces\input knuth \par
% \setinitial[two]   [m=4] D. E. Knuth  \ignorespaces\input knuth \par
% \stopbuffer
%
% \type{m=2}  \start 
\defineinitial[two][m=2,method=none]  \getbuffer \page \stop
% \type{m=1,method=auto}  \start 
\defineinitial[two][m=1,method=auto]  \getbuffer \page \stop
% \type{m=1,method={auto,first,last}} \start 
\defineinitial[two][m=1,method={first,auto,last}] \getbuffer \page \stop




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

maillist : ntg-context@ntg.nl mailto: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
___




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




--

-
  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] \placeinitial after a heading

2014-01-25 Thread Hans Hagen

On 1/24/2014 5:54 PM, Alexey Kryukov wrote:

Hi,

If I attempt to insert a drop cap after a heading while the paragraph
indentation is enabled, I get the following effect: all lines the drop
cap spans except the first one (e. g. second and third in case of n=3)
get an additional indent, equal to the \parindent. For example:

\setupinitial[font=Bold sa 4,n=3]
\setupindenting[yes,1em]

\starttext

\section{Knuth}

\placeinitial
\input knuth

\stoptext

I suppose this is not the intended behavior :) The problem doesn't
occur if I enable indenting also for the first paragraph after the
heading, but in this case, of course, the drop cap itself is indented
together with its adjacent lines. So the following workaround is
possible:

\setupinitial[font=Bold sa 4,n=3,
hoffset=\parindent,distance=-\parindent]
\setuphead[section][indentnext=yes]

Nevertheless it would be nice if this issue could be fixed.


in the next beta the following works ok

\showframe

\setupbodyfont[12pt]
\setuplayout[height=middle,topspace=1cm,header=0pt]
\setuppagenumbering[alternative=doublesided]
\setupinitial[font=Bold sa 4,n=3]

\starttext

\section{Knuth} \setupinitial[location=text]   \placeinitial \input 
knuth \par \placeinitial \input knuth \par
\section{Knuth} \setupinitial[location=margin] \placeinitial \input 
knuth \par \placeinitial \input knuth \par


\page

\section{Knuth} \setupinitial[location=text]   \placeinitial \input 
knuth \par \placeinitial \input knuth \par
\section{Knuth} \setupinitial[location=margin] \placeinitial \input 
knuth \par \placeinitial \input knuth \par


\page

\setupindenting[yes,1em]

\section{Knuth} \setupinitial[location=text]   \placeinitial \input 
knuth \par \placeinitial \input knuth \par
\section{Knuth} \setupinitial[location=margin] \placeinitial \input 
knuth \par \placeinitial \input knuth \par


\page

\section{Knuth} \setupinitial[location=text]   \placeinitial \input 
knuth \par \placeinitial \input knuth \par
\section{Knuth} \setupinitial[location=margin] \placeinitial \input 
knuth \par \placeinitial \input knuth \par


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


[NTG-context] \placeinitial after a heading

2014-01-24 Thread Alexey Kryukov
Hi,

If I attempt to insert a drop cap after a heading while the paragraph
indentation is enabled, I get the following effect: all lines the drop
cap spans except the first one (e. g. second and third in case of n=3)
get an additional indent, equal to the \parindent. For example:

\setupinitial[font=Bold sa 4,n=3]
\setupindenting[yes,1em]

\starttext

\section{Knuth}

\placeinitial
\input knuth

\stoptext

I suppose this is not the intended behavior :) The problem doesn't
occur if I enable indenting also for the first paragraph after the
heading, but in this case, of course, the drop cap itself is indented
together with its adjacent lines. So the following workaround is
possible:

\setupinitial[font=Bold sa 4,n=3,
hoffset=\parindent,distance=-\parindent]
\setuphead[section][indentnext=yes]

Nevertheless it would be nice if this issue could be fixed.

Also, is it possible to explicitly apply case conversion commands to a
drop cap? Setting the 'style' option to \WORD or \word currently seems
to have no effect.

-- 
Regards,
Alexey Kryukov anagnost at yandex dot ru

Moscow State University
Faculty of History
___
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] Fwd: Re: beta / initials

2013-08-28 Thread Hans Hagen




 Original Message 
Subject: Re: [NTG-context] beta / initials
Date: Wed, 28 Aug 2013 23:16:33 +0200
From: Hans Hagen pra...@wxs.nl
To: Otared Kavian ota...@gmail.com

On 8/26/2013 4:22 PM, Otared Kavian wrote:

Hi Hans,

I apologize for being so late to answer your message and test the new code 
about dropped capitals and fancy first lines (have been travelling sometime 
without access to the Internet).

It seems that your changes have broken \placeinitial now: the following results 
in an error:

\starttext
\placeinitial \input ward.tex \par
\input ward.tex
\stoptext


Hopefully fixed ... in the process i decided to experiment with a better
auto sizing .. there is now

SomeFont ht somedimen : scale to ascender height
SomeFont cp somedimen : scale to X height

example:

\setupbodyfont[dejavu]

\starttext

\start \showstruts

{\type{at}: TEST \strut\definedfont[Normal at 10pt] TEST}
{\type{ht}: TEST \strut\definedfont[Normal ht \the\strutht] TEST}
{\type{cp}: TEST \strut\definedfont[Normal cp \the\strutht] TEST}

\placeinitial \strut \input ward.tex

\start
\setupinitial[style=\bfd,voffset=.25\lineheight,n=1]
\placeinitial \strut \input ward.tex \par
\stop

\start
\setupinitial[font=Bold at 60pt]
\placeinitial \strut \input ward.tex \par
\stop

\start
\setupinitial[font=Bold at 60pt,voffset=2\lineheight]
\placeinitial \strut \input ward.tex \par
\stop

\start
\setupinitial[font=Bold cp \measure{initial:n},n=4,hoffset=.5em]
\placeinitial \strut \input ward.tex \par
\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] beta

2013-08-23 Thread Hans Hagen

On 8/23/2013 2:41 PM, Otared Kavian wrote:

Hi Hans,

This is a very nice feature indeed.
Out of curiosity, I wondered whether it is possible to to have \placeinitial to 
work with \definefirstline, or a variant of it: that is not only have the first 
character of the first sentence as a dropped capital, but also the first line 
(or first few words) for instance in smallcaps.


I played with that before uploading but it was somewhat tricky. Anyway, 
I redid some code so now you can do this:


\setupbodyfont
  [pagella]

\setupalign
  [tolerant,stretch]

\setupfirstline
  [alternative=line,
   color=darkred,
   style=\setfontfeature{smallcaps}]

\setupfirstline
  [fancy]
  [n=3]

\setupfirstline
  [fancier]
  [alternative=word,
   color=darkblue,
   style=bold,
   n=3]

\setupfirstline
  [weirder]
  [alternative=line,
   color=darkgreen,
   style=\setfontfeature{smallcaps},
   n=3]

\setupinitial
  [location=text,
   n=2,
   color=darkred,
   voffset=-.5ex,
   before={\blank[2*big]}]

\starttext

\setfirstline

\input ward \par

\placeinitial

\input ward \par

\setupindenting[medium,yes]

\setinitial % \placeinitial

\input ward \par

\setinitial %  \placeinitial
\setfirstline

\input ward \par

\setfirstline[fancy]

\input ward \par

\setfirstline[fancier]

\input ward \par

\setinitial %  \placeinitial
\setfirstline[weirder]

\input ward \par

\stoptext


Another curiosity question: is it on purpose that
  \definefirstline
[fancy]
[alternative=line,
color=darkred,
style=\setfontfeature{smallcaps},
n=2]
does not produce two lines of text in smallcaps?


I cannot imagine someone using it but it should work now. I must admit 
that I never use dropcaps or even this firstline stuff so it was more a 
challenge than a neccessity.


I have no clue (yet) to what extend it all interferes with other 
trickery but I suppose that such features are only used in controlled 
situations.


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
___


[NTG-context] placeinitial broken (mkiv)?

2013-01-22 Thread Andreas Mang
Hi there,

the example from the garden (http://wiki.contextgarden.net/Initials; with 
reference to [NTG-context] Lettrine not Working as Expected) does not work 
for me:

 minimal  
\setupinitial[color=red,font=Bold sa 4,distance=3pt,state=start,n=3]
% known parameters: font, distance, state, n, command

\starttext
\placeinitial \input knuth
\stoptext
 minimal  

ConTeXt  ver: 2013.01.13 23:10 MKIV  fmt: 2013.1.17

Is there a problem or am I doing something wrong?!

Thanks in advance for your help.

Cheers
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] placeinitial broken (mkiv)?

2013-01-22 Thread Wolfgang Schuster

Am 23.01.2013 um 08:16 schrieb Andreas Mang m...@imt.uni-luebeck.de:

 Hi there,
 
 the example from the garden (http://wiki.contextgarden.net/Initials; with 
 reference to [NTG-context] Lettrine not Working as Expected) does not work 
 for me:
 
  minimal  
 \setupinitial[color=red,font=Bold sa 4,distance=3pt,state=start,n=3]
 % known parameters: font, distance, state, n, command
 
 \starttext
 \placeinitial \input knuth
 \stoptext
  minimal  
 
 ConTeXt  ver: 2013.01.13 23:10 MKIV  fmt: 2013.1.17
 
 Is there a problem or am I doing something wrong?!

What doesn’t work, do you get a error message or is the output wrong?

When I process the example I get a pdf with a red T as initial.

ConTeXt  ver: 2013.01.21 18:18 MKII  fmt: 2013.1.21  int: english/english

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] placeinitial broken (mkiv)?

2013-01-22 Thread Andreas Mang
Hi Wolfgang. 

Thanks for looking into this. 

Am Jan 23, 2013 um 8:25 AM schrieb Wolfgang Schuster 
wolfgang.schus...@gmail.com:

 
 Am 23.01.2013 um 08:16 schrieb Andreas Mang m...@imt.uni-luebeck.de:
 
 Hi there,
 
 the example from the garden (http://wiki.contextgarden.net/Initials; with 
 reference to [NTG-context] Lettrine not Working as Expected) does not work 
 for me:
 
  minimal  
 \setupinitial[color=red,font=Bold sa 4,distance=3pt,state=start,n=3]
 % known parameters: font, distance, state, n, command
 
 \starttext
 \placeinitial \input knuth
 \stoptext
  minimal  
 
 ConTeXt  ver: 2013.01.13 23:10 MKIV  fmt: 2013.1.17
 
 Is there a problem or am I doing something wrong?!
 
 What doesn’t work, do you get a error message or is the output wrong?
 
 When I process the example I get a pdf with a red T as initial.
 
 ConTeXt  ver: 2013.01.21 18:18 MKII  fmt: 2013.1.21  int: english/english

Sorry for being imprecise. I've used MKIV. I gave it another try and now I also 
get the correct result (after getting the plain text without a big red T for 
a couple of times). I wonder how you managed to heal my local installation ;)

So, sorry for wasting your time and for being stupid, too. I don't know what 
I've been doing. Time to go on holidays. 

Cheers
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] Problem with *lettrine* module in Mk-iv

2012-09-10 Thread Jörg Hagmann
I had to switch to \placeinitial, e.g.

Instead of:
% \usemodule[lettrine]
% \setuplettrine[Raise=0.1,FontHook=\darkgrey,TextFont=\tf]

I used:

\setupinitial[color=darkgrey,n=2,voffset=-1.5ex]
and then:
\placeinitial My text …

See also 
http://archive.contextgarden.net/message/20120322.214713.ca22f882.en.html

Cheers, Jörg

On Sep 10, 2012, at 1:43 PM, Sietse Brouwer wrote:

 Hello Francisco,
 
 Welcome to ConTeXt! You are sure to enjoy it here.
 
 My conclusion is that *lettrine* does not work correctly with Mark-iv and
 there is somewhere a bug that has to be corrected. But I could be
 mistaken. Am I doing something wrongly?
 
 No, you are correct, there is a bug. It happens on my end, too; I have
 attached the resulting output.
 
 \usemodule[lettrine]
 \starttext
 \lettrine[Lines=3]{T}{he two} typeset arguments are the
 dropped capital. \input knuth
 \stoptext
 
 I had a look at the module code, but it's too low-level for me, so I'm
 CC-ing Taco Hoekwater who wrote the module. Depending on how trivial
 the bug is, and how busy Taco is, he might be able to help.
 
 Kind regards,
 Sietse
 Sietse Brouwer
 lettrine-bug.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
 ___


___
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] Lettrine misbehaving in beta

2012-03-22 Thread Hans Hagen

On 22-3-2012 16:44, James 'Twey' Kay wrote:

I have this problem too… most frustrating :-\ I guess the drop-cap is
being counted as part of the line, and thereby increasing the line height.


better try:

%D For the moment here: dropped caps redone. In addition to the
%D parameters shown in the example you can use the \type {style} and
%D more low level \type {font} keys to set up the font where
%D the first one wins. If you don't like the behaviour you can always
%D roll out your own command.
%D
%D \starttyping
%D \placeinitial \input ward \par \input ward \par \placeinitial \input 
tufte

%D
%D \setupinitial
%D   [location=text,
%Dn=2,
%Dcolor=darkred,
%Ddistance=-1em,
%Dhoffset=1em,
%Dvoffset=-3ex,
%Dbefore=\blank]
%D
%D \placeinitial \input ward \par \input ward \placeinitial \input tufte
%D \stoptyping

(dropping caps is something that can interfere with anything else that 
synchronizes at the start of a paragraph)


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
___

[NTG-context] Initials / DroppedCaps

2011-12-13 Thread Henning Hraban Ramm

For a book of fairy tales, I used (working!):

\def\Initial{\DroppedCaps%
{\color[red]} {Serif} {2.5\baselineskip} {3pt} {2\baselineskip} {3}}

\starttext
\Initial Once upon a time... \input tufte
\stoptext


But that gives now:

to be read again
   \unskip
\\-\ifhmode \unskip
 \prewordbreak \crlfplaceholder \ifcase  
\raggedstatus \h...

\somefontsize -2.5\\
 baselineskip
\lowleveldefinefont ...aledfontsize \somefontsize
  \or \scaledfontsize  
\local...

\dododefinefont ...inefont {#2}\rawfontidentifier
  \csname  
\rawfontidentifier...

\dodefinedfont ...nedfont][#1]\fi \thedefinedfont
  \the  
\everydefinedfont

...
l.7 \Initial O
  nce upon a time... \input tufte


It works, if I use absolute values for font size and vertical offset,  
like


\def\Initial{\DroppedCaps%
{\color[red]} {Serif} {36pt} {3pt} {28pt} {3}}


I also tried \setupinitial / \placeinitial like below; I got my  
defined font, but only ever in base font size.


%\definefontsynonym[Initial][WieynkInitialen]
\setupinitial[font=WieynkInitialen,n=3,state=start,command=\Initial] %

I also tried \NiceDroppedCaps and \LineDroppedCaps that I found in the  
sources, but didn’t get further.



So, what’s the preferred way to get dropped capitals / initials?
I’d like to wikify that, since it seems nowhere documented.


Greetlings from Lake Constance!
Hraban
---
http://www.fiee.net/texnique/
http://wiki.contextgarden.net
https://www.cacert.org (I'm an assurer)

___
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] Initials / DroppedCaps

2011-12-13 Thread Wolfgang Schuster

Am 13.12.2011 um 13:08 schrieb Henning Hraban Ramm:

 For a book of fairy tales, I used (working!):
 
 \def\Initial{\DroppedCaps%
 {\color[red]} {Serif} {2.5\baselineskip} {3pt} {2\baselineskip} {3}}
 
 \starttext
 \Initial Once upon a time... \input tufte
 \stoptext

\setupbodyfont[pagella]

\setupinitial
  [color=red]

\starttext
\placeinitial Once upon a time... \input tufte
\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] Initials / DroppedCaps

2011-12-13 Thread Hans Hagen

On 13-12-2011 13:08, Henning Hraban Ramm wrote:

For a book of fairy tales, I used (working!):

 ...

So, what’s the preferred way to get dropped capitals / initials?
I’d like to wikify that, since it seems nowhere documented.


Initials have been rewritten (they also no longer pick up an argument 
which is more robust). The old macros will probably be removed (or end 
up in a module).


\setupinitial[font=Bold at 48pt,state=start]

\starttext

\placeinitial \input tufte

\placeinitial \input ward

\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] Initials / DroppedCaps

2011-12-13 Thread Henning Hraban Ramm

Am 2011-12-13 um 13:28 schrieb Wolfgang Schuster:


\setupbodyfont[pagella]

\setupinitial
 [color=red]

\starttext
\placeinitial Once upon a time... \input tufte
\stoptext


Grmbl, I would have sworn that didn’t work before! But it does. Thank  
you!



Am 2011-12-13 um 13:38 schrieb Hans Hagen:

Initials have been rewritten (they also no longer pick up an  
argument which is more robust). The old macros will probably be  
removed (or end up in a module).


\setupinitial[font=Bold at 48pt,state=start]


Ok, but how can I set the font size relative to bodyfontsize/ 
baselineskip?


state=start doesn’t seem necessary, it works without.


Greetlings from Lake Constance!
Hraban
---
http://www.fiee.net/texnique/
http://wiki.contextgarden.net
https://www.cacert.org (I'm an assurer)

___
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] Initials / DroppedCaps

2011-12-13 Thread Wolfgang Schuster

Am 13.12.2011 um 14:17 schrieb Henning Hraban Ramm:

 Am 2011-12-13 um 13:38 schrieb Hans Hagen:
 
 Initials have been rewritten (they also no longer pick up an argument which 
 is more robust). The old macros will probably be removed (or end up in a 
 module).
 
 \setupinitial[font=Bold at 48pt,state=start]
 
 Ok, but how can I set the font size relative to bodyfontsize/baselineskip?

\setupinitial[font=Bold sa 4]

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] Initials / DroppedCaps

2011-12-13 Thread Henning Hraban Ramm

Am 2011-12-13 um 14:22 schrieb Wolfgang Schuster:

Ok, but how can I set the font size relative to bodyfontsize/ 
baselineskip?


\setupinitial[font=Bold sa 4]


Thank you, I feel stupid.
Works for me, but not in the wiki (I can’t get colors there, too).
http://wiki.contextgarden.net/Initials

Greetlings from Lake Constance!
Hraban
---
http://www.fiee.net/texnique/
http://wiki.contextgarden.net
https://www.cacert.org (I'm an assurer)

___
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] Initials / DroppedCaps

2011-12-13 Thread Wolfgang Schuster

Am 13.12.2011 um 14:42 schrieb Henning Hraban Ramm:

 Am 2011-12-13 um 14:22 schrieb Wolfgang Schuster:
 
 Ok, but how can I set the font size relative to bodyfontsize/baselineskip?
 
 \setupinitial[font=Bold sa 4]
 
 Thank you, I feel stupid.
 Works for me, but not in the wiki (I can’t get colors there, too).
 http://wiki.contextgarden.net/Initials

The wiki use MkII and you have to enable colors first.

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] Initials / DroppedCaps

2011-12-13 Thread Idris Samawi Hamid ادريس سماوي حامد

On Tue, 13 Dec 2011 05:38:09 -0700, Hans Hagen pra...@wxs.nl wrote:



On 13-12-2011 13:08, Henning Hraban Ramm wrote:

For a book of fairy tales, I used (working!):

  ...

So, what’s the preferred way to get dropped capitals / initials?
I’d like to wikify that, since it seems nowhere documented.


Initials have been rewritten (they also no longer pick up an argument  
which is more robust). The old macros will probably be removed (or end  
up in a module).


\setupinitial[font=Bold at 48pt,state=start]

\starttext

 \placeinitial \input tufte

 \placeinitial \input ward

\stoptext


Hmm, I did not realize that dropped caps were still supported in MkIV base  
so I've been using


\usemodule[lettrine]

which also lets you set not only dropped caps but the next couple of words  
or so in another font -- such as small caps.


Hans: Does the \setupinitial also allow to set the words immediately after  
in \sc etc?


Henning: Maybe you can try lettrines as well and compare them, see which  
works best for what you're trying to do ... Here is a sample for you to  
play with


===
\usemodule[lettrine]
\def \LettrineStyle{\definefontsynonym[LettrineFont][Italic]}
\setuplettrine  
[A][Lines=2,Findent=0.2em,Nindent=0.01em,FontHook={\LettrineStyle}]
\setuplettrine  
[T][Lines=2,Findent=0.35em,Nindent=0.01em,FontHook={\LettrineStyle},Hang=.25]
\setuplettrine  
[I][Lines=2,Findent=0.3em,Nindent=0.01em,FontHook={\LettrineStyle},Hang=.25]
\setuplettrine  
[O][Lines=2,Findent=0.2em,Nindent=0.01em,FontHook={\LettrineStyle}]
\setuplettrine  
[C][Lines=2,Findent=0.3em,Nindent=0.01em,FontHook={\LettrineStyle}]
\setuplettrine  
[W][Lines=2,Findent=0.3em,Nindent=0.01em,FontHook={\LettrineStyle},Hang=.34]


\starttext
\lettrine{A}{fter the three} \input ward
\stoptext
===

Best wishes
Idris

--
Professor Idris Samawi Hamid, Editor-in-Chief
International Journal of Shīʿī Studies
Department of Philosophy
Colorado State University
Fort Collins, CO 80523
___
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] Initials / DroppedCaps

2011-12-13 Thread Hans Hagen

On 13-12-2011 15:15, Idris Samawi Hamid ادريس   سماوي حامد wrote:


Hmm, I did not realize that dropped caps were still supported in MkIV
base so I've been using


it is but not as pure macro but a lua hybrid


which also lets you set not only dropped caps but the next couple of
words or so in another font -- such as small caps.

Hans: Does the \setupinitial also allow to set the words immediately
after in \sc etc?


no, but it's doable (need a good reason for it)

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] Project structure and modes

2011-11-13 Thread Jaroslav Hajtmar

Hello Hans.
Is it possible that I'm still not working? I just updated and always 
ends the same compilation error.

My older projects do not compile. It can be a problem in anything else?
When I ignore the error message,  then finally generates a PDF file, but 
the first three rows in PDF file are listed keywords:


project
environment


Thanx Jaroslav


Here is error message:

ctx drakiada_201110

mtx-context | run 1: luatex 
--fmt=C:/context/tex/texmf-cache/luatex-cache/c
ontext/2448223e6631addb83df348d74153606/formats/cont-en 
--lua=C:/context/tex/t

exmf-cache/luatex-cache/context/2448223e6631addb83df348d74153606/formats/cont-en
.lui --backend=pdf ./drakiada_201110 \stoptext
This is LuaTeX, Version beta-0.70.1-200321 (rev 4277)
 \write18 enabled.
(drakiada_201110.tex

ConTeXt  ver: 2011.11.12 12:34 MKIV  fmt: 2011.11.13  int: english/english

system  cont-new.mkiv loaded
(C:/context/tex/texmf-context/tex/context/base/cont-new.mkiv
system  beware: some patches loaded from cont-new.mkiv
)
system  drakiada_201110.top loaded
(drakiada_201110.top)
fonts  latin modern fonts are not preloaded
languages  language en is active
{C:/context/tex/texmf-context/fonts/map/pdftex/context/mkiv-base.map}
fonts  preloading latin modern fonts (second stage)
(C:/context/tex/texmf-context/tex/context/base/type-siz.mkiv) 
(C:/context/tex/te

xmf-context/tex/context/base/type-otf.mkiv)
files  readfile  asked name: 'loc', not found
{C:/context/tex/texmf/fonts/map/dvips/lm/lm-math.map}{C:/context/tex/texmf/fonts
/map/dvips/lm/lm-rm.map}
fonts  virtual math  unable to resolve name mapsfromchar
fonts  fallback modern rm 12pt is loaded
(../obstastnik.tex (../t-obstastnik_env.mkiv
loading  ConTeXt User Module / Noviny
(C:/context/tex/texmf-context/tex/context/base/colo-imp-rgb.mkiv)
colors  system rgb is loaded
)
! Undefined control sequence.

system  tex  error on line 1 in file drakiada_201110.tex: Undefined c
ontrol sequence ...

 1   \startcomponent drakiada_201110
 2 \product obst_201110
 3 \project obstastnik
 4 \environment obstastnik_env % nahrazeno volanim knihovny
 5 \environment setcolorsii_env
 6 \setuplayout[normalpage] % \setuplayout[width=fit, 
height=fit,backspace=1
0mm, topspace=0mm, header=1cm, footer=10mm,bottom=5mm, 
rightmargin=10mm,leftmarg
indistance=0mm,rightmargindistance=0mm\setuplayout[width=fit, 
height=fit,backspa
ce=10mm, topspace=0mm, header=1cm, footer=10mm,bottom=5mm, 
rightmargin=10mm,left

margindistance=0mm,rightmargindistance=0mm] %,grid=yes] %,grid=yes
 7
 8 
%\setupinitial[hesloinitial][location=text,n=2,color=red,before=\unblank]

 %, distance=-1em, hoffset=1em, voffset=-3ex, before=\blank]
 9
10 % \def\nadpisT{\hcolor\sst}
11 % \def\nadpisG{\hcolor\ssg}


\stopprojectindeed -\popsystemmode
\v!project \stoptext 
\signalendofinput \...

l.1 \stopprojectindeed

\ctxcommand ...\directlua \zerocount {commands.#1}

\stopproject -\ctxcommand {stopproject ()}
   \honorendofinput
l.22 \stopproject

?
!^C EmergChcete ukončit dávkovou úlohu (A/N)? ency stop.

system  tex  error on line 1 in file drakiada_201110.tex: Emergency s
top ...

 1   \startcomponent drakiada_201110
 2 \product obst_201110
 3 \project obstastnik
 4 \environment obstastnik_env % nahrazeno volanim knihovny
 5 \environment setcolorsii_env
 6 \setuplayout[normalpage] % \setuplayout[width=fit, 
height=fit,backspace=1
0mm, topspace=0mm, header=1cm, footer=10mm,bottom=5mm, 
rightmargin=10mm,leftmarg
indistance=0mm,rightmargindistance=0mm\setuplayout[width=fit, 
height=fit,backspa
ce=10mm, topspace=0mm, header=1cm, footer=10mm,bottom=5mm, 
rightmargin=10mm,left

margindistance=0mm,rightmargindistance=0mm] %,grid=yes] %,grid=yes
 7
 8 
%\setupinitial[hesloinitial][location=text,n=2,color=red,before=\unblank]

 %, distance=-1em, hoffset=1em, voffset=-3ex, before=\blank]
 9
10 % \def\nadpisT{\hcolor\sst}
11 % \def\nadpisG{\hcolor\ssg}


\stopprojectindeed -\popsystemmode
\v!project \stoptext 
\signalendofinput \...

l.1 \stopprojectindeed

\ctxcommand ...\directlua \zerocount {commands.#1}

\stopproject -\ctxcommand {stopproject ()}
   \honorendofinput
l.22 \stopproject

!  == Fatal error occurred, no output PDF file produced!^




Dne 12.11.2011 13:59, Hans Hagen napsal(a):

On 12-11-2011 13:55, Jaroslav Hajtmar wrote:


OK... thanx
I'm sorry to bother you., but give the corrected version to download 
soon?

I am not working at the moment the project.


normally the garden syncs on the (half) hour

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

Re: [NTG-context] Project structure and modes

2011-11-13 Thread Salil Sayed
Hi,

I get a similar error with a beta updated today. See below.


BR,

Salil




! Undefined control sequence.

system   tex  error on line 1 in file project_manuscript.tex: 
Undefined control sequence ...

1   \startproject project_manuscript
2 
3 \environment env_manuscript
4 
5 \product manuscript
6 
7 
8 \stopproject
9 


\stopcomponentindeed -\popsystemmode 
  \v!component \popreferenceprefix \stop...
l.1 \stopcomponentindeed
    
\ctxcommand ...\directlua \zerocount {commands.#1}
  
\stopcomponent -\ctxcommand {stopcomponent ()}
   \honorendofinput 
l.10 \stopcomponent
   
? 





From: Jaroslav Hajtmar hajt...@gyza.cz
To: Hans Hagen pra...@wxs.nl
Cc: mailing list for ConTeXt users ntg-context@ntg.nl
Sent: Sunday, November 13, 2011 12:06 PM
Subject: Re: [NTG-context] Project structure and modes

Hello Hans.
Is it possible that I'm still not working? I just updated and always ends the 
same compilation error.
My older projects do not compile. It can be a problem in anything else?
When I ignore the error message,  then finally generates a PDF file, but the 
first three rows in PDF file are listed keywords:

project
environment


Thanx Jaroslav


Here is error message:

ctx drakiada_201110

mtx-context     | run 1: luatex --fmt=C:/context/tex/texmf-cache/luatex-cache/c
ontext/2448223e6631addb83df348d74153606/formats/cont-en --lua=C:/context/tex/t
exmf-cache/luatex-cache/context/2448223e6631addb83df348d74153606/formats/cont-en
.lui --backend=pdf ./drakiada_201110 \stoptext
This is LuaTeX, Version beta-0.70.1-200321 (rev 4277)
\write18 enabled.
(drakiada_201110.tex

ConTeXt  ver: 2011.11.12 12:34 MKIV  fmt: 2011.11.13  int: english/english

system  cont-new.mkiv loaded
(C:/context/tex/texmf-context/tex/context/base/cont-new.mkiv
system  beware: some patches loaded from cont-new.mkiv
)
system  drakiada_201110.top loaded
(drakiada_201110.top)
fonts  latin modern fonts are not preloaded
languages  language en is active
{C:/context/tex/texmf-context/fonts/map/pdftex/context/mkiv-base.map}
fonts  preloading latin modern fonts (second stage)
(C:/context/tex/texmf-context/tex/context/base/type-siz.mkiv) (C:/context/tex/te
xmf-context/tex/context/base/type-otf.mkiv)
files  readfile  asked name: 'loc', not found
{C:/context/tex/texmf/fonts/map/dvips/lm/lm-math.map}{C:/context/tex/texmf/fonts
/map/dvips/lm/lm-rm.map}
fonts  virtual math  unable to resolve name mapsfromchar
fonts  fallback modern rm 12pt is loaded
(../obstastnik.tex (../t-obstastnik_env.mkiv
loading  ConTeXt User Module / Noviny
(C:/context/tex/texmf-context/tex/context/base/colo-imp-rgb.mkiv)
colors  system rgb is loaded
)
! Undefined control sequence.

system  tex  error on line 1 in file drakiada_201110.tex: Undefined c
ontrol sequence ...

1   \startcomponent drakiada_201110
2     \product obst_201110
3     \project obstastnik
4     \environment obstastnik_env % nahrazeno volanim knihovny
5     \environment setcolorsii_env
6     \setuplayout[normalpage] % \setuplayout[width=fit, height=fit,backspace=1
0mm, topspace=0mm, header=1cm, footer=10mm,bottom=5mm, rightmargin=10mm,leftmarg
indistance=0mm,rightmargindistance=0mm\setuplayout[width=fit, height=fit,backspa
ce=10mm, topspace=0mm, header=1cm, footer=10mm,bottom=5mm, rightmargin=10mm,left
margindistance=0mm,rightmargindistance=0mm] %,grid=yes] %,grid=yes
7
8     %\setupinitial[hesloinitial][location=text,n=2,color=red,before=\unblank]
%, distance=-1em, hoffset=1em, voffset=-3ex, before=\blank]
9
10     % \def\nadpisT{\hcolor\sst}
11     % \def\nadpisG{\hcolor\ssg}


\stopprojectindeed -\popsystemmode
                                    \v!project \stoptext \signalendofinput \...
l.1 \stopprojectindeed

\ctxcommand ...\directlua \zerocount {commands.#1}

\stopproject -\ctxcommand {stopproject ()}
                                           \honorendofinput
l.22 \stopproject

?
!^C EmergChcete ukončit dávkovou úlohu (A/N)? ency stop.

system  tex  error on line 1 in file drakiada_201110.tex: Emergency s
top ...

1   \startcomponent drakiada_201110
2     \product obst_201110
3     \project obstastnik
4     \environment obstastnik_env % nahrazeno volanim knihovny
5     \environment setcolorsii_env
6     \setuplayout[normalpage] % \setuplayout[width=fit, height=fit,backspace=1
0mm, topspace=0mm, header=1cm, footer=10mm,bottom=5mm, rightmargin=10mm,leftmarg
indistance=0mm,rightmargindistance=0mm\setuplayout[width=fit, height=fit,backspa
ce=10mm, topspace=0mm, header=1cm, footer=10mm,bottom=5mm, rightmargin=10mm,left
margindistance=0mm,rightmargindistance=0mm] %,grid=yes] %,grid=yes
7
8     %\setupinitial[hesloinitial][location=text,n=2,color=red,before=\unblank]
%, distance=-1em, hoffset=1em, voffset=-3ex, before=\blank]
9
10

Re: [NTG-context] Project structure and modes

2011-11-12 Thread Jaroslav Hajtmar

Hello, Hans.

Did not make a change now (in project structure)? I've updated an thirty 
minutes ago ConTeXt and stopped me working translation of things that I 
have a few days in order compiled.


It is possible to go some way older install standalone ConTeXt?


Thanx Jaroslav


Here is compilation error message:
exmf-cache/luatex-cache/context/2448223e6631addb83df348d74153606/formats/cont-en
.lui --backend=pdf ./drakiada_201110 \stoptext
This is LuaTeX, Version beta-0.70.1-200321 (rev 4277)
\write18 enabled.
(drakiada_201110.tex

ConTeXt ver: 2011.11.11 23:29 MKIV fmt: 2011.11.12 int: english/english

system  cont-new.mkiv loaded
(C:/context/tex/texmf-context/tex/context/base/cont-new.mkiv
system  beware: some patches loaded from cont-new.mkiv
)
system  drakiada_201110.top loaded
(drakiada_201110.top)
fonts  latin modern fonts are not preloaded
languages  language en is active
{C:/context/tex/texmf-context/fonts/map/pdftex/context/mkiv-base.map}
fonts  preloading latin modern fonts (second stage)
(C:/context/tex/texmf-context/tex/context/base/type-siz.mkiv) 
(C:/context/tex/te

xmf-context/tex/context/base/type-otf.mkiv)
files  readfile  asked name: 'loc', not found
{C:/context/tex/texmf/fonts/map/dvips/lm/lm-math.map}{C:/context/tex/texmf/fonts
/map/dvips/lm/lm-rm.map}
fonts  virtual math  unable to resolve name mapsfromchar
fonts  fallback modern rm 12pt is loaded
(../obstastnik.tex (../t-obstastnik_env.mkiv
loading  ConTeXt User Module / Noviny
(C:/context/tex/texmf-context/tex/context/base/colo-imp-rgb.mkiv)
colors  system rgb is loaded
)
! Undefined control sequence.

system  tex  error on line 1 in file drakiada_201110.tex: Undefined c
ontrol sequence ...

1  \startcomponent drakiada_201110
2 \product obst_201110
3 \project obstastnik
4 \environment obstastnik_env % nahrazeno volanim knihovny
5 \environment setcolorsii_env
6 \setuplayout[normalpage] % \setuplayout[width=fit, height=fit,backspace=1
0mm, topspace=0mm, header=1cm, footer=10mm,bottom=5mm, 
rightmargin=10mm,leftmarg
indistance=0mm,rightmargindistance=0mm\setuplayout[width=fit, 
height=fit,backspa
ce=10mm, topspace=0mm, header=1cm, footer=10mm,bottom=5mm, 
rightmargin=10mm,left

margindistance=0mm,rightmargindistance=0mm] %,grid=yes] %,grid=yes
7
8 %\setupinitial[hesloinitial][location=text,n=2,color=red,before=\unblank]
%, distance=-1em, hoffset=1em, voffset=-3ex, before=\blank]
9
10 % \def\nadpisT{\hcolor\sst}
11 % \def\nadpisG{\hcolor\ssg}


\stopprojectindeed -\popsystemmode
\v!project \stoptext \signalendofinput \...
l.1 \stopprojectindeed

\ctxcommand ...\directlua \zerocount {commands.#1}

\stopproject -\ctxcommand {stopproject ()}
\honorendofinput
l.22 \stopproject

?
! ^CChcete ukončit dávkovou úlohu (A/N)? Emergency stop.

system  tex  error on line 1 in file drakiada_201110.tex: Emergency s
top ...

1  \startcomponent drakiada_201110
2 \product obst_201110
3 \project obstastnik
4 \environment obstastnik_env % nahrazeno volanim knihovny
5 \environment setcolorsii_env
6 \setuplayout[normalpage] % \setuplayout[width=fit, height=fit,backspace=1
0mm, topspace=0mm, header=1cm, footer=10mm,bottom=5mm, 
rightmargin=10mm,leftmarg
indistance=0mm,rightmargindistance=0mm\setuplayout[width=fit, 
height=fit,backspa
ce=10mm, topspace=0mm, header=1cm, footer=10mm,bottom=5mm, 
rightmargin=10mm,left

margindistance=0mm,rightmargindistance=0mm] %,grid=yes] %,grid=yes
7
8 %\setupinitial[hesloinitial][location=text,n=2,color=red,before=\unblank]
%, distance=-1em, hoffset=1em, voffset=-3ex, before=\blank]
9
10 % \def\nadpisT{\hcolor\sst}
11 % \def\nadpisG{\hcolor\ssg}


\stopprojectindeed -\popsystemmode
\v!project \stoptext \sig
^CnSystém nemůže otevřít zadaný soubor nebo zařízení.
alenC:\1da\Pekarov\Obstastnik\obst_201110dofinput \...
l.1 \stopprojectindeed

\ctxcommand ...\directlua \zerocount {commands.#1}

\stopproject -\ctxcommand {stopproject ()}
\honorendofinput
l.22 \stopproject

! == Fatal error occurred, no output PDF file produced!
C:\1da\Pekarov\Obstastnik\obst_201110
C:\1da\Pekarov\Obstastnik\obst_201110ctx1 sklipek_201110

mtx-context | run 1: luatex --fmt=C:/context/tex/texmf-cache/luatex-cache/c
ontext/2448223e6631addb83df348d74153606/formats/cont-en 
--lua=C:/context/tex/t

exmf-cache/luatex-cache/context/2448223e6631addb83df348d74153606/formats/cont-en
.lui --backend=pdf ./sklipek_201110 \stoptext
This is LuaTeX, Version beta-0.70.1-200321 (rev 4277)
\write18 enabled.
(sklipek_201110.tex

ConTeXt ver: 2011.11.11 23:29 MKIV fmt: 2011.11.12 int: english/english

system  cont-new.mkiv loaded
(C:/context/tex/texmf-context/tex/context/base/cont-new.mkiv
system  beware: some patches loaded from cont-new.mkiv
)
system  sklipek_201110.top loaded
(sklipek_201110.top)
fonts  latin modern fonts are not preloaded
languages  language en is active
{C:/context/tex/texmf-context/fonts/map/pdftex/context/mkiv-base.map}
fonts  preloading latin modern fonts (second stage)
(C:/context/tex/texmf-context/tex/context/base/type-siz.mkiv) 
(C

[NTG-context] new beta

2011-11-02 Thread Hans Hagen

Hi,

I uploaded a beta. A few things requested the last couple of days have 
been added / patched (not all of course). Also, as a prelude to getting 
rid of the supp-fun modules initials have been rewritten. It was a 
hybrid of low level code and a wrapper but now is only available in 
\placeinitial (the old mechanism will become a module at some point).


\starttext

\placeinitial \input ward \par \input ward \par

\placeinitial \input tufte

\setupinitial
  [variant]
  [location=text,
   n=2,
   color=darkred,
   distance=-1em,
   hoffset=1em,
   voffset=-3ex,
   before=\blank]

\placeinitial[variant] \input ward \par \input ward

\placeinitial[variant] \input tufte

\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 signs in itemize

2011-09-25 Thread R. Ermers
Thanks for all your replies!

I changed the superscript e into \high{e}. There is one other math item: 
$\frac1{40}$ in the whole text.

I am using mkiv.
Until the recent update the document (90 pp.) was processed fine.

I add a minimal example below.

Thanks again for looking into this problem.

Regards,

Robert

+++

\enableregime[utf]
\setuppapersize[A4][A4]

\startsectionblockenvironment[bodypart]
\setupheader[text][location=text,state=high,strut=yes,after=\vskip-0.8em\thinrule]
\setupfootertexts[{\tfx \copyright R. Ermers}][][][{\tfx \copyright R. Ermers}]
\setuppagenumber[number=1]
\stopsectionblockenvironment

 %\setmainfont[Antykwa Poltawskiego]


\usemodule[t][lettrine]
\usemodule[t][annotation]
\usemodule[newmat] %vanwege de breuk


\newdimen\Margin
\Margin=20mm
\newdimen\Tekstbreedte
\Tekstbreedte=14cm


\setupinitial
  [state=start,
n=3,
distance=.15pc,
 font=SerifBold,
  ]
\definefontfeature
  [arabic]
  [mode=node,language=dflt,script=arab,ccmp=yes,
   init=yes,medi=yes,fina=yes,isol=yes,
   liga=yes,dlig=yes,rlig=yes,clig=yes,calt=yes,
   mark=yes,mkmk=yes,kern=yes,curs=yes]


\usemodule[t][simplefonts]
\setuplayout
[width=148mm,height=268mm\relax,
backspace=25mm,topspace=20mm,
header=12pt,headerdistance=15mm,
footer=5mm,footerdistance=8mm,
%rightmargin=\zeropoint,
location=middle,marking=off]
\setupwhitespace[halfline]

\definelayer[graphics][position=yes]
\setupbackgrounds[page][background=graphics]

\setuplanguage[nl]
[leftquote=\upperleftsinglesixquote,
 rightquote=\upperrightsingleninequote,
 leftquotation=\leftguillemot,
 rightquotation=\rightguillemot]
\mainlanguage[nl]
\hyphenation{lam-pet-stel}

\definefloat[figureonder][figure]
\definefloat[edgefigure][figure]
\setupcaption[figure][location=right]
\setupcaption[figureonder][location=bottom]
\setupcaption[edgefigure][location=bottom]
\setupfloat[edgefigure]
[leftmargindistance=-\leftmargintotal,rightmargindistance=-\rightmargintotal,
default={outer,low},criterium=.67\textwidth,numbering=no]
\setupcaptions[width=max,align=middle,style=small,number=no]




 \defineitemgroup[ongenummerd][levels=3]
\setupitemgroup[ongenummerd][1][5]
\setupitemgroup[ongenummerd][2][4]
\setupitemgroup[ongenummerd][2][3]
\defineitemgroup[genummerd][levels=3]
\setupitemgroup[genummerd][1][n]
\setupitemgroup[genummerd][2][a]
\setupitemgroup[genummerd][2][r]
\setuptolerance[horizontal,verytolerant] %hyphenation

\setuppagenumbering[state=start,alternative=doublesided,location=footer,style=bold]

\setupheadertexts
[{\getmarking[subsectionnumber]\enskip\getmarking[subsection]}]
[]
[]
[{\getmarking[sectionnumber]\enskip\getmarking[section]}]%

\setuphead[part][placehead=no]
\defineblankmethod[nobreak]{\penalty\plustenthousand}
\defineblankmethod[endgraf]{\endgraf}
\setuphead[section][grid=line]

\setupheader[style=small]

\definepagebreak[chapter][yes,empty,right]
\setupinmargin[location=both,line=1,align=normal,stack=yes,style=small,color=red,distance=5mm]

\hyphenation{ver-ant-woor-de-lijk-heid}
\setupindenting[yes,medium,first]
\setupfloats[indentnext=no]
\setupfootnotedefinition[location=left,distance=1em,headalign=flushleft]
\setupnote[footnote][textstyle=,numbercommand=,margindistance=8mm,rule=off,before=,interaction=yes,align={normal,hyphenated}]

\setupinteraction[style=]

\define[2]\QuotationCommand
 {
\setupindenting[no]
\switchtobodyfont[arial,10pt]
\textrule{#1}\blank \vfil\nobreak\penalty1\endgraf
\startcolumns#2\stopcolumns
\hspace \nobreak\penalty1000
\textrule
}

\definetypeface[braqqadocio][ss][Xsans][Braqqadocio]
\usetypescriptfile[type-gentium]

\setupbodyfont[gentium,11pt]
\definefontfeature
[default]
[default]
[protrusion=quality,expansion=quality]
\setupalign[hz,hanging]

\setuplettrine[Nindent=0pt,Lines=2,Oversize=0,TextFont=\sc]
\setuplettrine[T][Findent=0.2em,Hang=.12,TextFont=\sc]
\setuplettrine[A][Slope=0.4em,Findent=0.2em,Hang=0.12]
\setuplettrine[V][Slope=-0.1em,Findent=0.2em,Hang=0.12]
\setuplettrine[W][Slope=-0.1em,Findent=0.2em,Hang=0.12]
\sethyphenatedurlnormal{:=?}
\sethyphenatedurlbefore{?}
\sethyphenatedurlafter {:=}
\setupbackground[frame=on]
\setupexternalfigures[directory={./../../MOP}]

\setupitemize[1][paragraph,atmargin][width=3mm,distance=5pt,itemalign=flushleft,indentnext=no]
\setupitems[align=right]
\starttext
\lettrine{E}{lk} mens wordt gevormd door zijn omgeving
\startitemize
\item het type van de
\item ideeën over
\item de koeien
\item overige factoren (zoals paarden)
\stopitemize

The text continues ... The text continues The text continues The text continues
\stoptext

Op 25 sep 2011, om 13:39 heeft Alan Braslau het volgende geschreven:

 On Sun, Sep 25, 2011 at 01:02:07PM +0200, R. Ermers wrote:
 
 But I use very, very little math, only once or twice, as in  7$^{th}$, but I 
 could solve that otherwise. 
 
 You may want to use 7\high{th}.
 
 My main problem occurs in itemization. Please have a look at this:
 
 l.741 \item h

Re: [NTG-context] First Line After Whitespace Styling

2011-05-27 Thread Wolfgang Schuster

Am 27.05.2011 um 18:08 schrieb Marc Trius:

 Hi,
 I would like to be able to specify a style that would apply to text that 
 appears on the first line of a paragraph after whitespace. I have no idea how 
 to go about it. 
 
 Specifically, I have a font with an alternate glyph that can only be used 
 after whitespace, and I would like to have it used automatically when 
 appropriate. 

Do you want a initial?

\setupinitial[state=start]

\starttext
\placeinitial \input knuth
\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] First Line After Whitespace Styling

2011-05-27 Thread Marc Trius
On Fri, 27 May 2011 18:30:53 +0200
Wolfgang Schuster schuster.wolfg...@googlemail.com wrote:

 
 Am 27.05.2011 um 18:08 schrieb Marc Trius:
 
  Hi,
  I would like to be able to specify a style that would apply to text that 
  appears on the first line of a paragraph after whitespace. I have no idea 
  how to go about it. 
  
  Specifically, I have a font with an alternate glyph that can only be used 
  after whitespace, and I would like to have it used automatically when 
  appropriate. 
 
 Do you want a initial?
 
 \setupinitial[state=start]
 
 \starttext
 \placeinitial \input knuth
 \stoptext
 
 Wolfgang
 

No, what is something like:

...

\starttypescript  [Standard]
  \definetypeface [Standard] [rm] [serif] [frankruehl]   [default] 
[features=default]
  \definetypeface [Alt][rm] [serif] [frankruehl] [default] 
[features=alt]
  \stoptypescript

...

{\Alt This is the first line after a whitespace, this is the linebreak} and 
this is the rest of the paragraph. I'd like to have a macro that automatically 
styles the first line only so I don't have to guess at linebreaks every time I 
edit the text.

I need to do this because in texts that are written with the Hebrew alphabet, a 
shorter glyph of the tallest letter, 'lamed,' is used inside a block of text 
than in a first line, so that the interline space can be smaller. Employing 
this technique makes the difference between a pretty good and a really 
first-rate typesetting job :)

Thanks,
Marc

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


-- 
Marc Trius derpay...@riseup.net

The enemy is the gramophone mind, whether or not one agrees with the record 
that is being played at the moment. --- George Orwell
___
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] Lettrines in MkIV

2010-09-23 Thread Aditya Mahajan

On Thu, 23 Sep 2010, Alan BRASLAU wrote:


On Thursday 23 September 2010 15:49:07 Hans Hagen wrote:


we know and we will take a look at it next week (as it takes some time
to nail down node allocation bugs)



As Hans indicated, he is aware of the problem with the lettrine module
and will fix it. In the meantime, you can get by using simply:

%\usemodule [lettrine]
% broken, so let's fake it:
\def\lettrine#1#2{{\tfc #1}#2}

Of course, this is no good for production, but it is a simple
solution if you are working on drafts.


Isn't it better to use initials? This is what one of setups has

\definehead[initialtitle][title]

\setuphead[initialtitle]
  [after=\placeinitial]

\definefontsynonym[initial][name:fontin]

\setupinitial
  [   state=start,
  n=3,
   distance=-.1pc,
  ]

And then I can simply use

\initialtitle {Don Knuth said}

\input knuth

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] Lettrines in MkIV

2010-09-23 Thread Alan BRASLAU
On Thursday 23 September 2010 18:24:05 Aditya Mahajan wrote:
 On Thu, 23 Sep 2010, Alan BRASLAU wrote:
  On Thursday 23 September 2010 15:49:07 Hans Hagen wrote:
  we know and we will take a look at it next week (as it takes some time
  to nail down node allocation bugs)
  
  As Hans indicated, he is aware of the problem with the lettrine module
  and will fix it. In the meantime, you can get by using simply:
  
  %\usemodule [lettrine]
  % broken, so let's fake it:
  \def\lettrine#1#2{{\tfc #1}#2}
  
  Of course, this is no good for production, but it is a simple
  solution if you are working on drafts.
 
 Isn't it better to use initials? This is what one of setups has
 
 \definehead[initialtitle][title]
 
 \setuphead[initialtitle]
[after=\placeinitial]
 
 \definefontsynonym[initial][name:fontin]
 
 \setupinitial
[   state=start,
n=3,
 distance=-.1pc,
]
 
 And then I can simply use
 
 \initialtitle {Don Knuth said}
 
 \input knuth
 
 Aditya

I don't think that it is the same thing, but I do not understand
your example. Did you try running it? 

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
___


Re: [NTG-context] Lettrines in MkIV

2010-09-23 Thread Aditya Mahajan

On Thu, 23 Sep 2010, Alan BRASLAU wrote:


On Thursday 23 September 2010 18:24:05 Aditya Mahajan wrote:

On Thu, 23 Sep 2010, Alan BRASLAU wrote:

On Thursday 23 September 2010 15:49:07 Hans Hagen wrote:

we know and we will take a look at it next week (as it takes some time
to nail down node allocation bugs)


As Hans indicated, he is aware of the problem with the lettrine module
and will fix it. In the meantime, you can get by using simply:

%\usemodule [lettrine]
% broken, so let's fake it:
\def\lettrine#1#2{{\tfc #1}#2}

Of course, this is no good for production, but it is a simple
solution if you are working on drafts.


Isn't it better to use initials? This is what one of setups has

\definehead[initialtitle][title]

\setuphead[initialtitle]
   [after=\placeinitial]

\definefontsynonym[initial][name:fontin]

\setupinitial
   [   state=start,
   n=3,
distance=-.1pc,
   ]

And then I can simply use

\initialtitle {Don Knuth said}

\input knuth

Aditya


I don't think that it is the same thing, but I do not understand
your example. Did you try running it?


Sorry... \placeinitial gobbles \input but here is a standalone 
example:


\setupinitial
  [   state=start,
  n=3,
   distance=-.1pc,
  ]

\starttext

\placeinitial This is what Knuth said: \input knuth

\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] Lettrines in MkIV

2010-09-23 Thread Alan BRASLAU
On Thursday 23 September 2010 18:46:00 you wrote:
 
 Sorry... \placeinitial gobbles \input but here is a standalone
 example:
 
 \setupinitial
[   state=start,
n=3,
 distance=-.1pc,
]
 
 \starttext
 
 \placeinitial This is what Knuth said: \input knuth
 
 \stoptext
 

I didn't know about initial...

%D \macros
%D   {setupinitial,placeinitial,checkinitial}
%D
%D {\em To be documented.}

Indeed!


Nice, I would like to use something like this,
even setting it up to be automatic at the beginning
of chapters, for example.

But it does not quite work as lettrines.
In a silly language such as French, the following fails:

\placeinitial L'objet de cette commande\dots

as one needs:

\lettrine{L'}{objet} de cette commande\dots

Other heuristics might apply in different cases.

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
___


Re: [NTG-context] Lettrines in MkIV

2010-09-23 Thread Aditya Mahajan

On Thu, 23 Sep 2010, Alan BRASLAU wrote:


On Thursday 23 September 2010 18:46:00 you wrote:


Sorry... \placeinitial gobbles \input but here is a standalone
example:

\setupinitial
   [   state=start,
   n=3,
distance=-.1pc,
   ]

\starttext

\placeinitial This is what Knuth said: \input knuth

\stoptext



I didn't know about initial...

%D \macros
%D   {setupinitial,placeinitial,checkinitial}
%D
%D {\em To be documented.}

Indeed!


So you do not consider the source itself as the documentation :)


Nice, I would like to use something like this,
even setting it up to be automatic at the beginning
of chapters, for example.


The example that I showed earlier did that. Essentially, just use

\setuphead[chapter][after=\placeinitial]


But it does not quite work as lettrines.


Indeed. Otherwise, there would no need for a separate module. Actually, it 
will be nice if the functionality of lettrine can be merged with 
\placeintial.



In a silly language such as French, the following fails:

\placeinitial L'objet de cette commande\dots

as one needs:

\lettrine{L'}{objet} de cette commande\dots

Other heuristics might apply in different cases.


And there are sentences starting with quotations, etc.

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] Lettrines in MkIV

2010-09-23 Thread Philipp Gesang
On 2010-09-23 12:24:05, Aditya Mahajan wrote:
 On Thu, 23 Sep 2010, Alan BRASLAU wrote:
 
 On Thursday 23 September 2010 15:49:07 Hans Hagen wrote:
 
 we know and we will take a look at it next week (as it takes some time
 to nail down node allocation bugs)
 
 
 As Hans indicated, he is aware of the problem with the lettrine module
 and will fix it. In the meantime, you can get by using simply:
 
 %\usemodule [lettrine]
 % broken, so let's fake it:
 \def\lettrine#1#2{{\tfc #1}#2}
 
 Of course, this is no good for production, but it is a simple
 solution if you are working on drafts.
 
 Isn't it better to use initials? This is what one of setups has
 
 \definehead[initialtitle][title]
 
 \setuphead[initialtitle]
   [after=\placeinitial]
 
 \definefontsynonym[initial][name:fontin]
 
 \setupinitial
   [   state=start,
   n=3,
distance=-.1pc,
   ]
 
 And then I can simply use
 
 \initialtitle {Don Knuth said}
 
 \input knuth

Dear Alan, Aditya, and everybody else,

thanks for your efforts, but I’m afraid that you were being
mislead about my intentions.

I am (probably mis-)using the lettrine module in order to fake the
Knuthian \danger and \ddanger macros in auto-generated context
code. One of the main goals is, other than pure convenience on my
part, that understanding of the resulting code requires only
knowledge of high-level context macros, not of high-level tex
wizardry. Of course I could start with texbook, p. 419, and try
to adapt it to context (seems to be non-trivial), but even if I
should succeed, the effort necessary to understand what’s going
on is huge compared to when using a well-known and
well-documented module.

That’s why I rather do without autoindentation, as it concerns
only the layout of the manual, not the code itself.

@Aditya, I couldn’t get your code to work, neither in mkii nor in
mkiv. Anyways, I wasn’t aware of \setup/placeinitial before so I
learned something new today.

Philipp


-- 
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments


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


Re: [NTG-context] Lettrines in MkIV

2010-09-23 Thread Alan BRASLAU
On Thursday 23 September 2010 19:38:46 Aditya Mahajan wrote:
  
  %D \macros
  %D   {setupinitial,placeinitial,checkinitial}
  %D
  %D {\em To be documented.}
  
  Indeed!
 
 So you do not consider the source itself as the documentation :)
 

Copied verbatum!

I (still) read documentation better than source code,
although I am learning how to read \TeX macros and now
even lua functions. I am also supposed to work on
*writing* the documentation!

  But it does not quite work as lettrines.
 
 Indeed. Otherwise, there would no need for a separate module. Actually, it
 will be nice if the functionality of lettrine can be merged with
 \placeintial.

Would be very nice. Do you have good ideas about how to better parse
the beginning of text? One needs to be clever.

  \lettrine{L'}{objet} de cette commande\dots
  
  Other heuristics might apply in different cases.
 
 And there are sentences starting with quotations, etc.

As in:

\quote{The rain in Spain...}

Maybe others on the mailing list can suggest many particular cases.

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
___


Re: [NTG-context] Dropped caps and indenting

2005-12-04 Thread Hans Hagen

Idris Samawi Hamid wrote:


\TextDroppedCaps In general, Baroque letterforms appear more
 


\noindenting \TextD

or replace this in supp-fun.tex

\def\DroppedCaps#1#2#3#4#5#6#7% does not yet handle accented chars
 {\convertargument#7\to\asciia
  \convertcommand \DroppedString\to\asciib
  \ExpandBothAfter\doifinstringelse\asciia\asciib
{\noindenting
 \dontleavehmode
%\ifhmode\hskip-\parindent\fi % sensitive for context mechanism
 \keeplinestogether{#6}%
 \setbox0\hbox{\definedfont[#2 at #3]#1{#7}\hskip#4}%
 \ifdim\dp0\strutdp % one of those Q's , will be option
   \setbox2\hbox{\raise\dp0\hbox{\lower\strutdp\copy0}}%
   \ht2\ht0
   \dp0\strutdp
   \setbox0\box2
 \fi
 \setbox0\hbox
   {\ifnum\DropMode=\plusone
  \hskip-\wd0\wd0\zeropoint
\fi
\lower#5\box0}%
 \ht0\strutht
 \dp0\strutdp
 \ifnum\DropMode=\plusone
   \globaldropcaps\let\DroppedIndent\!!zeropoint
   \globaldropcaps\edef\DroppedLines{\number\maxdimen}%
   \globaldropcaps\chardef\DroppedStatus\plusthree
 \else
   \globaldropcaps\edef\DroppedIndent{\the\wd0}%
   \globaldropcaps\edef\DroppedLines {\number#6}%
   \globaldropcaps\chardef\DroppedStatus\plustwo
   \globaldropcaps\hangindent\DroppedIndent
   \globaldropcaps\hangafter-\DroppedLines
   \noindent
   \hskip-\DroppedIndent
 \fi
 \vbox{\forgetall\box0}%
 \nobreak
 \let\next\ignorespaces} % Could be a one character word !
{\globaldropcaps\let\DroppedIndent\!!zeropoint
 \globaldropcaps\edef\DroppedLines{\number\maxdimen}%
 \globaldropcaps\chardef\DroppedStatus\plusthree
 \def\next{#7}}%
  \let\globaldropcaps\global
  \next}

btw, another way is:

\setupinitial
 [n=3,
  distance=.125em,
  font=SansBold]

% or: \definefontsynonym[Initial][SansBold]

\setupinitial[state=start] \placeinitial \input tufte

(and there is taco's lettrines module)

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


Re: [NTG-context] Strange interaction of \chapter and \AutoDroppedCaps

2005-02-21 Thread Slawek Zak
On Sat, Feb 19, 2005 at 04:06:56PM +0100, Hans Hagen wrote:
 Slawek Zak wrote:
 Hi,
 
 In this document:
 
 \setupindenting[medium]
 \setupwhitespace[medium]
 \setupbodyfont[16pt]
 
 \starttext
 \chapter{This is a test}
 
 \AutoDroppedCaps \input tufte
 
 \input tufte
 \stoptext
 
 I get output attached in gif file. It works fine without \chapter before. 
 Any
 thoughts?
 
 can you try
 
 \unprotect
 
 \ifx\keeplinestogether\undefined
   \let\keeplinestogether\gobbleoneargument
 \fi

[...]

 btw, high level interface:
 
 \setupindenting[medium] \setupwhitespace[medium]
 
 \setupinitial[state=start,n=3]
 \definefontsynonym[Initial][SerifBold]
 
 \placeinitial \dorecurse{3}{\input tufte \endgraf}

Tried that. Same problem. Should I patch the original ConTeXt file? I just put
your code in the document. Sorry for a lame question.

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