[NTG-context] Re: Number in a circle

2024-05-30 Thread Kip Warner
On Thu, 2024-05-30 at 23:20 +0100, Bruce Horrocks wrote:
> I'd be able to maintain a Context PPA but there already seems to be
> one:
> 

I think that's just the source used in Ubuntu. This is called a "source
package" in the Debian parlance:

   https://www.debian.org/doc/debian-policy/ch-source.html

But if you click the "Other versions of 'context' in untrusted
archives" at the bottom of the page it will show you PPAs. There
appears to be three, all of which are ancient.

Just so you know, Ubuntu source packages are just Debian source
packages, but often with some downstream patches. The Debian source
package is what ends up in endless distros.

Probably most lay users who use ConTeXt outside of building from a
tarball or putting somewhere outside of the FHS are using some Debian
distro derivative's package via:

   $ sudo apt install context

Unless the Debian package is updated, usually downstream derivative
distros won't update their own. For that reason if you want to affect
the most change for the most users it's best to do so here:

   https://tracker.debian.org/pkg/context

Over a hundred distros just recycle the above source package and its
resulting binaries.

Usually Debian is slow to update their packages, depending on who is
assigned as package maintainer. Because of that, this is part of the
reason why PPAs are popular because they shorten the time for lay users
to try the new version without having to fiddle with paths, tarballs,
etc.

Once you have a PPA up, to build binary packages the builder does the
same as the ones used by the Debian project. You upload a Debian source
package and it will then go and build and test the resulting binary
packages. After that it injects them into the APT repository (which is
all a PPA is).

-- 
Kip Warner
OpenPGP signed/encrypted mail preferred
https://www.thevertigo.com


signature.asc
Description: This is a digitally signed message part
___
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: setuphead in connection with the command argument

2024-05-30 Thread Bruce Horrocks


> On 30 May 2024, at 23:25, Gerion Entrup  wrote:
> 
> Am Donnerstag, 30. Mai 2024, 18:49:08 MESZ schrieb Bruce Horrocks:
>> 
>>> On 30 May 2024, at 15:15, Gerion Entrup  wrote:
>>> 
>>> Let's begin with a minimal example:
>>> ```
>>> \define[2]\MyChapter{%
>>> #1 #2: \structureuservariable{subtitle} (\structureuservariable{intro})
>>> }
>> 
>> Stop there!
>> 
>> Use \definehead to create your own variation of a heading - much more 
>> robust. Something like the following (untested):
>> 
>>  \startsetups PlaceSubTitleAndIntro
>>% Set font and and style etc for the subtitle here
>>\structureuservariable(subtitle)
>> 
>>% Set font and style etc for the intro text here
>>\structureuservariable(intro)
>>  \stopsetups
>> 
>>  \definehead [MyChapter] [chapter]
>>  \setuphead [MyChapter]
>>[ style={...}, % heading style
>>  after={\setup{PlaceSubTitleAndIntro}},
>>]
>> 
>>  \starttext
>>  \startMyChapter[title={Foo}]
>>[ subtitle={Bar},
>>  intro={Some explanation},
>>]
>>  The text of the chapter
>>  \stopMyChapter
>>  \stoptext
> 
> Thanks for the input. A comparable example is also listed in the wiki.
> I like the approach for placing subtitle and intro alone. However, I also 
> want to style chapter number and chapter title separately.

Any setuphead commands that apply to MyChapter also apply to chapter so you 
should be able to use exactly the same styling commands.

> I'm also not sure, if an extra heading (MyChapter) is needed, since all my 
> chapters are styled in this way.
> Isn't it possible to define "after" of chapter directly?

Yes, I think it is possible to just use \setuphead [chapter] instead of 
\setuphead [MyChapter] with the rest remaining the same.

The only reason I don't do it is that if something goes wrong, I know I have an 
original version of \chapter readily to hand to compare against for debugging.

Regards,
—
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 / 
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: setuphead in connection with the command argument

2024-05-30 Thread Gerion Entrup
Am Donnerstag, 30. Mai 2024, 22:54:47 MESZ schrieb Wolfgang Schuster:
> Gerion Entrup schrieb am 30.05.2024 um 16:25:
> > The chapter format that I want to achieve in the end is nearly the one in 
> > the attachment (excerpt of Christian Dietrich's PhD thesis).
> 
> When you have a complex layout it is easier to use the 
> \defineheadalternative command to create it.
> 
> To change the font for each element disable the default settings with 
> \setuphead[style=] and use \startfont (or \definedfont) to apply a 
> different style for the number, title etc.
> 
>  begin example
> \defineframed
>[ChapterFrame]
>[width=\textwidth,
> align=flushright,
> offset=0pt,
> rulethickness=0pt]
> 
> \startsetups [christian_dietrich]
>\startlocalheadsetup
>  \startframed[ChapterFrame]
>\blank[2cm]
>\startfont[Serif sa 8]
>  \color[darkgray]{\headnumbercontent}
>\stopfont
>\blank[5mm]
>\startfont[SerifBold sa 2]
>  \color[darkred]{\headtextcontent}
>\stopfont
>\blank[1cm]
>\startfont[SerifBold sa 1.5]
>  \color[darkred]{\structureuservariable{subtitle}}
>\stopfont
>  \stopframed
>\stoplocalheadsetup
> \stopsetups
> 
> \defineheadalternative
>[christian_dietrich]
>[renderingsetup=christian_dietrich]
> 
> \setuphead
>[chapter]
>[alternative=christian_dietrich,
> header=empty,
> style=]
> 
> \starttext
> 
> \startchapter[title=Chapter title][subtitle=Chapter subtitle]
> \samplefile{lorem}
> \stopchapter
> 
> \stoptext
>  end example

Thank you very much! That looks really clean. I will add it to the wiki.

Can you bring some clarification regarding "style=", "command=" and 
"alternative="?
What, if I define multiple of them? Is the system not made for this?

I just tested my initial example regarding font size with `command=\MyChapter, 
style=` and the font size was only affected by the code of \MyChapter.
What is the default style?

Best
Gerion



signature.asc
Description: This is a digitally signed message part.
___
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: setuphead in connection with the command argument

2024-05-30 Thread Gerion Entrup
Am Donnerstag, 30. Mai 2024, 18:49:08 MESZ schrieb Bruce Horrocks:
> 
> > On 30 May 2024, at 15:15, Gerion Entrup  wrote:
> > 
> > Let's begin with a minimal example:
> > ```
> > \define[2]\MyChapter{%
> > #1 #2: \structureuservariable{subtitle} (\structureuservariable{intro})
> > }
> 
> Stop there!
> 
> Use \definehead to create your own variation of a heading - much more robust. 
> Something like the following (untested):
> 
>   \startsetups PlaceSubTitleAndIntro
> % Set font and and style etc for the subtitle here
> \structureuservariable(subtitle)
> 
> % Set font and style etc for the intro text here
> \structureuservariable(intro)
>   \stopsetups
> 
>   \definehead [MyChapter] [chapter]
>   \setuphead [MyChapter]
> [ style={...}, % heading style
>   after={\setup{PlaceSubTitleAndIntro}},
> ]
> 
>   \starttext
>   \startMyChapter[title={Foo}]
> [ subtitle={Bar},
>   intro={Some explanation},
> ]
>   The text of the chapter
>   \stopMyChapter
>   \stoptext

