Re: [NTG-context] Finalizing my book

2015-09-06 Thread Mikoláš Štrajt
>> 1) its impossible to place table of content after the content itself. It
>> simply doesnt display without any trace in log.
>
>Hi Mikoláš,
>
>\placecontent[criterium=previous] is the right command.
>
>> 2) i am triying to use Antykwa Torunska with "\definetypeface [antykwa]
>> [rm] [serif] [antykwa-torunska] [default] [encoding=ec]", but it
>> complaint for misssing typescript. Is there some working way to install
>> it? (Using minimals)
>
>I use MkIV and this works (no typescripts involved):
>
>  \definefontfamily [antykwa] [rm] [Antykwa Torunska]
>
>   \definefontfamily [iwona] [rm] [Iwona]
>
>   \setupbodyfont[iwona,12pt]
>
>   \setuphead[section]  [style=\tfc\antykwa]
>
>   \setuphead[subsection]   [style=\tfb\antykwa, page=yes]


Both suggestions worked like a charm. Thank you.

Mikoláš
___
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] Finalizing my book

2015-09-06 Thread Wolfgang Schuster

Mikoláš Štrajt 
5. September 2015 22:15
I am finalizing my semi-autogenerated e-book and i ran into three issues:

1) its impossible to place table of content after the content itself. 
It simply doesnt display without any trace in log.
2) i am triying to use Antykwa Torunska with "\definetypeface 
[antykwa] [rm] [serif] [antykwa-torunska] [default] [encoding=ec]", 
but it complaint for misssing typescript. Is there some working way to 
install it? (Using minimals)

Use

\definetypeface [antykwa] [rm] [serif] [antykwa] [default]

to set the font.
3) is there some trick to protect stanzas of poems against pagebreak 
in the middle of stanza? Or there are some usefult tips/modules when 
typeseting poetry in Context?

You can use the lines environment with the packed option.

 begin example
\definetypeface [antykwa] [rm] [serif] [antykwa] [default]

\setupbodyfont[antykwa]

\setuplines[option=packed,inbetween={\blank[line,preference]}]

\setuppapersize[A6]

\showframe

\starttext

\subsection{Co mě tak láká?}

\startlines
A ty se ptáš,
co mě tak láka, na tobě?
Odpoveď máš
tady i když v snivé podobě

Dostal jsem ochutnat
z poháru štěstí.
Je to jak tancovat
na poušti v dešti.

Rychle mi však došlo,
že byl to jen sen
Nad pouští slunce vyšlo
a zase další horký den.

Tak buď mi oázou,
do které toužím jít.
Pouští mé kroky jdou,
mám žízeň, musím pít.

I kdybys byla jen fata morgána,
tak dáváš mi směr.
Oslovit můžu pak, to slunce nad náma:
Jen do mě si per!
\stoplines

\stoptext
 end example

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] footnote coloring

2015-09-06 Thread dr. Hans van der Meer
I want to color all elements of a footnote, but I cannot find how to do this.Minimal example:\def\rednumber#1{\color[red]{#1}}\starttext\setupfootnotes[textcolor=red,numbercommand=\rednumber,foregroundcolor=red]This text\footnote{the footnote} contains a footnote.\stoptextThe footnotenumber in the text is the only element that gets colored because of the [textcolor=red] parameter setting.In the command reference it is [numbercommand=\rednumber]. Shouldn't that have made the color of the footnotenumber below?Since \setupfootnotes inherits from setupframed I expected [foregroundcolor=red] to do the trick for the content of the footnote, but it doesn't.How to?Hans van der Meer

footnotecolor.pdf
Description: Adobe PDF document
 ___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] framed broken?

2015-09-06 Thread dr. Hans van der Meer
I tried to reproduce a framed example from the context-reference:



Input taken from this example by copying the lines from the reference document:
\starttext
\framed
[width=.2\hsize,height=3cm]
{\cbox to 2.5cm{\hsize2.5cm just\\in the\\middle}}
\stoptext

result is wrong in comparison with the middle \cbox example. The text is not 
centered.
Is framed at fault here?

Hans van der Meer


framedlines.pdf
Description: Adobe PDF document



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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] footnote coloring