Thanks for the input. A comparable example is also listed in the wiki.
I like the approach for placing subtitle and intro alone. However, I also want 
to style chapter number and chapter title separately.
I'm also not sure, if an extra heading (MyChapter) is needed, since all my 
chapters are styled in this way.
Isn't it possible to define "after" of chapter directly?

Best
Gerion


signature.asc
Description: This is a digitally signed message part.
___
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: Number in a circle

2024-05-30 Thread Bruce Horrocks

> On 30 May 2024, at 21:19, Henning Hraban Ramm  wrote:
> 
> Am 30.05.24 um 19:25 schrieb Kip Warner:
>> On Thu, 2024-05-30 at 18:26 +0200, Thomas A. Schmitz wrote:
>>> Is this a message "I'm volunteering to maintain such a ppa" or a
>>> message "wouldn't it be nice if someone went out of their way to make
>>> my life easier"? Just out of curiosity.
>> Right now it's the latter due to time constraints. Although I have
>> helped a number of free software projects get PPAs up and running.
>> Usually once they're up there's not much to do after. Since ConTeXt is
>> already Debianized by the Debian project, you probably can start with
>> their debian/ folder, edit as needed, and then you should be good. You
>> can also set an automatic build recipe in the PPA so each commit to SCM
>> results in a new nightly.
>> You'll get a lot more people using and testing your newer release this
>> way. Food for thought.
> 
> I can assure you the worldwide TeX community has thought about their approach 
> a few times.
> TeX Live packaging (i.e. mostly LaTeX packaging) is different to Linux 
> packaging. Somebody explained it to me in detail, but I can’t remember…
> At least TeX Live’s yearly release setup doesn’t fit… well, anything else (I 
> find it annoying). But for release date, many of the active contributors make 
> sure everything fits together.
> 
> ConTeXt is different in that the distribution is closely coupled to binary 
> versions. It would be possible to set up a PPA independent of TeX Live, I 
> guess. (Have binary & macros in the same package, maybe docs & fonts 
> separate…) But somebody would have to maintain it.

I'd be able to maintain a Context PPA but there already seems to be one:


The dates on that page confuse me, however. It says the last upload of the 
package was 2023-05-05 but that it somehow contains the Context version from 
2024-04-09. I'm not quite sure how that can be the case?

Also it's not clear to me whether that PPA is Context alone or TeXlive plus a 
bunch of TeX stuff including Context? (I could install it of course.) :-)

—
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 / 
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: self defined conversion in \date

2024-05-30 Thread Wolfgang Schuster

Peter Münster schrieb am 30.05.2024 um 23:22:

On Thu, May 30 2024, Wolfgang Schuster wrote:


The \date mechanism can only use conversions which are defined on the Lua side


Ok. How please?

This does not work:

--8<---cut here---start->8---
\startluacode
-- from https://wiki.contextgarden.net/Command/defineconversion:
   interfaces.implement {
 name  = "FRdate",
 public= true,
 arguments = "string",
 actions   =
 function(s)
 local n = tonumber(s)
 if n == 1 then
 context"1\\ier"
 else
 context(s)
 end
 end
}
\stopluacode
\def\ier{\highordinalstr{er}}
\mainlanguage[fr]
\defineconversion[frd][\FRdate]
\setuplanguage[fr][date={day:frd,\ ,month,\ ,year}]
\starttext
Conversion: \convertnumber{frd}{1}, \convertnumber{frd}{2} (OK)\\
Dates: \date[d=1], \date[d=2] (not OK)
\stoptext
--8<---cut here---end--->8---



\startluacode
function converters.peter(n)
return "X-" .. converters.romannumerals(n)
end
\stopluacode

\starttext

\date[d=1][X-,day:romannumerals]

\date[d=1][day:peter]

\stoptext

Wolfgang
___
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: missing space with French quotation

2024-05-30 Thread Rik Kabel

My apologies to all, and thank you, Wolfgang. Time to update my notes.

--
Rik

On 2024-05-30 16:33, Wolfgang Schuster wrote:

Rik Kabel schrieb am 30.05.2024 um 19:21:

 From my basic environment file, a useful reminder:

    %% \mainlanguage sets language used for labels (TOC, chapters, ...)
    %% \language sets language to use for hyphenation, quote rules, ...


\mainlanguage includes all settings of \language.

As you can see in the following example \mainlanguage change the float 
label and the quotation marks but \language changes only the quotation 
marks and uses the label of the main language.


 begin example
\starttext

\startplacefigure[title=\quotation{English quotes}]
\midaligned{\blackrule[width=6cm,height=2cm,color=red]}
\stopplacefigure

\start \mainlanguage[nl]
\startplacefigure[title=\quotation{Dutch quotes}]
\midaligned{\blackrule[width=6cm,height=2cm,color=green]}
\stopplacefigure
\stop

\start \language[fr]
\startplacefigure[title=\quotation{French quotes}]
\midaligned{\blackrule[width=6cm,height=2cm,color=blue]}
\stopplacefigure
\stop

\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 / 
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: self defined conversion in \date

2024-05-30 Thread Peter Münster
On Thu, May 30 2024, Wolfgang Schuster wrote:

> The \date mechanism can only use conversions which are defined on the Lua side

Ok. How please?

This does not work:

--8<---cut here---start->8---
\startluacode
-- from https://wiki.contextgarden.net/Command/defineconversion:
  interfaces.implement {
name  = "FRdate",
public= true,
arguments = "string",
actions   =
function(s)
local n = tonumber(s)
if n == 1 then
context"1\\ier"
else
context(s)
end
end
}
\stopluacode
\def\ier{\highordinalstr{er}}
\mainlanguage[fr]
\defineconversion[frd][\FRdate]
\setuplanguage[fr][date={day:frd,\ ,month,\ ,year}]
\starttext
Conversion: \convertnumber{frd}{1}, \convertnumber{frd}{2} (OK)\\
Dates: \date[d=1], \date[d=2] (not OK)
\stoptext
--8<---cut here---end--->8---

-- 
   Peter
___
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: Number in a circle

2024-05-30 Thread Kip Warner
On Thu, 2024-05-30 at 17:26 +0200, Henning Hraban Ramm wrote:
> My example wasn’t complete, and so is yours. You just define that 
> typeface but never use it.

I'm probably doing it wrong, but I still can't get it to work:

   \definefontfallback[SymbolFB]
 [file:symbola.otf]
 [0x00300-0x003FF,0x02100-0x02800,0x1F000-0x2] % look up the right 
Unicode ranges!
 [check=no,force=no]
   
   
\definetypeface[circle_typeface][rm][serif][times][default][fallbacks=SymbolFB]
   
   \starttext
   Some text in default font before temporarily switching just for this number:
   {\switchtobodyfont[circle_typeface] \utfchar{0x02460}}
   And back to normal text.
   \stoptext

-- 
Kip Warner
OpenPGP signed/encrypted mail preferred
https://www.thevertigo.com


signature.asc
Description: This is a digitally signed message part
___
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: self defined conversion in \date

2024-05-30 Thread Wolfgang Schuster

Peter Münster schrieb am 30.05.2024 um 13:59:

Hi,

It seems, that you cannot use self defined conversions in \date:

\defineconversion[mytest][X-\romannumerals]
\starttext
Self defined conversion: \convertnumber{mytest}{1} (OK)\\
Predefined conversion in date: \date[d=1][day:a] (OK)\\
Self defined conversion in date: \date[d=1][day:mytest] (not OK)
\stoptext

Is this a bug, or a feature?

How could one use self defined conversions in \date please?


The \date mechanism can only use conversions which are defined on the 
Lua side but your custom conversion is only available on the TeX side.
You can however set the "X-" prefix as normal string in the output of 
\date and use a predefined conversion.


\starttext

\date[d=1][X-,day:r]

\date[d=1][X-,day:romannumerals]

\stoptext

Wolfgang
___
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: setuphead in connection with the command argument

2024-05-30 Thread Wolfgang Schuster

Gerion Entrup schrieb am 30.05.2024 um 16:25:

The chapter format that I want to achieve in the end is nearly the one in the 
attachment (excerpt of Christian Dietrich's PhD thesis).


When you have a complex layout it is easier to use the 
\defineheadalternative command to create it.


To change the font for each element disable the default settings with 
\setuphead[style=] and use \startfont (or \definedfont) to apply a 
different style for the number, title etc.


 begin example
\defineframed
  [ChapterFrame]
  [width=\textwidth,
   align=flushright,
   offset=0pt,
   rulethickness=0pt]

\startsetups [christian_dietrich]
  \startlocalheadsetup
\startframed[ChapterFrame]
  \blank[2cm]
  \startfont[Serif sa 8]
\color[darkgray]{\headnumbercontent}
  \stopfont
  \blank[5mm]
  \startfont[SerifBold sa 2]
\color[darkred]{\headtextcontent}
  \stopfont
  \blank[1cm]
  \startfont[SerifBold sa 1.5]
\color[darkred]{\structureuservariable{subtitle}}
  \stopfont
\stopframed
  \stoplocalheadsetup
\stopsetups

\defineheadalternative
  [christian_dietrich]
  [renderingsetup=christian_dietrich]

\setuphead
  [chapter]
  [alternative=christian_dietrich,
   header=empty,
   style=]

\starttext

\startchapter[title=Chapter title][subtitle=Chapter subtitle]
\samplefile{lorem}
\stopchapter

\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 / 
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: missing space with French quotation

2024-05-30 Thread Wolfgang Schuster

Rik Kabel schrieb am 30.05.2024 um 19:21:

 From my basic environment file, a useful reminder:

%% \mainlanguage sets language used for labels (TOC, chapters, ...)
%% \language sets language to use for hyphenation, quote rules, ...


\mainlanguage includes all settings of \language.

As you can see in the following example \mainlanguage change the float 
label and the quotation marks but \language changes only the quotation 
marks and uses the label of the main language.


 begin example
\starttext

\startplacefigure[title=\quotation{English quotes}]
\midaligned{\blackrule[width=6cm,height=2cm,color=red]}
\stopplacefigure

\start \mainlanguage[nl]
\startplacefigure[title=\quotation{Dutch quotes}]
\midaligned{\blackrule[width=6cm,height=2cm,color=green]}
\stopplacefigure
\stop

\start \language[fr]
\startplacefigure[title=\quotation{French quotes}]
\midaligned{\blackrule[width=6cm,height=2cm,color=blue]}
\stopplacefigure
\stop

\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 / 
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: Number in a circle

2024-05-30 Thread Henning Hraban Ramm

Am 30.05.24 um 19:25 schrieb Kip Warner:

On Thu, 2024-05-30 at 18:26 +0200, Thomas A. Schmitz wrote:

Is this a message "I'm volunteering to maintain such a ppa" or a
message "wouldn't it be nice if someone went out of their way to make
my life easier"? Just out of curiosity.


Right now it's the latter due to time constraints. Although I have
helped a number of free software projects get PPAs up and running.

Usually once they're up there's not much to do after. Since ConTeXt is
already Debianized by the Debian project, you probably can start with
their debian/ folder, edit as needed, and then you should be good. You
can also set an automatic build recipe in the PPA so each commit to SCM
results in a new nightly.

You'll get a lot more people using and testing your newer release this
way. Food for thought.


I can assure you the worldwide TeX community has thought about their 
approach a few times.
TeX Live packaging (i.e. mostly LaTeX packaging) is different to Linux 
packaging. Somebody explained it to me in detail, but I can’t remember…
At least TeX Live’s yearly release setup doesn’t fit… well, anything 
else (I find it annoying). But for release date, many of the active 
contributors make sure everything fits together.


ConTeXt is different in that the distribution is closely coupled to 
binary versions. It would be possible to set up a PPA independent of TeX 
Live, I guess. (Have binary & macros in the same package, maybe docs & 
fonts separate…) But somebody would have to maintain it.


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: Number in a circle

2024-05-30 Thread Kip Warner
On Thu, 2024-05-30 at 18:26 +0200, Thomas A. Schmitz wrote:
> Is this a message "I'm volunteering to maintain such a ppa" or a
> message "wouldn't it be nice if someone went out of their way to make
> my life easier"? Just out of curiosity.

Right now it's the latter due to time constraints. Although I have
helped a number of free software projects get PPAs up and running. 

Usually once they're up there's not much to do after. Since ConTeXt is
already Debianized by the Debian project, you probably can start with
their debian/ folder, edit as needed, and then you should be good. You
can also set an automatic build recipe in the PPA so each commit to SCM
results in a new nightly.

You'll get a lot more people using and testing your newer release this
way. Food for thought.

-- 
Kip Warner
OpenPGP signed/encrypted mail preferred
https://www.thevertigo.com


signature.asc
Description: This is a digitally signed message part
___
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: missing space with French quotation

2024-05-30 Thread Rik Kabel

From my basic environment file, a useful reminder:

   %% \mainlanguage sets language used for labels (TOC, chapters, ...)
   %% \language sets language to use for hyphenation, quote rules, ...

--
Rik


On 2024-05-30 11:34, Peter Münster wrote:

Hi,

When using \start/stopquotation in French documents, there is a missing space:

\mainlanguage[fr]
\setcharacterspacing[frenchpunctuation]
\starttext
bla \quotation{OK} bla\\
bla «OK» bla
\startquotation
   Not Ok: a space is missing
\stopquotation
\stoptext

Is this a bug or a feature?

How could I get a space before "»" please?

TIA for any help,___
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: setuphead in connection with the command argument

2024-05-30 Thread Bruce Horrocks


> On 30 May 2024, at 15:15, Gerion Entrup  wrote:
> 
> Let's begin with a minimal example:
> ```
> \define[2]\MyChapter{%
> #1 #2: \structureuservariable{subtitle} (\structureuservariable{intro})
> }

Stop there!

Use \definehead to create your own variation of a heading - much more robust. 
Something like the following (untested):

  \startsetups PlaceSubTitleAndIntro
% Set font and and style etc for the subtitle here
\structureuservariable(subtitle)

% Set font and style etc for the intro text here
\structureuservariable(intro)
  \stopsetups

  \definehead [MyChapter] [chapter]
  \setuphead [MyChapter]
[ style={...}, % heading style
  after={\setup{PlaceSubTitleAndIntro}},
]

  \starttext
  \startMyChapter[title={Foo}]
[ subtitle={Bar},
  intro={Some explanation},
]
  The text of the chapter
  \stopMyChapter
  \stoptext

—
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 / 
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: Number in a circle

2024-05-30 Thread Thomas A. Schmitz

On 30.05.24 18:18, Kip Warner wrote:

Thanks Hrabab. With respect to the latter wiki page, the project might
consider adding a PPA. They're very popular among the over a hundred
different Debian based distros out there. They reconcile both system
requirements of proper FHS usage and file tracking by the system
package manager with the user's need to use the latest stable or
nightly.


Is this a message "I'm volunteering to maintain such a ppa" or a message 
"wouldn't it be nice if someone went out of their way to make my life 
easier"? Just out of curiosity.


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
___


[NTG-context] Re: Number in a circle

2024-05-30 Thread Kip Warner
On Thu, 2024-05-30 at 17:22 +0200, Henning Hraban Ramm wrote:
> Am 28.05.24 um 23:50 schrieb Kip Warner:
> > On Tue, 2024-05-28 at 17:47 +0200, Pablo Rodriguez wrote:
> > > fw is a new dimensio unit only available in LMTX (not in LuaTeX).
> > > 
> > > Just in case it might help,
> > 
> > Thanks Pablo. I'm using the context package for Ubuntu Mantic which
> > is
> > version 2021.03.05.20230120+dfsg-2. I'm assuming that doesn't
> > support
> > the new unit.
> 
> No. Debian/Ubuntu is known for outdated TeX Live packages.
> 
> It doesn’t matter as long as it works for you, but on this mailing
> list we tend to assume latest versions.
> 
> See "Integrating vanilla TeX Live with Debian" in 
> https://wiki.debian.org/TeXLive how to replace TeX Live from your
> Linux distribution with a current version.
> 
> You can also install an additional ConTeXt LMTX, just be careful
> about your PATH.
> https://wiki.contextgarden.net/Installation

Thanks Hrabab. With respect to the latter wiki page, the project might
consider adding a PPA. They're very popular among the over a hundred
different Debian based distros out there. They reconcile both system
requirements of proper FHS usage and file tracking by the system
package manager with the user's need to use the latest stable or
nightly.

-- 
Kip Warner
OpenPGP signed/encrypted mail preferred
https://www.thevertigo.com


signature.asc
Description: This is a digitally signed message part
___
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] \hfrac undefined in latest

2024-05-30 Thread Henning Hraban Ramm

Hi Hans & Mikael,

\hfrac is not defined anymore in latest LMTX, is this intentional?

(I don’t need it, it’s just about documentation.)

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] missing space with French quotation

2024-05-30 Thread Peter Münster
Hi,

When using \start/stopquotation in French documents, there is a missing space:

\mainlanguage[fr]
\setcharacterspacing[frenchpunctuation]
\starttext
bla \quotation{OK} bla\\
bla «OK» bla
\startquotation
  Not Ok: a space is missing
\stopquotation
\stoptext

Is this a bug or a feature?

How could I get a space before "»" please?

TIA for any help,
-- 
   Peter
___
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: Number in a circle

2024-05-30 Thread Henning Hraban Ramm

Am 28.05.24 um 23:49 schrieb Kip Warner:

On Tue, 2024-05-28 at 08:17 +0200, Henning Hraban Ramm wrote:

Am 27.05.24 um 19:20 schrieb Kip Warner:



You could just define a fallback font, like:

\definefontfallback[SymbolFB]
    [file:symbola.otf]
    [0x00300-0x003FF,0x02100-0x02800,0x1F000-0x2] % look up the
right
Unicode ranges!
    [check=no,force=no]

\definetypeface [myfonts] [rm] [serif] [times] [default]
[fallbacks=SymbolFB]

And then copy the character from a symbol table, no need for a macro.


Hmm, that's a great idea. But I can't seem to get a minimal to work
with https://context-on-web.eu:

\definefontfallback[SymbolFB]
   [file:symbola.otf]
   [0x00300-0x003FF,0x02100-0x02800,0x1F000-0x2] % look up the
right
Unicode ranges!
   [check=no,force=no]

\definetypeface [myfonts] [rm] [serif] [times] [default]

[fallbacks=SymbolFB]

\starttext

\utfchar{0x02460}
\stoptext

The above just prints the vanilla character '1'. That might be because
the online editor doesn't have access to the font. So I tried compiling
the above locally with the Symbola.otf file in the same directory and
same problem.



My example wasn’t complete, and so is yours. You just define that 
typeface but never use it.


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: Number in a circle

2024-05-30 Thread Henning Hraban Ramm

Am 28.05.24 um 23:50 schrieb Kip Warner:

On Tue, 2024-05-28 at 17:47 +0200, Pablo Rodriguez wrote:

fw is a new dimensio unit only available in LMTX (not in LuaTeX).

Just in case it might help,


Thanks Pablo. I'm using the context package for Ubuntu Mantic which is
version 2021.03.05.20230120+dfsg-2. I'm assuming that doesn't support
the new unit.


No. Debian/Ubuntu is known for outdated TeX Live packages.

It doesn’t matter as long as it works for you, but on this mailing list 
we tend to assume latest versions.


See "Integrating vanilla TeX Live with Debian" in 
https://wiki.debian.org/TeXLive how to replace TeX Live from your Linux 
distribution with a current version.


You can also install an additional ConTeXt LMTX, just be careful about 
your PATH.

https://wiki.contextgarden.net/Installation

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: setuphead in connection with the command argument

2024-05-30 Thread Gerion Entrup
Hi Tomáš,

first, thank you for the answer.

Am Donnerstag, 30. Mai 2024, 16:47:36 MESZ schrieb Tomáš Hála:
> Hi Gebrion,
> 
> > ## Font size + ## Bold text
> 
> for font size etc., you can use 
>   \setuphead [chapter] [style={\setupbodyfont[11pt]}]  or
>   \setuphead [chapter] [style=\tf]
> 
>   \setuphead [chapter] [style=\bf]

So this sentence of the wiki [1] is wrong (documentation of the command 
argument)?:
> Command to use for typesetting the title; overrules all other styling. First 
> argument is the number, second the title text.

If I see it right, `style=` only affects the typesetting of `#1` and `#2`, so I 
need setupbodyfont _and_ switchtobodyfont, didn't I?
Also, when I want #1 and #2 to be in different sizes, I choose the "base" size 
with style=\setupbodyfont and adjust it further with switchtobodyfont just for 
one the the argument?

All in all, the correct documentation would be:
> Command to use for typesetting the title. First argument is the number, 
> second the title text. Styling of these parameters can be achieved only by 
> specifying style=.


> > ## Line breaks + ## Framed
> > How can I achieve line breaks?
> 
> \define[2]\MyChapter{%
>   \framedtext{%
>  #1 #2:\\
>  \structureuservariable{subtitle}\\
>  (\structureuservariable{intro})
>   }
> }

This produces an extra line break between '#2' and ':', I don't get why. 
Otherwise, it looks quite nice.


> > I also want to set everything except of the intro in a flushright 
> > environment but do not know how. I tried:
> 
> As above: 
>   \framedtext[align=flushright]{%

That works, thank you!


Best,
Gerion

> --
> 
> On Thu, May 30, 2024 at 02:15:01PM +, Gerion Entrup wrote:
> > Hi,
> > 
> > I'm trying to adapt the format of chapters in my document and have a few 
> > questions regarding setuphead.
> > My aim is to have the chapter (title) on a separate page with an additional 
> > intro in different text sizes for title, subtitle and the intro.
> > I chose to use the "command=" argument in setuphead for that.
> > However, I'm not quite sure about it's internals.
> > 
> > Let's begin with a minimal example:
> > ```
> > \define[2]\MyChapter{%
> > #1 #2: \structureuservariable{subtitle} (\structureuservariable{intro})
> > }
> > 
> > \setuphead[title, chapter][command=\MyChapter]
> > 
> > \setupbodyfont[11pt]
> > 
> > \starttext
> > \startchapter[title=foo][subtitle=bar, intro={some explanation}]
> > some text
> > \stopchapter
> > \stoptext
> > ```
> > This produces 1.pdf.
> > 
> > 
> > ## Font size
> > 
> > What is the reason that that the font of the chapter is bigger? How can I 
> > reset it to normal size? This does not work at all:
> > ```
> > \define[2]\MyChapter{%
> > \setupbodyfont[11pt] #1 #2: \structureuservariable{subtitle} 
> > (\structureuservariable{intro})
> > }
> > ```
> > However, changing to a bigger font works somehow. Is there a factor applied 
> > to the font size internally? For example:
> > ```
> > \define[2]\MyChapter{%
> > \setupbodyfont[20pt] #1 #2: \structureuservariable{subtitle} 
> > (\structureuservariable{intro})
> > }
> > ```
> > produces 2.pdf (the chapter font is not 20pt).
> > 
> > 
> > ## Line breaks
> > 
> > How can I achieve line breaks?
> > This does not work:
> > ```
> > \define[2]\MyChapter{%
> > #1 #2:\\
> > \structureuservariable{subtitle}\\
> > (\structureuservariable{intro})
> > }
> > ```
> > (see 3.pdf)
> > 
> > I also want to set everything except of the intro in a flushright 
> > environment but do not know how. I tried:
> > ```
> > \define[2]\MyChapter{%
> > \startalignment[flushright]
> > #1 #2:\\
> > \structureuservariable{subtitle}\\
> > \stopalignment
> > \structureuservariable{intro}
> > }
> > ```
> > (see 4.pdf, no change)
> > 
> > 
> > ## Bold text
> > 
> > I tried to get the text bold. However, `#1` and `#2` does not seem to 
> > follow this.
> > ```
> > \define[2]\MyChapter{%
> > \bold #1 #2: \structureuservariable{subtitle} 
> > (\structureuservariable{intro})
> > }
> > ```
> > 
> > ## Makeups
> > 
> > The best solution, I had so far, was to define a makeup, but I don't get it 
> > to work with text with mixed alignment and it does not solve the font size 
> > problem:
> > ```
> > \definemakeup[chapter][align=left, top=]
> > \define[2]\MyChapter{%
> > \startmakeup[chapter]
> > #1 #2:\\
> > \structureuservariable{subtitle}\\
> > \stopmakeup
> > (\structureuservariable{intro})
> > }
> > ```
> > (see 5.pdf)
> > 
> > ## Framed
> > 
> > I also have tried this but it does not bring any linebreaks:
> > ```
> > \define[2]\MyChapter{%
> > \framed[frame=off, offset=0pt]{#1\\#2:\\ 
> > \structureuservariable{subtitle}\\ (\structureuservariable{intro})}
> > }
> > ```
> > (see 6.pdf)
> > 
> > I hope you can shed some light into setuphead with command. I search on the 
> > wiki, Stackoverflow and the manuals but didn't really find anything.
> > 
> > Best,
> > Gerion
> > 
> 
> 
> 

[NTG-context] Re: setuphead in connection with the command argument

2024-05-30 Thread Tomáš Hála
Hi Gebrion,

> ## Font size + ## Bold text

for font size etc., you can use 
  \setuphead [chapter] [style={\setupbodyfont[11pt]}]  or
  \setuphead [chapter] [style=\tf]

  \setuphead [chapter] [style=\bf]

> ## Line breaks + ## Framed
> How can I achieve line breaks?

\define[2]\MyChapter{%
  \framedtext{%
 #1 #2:\\
 \structureuservariable{subtitle}\\
 (\structureuservariable{intro})
  }
}

> I also want to set everything except of the intro in a flushright environment 
> but do not know how. I tried:

As above: 
  \framedtext[align=flushright]{%

The best,

Tomáš

--

On Thu, May 30, 2024 at 02:15:01PM +, Gerion Entrup wrote:
> Hi,
> 
> I'm trying to adapt the format of chapters in my document and have a few 
> questions regarding setuphead.
> My aim is to have the chapter (title) on a separate page with an additional 
> intro in different text sizes for title, subtitle and the intro.
> I chose to use the "command=" argument in setuphead for that.
> However, I'm not quite sure about it's internals.
> 
> Let's begin with a minimal example:
> ```
> \define[2]\MyChapter{%
>   #1 #2: \structureuservariable{subtitle} (\structureuservariable{intro})
> }
> 
> \setuphead[title, chapter][command=\MyChapter]
> 
> \setupbodyfont[11pt]
> 
> \starttext
> \startchapter[title=foo][subtitle=bar, intro={some explanation}]
> some text
> \stopchapter
> \stoptext
> ```
> This produces 1.pdf.
> 
> 
> ## Font size
> 
> What is the reason that that the font of the chapter is bigger? How can I 
> reset it to normal size? This does not work at all:
> ```
> \define[2]\MyChapter{%
>   \setupbodyfont[11pt] #1 #2: \structureuservariable{subtitle} 
> (\structureuservariable{intro})
> }
> ```
> However, changing to a bigger font works somehow. Is there a factor applied 
> to the font size internally? For example:
> ```
> \define[2]\MyChapter{%
>   \setupbodyfont[20pt] #1 #2: \structureuservariable{subtitle} 
> (\structureuservariable{intro})
> }
> ```
> produces 2.pdf (the chapter font is not 20pt).
> 
> 
> ## Line breaks
> 
> How can I achieve line breaks?
> This does not work:
> ```
> \define[2]\MyChapter{%
> #1 #2:\\
> \structureuservariable{subtitle}\\
> (\structureuservariable{intro})
> }
> ```
> (see 3.pdf)
> 
> I also want to set everything except of the intro in a flushright environment 
> but do not know how. I tried:
> ```
> \define[2]\MyChapter{%
> \startalignment[flushright]
> #1 #2:\\
> \structureuservariable{subtitle}\\
> \stopalignment
> \structureuservariable{intro}
> }
> ```
> (see 4.pdf, no change)
> 
> 
> ## Bold text
> 
> I tried to get the text bold. However, `#1` and `#2` does not seem to follow 
> this.
> ```
> \define[2]\MyChapter{%
> \bold #1 #2: \structureuservariable{subtitle} 
> (\structureuservariable{intro})
> }
> ```
> 
> ## Makeups
> 
> The best solution, I had so far, was to define a makeup, but I don't get it 
> to work with text with mixed alignment and it does not solve the font size 
> problem:
> ```
> \definemakeup[chapter][align=left, top=]
> \define[2]\MyChapter{%
> \startmakeup[chapter]
> #1 #2:\\
> \structureuservariable{subtitle}\\
> \stopmakeup
> (\structureuservariable{intro})
> }
> ```
> (see 5.pdf)
> 
> ## Framed
> 
> I also have tried this but it does not bring any linebreaks:
> ```
> \define[2]\MyChapter{%
> \framed[frame=off, offset=0pt]{#1\\#2:\\ 
> \structureuservariable{subtitle}\\ (\structureuservariable{intro})}
> }
> ```
> (see 6.pdf)
> 
> I hope you can shed some light into setuphead with command. I search on the 
> wiki, Stackoverflow and the manuals but didn't really find anything.
> 
> Best,
> Gerion
> 







> % 1.pdf
> \define[2]\MyChapter{%
>   #1 #2: \structureuservariable{subtitle} (\structureuservariable{intro})
> }
> 
> % % 2.pdf
> % \define[2]\MyChapter{%
> % \setupbodyfont[20pt] #1 #2: \structureuservariable{subtitle} 
> (\structureuservariable{intro})
> % }
> 
> % % 3.pdf
> % \define[2]\MyChapter{%
> % #1 #2:\\
> % \structureuservariable{subtitle}\\
> % (\structureuservariable{intro})
> % }
> 
> % % 4.pdf
> % \define[2]\MyChapter{%
> % \startalignment[flushright]
> % #1 #2:\\
> % \structureuservariable{subtitle}\\
> % \stopalignment
> % \structureuservariable{intro}
> % }
> 
> % % 5.pdf
> % \definemakeup[chapter][align=left, top=]
> % \define[2]\MyChapter{%
> % \startmakeup[chapter]
> % #1 #2:\\
> % \structureuservariable{subtitle}\\
> % \stopmakeup
> % (\structureuservariable{intro})
> % }
> 
> 
> % % 6.pdf
> % \define[2]\MyChapter{%
> % \framed[frame=off, offset=0pt]{#1\\#2:\\ 
> \structureuservariable{subtitle}\\ (\structureuservariable{intro})}
> % }
> 
> \setuphead[title, chapter][command=\MyChapter]
> 
> \setupbodyfont[11pt]
> 
> \starttext
> \startchapter[title=foo][subtitle=bar, intro={some explanation}]
> some text
> \stopchapter
> \stoptext


> 

[NTG-context] Re: setuphead in connection with the command argument

2024-05-30 Thread Gerion Entrup
The chapter format that I want to achieve in the end is nearly the one in the 
attachment (excerpt of Christian Dietrich's PhD thesis).

Best
Gerion


Am Donnerstag, 30. Mai 2024, 16:15:01 MESZ schrieb Gerion Entrup:
> Hi,
> 
> I'm trying to adapt the format of chapters in my document and have a few 
> questions regarding setuphead.
> My aim is to have the chapter (title) on a separate page with an additional 
> intro in different text sizes for title, subtitle and the intro.
> I chose to use the "command=" argument in setuphead for that.
> However, I'm not quite sure about it's internals.
> 
> Let's begin with a minimal example:
> ```
> \define[2]\MyChapter{%
>   #1 #2: \structureuservariable{subtitle} (\structureuservariable{intro})
> }
> 
> \setuphead[title, chapter][command=\MyChapter]
> 
> \setupbodyfont[11pt]
> 
> \starttext
> \startchapter[title=foo][subtitle=bar, intro={some explanation}]
> some text
> \stopchapter
> \stoptext
> ```
> This produces 1.pdf.
> 
> 
> ## Font size
> 
> What is the reason that that the font of the chapter is bigger? How can I 
> reset it to normal size? This does not work at all:
> ```
> \define[2]\MyChapter{%
>   \setupbodyfont[11pt] #1 #2: \structureuservariable{subtitle} 
> (\structureuservariable{intro})
> }
> ```
> However, changing to a bigger font works somehow. Is there a factor applied 
> to the font size internally? For example:
> ```
> \define[2]\MyChapter{%
>   \setupbodyfont[20pt] #1 #2: \structureuservariable{subtitle} 
> (\structureuservariable{intro})
> }
> ```
> produces 2.pdf (the chapter font is not 20pt).
> 
> 
> ## Line breaks
> 
> How can I achieve line breaks?
> This does not work:
> ```
> \define[2]\MyChapter{%
> #1 #2:\\
> \structureuservariable{subtitle}\\
> (\structureuservariable{intro})
> }
> ```
> (see 3.pdf)
> 
> I also want to set everything except of the intro in a flushright environment 
> but do not know how. I tried:
> ```
> \define[2]\MyChapter{%
> \startalignment[flushright]
> #1 #2:\\
> \structureuservariable{subtitle}\\
> \stopalignment
> \structureuservariable{intro}
> }
> ```
> (see 4.pdf, no change)
> 
> 
> ## Bold text
> 
> I tried to get the text bold. However, `#1` and `#2` does not seem to follow 
> this.
> ```
> \define[2]\MyChapter{%
> \bold #1 #2: \structureuservariable{subtitle} 
> (\structureuservariable{intro})
> }
> ```
> 
> ## Makeups
> 
> The best solution, I had so far, was to define a makeup, but I don't get it 
> to work with text with mixed alignment and it does not solve the font size 
> problem:
> ```
> \definemakeup[chapter][align=left, top=]
> \define[2]\MyChapter{%
> \startmakeup[chapter]
> #1 #2:\\
> \structureuservariable{subtitle}\\
> \stopmakeup
> (\structureuservariable{intro})
> }
> ```
> (see 5.pdf)
> 
> ## Framed
> 
> I also have tried this but it does not bring any linebreaks:
> ```
> \define[2]\MyChapter{%
> \framed[frame=off, offset=0pt]{#1\\#2:\\ 
> \structureuservariable{subtitle}\\ (\structureuservariable{intro})}
> }
> ```
> (see 6.pdf)
> 
> I hope you can shed some light into setuphead with command. I search on the 
> wiki, Stackoverflow and the manuals but didn't really find anything.
> 
> Best,
> Gerion
> 
> 



chapter.pdf
Description: Adobe PDF document


signature.asc
Description: This is a digitally signed message part.
___
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] setuphead in connection with the command argument

2024-05-30 Thread Gerion Entrup
Hi,

I'm trying to adapt the format of chapters in my document and have a few 
questions regarding setuphead.
My aim is to have the chapter (title) on a separate page with an additional 
intro in different text sizes for title, subtitle and the intro.
I chose to use the "command=" argument in setuphead for that.
However, I'm not quite sure about it's internals.

Let's begin with a minimal example:
```
\define[2]\MyChapter{%
#1 #2: \structureuservariable{subtitle} (\structureuservariable{intro})
}

\setuphead[title, chapter][command=\MyChapter]

\setupbodyfont[11pt]

\starttext
\startchapter[title=foo][subtitle=bar, intro={some explanation}]
some text
\stopchapter
\stoptext
```
This produces 1.pdf.


## Font size

What is the reason that that the font of the chapter is bigger? How can I reset 
it to normal size? This does not work at all:
```
\define[2]\MyChapter{%
\setupbodyfont[11pt] #1 #2: \structureuservariable{subtitle} 
(\structureuservariable{intro})
}
```
However, changing to a bigger font works somehow. Is there a factor applied to 
the font size internally? For example:
```
\define[2]\MyChapter{%
\setupbodyfont[20pt] #1 #2: \structureuservariable{subtitle} 
(\structureuservariable{intro})
}
```
produces 2.pdf (the chapter font is not 20pt).


## Line breaks

How can I achieve line breaks?
This does not work:
```
\define[2]\MyChapter{%
#1 #2:\\
\structureuservariable{subtitle}\\
(\structureuservariable{intro})
}
```
(see 3.pdf)

I also want to set everything except of the intro in a flushright environment 
but do not know how. I tried:
```
\define[2]\MyChapter{%
\startalignment[flushright]
#1 #2:\\
\structureuservariable{subtitle}\\
\stopalignment
\structureuservariable{intro}
}
```
(see 4.pdf, no change)


## Bold text

I tried to get the text bold. However, `#1` and `#2` does not seem to follow 
this.
```
\define[2]\MyChapter{%
\bold #1 #2: \structureuservariable{subtitle} 
(\structureuservariable{intro})
}
```

## Makeups

The best solution, I had so far, was to define a makeup, but I don't get it to 
work with text with mixed alignment and it does not solve the font size problem:
```
\definemakeup[chapter][align=left, top=]
\define[2]\MyChapter{%
\startmakeup[chapter]
#1 #2:\\
\structureuservariable{subtitle}\\
\stopmakeup
(\structureuservariable{intro})
}
```
(see 5.pdf)

## Framed

I also have tried this but it does not bring any linebreaks:
```
\define[2]\MyChapter{%
\framed[frame=off, offset=0pt]{#1\\#2:\\ \structureuservariable{subtitle}\\ 
(\structureuservariable{intro})}
}
```
(see 6.pdf)

I hope you can shed some light into setuphead with command. I search on the 
wiki, Stackoverflow and the manuals but didn't really find anything.

Best,
Gerion



1.pdf
Description: Adobe PDF document


2.pdf
Description: Adobe PDF document


3.pdf
Description: Adobe PDF document


4.pdf
Description: Adobe PDF document


5.pdf
Description: Adobe PDF document


6.pdf
Description: Adobe PDF document
% 1.pdf
\define[2]\MyChapter{%
	#1 #2: \structureuservariable{subtitle} (\structureuservariable{intro})
}

% % 2.pdf
% \define[2]\MyChapter{%
% 	\setupbodyfont[20pt] #1 #2: \structureuservariable{subtitle} (\structureuservariable{intro})
% }

% % 3.pdf
% \define[2]\MyChapter{%
% #1 #2:\\
% \structureuservariable{subtitle}\\
% (\structureuservariable{intro})
% }

% % 4.pdf
% \define[2]\MyChapter{%
% \startalignment[flushright]
% #1 #2:\\
% \structureuservariable{subtitle}\\
% \stopalignment
% \structureuservariable{intro}
% }

% % 5.pdf
% \definemakeup[chapter][align=left, top=]
% \define[2]\MyChapter{%
% \startmakeup[chapter]
% #1 #2:\\
% \structureuservariable{subtitle}\\
% \stopmakeup
% (\structureuservariable{intro})
% }


% % 6.pdf
% \define[2]\MyChapter{%
% \framed[frame=off, offset=0pt]{#1\\#2:\\ \structureuservariable{subtitle}\\ (\structureuservariable{intro})}
% }

\setuphead[title, chapter][command=\MyChapter]

\setupbodyfont[11pt]

\starttext
\startchapter[title=foo][subtitle=bar, intro={some explanation}]
some text
\stopchapter
\stoptext


signature.asc
Description: This is a digitally signed message part.
___
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: how to prevent item appearing in List of Figures

2024-05-30 Thread Rik Kabel
Bypass the place figure mechanism completely  by placing them on the page in an overlay. On May 30, 2024 04:22, Tomáš Hála  wrote:Hi Charlie,

I guess that \starttplacefigure[location={none},...] might help you.

Or (older) \placefigure[none][,,,]{...}{...}

Best,

Tomáš

> I haven’t typeset a book before and various things are a challenge. The most recent is the following.
> 
> I have \placelistoffigures some of which are logos (for the publisher and two granting bodies) that I have placed with:
> 
>    \setupcaptions[number=no]
> \starttplacefigure[
>  location={middle,high,low},
>  reference=fig:logo,
>  title=]
> {\externalfigure[FCLogo][width=0.045\textwidth]}
> \stopplacefigure 
> 
> These are not part of the text and I don’t want them to appear in the list.
> 
> The caption for the logo doesn’t appear in the List of Figures but the page number does. How can I prevent these particular graphics from being listed in the List of figures.
> 
> Thanks,
> Charlie
> 
> 
> 
> 
> 
> ___
> 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
___

___
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] self defined conversion in \date

2024-05-30 Thread Peter Münster
Hi,

It seems, that you cannot use self defined conversions in \date:

\defineconversion[mytest][X-\romannumerals]
\starttext
Self defined conversion: \convertnumber{mytest}{1} (OK)\\
Predefined conversion in date: \date[d=1][day:a] (OK)\\
Self defined conversion in date: \date[d=1][day:mytest] (not OK)
\stoptext

Is this a bug, or a feature?

How could one use self defined conversions in \date please?

TIA for any help,
-- 
   Peter
___
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: how to prevent item appearing in List of Figures

2024-05-30 Thread Charles Doherty via ntg-context
Thanks Hraban,

Tomáš Hála suggested l \starttplacefigure[location={none},...] which works a 
treat. I will keep your suggestion in mind too. I am very grateful to you all.

Thank you,
Charlie

> On 30 May 2024, at 11:41, Henning Hraban Ramm  wrote:
> 
> If you don’t need them in the list and also no caption, I wouldn’t use floats 
> (\placefigure) at all, but just plain \externalfigure.
> 
> Hraban

***
CHARLES DOHERTY
13 BANCROFT ROAD
TALLAGHT
DUBLIN 
D24 YH2V
home: +353 1 2447483
Mobile: +353 863868629
charles.dohe...@icloud.com





___
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: how to prevent item appearing in List of Figures

2024-05-30 Thread Henning Hraban Ramm

Am 29.05.24 um 17:35 schrieb Charles Doherty via ntg-context:

I have \placelistoffigures some of which are logos (for the publisher and two 
granting bodies) that I have placed with:

\setupcaptions[number=no]
 \starttplacefigure[
  location={middle,high,low},
  reference=fig:logo,
  title=]
{\externalfigure[FCLogo][width=0.045\textwidth]}
\stopplacefigure

These are not part of the text and I don’t want them to appear in the list.


If you don’t need them in the list and also no caption, I wouldn’t use 
floats (\placefigure) at all, but just plain \externalfigure.


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: how to prevent item appearing in List of Figures

2024-05-30 Thread Tomáš Hála
Hi Charlie,

I guess that \starttplacefigure[location={none},...] might help you.

Or (older) \placefigure[none][,,,]{...}{...}

Best,

Tomáš

> I haven’t typeset a book before and various things are a challenge. The most 
> recent is the following.
> 
> I have \placelistoffigures some of which are logos (for the publisher and two 
> granting bodies) that I have placed with:
> 
>\setupcaptions[number=no]
> \starttplacefigure[
>  location={middle,high,low},
>  reference=fig:logo,
>  title=]
> {\externalfigure[FCLogo][width=0.045\textwidth]}
> \stopplacefigure 
> 
> These are not part of the text and I don’t want them to appear in the list.
> 
> The caption for the logo doesn’t appear in the List of Figures but the page 
> number does. How can I prevent these particular graphics from being listed in 
> the List of figures.
> 
> Thanks,
> Charlie
> 
> 
> 
> 
> 
> ___
> 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
___