2015-09-06 Thread Pablo Rodriguez
On 09/06/2015 11:11 AM, dr. Hans van der Meer wrote:
> I want to color all elements of a footnote, but I cannot find how to do
> this.
> Minimal example:
> 
> \def\rednumber#1{\color[red]{#1}}
> \starttext
> \setupfootnotes[textcolor=red,numbercommand=\rednumber,foregroundcolor=red]
> This text\footnote{the footnote} contains a footnote.
> \stoptext
> 
> The footnotenumber in the text is the only element that gets colored
> because of the [textcolor=red] parameter setting.
> 
> In the command reference it is [numbercommand=\rednumber]. Shouldn't
> that have made the color of the footnotenumber below?
> 
> Since \setupfootnotes inherits from setupframed I expected
> [foregroundcolor=red] to do the trick for the content of the footnote,
> but it doesn't.
> 
> How to?

Hi Hans,

this setup works fine in MkIV:

  \setupnote[footnote][textcolor=blue]

  \setupnotation[footnote][numbercommand={\color[red]}, color=green]


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

Re: [NTG-context] footnote coloring

2015-09-06 Thread Meer, H. van der
Indeed, this helped. Thanks.

For the record: in order to keep the position of the number in the footnote 
high, one has to use:
\def\redfootnotenumber#1{\color[red]{\high{#1}}}
\setupnotation[footnote][numbercommand=\redfootnotenumber]

Hans van der Meer


On 06 Sep 2015, at 12:29, Pablo Rodriguez > 
wrote:

this setup works fine in MkIV:

 \setupnote[footnote][textcolor=blue]

 \setupnotation[footnote][numbercommand={\color[red]}, color=green]


I hope it helps,

___
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] Finalizing my book

2015-09-06 Thread Pablo Rodriguez
On 09/05/2015 10:15 PM, Mikoláš Štrajt wrote:
> I am finalizing my semi-autogenerated e-book and i ran into three issues:
> 
> 1) its impossible to place table of content after the content itself. It
> simply doesnt display without any trace in log.

Hi Mikoláš,

\placecontent[criterium=previous] is the right command.

> 2) i am triying to use Antykwa Torunska with "\definetypeface [antykwa]
> [rm] [serif] [antykwa-torunska] [default] [encoding=ec]", but it
> complaint for misssing typescript. Is there some working way to install
> it? (Using minimals)

I use MkIV and this works (no typescripts involved):

   \definefontfamily [antykwa] [rm] [Antykwa Torunska]

   \definefontfamily [iwona] [rm] [Iwona]

   \setupbodyfont[iwona,12pt]

   \setuphead[section]  [style=\tfc\antykwa]

   \setuphead[subsection]   [style=\tfb\antykwa, page=yes]


BTW, you define section and subsection heads in lines 24-25 and 59-60.
Main typeface is defined in lines 19 and 57. Are these redefinitions
intended or is it a bug? (Even if they were intended, I’d remove them
for the sake of clarity.)

> 3) is there some trick to protect stanzas of poems against pagebreak in
> the middle of stanza? Or there are some usefult tips/modules when
> typeseting poetry in Context?

Sorry, but I don’t know how to do that.

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

Re: [NTG-context] Oddity: \buildtextaccent shifts glyph right

2015-09-06 Thread Rik

On 2015-09-06 11:52, Pablo Rodriguez wrote:

On 09/06/2015 05:27 PM, Rik wrote:

I am using \buildtextaccent to create a couple of characters that have
no Unicode equivalent.

Hi Rik,

although they don’t seem to work as expected in ConTeXt, Unicode has
combining diacritical marks (as you might know), such as:

 U+0301 COMBINING ACUTE ACCENT

Just in case it might help,


Pablo


On 2015-09-06 12:20, Thomas A. Schmitz wrote:
\buildtextaccent has to take some heuristics about horizontal and 
vertical placement and is sometimes wrong about it. Since your case is 
somewhat special, I would define a macro for the que symbol and adjust 
the boxes manually - but then, you'll have to adapt it to italic and 
upright (and bold) and different font sizes. Depends on how important 
typographical beauty is to you - either a medium-quality solution for 
all cases or better quality and manual fiddling... Something like


\definefontfamily [test] [serif] [ebgaramond]

\setupbodyfont [test,12pt]

\define\que%
  {\bgroup
   \setbox0\hbox{q}%
   \setbox2\hbox to \wd0{\kern0.3em\switchtobodyfont[6pt] ʒ}%
   \setbox4\hbox to \wd0{\kern0.1em\textacute}%
   \hbox to \wd0 \bgroup
 \hss\copy0\hss
 \hskip-\wd0
 \raise-0.45ex\copy2
 \hskip-\wd0
 \raise0.1ex\copy4
\egroup
  \egroup\autoinsertnextspace}

\starttext

{\it Dicit\que mihi}

\stoptext

(btw, the example you sent uses Latin Modern).

Thomas





Indeed, for the cases where there are combining accents that is a much 
better solution. I should have chosen a better example, that is, one 
that does not have a combining accent. Fortunately, there are very few 
that fall into that category, and unfortunately, there are some.


Using this, together with Thomas’s code, I can get around these issues.

Thank you both.

(And yes, I had attached the wrong example, and then referred to the 
font therein by the wrong name.)


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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] footnote coloring

2015-09-06 Thread Meer, H. van der
Thanks. I would not have thought of that. In the reference manual headcolor 
occurs in 13.2 \setupdescriptions and in 13.5 \definelabel only. I did not 
connect that with footnotes. Is \setupnotation a special form of 
\setupdescriptions?

By the way, is a separate call to \setupnote[footnote][textcolor=red] necessary 
to color the footnotemark in the running text? Or is there a key for it in 
\setupnotation[footnote] too?

Hans van der Meer


On 06 Sep 2015, at 18:25, Wolfgang Schuster 
> wrote:
Meer, H. van der
6. September 2015 13:15
Indeed, this helped. Thanks.

For the record: in order to keep the position of the number in the footnote 
high, one has to use:
\def\redfootnotenumber#1{\color[red]{\high{#1}}}
\setupnotation[footnote][numbercommand=\redfootnotenumber]
You can use the headcolor key to change the color of the footnote number.

\setupnotation[footnote][headcolor=red]

Wolfgang
___

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] Oddity: \buildtextaccent shifts glyph right

2015-09-06 Thread Rik
I am using \buildtextaccent to create a couple of characters that have 
no Unicode equivalent. They are scribal abbreviations that made it into 
early typesetters works. In this case, the abbreviation are for Latin 
que, which looks like a q with a small ezh appended in a subscript 
position, and q with an acute accent, both of which are used in some 
17th century works I am dealing with. An example of the abbreviation 
with the ezh and accent can be seen at 
https://books.google.com/books?id=hHNVcAAJ=PA6#v=onepage=false in 
the sixth line of the paragraph beginning “Yea but”.


It seems that \buildtextaccent\textacute q (or \buildtextaccent´q) moves 
the q to the right within the character’s bounding box. The following 
example (and attached resulting pdf) demonstrates this. Lines 1 and 2 
show the string with and without the \buildtextaccent, and lines 4 and 6 
repeat that in italic.  The strings are the same width, but the q is 
moved right. Lines 3 and 6 show a manual kerning of the q to improve 
appearance.


This happens with many fonts, but not all (I do not see it with Computer 
Modern). I am using Win 10Pro x64 with ConTeXt  ver: 2015.09.04 11:00 
MKIV beta  fmt: 2015.9.5  int: english/english.


I suspect that this is not intended, but I am not sure.

I would also love to raise the accent a bit. Suggestions? I can live 
with it as it is and manually kern as needed. There are very few 
instances of these abbreviations that need to be dealt with.


   % macros=mkvi engine=luajittex

   \starttexdefinition boxWidth #STR
  \setbox0=\hbox{#STR}\the\wd0
   \stoptexdefinition

   \starttexdefinition Dicitque
  Dicitq\kern-0.070em\low{ʒ}\autoinsertnextspace
   \stoptexdefinition
   \starttexdefinition DicitqueK
  Dicit\buildtextaccent\textacute
   q\kern-0.070em\low{ʒ}\autoinsertnextspace
   \stoptexdefinition
   \starttexdefinition DicitqueKK
  Dicit\kern-0.060em\buildtextaccent\textacute
   q\kern-0.070em\low{ʒ}\autoinsertnextspace
   \stoptexdefinition

   \starttexdefinition idque
  idq\autoinsertnextspace
   \stoptexdefinition
   \starttexdefinition idqueK
  id\buildtextaccent\textacute q\autoinsertnextspace
   \stoptexdefinition
   \starttexdefinition idqueKK
  id\kern-0.060em\buildtextaccent\textacute q\autoinsertnextspace
   \stoptexdefinition

   \setupbodyfont[ebgaramond,12pt]

   \starttext
   \startitemize[n,joinedup,packed]
   \item \Dicitque \qquad\boxWidth{\Dicitque}\par
   \item \DicitqueK \qquad\boxWidth{\DicitqueK}\par
   \item \DicitqueKK \qquad\boxWidth{\DicitqueKK}\par
   \it
   \item \Dicitque \qquad\boxWidth{\Dicitque}\par
   \item \DicitqueK \qquad\boxWidth{\DicitqueK}\par
   \item \DicitqueKK \qquad\boxWidth{\DicitqueKK}\par
   \stopitemize
   \startitemize[n,joinedup,packed]
   \item \idque \qquad\boxWidth{\idque}\par
   \item \idqueK \qquad\boxWidth{\idqueK}\par
   \item \idqueKK \qquad\boxWidth{\idqueKK}\par
   \it
   \item \idque \qquad\boxWidth{\idque}\par
   \item \idqueK \qquad\boxWidth{\idqueK}\par
   \item \idqueKK \qquad\boxWidth{\idqueKK}\par
   \stopitemize
   \stoptext

--
Rik


qAcute.pdf
Description: Adobe PDF document
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Oddity: \buildtextaccent shifts glyph right

2015-09-06 Thread Pablo Rodriguez
On 09/06/2015 05:27 PM, Rik wrote:
> I am using \buildtextaccent to create a couple of characters that have
> no Unicode equivalent.

Hi Rik,

although they don’t seem to work as expected in ConTeXt, Unicode has
combining diacritical marks (as you might know), such as:

U+0301 COMBINING ACUTE ACCENT

Just in case it might help,


Pablo


They are scribal abbreviations that made it into
> early typesetters works. In this case, the abbreviation are for Latin
> que, which looks like a q with a small ezh appended in a subscript
> position, and q with an acute accent, both of which are used in some
> 17th century works I am dealing with. An example of the abbreviation
> with the ezh and accent can be seen at
> https://books.google.com/books?id=hHNVcAAJ=PA6#v=onepage=false in
> the sixth line of the paragraph beginning “Yea but”.
> 
> It seems that \buildtextaccent\textacute q (or \buildtextaccent´q) moves
> the q to the right within the character’s bounding box. The following
> example (and attached resulting pdf) demonstrates this. Lines 1 and 2
> show the string with and without the \buildtextaccent, and lines 4 and 6
> repeat that in italic.  The strings are the same width, but the q is
> moved right. Lines 3 and 6 show a manual kerning of the q to improve
> appearance.
> 
> This happens with many fonts, but not all (I do not see it with Computer
> Modern). I am using Win 10Pro x64 with ConTeXt  ver: 2015.09.04 11:00
> MKIV beta  fmt: 2015.9.5  int: english/english.
> 
> I suspect that this is not intended, but I am not sure.
> 
> I would also love to raise the accent a bit. Suggestions? I can live
> with it as it is and manually kern as needed. There are very few
> instances of these abbreviations that need to be dealt with.


-- 
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] Oddity: \buildtextaccent shifts glyph right

2015-09-06 Thread Thomas A. Schmitz

On 06.09.2015 17:27, Rik wrote:

It seems that \buildtextaccent\textacute q (or \buildtextaccent´q) moves
the q to the right within the character’s bounding box. The following
example (and attached resulting pdf) demonstrates this. Lines 1 and 2
show the string with and without the \buildtextaccent, and lines 4 and 6
repeat that in italic.  The strings are the same width, but the q is
moved right. Lines 3 and 6 show a manual kerning of the q to improve
appearance.


\buildtextaccent has to take some heuristics about horizontal and 
vertical placement and is sometimes wrong about it. Since your case is 
somewhat special, I would define a macro for the que symbol and adjust 
the boxes manually - but then, you'll have to adapt it to italic and 
upright (and bold) and different font sizes. Depends on how important 
typographical beauty is to you - either a medium-quality solution for 
all cases or better quality and manual fiddling... Something like


\definefontfamily [test] [serif] [ebgaramond]

\setupbodyfont [test,12pt]

\define\que%
  {\bgroup
   \setbox0\hbox{q}%
   \setbox2\hbox to \wd0{\kern0.3em\switchtobodyfont[6pt] ʒ}%
   \setbox4\hbox to \wd0{\kern0.1em\textacute}%
   \hbox to \wd0 \bgroup
 \hss\copy0\hss
 \hskip-\wd0
 \raise-0.45ex\copy2
 \hskip-\wd0
 \raise0.1ex\copy4
\egroup
  \egroup\autoinsertnextspace}

\starttext

{\it Dicit\que mihi}

\stoptext

(btw, the example you sent uses Latin Modern).

Thomas
___
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] footnote coloring

2015-09-06 Thread Wolfgang Schuster

Meer, H. van der 
6. September 2015 13:15
Indeed, this helped. Thanks.

For the record: in order to keep the position of the number in the 
footnote high, one has to use:

\def\redfootnotenumber#1{\color[red]{\high{#1}}}
\setupnotation[footnote][numbercommand=\redfootnotenumber]

You can use the headcolor key to change the color of the footnote number.

\setupnotation[footnote][headcolor=red]

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
___