[NTG-context] Re: preventing column break after section title

2024-04-18 Thread Peter Münster
On Thu, Apr 18 2024, Peter Münster wrote:

> How could I prevent a column break after the second section title please?

Ok, found it:

\setupitemize[each][autointro]

-- 
   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] preventing column break after section title

2024-04-18 Thread Peter Münster
Hi,

How could I prevent a column break after the second section title please?

Minimal example:

\starttext
\startcolumns[n=2]
  \section{title 1}
  \dorecurse{22}{bla\par}
  \section{title 2} % Here starts a new column.
  \startitemize
\dorecurse{15}{\item bla}
  \stopitemize
\stopcolumns
\stoptext

I’ve tried "\setuphead[section][after={\columnbreak[no]}]", but it does
not help.

TIA for any hints,
-- 
   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 apply metapost effects to section title?

2024-04-09 Thread Wolfgang Schuster

seyal.zav...@gmail.com schrieb am 09.04.2024 um 14:53:

i want to produce a gradient header
i tried this code but it does not produce any result:

\startext
\def\Mystyle#1{\startMPcode
   picture tt ; tt := lmt_outline [
   kind = "path",
   text = "#1",
   ] ;
   fill
   for i within tt : pathpart i && endfor cycle
  withshademethod "linear"
  withshadedirection up
  withshadecolors (red, blue) ;
\stopMPcode
}

\definehead[Myhead][section]
\setuphead[Myhead][
   style=\Mystyle,
]
\startMyhead[title=sample] a sample text \stopMyhead
\stoptext


You can't use commands with parameters as argument for the style key.

To format single parts (number or title) of a section title you have to 
apply a command to the "deep...command" key but even then you have to 
make manual changes to the vertical alignment of the text.


 begin example
\starttexdefinition spaces Mystyle #1
  \setbox\scratchboxone\hbox{#1}%
  \setbox\scratchboxtwo\hbox\bgroup
\startMPcode
  picture tt ; tt := lmt_outline [
kind = "path",
text = "#1",
  ];
fill
  for i within tt : pathpart i && endfor cycle
  withshademethod "linear"
  withshadedirection up
  withshadecolors (red, blue) ;
\stopMPcode
  \egroup
  \boxyoffset\scratchboxtwo-\dp\scratchboxone
  \box\scratchboxtwo
\stoptexdefinition

\starttext

\setuphead
  [section]
  [
 deeptextcommand=\Mystyle,
%  deepnumbercommand=\Mystyle,
  ]

\startsection[title=Lorem ipsum]
\samplefile{lorem}
\stopsection

\stoptext
 end example


and the code below works but does not colorize numbers of this heads:
\starttext
 
\def\Mystyle#1{\startMPcode

   picture tt ; tt := lmt_outline [
   kind = "path",
   text = "#1",
   ] ;
   fill
   for i within tt : pathpart i && endfor cycle
  withshademethod "linear"
  withshadedirection up
  withshadecolors (red, blue) ;
\stopMPcode
}
 
\def\startMysection#1{\startsection[title=\Mystyle{#1}]}

\def\stopMysection{\stopsection}
 
\startMysection{hello}

what is best method?
\stopMysection
     
\stoptext


what is your suggestion?


To apply the format the the complete section title you have to create 
your own style and apply it with the "command" key, to get the number 
and title for the current section use the \structurenumber and 
\structuretitle macros.


 begin example
\starttexdefinition spaces protected Mystyle #1#2
  \startMPcode
picture tt ; tt := lmt_outline [
  kind = "path",
  text = "\structurenumber\space\structuretitle",
];
  fill
for i within tt : pathpart i && endfor cycle
withshademethod "linear"
withshadedirection up
withshadecolors (red, blue) ;
  \stopMPcode
\stoptexdefinition

\starttext

\setuphead
  [section]
  [command=\Mystyle]

\startsection[title=Lorem ipsum]
\samplefile{lorem}
\stopsection

\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] how to apply metapost effects to section title?

2024-04-09 Thread seyal . zavira
i want to produce a gradient header
i tried this code but it does not produce any result:

\startext
\def\Mystyle#1{\startMPcode
  picture tt ; tt := lmt_outline [
  kind = "path",
  text = "#1",
  ] ;
  fill
  for i within tt : pathpart i && endfor cycle
 withshademethod "linear"
 withshadedirection up
 withshadecolors (red, blue) ;
\stopMPcode
}

\definehead[Myhead][section]
\setuphead[Myhead][
  style=\Mystyle,
]
\startMyhead[title=sample] a sample text \stopMyhead
\stoptext

and the code below works but does not colorize numbers of this heads:
\starttext  



\def\Mystyle#1{\startMPcode 

  picture tt ; tt := lmt_outline [  

  kind = "path",

  text = "#1",  

  ] ;   

  fill  

  for i within tt : pathpart i && endfor cycle  

 withshademethod "linear"   

 withshadedirection up  

 withshadecolors (red, blue) ;  

\stopMPcode 

}   



\def\startMysection#1{\startsection[title=\Mystyle{#1}]}

\def\stopMysection{\stopsection}



\startMysection{hello}  

what is best method?

\stopMysection  



\stoptext

what is your suggestion?
___
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: Suppress the Chapter Number in the Section Numbering

2024-03-19 Thread Wolfgang Schuster

Jeroen schrieb am 19.03.2024 um 20:35:


I am trying to suppress the chapter number in a section number as 
below as in 1., 2., etc instead of 1.1, 1.2, etc. Is there a simple way 
to achieve this?



1. The First Chapter
1. The First Section
...
2. The Second Section
...

2. The Second Chapter
1. The Third Section
...
2. The Fourth Section
...


\setuphead
  [chapter]
  [sectionstopper=.]

\setuphead
  [section]
  [sectionsegments=section,
   sectionstopper=.]

\starttext

\chapter{The First Chapter}

\section{The First Section}

\section{The Second Section}

\chapter{The Second Chapter}

\section{The Third Section}

\section{The Fourth Section}

\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] Suppress the Chapter Number in the Section Numbering

2024-03-19 Thread Jeroen
I am trying to suppress the chapter number in a section number as below as
in 1., 2., etc instead of 1.1, 1.2, etc. Is there a simple way to achieve
this?


1. The First Chapter
1. The First Section
...
2. The Second Section
...

2. The Second Chapter
1. The Third Section
...
2. The Fourth Section
...
___
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 set section title based on section content?

2024-03-09 Thread Wolfgang Schuster

Joel via ntg-context schrieb am 09.03.2024 um 16:01:

How to set section title based on section content?

I have a document that has some structures like this:

\starttext

\startsection[title={Animals}]

\event{\input knuth }

\stopsection

\startsection[title={Books}]

\event{\input knuth }

\stopsection

\stoptext

The event macro runs a bunch of conditionals, deciding which content to 
place inside the section. It places any one of neary 200 possible 
different types of content there.


Sadly when I wrote the code, I thought generic titles would be okay. Now 
I realize I need to be more specific, giving titles that match the 
content inside. I could move the section titles inside the \event macro, 
but it means rewriting ~200 other macros.


In other words, how do I define a section title by defining it somewhere 
in the content of the \event macro?


\starttext

\startsection[\whatistitle] %<-- would display "Neon Tetras"

\event{\thetitleis{Neon Tetras}\input knuth }

\stopsection

\startsection[\whatistitle] %<-- would display "Detective Stories"

\event{\thetitleis{Detective Stories}\input knuth }

\stopsection

\stoptext


When each section contains nothing except the \event command I would 
remove the section titles from the document itself and place them as 
part of the \event command.


\define[1]\Event
  {\startsection[title={#1}]
   \input{knuth}
   \stopsection}

\starttext

\Event{Neon Tetras}

\Event{Detective Stories}

\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] How to set section title based on section content?

2024-03-09 Thread Joel via ntg-context
How to set section title based on section content?

I have a document that has some structures like this:

\starttext

\startsection[title={Animals}]

\event{\input knuth }

\stopsection

\startsection[title={Books}]

\event{\input knuth }

\stopsection

\stoptext

The event macro runs a bunch of conditionals, deciding which content to place 
inside the section. It places any one of neary 200 possible different types of 
content there.

Sadly when I wrote the code, I thought generic titles would be okay. Now I 
realize I need to be more specific, giving titles that match the content 
inside. I could move the section titles inside the \event macro, but it means 
rewriting ~200 other macros.

In other words, how do I define a section title by defining it somewhere in the 
content of the \event macro?

\starttext

\startsection[\whatistitle] %<-- would display "Neon Tetras"

\event{\thetitleis{Neon Tetras}\input knuth }

\stopsection

\startsection[\whatistitle] %<-- would display "Detective Stories"

\event{\thetitleis{Detective Stories}\input knuth }

\stopsection

\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: Section numbering does not work

2024-02-13 Thread Oliver Marugg



> Am 13.02.2024 um 16:54 schrieb Wolfgang Schuster 
> :
> 
> Oliver Marugg schrieb am 13.02.2024 um 00:17:
>> Hi
>> Section numbering does not work until I remove \startbackmatter 
>> \stopbackmatter. I had a longer text file and I stripped it down until I 
>> found this?
>> Greets Oliver
>> Running freshly installed context ARM64 on m1 and updated it via sh 
>> install.sh on ARM64 macos 14.3.1:
>> 
>> context --version
>> mtx-context | ConTeXt Process Management 1.05
>> mtx-context |
>> mtx-context | main context file: 
>> /Applications/ConTeXtStandalone/tex/texmf-context/tex/context/base/mkiv/context.mkiv
>> mtx-context | current version: 2024.01.24 22:39
>> mtx-context | main context file: 
>> /Applications/ConTeXtStandalone/tex/texmf-context/tex/context/base/mkxl/context.mkxl
>> mtx-context | current version: 2024.01.24 22:39
>> --
>> Stripped down MWE:
>> \setuppapersize[A4] [A4]
>> \starttext
>> \completecontent[criterium=all]
>> % ToC
>> \page
>> \chapter{CHAP 1}
>> TEXT
>> \startbackmatter
>> \startchapter[title=Literature]
>> \placelistofpublications
>> \stopchapter
>> \stopbackmatter
>> \stoptext
> 
> Besides enabling numbering for the backpart you can use the appendix block 
> which has numbering by default.
> 
> %\defineconversionset[appendix:default][n]
> 
> \starttext
> 
> \startfrontmatter
>  \completecontent[criterium=all]
> \stopfrontmatter
> 
> \startbodymatter
>  \startchapter[title=CHAP 1]
>  TEXT
>  \stopchapter
> \stopbodymatter
> 
> \startappendices
>  \startchapter[title=Literature]
>  \placelistofpublications
>  \stopchapter
> \stopappendices
> 
> \stoptext
> 
> Wolfgang



Thanks Wolfgang for your practical hint. 

___
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: Section numbering does not work

2024-02-13 Thread Wolfgang Schuster

Oliver Marugg schrieb am 13.02.2024 um 00:17:

Hi

Section numbering does not work until I remove \startbackmatter 
\stopbackmatter. I had a longer text file and I stripped it down until I found 
this?

Greets Oliver


Running freshly installed context ARM64 on m1 and updated it via sh install.sh 
on ARM64 macos 14.3.1:

context --version
mtx-context | ConTeXt Process Management 1.05
mtx-context |
mtx-context | main context file: 
/Applications/ConTeXtStandalone/tex/texmf-context/tex/context/base/mkiv/context.mkiv
mtx-context | current version: 2024.01.24 22:39
mtx-context | main context file: 
/Applications/ConTeXtStandalone/tex/texmf-context/tex/context/base/mkxl/context.mkxl
mtx-context | current version: 2024.01.24 22:39
--

Stripped down MWE:

\setuppapersize[A4] [A4]
\starttext
\completecontent[criterium=all]
% ToC
\page
\chapter{CHAP 1}
TEXT
\startbackmatter
\startchapter[title=Literature]
\placelistofpublications
\stopchapter
\stopbackmatter
\stoptext


Besides enabling numbering for the backpart you can use the appendix 
block which has numbering by default.


%\defineconversionset[appendix:default][n]

\starttext

\startfrontmatter
  \completecontent[criterium=all]
\stopfrontmatter

\startbodymatter
  \startchapter[title=CHAP 1]
  TEXT
  \stopchapter
\stopbodymatter

\startappendices
  \startchapter[title=Literature]
  \placelistofpublications
  \stopchapter
\stopappendices

\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: Section numbering does not work

2024-02-13 Thread Oliver Marugg
Many thanks Taco, that works indeed;-)


> Am 13.02.2024 um 09:29 schrieb Taco Hoekwater :
> 
> 
> 
>> On 13 Feb 2024, at 00:17, Oliver Marugg  wrote:
>> 
>> Hi 
>> 
>> Section numbering does not work until I remove \startbackmatter 
>> \stopbackmatter. I had a longer text file and I stripped it down until I 
>> found this?
> 
> IIRC :
> 
> \setupsectionblock[backpart][number=yes]
> 
> Best wishes,
> Taco
> 
>> Greets Oliver
>> 
>> 
>> Running freshly installed context ARM64 on m1 and updated it via sh 
>> install.sh on ARM64 macos 14.3.1:
>> 
>> context --version
>> mtx-context | ConTeXt Process Management 1.05
>> mtx-context |
>> mtx-context | main context file: 
>> /Applications/ConTeXtStandalone/tex/texmf-context/tex/context/base/mkiv/context.mkiv
>> mtx-context | current version: 2024.01.24 22:39
>> mtx-context | main context file: 
>> /Applications/ConTeXtStandalone/tex/texmf-context/tex/context/base/mkxl/context.mkxl
>> mtx-context | current version: 2024.01.24 22:39
>> --
>> 
>> Stripped down MWE:
>> 
>> \setuppapersize[A4] [A4] 
>> \starttext
>> \completecontent[criterium=all]
>> % ToC
>> \page
>> \chapter{CHAP 1}
>> TEXT
>> \startbackmatter
>> \startchapter[title=Literature]
>> \placelistofpublications
>> \stopchapter
>> \stopbackmatter
>> \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
>> ___
> 
> — 
> Taco Hoekwater  E: t...@bittext.nl
> genderfluid (all pronouns)
> 
> 
> ___
> 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: Section numbering does not work

2024-02-13 Thread Taco Hoekwater


> On 13 Feb 2024, at 00:17, Oliver Marugg  wrote:
> 
> Hi 
> 
> Section numbering does not work until I remove \startbackmatter 
> \stopbackmatter. I had a longer text file and I stripped it down until I 
> found this?

IIRC :

\setupsectionblock[backpart][number=yes]

Best wishes,
Taco

> Greets Oliver
> 
> 
> Running freshly installed context ARM64 on m1 and updated it via sh 
> install.sh on ARM64 macos 14.3.1:
> 
> context --version
> mtx-context | ConTeXt Process Management 1.05
> mtx-context |
> mtx-context | main context file: 
> /Applications/ConTeXtStandalone/tex/texmf-context/tex/context/base/mkiv/context.mkiv
> mtx-context | current version: 2024.01.24 22:39
> mtx-context | main context file: 
> /Applications/ConTeXtStandalone/tex/texmf-context/tex/context/base/mkxl/context.mkxl
> mtx-context | current version: 2024.01.24 22:39
> --
> 
> Stripped down MWE:
> 
> \setuppapersize[A4] [A4] 
> \starttext
> \completecontent[criterium=all]
> % ToC
> \page
> \chapter{CHAP 1}
> TEXT
> \startbackmatter
> \startchapter[title=Literature]
> \placelistofpublications
> \stopchapter
> \stopbackmatter
> \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
> ___

— 
Taco Hoekwater  E: t...@bittext.nl
genderfluid (all pronouns)


___
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] Section numbering does not work

2024-02-12 Thread Oliver Marugg
Hi 

Section numbering does not work until I remove \startbackmatter 
\stopbackmatter. I had a longer text file and I stripped it down until I found 
this?

Greets Oliver


Running freshly installed context ARM64 on m1 and updated it via sh install.sh 
on ARM64 macos 14.3.1:

context --version
mtx-context | ConTeXt Process Management 1.05
mtx-context |
mtx-context | main context file: 
/Applications/ConTeXtStandalone/tex/texmf-context/tex/context/base/mkiv/context.mkiv
mtx-context | current version: 2024.01.24 22:39
mtx-context | main context file: 
/Applications/ConTeXtStandalone/tex/texmf-context/tex/context/base/mkxl/context.mkxl
mtx-context | current version: 2024.01.24 22:39
--

Stripped down MWE:

\setuppapersize[A4] [A4] 
\starttext
\completecontent[criterium=all]
% ToC
\page
\chapter{CHAP 1}
TEXT
\startbackmatter
\startchapter[title=Literature]
\placelistofpublications
\stopchapter
\stopbackmatter
\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: How to print the book title and section title where \reference is located?

2024-02-09 Thread Bruce Horrocks


> On 7 Feb 2024, at 03:47, Joel via ntg-context  wrote:
> 
> I have an extensive multi-book project. Each book has a nickname, like TB for 
> "Textbook", "WB 1" for the "Workbook, Vol. 1":
> 
> TB -- 01_textbook.tex
> WB 1 -- 03_workbook.tex
> WB 2 -- 04_workbook.tex
> WB 3 -- 05_workbook.tex
> WB 4 -- 06_workbook.tex
> TG -- 08_teachersguide.tex
> 
> I have to prove to a government agency that the content meets several 
> requirements, so I'm giving them a simple file that says something like 
> "Requirement A is met in TB, "Cats", p. 11" basically letting the reader know 
> its in the textbook, section called "Cats", on p. 11. To mark the pages, I'm 
> simply dropping in macros called "\requirementA" "\requirementB" on whichever 
> page of whichever book demonstrates it meets the requirement, then the file 
> will aquatically list the book, section, and page number by searching for 
> that macro.

[snip]

> Here is a sample message what the output should give:
> 
> "Requirement A is met in WB 3, "Bears", p. 33."

Taking you literally in that you want a *file* listing the occurences and not a 
typeset page listing the occurrences then you could try using the following in 
your document at the places where you currently put \requirementA etc:

\writestatus{RequirementMet}{Requirement A is met in section 
\fetchmark[section][current], p. \pagenumber}

This will write the current section title and page number to the console 
listing, prefixed by the word "RequirementMet". To produce the file for your 
customer all you have to do is filter these lines out of the .log file that is 
produced when you compile your book. In Unix-like systems that is a simple: 
grep RequirementMet file.log

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] How to print the book title and section title where \reference is located?

2024-02-06 Thread Joel via ntg-context
I have an extensive multi-book project. Each book has a nickname, like TB for 
"Textbook", "WB 1" for the "Workbook, Vol. 1":

TB -- 01_textbook.texWB 1 -- 03_workbook.texWB 2 -- 04_workbook.texWB 3 -- 
05_workbook.tex
WB 4 -- 06_workbook.tex
TG -- 08_teachersguide.tex
I have to prove to a government agency that the content meets several 
requirements, so I'm giving them a simple file that says something like 
"Requirement A is met in TB, "Cats", p. 11" basically letting the reader know 
its in the textbook, section called "Cats", on p. 11. To mark the pages, I'm 
simply dropping in macros called "\requirementA" "\requirementB" on whichever 
page of whichever book demonstrates it meets the requirement, then the file 
will aquatically list the book, section, and page number by searching for that 
macro.

\define\requirementA{
    \reference[markerA]{This is a comment.}
}

\define\requirementB{
    \reference[markerB]{This is a comment.}
}

\define\requirementC{
    \reference[markerC]{This is a comment.}
}

\starttext

    \section{Cats}
        \requirementA
        \input knuth
        \requirementC
        \requirementB
    
    \pagebreak
    
    \section{Fish}
        \input knuth
        \input knuth
        \input knuth
        \input knuth
        \requirementC
        \requirementB
    
    \pagebreak
    
    \section{Frogs}
        \input knuth
        \requirementB
    
    \pagebreak
    
    \section{Markers}
    
        \startitemize
            \item Requirement A is met \at{page}[markerA].
            \item Requirement B is met \at{page}[markerB].
            \item Requirement C is met \at{page}[markerC].
        \stopitemize    
    
\stoptext



I have this sample code, but it only works for a single document, and only 
displays page number. I tried looking at the \about and other related command, 
but that requires giving a reference name and referring to the titles, not my 
dropped macro. How can I modify this to display a message like below, plus also 
scans the other files. *It only needs to reference the first found occurrence.*
Here is a sample message what the output should give:
"Requirement A is met in WB 3, "Bears", p. 33."
--Joel
___
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: Section number in the margin and the section title followed by paragraph!

2024-01-28 Thread Wolfgang Schuster

Pablo Rodriguez via ntg-context schrieb am 27.01.2024 um 18:40:

On 1/27/24 17:40, Ali Ali wrote:

Thanks, those seems close to what I wanted but not exactly.

The ASCII graphic (better in typewriter font) may explain what I desired,
```
 text width
  |<>|

##.   SECTION TITLE paragraph
   ...
   .

|<-->|
margin
```
I wanted paragraph to begin on the same line the section title lies.


\define[1]\SectionNumberCommand
  {\margindata[inmargin][scope=local]{#1}}

\setuphead
  [section]
  [alternative=text,
   numbercommand=\SectionNumberCommand,
   distance=0pt]

\starttext

\section{Lorem}

\samplefile{lorem}

\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: Section number in the margin and the section title followed by paragraph!

2024-01-27 Thread Pablo Rodriguez via ntg-context
On 1/27/24 17:40, Ali Ali wrote:
> Thanks, those seems close to what I wanted but not exactly.
>
> The ASCII graphic (better in typewriter font) may explain what I desired,
> ```
> text width
>  |<---->|
>
> ##.   SECTION TITLE paragraph
>   ...
>   .
>
> |<-->|
> margin
> ```
> I wanted paragraph to begin on the same line the section title lies.

Hi Ali,

from what I understand, you need both alternative=inmargin (or margin)
and alternative=text.

I’m afraid they are mutually exclusive alternative modes.

Just in case it might 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://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: Section number in the margin and the section title followed by paragraph!

2024-01-27 Thread Ali Ali
Thanks, those seems close to what I wanted but not exactly.

The ASCII graphic (better in typewriter font) may explain what I desired,
```
text width
 |<>|

##.   SECTION TITLE paragraph
  ...
  .

|<-->|
margin
```
I wanted paragraph to begin on the same line the section title lies.

Best regards,
Ali
___
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: Section number in the margin and the section title followed by paragraph!

2024-01-27 Thread Wolfgang Schuster

Ali Ali schrieb am 27.01.2024 um 06:03:

I've able to achieve the results I wanted by trial/e using the code shown 
below.
"""
\def\subsecnumwrapper#1{\llap{#1\hskip8pt}}
\setuphead[subsection][alternative=text,numbercommand=\subsecnumwrapper,distance=0pt]
"""

I just wanted to know if there already an option defined to achieve the desired 
result.


\setuphead [subsection] [alternative=margin]
%\setuphead [subsection] [alternative=inmargin]
%\setuphead [subsection] [alternative=margintext]

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] Section number in the margin and the section title followed by paragraph!

2024-01-26 Thread Ali Ali
I've able to achieve the results I wanted by trial/e using the code shown 
below.
"""
\def\subsecnumwrapper#1{\llap{#1\hskip8pt}}
\setuphead[subsection][alternative=text,numbercommand=\subsecnumwrapper,distance=0pt]
"""

I just wanted to know if there already an option defined to achieve the desired 
result.

Best regards,
Ali
___
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] Adjust width of section part of table of contents

2023-09-04 Thread Jeroen
The following is a setuplist for the table of contents. Is there a way to
have the section part only go to 80% of the page width, similar to
width=0.8\textwidth

\setuplist
  [chapter]
  [style={\bf}]

\setuplist
  [section]
  [style={\tfx}]

\setuplist
  [chapter,section]
  [headnumber=no]

\setuplist
  [section]
  [alternative=d]

\placecontent
___
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] Re: Trimming (rearranging) long section name

2023-09-04 Thread Lukas via ntg-context

Hello,

On 2023-09-04 12:06, Wolfgang Schuster wrote:

\mainlanguage[cz]

\setuphead
  [section]
  [distance=1.25em,
   style=\bfc,
   align={flushleft,broad,nothyphenated}]


that's it, thank you!

Lukas


\setupbodyfont[8pt]

\starttext

\chapter{Dummy}

\samplefile{lorem}

\section{Specifické požadavky pro předpokládanou technologii stavby 
(přístupy, přívody el. energie, skladovací plochy, montážní a pomocné 
plochy, montážní a pomocné konstrukce, ...)}


\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://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] Re: Trimming (rearranging) long section name

2023-09-04 Thread Wolfgang Schuster

Lukas via ntg-context schrieb am 04.09.2023 um 13:33:

Hello,

just

"
\setuphead[section][distance=1.25em]
\setuphead[section][style=\bfc]
"

Lukas


On 2023-09-04 11:25, Henning Hraban Ramm wrote:

Am 04.09.23 um 13:06 schrieb Lukas via ntg-context:

IOW to force the word "stavby" not to cross the right border (see the
green vertical line) but to appear on the next line?

I played with "strict", "verytolerant" and similar options but they 
seem

not to affect section titles.


What’s your section setup, esp. the align settings?


Please try to provide a *working* minimal example the next time, 
otherwise we have

to fill the missing parts (\starttext ... \stoptext).

\mainlanguage[cz]

\setuphead
  [section]
  [distance=1.25em,
   style=\bfc,
   align={flushleft,broad,nothyphenated}]

\setupbodyfont[8pt]

\starttext

\chapter{Dummy}

\samplefile{lorem}

\section{Specifické požadavky pro předpokládanou technologii stavby 
(přístupy, přívody el. energie, skladovací plochy, montážní a pomocné 
plochy, montážní a pomocné konstrukce, ...)}


\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://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] Re: Trimming (rearranging) long section name

2023-09-04 Thread Lukas via ntg-context

Hello,

just

"
\setuphead[section][distance=1.25em]
\setuphead[section][style=\bfc]
"

Lukas


On 2023-09-04 11:25, Henning Hraban Ramm wrote:

Am 04.09.23 um 13:06 schrieb Lukas via ntg-context:

IOW to force the word "stavby" not to cross the right border (see the
green vertical line) but to appear on the next line?

I played with "strict", "verytolerant" and similar options but they 
seem

not to affect section titles.


What’s your section setup, esp. the align settings?

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
___

[NTG-context] Re: Trimming (rearranging) long section name

2023-09-04 Thread Henning Hraban Ramm

Am 04.09.23 um 13:06 schrieb Lukas via ntg-context:

IOW to force the word "stavby" not to cross the right border (see the
green vertical line) but to appear on the next line?

I played with "strict", "verytolerant" and similar options but they seem
not to affect section titles.


What’s your section setup, esp. the align settings?

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
___

[NTG-context] Trimming (rearranging) long section name

2023-09-04 Thread Lukas via ntg-context

Hello,

is there a way to alter the section name to be

"
Specifické požadavky pro předpokládanou technologii
stavby (přístupy, přívody el. energie, skladovací plochy,
montážní a pomocné plochy, montážní a pomocné konstrukce,
...)
"

instead of

"
Specifické požadavky pro předpokládanou technologii stavby
(přístupy, přívody el. energie, skladovací plochy, mon-
tážní a pomocné plochy, montážní a pomocné konstrukce,
...)
"

IOW to force the word "stavby" not to cross the right border (see the
green vertical line) but to appear on the next line?

I played with "strict", "verytolerant" and similar options but they seem
not to affect section titles.

(MkIV solution preferably.)

Best regards,

Lukas___
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] Re: Reinserting a section title followed by (continued) after a page break

2023-09-04 Thread Hans Hagen via ntg-context

On 9/4/2023 5:55 AM, Calvin Ross wrote:

On the off chance anyone seeing this is interested, I have a solution uploaded 
as part of a module I wrote for screenplay and stageplay writing: 
https://github.com/cjayross/drama.mkiv/blob/4a9b2576c8630fd03352d95f99456092f6e21190/drama.mkiv#L480


A few remarks:

- you can best name modules like t-drama and then t-drame-screenplay and 
so in order to avoid clashes with files in the tex tree


- you really have to be careful with defining additional intercace 
constants; as you don't define them for other interface languages there 
is no real reason for them


- be aware that when you add key sto existign commands, future clashes 
can occur


- best define new commands CamelCase so that ther ei sno clash with 
existing or future commands


- as you basically define in mkii style, you can use \setevalue {xxx} 
{\getvalue{yyy}} which is a bit more readable


If you load the module in lmtx you get an error on \checkparameters 
which is not available in lmtx (here \ifparameters is a primitive) 
because \doifelseassignment is the real tester (checkparameters is more 
an mkii thing).


However, when you \enabledirectives[overloadmode=error] loading will be 
aborted earlier on because you overload existing macros.


It sounds worse than it is because if you use mkiv/lmtx there are easier 
ways to define an enviroment, think:


\unprotect

\installnamespace  {Slug}
\installcommandhandler \Slug {Slug} \Slug

\protect

\setupSlug[this=that]

\Slugparameter{this}

etc

Which would reduce the amount of code.

Anyway, I advise users of LMTX to testtheir local definitions with

\enabledirectives[overloadmode=error]

or at least

\enabledirectives[overloadmode=warning]


The solution ended up being very detailed and tightly coupled to this 
particular problem. However, the general approach was to use box registers to 
capture the portions of dialog marked using a command sequence (`\continue` in 
this case) that designates acceptable locations to insert a page break in the 
dialog. The markup is then placed into the document in pieces with each 
placement testing the `\pagetotal` against the `\pagegoal` to measure whether 
the current piece will fit on the current page.

This solution had to up using `\synchronizeoutput` as opposed to 
`\triggerpagebuilder`. I'm not sure why there's a difference in behavior 
between the two, but the former seems to fix bugs where the `\pagetotal`s would 
output the measure of the previous page rather than the current one -- leading 
to sporadic page breaks.


This is indeed a problem. Forcing the page builder is not always the 
solution, but neither is synchronize output. The first one triggers a 
check for pending contributions while the second forces it using a 
penalty which can have side effects.


One problem is that pagegoal and pagetotal are not always reliable. 
There is a wrap up about this which isnot yet in the disibution because 
it is part of a larger experiment. In luametatex we have a few more ways 
to influence the page builder and also get more reliable info about the 
state so far. It is something Mikael and I are experimenting with (using 
large complex mixed text/math documents) in the perspective of par and 
page building. We will come back to this later this year but some 
already trickled into context lmtx.


So, keep an eye on what shows up,

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
___


[NTG-context] Re: Reinserting a section title followed by (continued) after a page break

2023-09-03 Thread Calvin Ross
On the off chance anyone seeing this is interested, I have a solution uploaded 
as part of a module I wrote for screenplay and stageplay writing: 
https://github.com/cjayross/drama.mkiv/blob/4a9b2576c8630fd03352d95f99456092f6e21190/drama.mkiv#L480

The solution ended up being very detailed and tightly coupled to this 
particular problem. However, the general approach was to use box registers to 
capture the portions of dialog marked using a command sequence (`\continue` in 
this case) that designates acceptable locations to insert a page break in the 
dialog. The markup is then placed into the document in pieces with each 
placement testing the `\pagetotal` against the `\pagegoal` to measure whether 
the current piece will fit on the current page.

This solution had to up using `\synchronizeoutput` as opposed to 
`\triggerpagebuilder`. I'm not sure why there's a difference in behavior 
between the two, but the former seems to fix bugs where the `\pagetotal`s would 
output the measure of the previous page rather than the current one -- leading 
to sporadic page breaks.
___
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] Re: An strange error with section and page

2023-08-27 Thread Xavier B.
Thanks. It works.

On Sun, 27 Aug 2023 21:24:54 +0200
Wolfgang Schuster  ha escrit:

> Am So., 27. Aug. 2023 um 19:54 Uhr schrieb Xavier B.  >:
> 
> > What is the state of this problem?
> > Is it some deadline here?
> >
> > I need to have a "production" document in mid september to show to my
> > students.
> > Can you please make a "push" in this topic.
> >
> 
> 
> Just update your installation, the problem is already fixed.
> 
> Wolfgang
___
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] Re: An strange error with section and page

2023-08-27 Thread Wolfgang Schuster
Am So., 27. Aug. 2023 um 19:54 Uhr schrieb Xavier B. :

> What is the state of this problem?
> Is it some deadline here?
>
> I need to have a "production" document in mid september to show to my
> students.
> Can you please make a "push" in this topic.
>


Just update your installation, the problem is already fixed.

Wolfgang
___
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] Re: An strange error with section and page

2023-08-27 Thread Xavier B.
What is the state of this problem?
Is it some deadline here?

I need to have a "production" document in mid september to show to my students.
Can you please make a "push" in this topic.

Thanks in advance,
Xavier

On Wed, 23 Aug 2023 22:04:36 +0200
Wolfgang Schuster  ha escrit:

> Xavier B. schrieb am 23.08.2023 um 15:02:
> > Wolfgang,
> >
> > I detect something extrange: when I use \startexercici \stopexercici (see 
> > [https://repo.or.cz/apunts-espa-matematiques.git/blob/HEAD:/ng-entorn-minimal.conTeXt])
> >  in some cases there is an *undesired* indent (see attachment image). I saw 
> > the source 
> > [https://repo.or.cz/apunts-espa-matematiques.git/blob/HEAD:/ng-aritmetica-problemes-nombres-fraccions.conTeXt]
> >  which is the first time it happens.
> >
> > I don't see anything weird.
> >
> > Can you please help me?
> 
> I found the problem but I have to discuss it with Hans.
> 
> Wolfgang
___
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] Re: An strange error with section and page

2023-08-24 Thread Xavier B.
Oh Awesome.

I'm looking forward to the solution.

Thanks a lot,
Xavier


On Wed, 23 Aug 2023 22:04:36 +0200
Wolfgang Schuster  ha escrit:

> Xavier B. schrieb am 23.08.2023 um 15:02:
> > Wolfgang,
> >
> > I detect something extrange: when I use \startexercici \stopexercici (see 
> > [https://repo.or.cz/apunts-espa-matematiques.git/blob/HEAD:/ng-entorn-minimal.conTeXt])
> >  in some cases there is an *undesired* indent (see attachment image). I saw 
> > the source 
> > [https://repo.or.cz/apunts-espa-matematiques.git/blob/HEAD:/ng-aritmetica-problemes-nombres-fraccions.conTeXt]
> >  which is the first time it happens.
> >
> > I don't see anything weird.
> >
> > Can you please help me?
> 
> I found the problem but I have to discuss it with Hans.
> 
> Wolfgang
___
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] Re: An strange error with section and page

2023-08-23 Thread Wolfgang Schuster

Xavier B. schrieb am 23.08.2023 um 15:02:

Wolfgang,

I detect something extrange: when I use \startexercici \stopexercici (see 
[https://repo.or.cz/apunts-espa-matematiques.git/blob/HEAD:/ng-entorn-minimal.conTeXt])
 in some cases there is an *undesired* indent (see attachment image). I saw the 
source 
[https://repo.or.cz/apunts-espa-matematiques.git/blob/HEAD:/ng-aritmetica-problemes-nombres-fraccions.conTeXt]
 which is the first time it happens.

I don't see anything weird.

Can you please help me?


I found the problem but I have to discuss it with Hans.

Wolfgang
___
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] Re: An strange error with section and page

2023-08-23 Thread Xavier B.
On Tue, 22 Aug 2023 20:06:52 +0200
Wolfgang Schuster  ha escrit:

> While the solution here is to convert all subject headings to subsubject 
> (be sure to also take care
> of even lower section) a quick way to fix the page break is to disable 
> the page-value for subject,
> look at the commented line in the example how this can be done.
> 
>  begin example
> \setuphead[section][page=yes]
> %\setuphead[subject][page=no]
> 

Thank you VERY much.
You solved my problem

Xavier
___
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] Re: An strange error with section and page

2023-08-22 Thread Wolfgang Schuster

Xavier B. schrieb am 22.08.2023 um 19:32:

Hi,

I have a long document 
[https://repo.or.cz/apunts-espa-matematiques.git/blob/HEAD:/ng-exercicis.conTeXt.pdf]
 which I migrated from MKIV to LMTX version of ConTeXt. As Wolfgang recommened. 
I migrated old syntax to new one and replace \page[yes] before each section to

\setupheads[section][style={\bf \ssc}, alternative=margin, page=yes]

but now after each section there is a new page.

Why? I don't know.
Can someone help me to see what happens?

The source code is here [https://repo.or.cz/apunts-espa-matematiques.git]


You're using the structure for section of the following example in your 
document. This is a problem
because subjects are the same level as section or to be precise, 
subjects are unnumbered versions

of sections and inherit all settings from them unless configured otherwise.

While the solution here is to convert all subject headings to subsubject 
(be sure to also take care
of even lower section) a quick way to fix the page break is to disable 
the page-value for subject,

look at the commented line in the example how this can be done.

 begin example
\setuphead[section][page=yes]
%\setuphead[subject][page=no]

\starttext

\startsection[title=Section]

\startsubject [title=Subject]

\stopsubject

\stopsection

\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://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] An strange error with section and page

2023-08-22 Thread Xavier B.
Hi,

I have a long document 
[https://repo.or.cz/apunts-espa-matematiques.git/blob/HEAD:/ng-exercicis.conTeXt.pdf]
 which I migrated from MKIV to LMTX version of ConTeXt. As Wolfgang recommened. 
I migrated old syntax to new one and replace \page[yes] before each section to 

\setupheads[section][style={\bf \ssc}, alternative=margin, page=yes]

but now after each section there is a new page.

Why? I don't know.
Can someone help me to see what happens?

The source code is here [https://repo.or.cz/apunts-espa-matematiques.git]

Thanks in advance,
Xavier

PS: Please CCme
___
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] Reinserting a section title followed by (continued) after a page break

2023-07-30 Thread Calvin Ross
I'm trying to use ConTeXt for playwriting, and I think it would be best to use
sections for dialog. However, if a dialog's text is interrupted by a page
break, it is customary to restate the character name followed by (continued) on
the following page:

--- open ---

John
My name is John, and I seek help with my

--- page break ---

John (cont'd)
typesetting needs...

--- end ---

Maybe what I need is instead a mark? Here's a catch though, I will also need
this to work for simultaneous dialog as well. This kind of dialog is
represented by having dialog sections in columns:

--- open ---

Alice  Bob
John, you fool.John, you imbecile.

--- page break ---

Alice (cont'd)
Don't you know that
everyone uses Word
to typeset their plays?

--- end ---

How can I do this kind of thing in ConTeXt? At the moment, I've been looking
into adding a hook to shipout to prepend a section header with the last custom
mark I've set. Even still, I don't know if this would work, or how to go about
achieving this. If columns would be too difficult to implement, I'd be fine
with living without (continued) support in them since they are pretty rare.
___
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] expansion of section title

2023-06-27 Thread Henning Hraban Ramm via ntg-context

Am 27.06.23 um 21:01 schrieb Wolfgang Schuster via ntg-context:

Henning Hraban Ramm via ntg-context schrieb am 27.06.2023 um 20:55:

\defineregister[todos]

% add a "todos" index entry with the current section title
\define[1]\TODO{\todos{\structurevariable{title}}}

\chapter{Something}
\TODO{This is still empty!}

% at the end of the book
\chapter{work list}
\placetodos 


\define[1]\TODO{\expanded{\todos{\structurevariable{title


Thank you, that works.
I thought I tried that, but probably forgot the braces.


What is the purpose of the argument for \TODO when you don't use it?


I simplified too much, the actual definition is (now):

\define[1]\TODO{\inouter{\tt\color[ColTodo]{TODO}}\expanded{\todos{\structurevariable{title}}}\color[ColTodo]{\bf 
#1}\autoinsertnextspace}


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] expansion of section title

2023-06-27 Thread Wolfgang Schuster via ntg-context

Henning Hraban Ramm via ntg-context schrieb am 27.06.2023 um 20:55:

\defineregister[todos]

% add a "todos" index entry with the current section title
\define[1]\TODO{\todos{\structurevariable{title}}}

\chapter{Something}
\TODO{This is still empty!}

% at the end of the book
\chapter{work list}
\placetodos 


\define[1]\TODO{\expanded{\todos{\structurevariable{title

What is the purpose of the argument for \TODO when you don't use it?

Wolfgang

___
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] expansion of section title

2023-06-27 Thread Henning Hraban Ramm via ntg-context
I think I had a good idea how to keep an overview of the “todos” in my 
book project:


\defineregister[todos]

% add a "todos" index entry with the current section title
\define[1]\TODO{\todos{\structurevariable{title}}}

\chapter{Something}
\TODO{This is still empty!}

% at the end of the book
\chapter{work list}
\placetodos


But the section title is always "work list" in the "todos" index.
I guess I need some expansion and tried \expanded, \safeexpanded, 
\expandoneargafter, \fullexpandoneargafter, but probably not in the 
right place.


How does this work?

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] How to print the section number of a reference in ConTeXt?

2023-03-04 Thread Joel via ntg-context
 To explain more simply, I've put \pagereference[sample] somewhere in a 
document. Intead of just printing the page number that appeared with 
\at{page}[sample], I'd like to print the section or subsection title of where 
that appeared.
--Joel

On Saturday, March 4, 2023 at 09:18:19 AM MST, Joel via ntg-context 
 wrote:  
 
 I've set a \pagereference in a chapter, and want to print its chapter title 
and page number, ex.

"You can find more information in "Fish" on p. 1" (where "Fish" is the title of 
the chapter or section).
I've tried looking all through the wiki, thinking this was a basic feature, but 
couldn't get anything to work. I even tried my own custom macros, see below, 
but strangely, it won't give me the correct title, it tells me the title of the 
current chapter, instead of the title in which the reference was placed:


\define[1]\dropref{%    \textreference[#1]{\expanded{\currentstructuretitle}}
}


\starttext

\startchapter[title=Fish]

\dropref{hello}

\input knuth

\stopchapter

\startchapter[title=Whales]

You can more information at \at{page}[hello] in \at{chapter}[hello] or 
\about[hello].

\stopchapter

\stoptext
Strangely both at commands give the correct information, but \about doesn't.

How do I place a reference somewhere in a text, then later tell which chapter 
title and page number that reference appeared in?
--Joel


___
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] How to print the section number of a reference in ConTeXt?

2023-03-04 Thread Joel via ntg-context
I've set a \pagereference in a chapter, and want to print its chapter title and 
page number, ex.

"You can find more information in "Fish" on p. 1" (where "Fish" is the title of 
the chapter or section).
I've tried looking all through the wiki, thinking this was a basic feature, but 
couldn't get anything to work. I even tried my own custom macros, see below, 
but strangely, it won't give me the correct title, it tells me the title of the 
current chapter, instead of the title in which the reference was placed:


\define[1]\dropref{%    \textreference[#1]{\expanded{\currentstructuretitle}}
}


\starttext

\startchapter[title=Fish]

\dropref{hello}

\input knuth

\stopchapter

\startchapter[title=Whales]

You can more information at \at{page}[hello] in \at{chapter}[hello] or 
\about[hello].

\stopchapter

\stoptext
Strangely both at commands give the correct information, but \about doesn't.

How do I place a reference somewhere in a text, then later tell which chapter 
title and page number that reference appeared in?
--Joel


___
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] Section numbering starting from zero, not one

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

On 2/16/2023 8:07 PM, Alex Leray via ntg-context wrote:

Answering my own question… this fits my needs:

###

\defineconversion[romannumeralszero][0, I, II, III, IV, V, VI, VII, 
VIII, IX, X, XI, XII, XIII, XIV, XV, XVI, XVII, XIII, XIX, XX, XXI]


\setuphead[section][conversion=romannumeralszero]

\starttext
\startsection[title={Section zero}]foo\stopsection

\startsection[title={Section 1}]bar\stopsection
\stoptext

###

Sorry for the noise


you can often find hints in the test suite (many small files)


Le 16/02/23 à 17:32, Alex Leray via ntg-context a écrit :

Hello,

I'd like to have roman numerals prefixed sections, but starting from 
Zero and not One (even if I know that roman numerals don't have a sign 
for 0).


Is there a way to achieve this? My code looks like that at the moment:

###

\setuphead[section][conversion=Romannumerals]

\starttext
\setupheadnumber[section] [-1]
\startsection[title={Section zero}]\stopsection
\startsection[title={Section one}]\stopsection
\stoptext

###

Thank you,

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




--

-
  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] Section numbering starting from zero, not one

2023-02-16 Thread Alex Leray via ntg-context

Answering my own question… this fits my needs:

###

\defineconversion[romannumeralszero][0, I, II, III, IV, V, VI, VII, 
VIII, IX, X, XI, XII, XIII, XIV, XV, XVI, XVII, XIII, XIX, XX, XXI]


\setuphead[section][conversion=romannumeralszero]

\starttext
\startsection[title={Section zero}]foo\stopsection

\startsection[title={Section 1}]bar\stopsection
\stoptext

###

Sorry for the noise


Le 16/02/23 à 17:32, Alex Leray via ntg-context a écrit :

Hello,

I'd like to have roman numerals prefixed sections, but starting from 
Zero and not One (even if I know that roman numerals don't have a sign 
for 0).


Is there a way to achieve this? My code looks like that at the moment:

###

\setuphead[section][conversion=Romannumerals]

\starttext
\setupheadnumber[section] [-1]
\startsection[title={Section zero}]\stopsection
\startsection[title={Section one}]\stopsection
\stoptext

###

Thank you,

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


--
Alexandre Leray
+32 487 947 030

Avez-vous pensé à (vous) offrir Médor ?
https://medor.coop/ideescadeau
___
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] Section numbering starting from zero, not one

2023-02-16 Thread Alex Leray via ntg-context

Hello,

I'd like to have roman numerals prefixed sections, but starting from 
Zero and not One (even if I know that roman numerals don't have a sign 
for 0).


Is there a way to achieve this? My code looks like that at the moment:

###

\setuphead[section][conversion=Romannumerals]

\starttext
\setupheadnumber[section] [-1]
\startsection[title={Section zero}]\stopsection
\startsection[title={Section one}]\stopsection
\stoptext

###

Thank you,

Alex
___
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] Use section custom value in a header text.

2022-12-21 Thread Pawel Urbanski via ntg-context
>
>
> Hi Everyone,

Thanks for the answers. I learnt something new.
I ended up using the:
\namedstructureuservariable{chapter}{my_custom_variable} command with
\setupheadertexts.
It worked well - at least for my case.

While reading the wiki I started wondering what is the role of:
lefttext / middletext / righttext keys in \setupheader and \setupfooter
commands.
I would understand htem as keys that can be assigned some value for their
respective slots. I tried to put some texts manually, but there was no
effect - or maybe there is some trick to that. It was just a bit of
exploration - the solution I described works well for my case.

Thanks again for your time and experience...
Pawel
___
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] Use section custom value in a header text.

2022-12-20 Thread Rik Kabel via ntg-context


On 2022-12-20 14:31, Pawel Urbanski via ntg-context wrote:

Hi,
Let me clarify my question more...
I need to attach some value to a chapter in that key. That custom 
prefix + the value in the key is ment to be in the header or a footer 
as a matter of fact. The case can apply to both headers and footers.

I tried:
\chapter[title={A sample title}][custom_random={custom_value}]
\setupheadertexts[{Prefix: \structureuservariable{custom_random}}]
...
\stopchapter
I tried this code when trying to figure out the mechanism. The prefix 
string in placed in the header, but hte custom value of the attached 
key is not expanded..
Evey page will contain just one section started by a \startchapter and 
\stop chapter. I would like to put this custom attached value in the 
right slot in the document header.


I hope that htis time around htigs are more clear.

On Tue, Dec 20, 2022 at 8:13 PM Henning Hraban Ramm via ntg-context 
 wrote:


Am 20.12.22 um 19:44 schrieb Pawel Urbanski via ntg-context:
> Dear Friends,
> I s-- pent some time searching and coding simple documents, but
failed and
> therefore I'm asking for help...
> A section such as chapter cn have custom keys with values. One
uses the:
> \structureuservariable command to access such values.
> How can I use such a value to create a custom header in a format:
> Prefix: \structureuservariable{foo}
>
> I am asking for the only thing that worked when I tried was
calling the:
> \setupheadertexts command inside a chapter environment block
with some
> prefix. Unfortunately the value from the custom field was not
expanded.
> It was correctly inserted in a regular paragraph.
> For example:
> \startchapter
> [title={A sample title}][custom_something={random_value}]
> ...
> \stopchapter
>
> How can I put the value of: custom_something in the header with
some prefix?

\define[2]\MyChapter{No.#1 – Prefix
\structureuservariable{custom_something}: #2}

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

Is this what you meant?

Hraban



Perhaps:

   \setuppagenumbering[alternative=doublesided,location=bottom]
   \startsetups chapter:headings
  \doifsomethingelse{\structureuservariable{custom}}
    {\setupheadertexts[RI]
  [Prefix:
   \structureuservariable{custom}]
  [Prefix:
   \structureuservariable{custom}]
  [VO]}
    {\setupheadertexts[RI][RO][VO][VI]}
   \stopsetups
   \setuphead[chapter]
  [style=\tfa,
   after={\blank\setups{chapter:headings}},
  ]
   \starttext
   \startchapter[title=Nothing special]
   \dorecurse{10}{\input knuth\par}
   \stopchapter
   \startchapter[title=Something special][custom={Hi there!}]
   \dorecurse{10}{\input knuth\par}
   \stopchapter
   \startchapter[title=More nothing special]
   \dorecurse{10}{\input knuth\par}
   \stopchapter
   \startchapter[title=More something special][custom={Bye Bye!}]
   \dorecurse{10}{\input knuth\par}
   \stopchapter
   \stoptext

--
Rik
___
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] Use section custom value in a header text.

2022-12-20 Thread Henning Hraban Ramm via ntg-context

Am 20.12.22 um 20:31 schrieb Pawel Urbanski via ntg-context:

Hi,
Let me clarify my question more...
I need to attach some value to a chapter in that key. That custom 
prefix + the value in the key is ment to be in the header or a footer as 
a matter of fact. The case can apply to both headers and footers.

I tried:
\chapter[title={A sample title}][custom_random={custom_value}]
\setupheadertexts[{Prefix: \structureuservariable{custom_random}}]
...
\stopchapter
I tried this code when trying to figure out the mechanism. The prefix 
string in placed in the header, but hte custom value of the attached key 
is not expanded..
Evey page will contain just one section started by a \startchapter and 
\stop chapter. I would like to put this custom attached value in the 
right slot in the document header.


In headers and footers, you need 
\namedstructureuservariable{chapter}{custom_value} and maybe some 
expansion stuff (not my forte).


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] Use section custom value in a header text.

2022-12-20 Thread Pawel Urbanski via ntg-context
Hi,
Let me clarify my question more...
I need to attach some value to a chapter in that key. That custom prefix +
the value in the key is ment to be in the header or a footer as a matter of
fact. The case can apply to both headers and footers.
I tried:
\chapter[title={A sample title}][custom_random={custom_value}]
\setupheadertexts[{Prefix: \structureuservariable{custom_random}}]
...
\stopchapter
I tried this code when trying to figure out the mechanism. The prefix
string in placed in the header, but hte custom value of the attached key is
not expanded..
Evey page will contain just one section started by a \startchapter and
\stop chapter. I would like to put this custom attached value in the right
slot in the document header.

I hope that htis time around htigs are more clear.

On Tue, Dec 20, 2022 at 8:13 PM Henning Hraban Ramm via ntg-context <
ntg-context@ntg.nl> wrote:

> Am 20.12.22 um 19:44 schrieb Pawel Urbanski via ntg-context:
> > Dear Friends,
> > I spent some time searching and coding simple documents, but failed and
> > therefore I'm asking for help...
> > A section such as chapter cn have custom keys with values. One uses the:
> > \structureuservariable command to access such values.
> > How can I use such a value to create a custom header in a format:
> > Prefix: \structureuservariable{foo}
> >
> > I am asking for the only thing that worked when I tried was calling the:
> > \setupheadertexts command inside a chapter environment block with some
> > prefix. Unfortunately the value from the custom field was not expanded.
> > It was correctly inserted in a regular paragraph.
> > For example:
> > \startchapter
> > [title={A sample title}][custom_something={random_value}]
> > ...
> > \stopchapter
> >
> > How can I put the value of: custom_something in the header with some
> prefix?
>
> \define[2]\MyChapter{No.#1 – Prefix
> \structureuservariable{custom_something}: #2}
>
> \setuphead[chapter][
>   command=\MyChapter,
> ]
>
> Is this what you meant?
>
> 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
>
> ___
>
___
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] Use section custom value in a header text.

2022-12-20 Thread Henning Hraban Ramm via ntg-context

Am 20.12.22 um 19:44 schrieb Pawel Urbanski via ntg-context:

Dear Friends,
I spent some time searching and coding simple documents, but failed and 
therefore I'm asking for help...
A section such as chapter cn have custom keys with values. One uses the: 
\structureuservariable command to access such values.

How can I use such a value to create a custom header in a format:
Prefix: \structureuservariable{foo}

I am asking for the only thing that worked when I tried was calling the: 
\setupheadertexts command inside a chapter environment block with some 
prefix. Unfortunately the value from the custom field was not expanded.

It was correctly inserted in a regular paragraph.
For example:
\startchapter
[title={A sample title}][custom_something={random_value}]
...
\stopchapter

How can I put the value of: custom_something in the header with some prefix?


\define[2]\MyChapter{No.#1 – Prefix 
\structureuservariable{custom_something}: #2}


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

Is this what you meant?

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
___


[NTG-context] Use section custom value in a header text.

2022-12-20 Thread Pawel Urbanski via ntg-context
Dear Friends,
I spent some time searching and coding simple documents, but failed and
therefore I'm asking for help...
A section such as chapter cn have custom keys with values. One uses the:
\structureuservariable command to access such values.
How can I use such a value to create a custom header in a format:
Prefix: \structureuservariable{foo}

I am asking for the only thing that worked when I tried was calling the:
\setupheadertexts command inside a chapter environment block with some
prefix. Unfortunately the value from the custom field was not expanded.
It was correctly inserted in a regular paragraph.
For example:
\startchapter
[title={A sample title}][custom_something={random_value}]
...
\stopchapter

How can I put the value of: custom_something in the header with some prefix?

All the best and thanks,
Pawel
___
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] How to display the pages of a particular section in another PDF?

2022-12-06 Thread Hans Hagen via ntg-context

On 12/6/2022 6:33 PM, Pablo Rodriguez via ntg-context wrote:

On 12/6/22 09:05, Hans Hagen via ntg-context wrote:

On 12/6/2022 1:39 AM, Joel wrote:

Thanks so much! It took some work for me to figure out how to make it
work, but it now works great!

i added \firstsectionpage and \lastsectionpage that (i guess) Pablo will
document at the wiki


Many thanks for the implementation, Hans.

https://wiki.contextgarden.net/Including_pages_from_PDF_documents
contains the new information (please, Joel, could you check whether the
explanation is clear?).

But I’m afraid I’m seeing a potential problem here, if the source PDF is
doublesided, \lastsectionpage from a reference may be an empty page.

There is not much we do about that. Oen can then do

{\numexpr\lastsectionpage... -1\relax}

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] How to display the pages of a particular section in another PDF?

2022-12-06 Thread Pablo Rodriguez via ntg-context
On 12/6/22 09:05, Hans Hagen via ntg-context wrote:
> On 12/6/2022 1:39 AM, Joel wrote:
>> Thanks so much! It took some work for me to figure out how to make it 
>> work, but it now works great!
> i added \firstsectionpage and \lastsectionpage that (i guess) Pablo will 
> document at the wiki

Many thanks for the implementation, Hans.

https://wiki.contextgarden.net/Including_pages_from_PDF_documents
contains the new information (please, Joel, could you check whether the
explanation is clear?).

But I’m afraid I’m seeing a potential problem here, if the source PDF is
doublesided, \lastsectionpage from a reference may be an empty page.

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] How to display the pages of a particular section in another PDF?

2022-12-06 Thread Hans Hagen via ntg-context

On 12/6/2022 1:39 AM, Joel wrote:
Thanks so much! It took some work for me to figure out how to make it 
work, but it now works great!
i added \firstsectionpage and \lastsectionpage that (i guess) Pablo will 
document at the wiki


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] How to display the pages of a particular section in another PDF?

2022-12-05 Thread Joel via ntg-context
 Thanks so much! It took some work for me to figure out how to make it work, 
but it now works great!
--Joel

On Monday, December 5, 2022 at 05:15:49 AM MST, Hans Hagen via ntg-context 
 wrote:  
 
 On 12/4/2022 11:30 PM, Joel via ntg-context wrote:
> I can use this code to display page 5 from a PDF:
> 
> \externalfigure[filename.pdf][page=5]
> 
> I am making a teacher's guide for a workbook (workbook.pdf). I need to 
> be able to display on the page all pages of a particular section.
> 
> The teacher's guide uses the same section titles as the workbook, e.g.:
> 
> 17-A: Title
> 17-B: Title
> 
> In other words, there is 1:1 pairing of section titles in the teacher's 
> guide and the workbook.
> 
> Is there any way to tell ConTeXt to display all of the pages for a 
> particular section?
> 
> \externalfigure[filename.pdf][section=17A]
prototype attached (first process crap, then load)

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
___
  ___
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] How to display the pages of a particular section in another PDF?

2022-12-05 Thread Hans Hagen via ntg-context

On 12/5/2022 7:23 PM, Pablo Rodriguez via ntg-context wrote:

On 12/5/22 18:30, Hans Hagen via ntg-context wrote:

On 12/5/2022 5:39 PM, Pablo Rodriguez via ntg-context wrote:

[...]
it would be great to have something like:

\loadsection[1] [2] [3]
[...]

that is not flexible ... we're talking about a rather special
application, so what I can add is a simple helper that returns the first
and last page of a section


That would be great for me.


keep in mind that it is also a biut fragile as one never know where the
last one ends


I wondered whether \doifreference{\lastsectionpage[file][reference]}
would make sense here, but this would probably be a way of unnecesarily
complicating things...

for sure complicating, as i have no cleu what that would mean

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] How to display the pages of a particular section in another PDF?

2022-12-05 Thread Pablo Rodriguez via ntg-context
On 12/5/22 18:30, Hans Hagen via ntg-context wrote:
> On 12/5/2022 5:39 PM, Pablo Rodriguez via ntg-context wrote:
>> [...]
>> it would be great to have something like:
>>
>>\loadsection  [1] [2] [3]
>> [...]
> that is not flexible ... we're talking about a rather special 
> application, so what I can add is a simple helper that returns the first 
> and last page of a section

That would be great for me.

> keep in mind that it is also a biut fragile as one never know where the 
> last one ends

I wondered whether \doifreference{\lastsectionpage[file][reference]}
would make sense here, but this would probably be a way of unnecesarily
complicating things...

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] How to display the pages of a particular section in another PDF?

2022-12-05 Thread Hans Hagen via ntg-context

On 12/5/2022 5:39 PM, Pablo Rodriguez via ntg-context wrote:

On 12/5/22 13:13, Hans Hagen via ntg-context wrote:

On 12/4/2022 11:30 PM, Joel via ntg-context wrote:

I can use this code to display page 5 from a PDF:
[...]
\externalfigure[filename.pdf][section=17A]


prototype attached (first process crap, then load)


Hi Hans,

it would be great to have something like:

   \loadsection [1] [2] [3]

   1FILE
   2REFERENCE
   3inherits from \setupexternalfigure

Just in case it may be relevant to the discussion.
that is not flexible ... we're talking about a rather special 
application, so what I can add is a simple helper that returns the first 
and last page of a section


\dostepwiserecurse {\firstsectionpage[crap][chapter:3]} 
{\lastsectionpage[crap][chapter:3]} {1} {

\startpagemakeup
\externalfigure[crap.pdf][page=#1]
\stoppagemakeup
}

\dostepwiserecurse {\firstsectionpage[crap][chapter:5]} 
{\lastsectionpage[crap][chapter:5]} {1} {

\dontleavehmode
\externalfigure[crap.pdf][page=#1,width=3cm,frame=on]%
\space\allowbreak
}

keep in mind that it is also a biut fragile as one never know where the 
last one ends


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] How to display the pages of a particular section in another PDF?

2022-12-05 Thread Pablo Rodriguez via ntg-context
On 12/5/22 13:13, Hans Hagen via ntg-context wrote:
> On 12/4/2022 11:30 PM, Joel via ntg-context wrote:
>> I can use this code to display page 5 from a PDF:
>> [...]
>> \externalfigure[filename.pdf][section=17A]
>
> prototype attached (first process crap, then load)

Hi Hans,

it would be great to have something like:

  \loadsection  [1] [2] [3]

  1 FILE
  2 REFERENCE
  3 inherits from \setupexternalfigure

Just in case it may be relevant to the discussion.

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] How to display the pages of a particular section in another PDF?

2022-12-05 Thread Hans Hagen via ntg-context

On 12/4/2022 11:30 PM, Joel via ntg-context wrote:

I can use this code to display page 5 from a PDF:

\externalfigure[filename.pdf][page=5]

I am making a teacher's guide for a workbook (workbook.pdf). I need to 
be able to display on the page all pages of a particular section.


The teacher's guide uses the same section titles as the workbook, e.g.:

17-A: Title
17-B: Title

In other words, there is 1:1 pairing of section titles in the teacher's 
guide and the workbook.


Is there any way to tell ConTeXt to display all of the pages for a 
particular section?


\externalfigure[filename.pdf][section=17A]

prototype attached (first process crap, then load)

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
-

\startluacode
document.foundsection = { first = 0, last  = 0 }

function document.loadsection(filename,reference)
local data = job.loadother(file.addsuffix(filename,"tuc"))
if data then
local lists = data.structures.lists.collected
local pages = data.structures.pages.collected
if lists and pages then
for i=1,#lists do
local li = lists[i]
if li.references.reference == reference then
local first = 1
local last  = pages[#pages].number
local level = li.metadata.level
first = li.references.realpage
for j=i+1,#lists do
local lj = lists[j]
if lj.metadata.level == level then
last = lj.references.realpage - 1
break
end
end
document.foundsection.first = first
document.foundsection.last  = last
end
end
end
end
end
\stopluacode

% it depends what interface one wants ... we could have
%
% \externalfigure[crap.pdf][section=] % takes from crap
%
% but we need more inpiut and discussion for that

\starttexdefinition DoWithSection #1#2
\startpagemakeup
\externalfigure[#1.pdf][page=#2]
\stoppagemakeup
\stoptexdefinition

\starttexdefinition LoadSectionsA #1#2
\ctxlua{document.loadsection("#1","#2")}
\doifnot{\cldcontext{document.foundsection.first}} {0} {
\dostepwiserecurse
{\cldcontext{document.foundsection.first}}
{\cldcontext{document.foundsection.last}}
{1}
{
\DoWithSection{#1}{\recurselevel}
}
}
\stoptexdefinition

\starttexdefinition spaces LoadSectionsB #1#2
\ctxlua{
document.loadsection("#1","#2")
if document.foundsection.first > 0 then
for i=document.foundsection.first,document.foundsection.last do
context.DoWithSection("#1",i)
end
end
}
\stoptexdefinition

\starttext

\LoadSectionsA{crap}{chapter:3}

\LoadSectionsB{crap}{chapter:2}

\stoptext
\starttext

\dorecurse{10}{
\startchapter[title=Chapter #1,reference=chapter:#1]
\dorecurse{10}{
\startsubject[title=Subject #1]
\dorecurse{2}{\samplefile{tufte}\par}
    \stopsubject
\startsection[title=Section #1.##1,reference=#1.##1]
\dorecurse{10}{\samplefile{tufte}\par}
\stopsection
}
\stopchapter
}

\stoptext
___
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] How to display the pages of a particular section in another PDF?

2022-12-05 Thread Henning Hraban Ramm via ntg-context

Am 04.12.22 um 23:30 schrieb Joel via ntg-context:

I can use this code to display page 5 from a PDF:

\externalfigure[filename.pdf][page=5]

I am making a teacher's guide for a workbook (workbook.pdf). I need to 
be able to display on the page all pages of a particular section.


The teacher's guide uses the same section titles as the workbook, e.g.:

17-A: Title
17-B: Title

In other words, there is 1:1 pairing of section titles in the teacher's 
guide and the workbook.


Is there any way to tell ConTeXt to display all of the pages for a 
particular section?


\externalfigure[filename.pdf][section=17A]


Use a loop in Lua or TeX:

https://wiki.contextgarden.net/System_Macros/Loops_and_Recursion

\dostepwiserecurse {5} {17} {1} 
{\externalfigure[filename.pdf][page=\recurselevel]}


or

\startluacode

for s=5, 17 do
  context.externalfigure({"filename.pdf"},{page=s})
end

\stopluacode

(untested)

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] How to display the pages of a particular section in another PDF?

2022-12-05 Thread Denis Maier via ntg-context
Don’t know about ConTeXt. But maybe you might want to have a look at pdftk. You 
could try to produce per-section pdfs and include those.

Best,
Denis

Von: ntg-context  Im Auftrag von Joel via 
ntg-context
Gesendet: Sonntag, 4. Dezember 2022 23:31
An: Mailing List for ConTeXt Users 
Cc: Joel 
Betreff: [NTG-context] How to display the pages of a particular section in 
another PDF?

I can use this code to display page 5 from a PDF:

\externalfigure[filename.pdf][page=5]
I am making a teacher's guide for a workbook (workbook.pdf). I need to be able 
to display on the page all pages of a particular section.

The teacher's guide uses the same section titles as the workbook, e.g.:

17-A: Title
17-B: Title

In other words, there is 1:1 pairing of section titles in the teacher's guide 
and the workbook.

Is there any way to tell ConTeXt to display all of the pages for a particular 
section?


\externalfigure[filename.pdf][section=17A]

--Joel
___
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] How to display the pages of a particular section in another PDF?

2022-12-04 Thread Joel via ntg-context
I can use this code to display page 5 from a 
PDF:\externalfigure[filename.pdf][page=5]I am making a teacher's guide for a 
workbook (workbook.pdf). I need to be able to display on the page all pages of 
a particular section.
The teacher's guide uses the same section titles as the workbook, e.g.:
17-A: Title
17-B: Title

In other words, there is 1:1 pairing of section titles in the teacher's guide 
and the workbook.

Is there any way to tell ConTeXt to display all of the pages for a particular 
section?
\externalfigure[filename.pdf][section=17A]
--Joel
___
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] How to make a reference go to an exact point of a section on a page?

2022-09-02 Thread amano.kenji via ntg-context
\setupinteraction[state=start,focus=standard] was what I wanted.

Thanks.

--- Original Message ---
On Thursday, September 1st, 2022 at 4:42 PM, Pablo Rodriguez via ntg-context 
 wrote:


> On 9/1/22 14:36, amano.kenji via ntg-context wrote:
> 
> > I just created a reference to a \section with \in.
> > 
> > Clicking the \in reference doesn't go to the \section, but to the
> > page that has the \section.
> > 
> > Does ConTeXt lack the ability to go to an exact point of a numbered
> > element on a page?
> 
> 
> Hi Amano,
> 
> please, provide a minimal sample with your questions.
> 
> Sometimes it is not easy for the rest of the world to figure out what
> each of us may have in mind.
> 
> I hope any of the options might help you:
> 
> \setupinteraction[state=start,focus=standard]
> \starttext
> \chapter[one]{One}
> in \in[two] or \about[two]
> \chapter[two]{Two}
> in \in[one] or \about[one]
> \stoptext
> 
> Just in case it helps,
> 
> Pablo
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / 
> 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] How to make a reference go to an exact point of a section on a page?

2022-09-01 Thread Pablo Rodriguez via ntg-context
On 9/1/22 14:36, amano.kenji via ntg-context wrote:
> I just created a reference to a \section with \in.
>
> Clicking the \in reference doesn't go to the \section, but to the
> page that has the \section.
>
> Does ConTeXt lack the ability to go to an exact point of a numbered
> element on a page?

Hi Amano,

please, provide a minimal sample with your questions.

Sometimes it is not easy for the rest of the world to figure out what
each of us may have in mind.

I hope any of the options might help you:

  \setupinteraction[state=start,focus=standard]
  \starttext
  \chapter[one]{One}
  in \in[two] or \about[two]
  \chapter[two]{Two}
  in \in[one] or \about[one]
  \stoptext

Just in case it helps,

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

maillist : ntg-context@ntg.nl / 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] How to make a reference go to an exact point of a section on a page?

2022-09-01 Thread Mikael Sundqvist via ntg-context
On Thu, Sep 1, 2022 at 2:37 PM amano.kenji via ntg-context
 wrote:
>
> I just created a reference to a \section with \in.
>
> Clicking the \in reference doesn't go to the \section, but to the page that 
> has the \section.
>
> Does ConTeXt lack the ability to go to an exact point of a numbered element 
> on a page?
> ___
> 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
> ___

I think

\setupinteraction[focus=standard]

is what you need.

/Mikael
___
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] How to make a reference go to an exact point of a section on a page?

2022-09-01 Thread amano.kenji via ntg-context
I just created a reference to a \section with \in.

Clicking the \in reference doesn't go to the \section, but to the page that has 
the \section.

Does ConTeXt lack the ability to go to an exact point of a numbered element on 
a page?
___
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] How to define a section title, after the section title appears?

2022-06-12 Thread Joel via ntg-context
I have a document with conditionally-generated content.

There are some situations when I need the section title to change according to 
the content displayed within that section.

For instance, the 14th section that appears in *every* chapter is either called 
"Cause and Effect" if the conditions decide to place macros \altMa, \altMb, or 
\altMc inside, but becomes called "Compare and Contrast" if one of a dozen 
other macros are pladed there.

- The macros are defined in an entirely different macros.tex file.
- The whole document is in a recurse loop, so \recurselevel or \chaptertitleis 
can give the current chapter number.

I tried defining chapter titles inside the macros, 
`\setvalue{title\recurselevel}{Cause and Effect}`, but 
\getvalue{title\recurselevel}` couldn't find the defined value.
I tried just defining in each macro \define\thesectiontitleis{Compare and 
Contrast}, but that only affects things AFTER the macro is called, so the wrong 
titles appear.

How do I very simply make a section title change according to what content is 
inside it?
--Joel

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] How can I get a section title to change depending on the section content?

2022-01-29 Thread Joel via ntg-context
I have a section somewhat like this...I'm replacing the code with something 
much simpler, but its basically doing a similar thing, running conditionals to 
check which content to place: 
\section{Brave Rabbits}
 \ifnum\somenumber>3 Print this content about rabbits. \else
 Print this stuff about pigeons instead. \fi
Basically the content inside that section can change, either being about 
rabbits or about pigeons. I need the section title to follow that change, the 
problem is the section title appears before this code, so defining some 
variable in the later code won't affect the rendeiring of the section title.
Is there a way I can tell the section title to change as well to match what 
content is inside that section?
\section{\thissectiontitle}
 \ifnum\somenumber>3 Print this content about rabbits.         
\define\thissectiontitle{Brave Rabbits} \else Print this stuff 
about pigeons instead. \define\thissectiontitle{Hungry Pigeons} \fi
--Joel
___
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] Get Current Section Number

2022-01-09 Thread Wolfgang Schuster via ntg-context

Michael Urban via ntg-context schrieb am 09.01.2022 um 17:25:

I want to put a book title above the Chapter title for the first chapter of a 
book.  I suppose that this can be accomplished with a 'before=' clause that 
checks to see if it is the first chapter... but how do I look at the chapter 
number in order to set up the conditional?


Can you show a example of your document, maybe there is a better way to 
produce the desired result.


\startsetups [document:start]
    \startalignment[middle]
    {\ssd\documentparameter{title}}
    \stopalignment
\stopsetups

\setuphead [chapter] [page=no]

\startdocument [title={Dummy title}]

\dorecurse{5}
  {\startchapter[title={Chapter \convertnumber{word}{#1}}]
   \samplefile{lorem}
   \stopchapter}

\stopdocument

Wolfgang

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Get Current Section Number

2022-01-09 Thread Pablo Rodriguez via ntg-context
On 1/9/22 5:25 PM, Michael Urban via ntg-context wrote:
> I want to put a book title above the Chapter title for the first
> chapter of a book.  I suppose that this can be accomplished with a
> 'before=' clause that checks to see if it is the first chapter... but
> how do I look at the chapter number in order to set up the
> conditional?

Hi MIchael,

this might do the trick:

  \starttext
  \dorecurse{5}
   {\chapter{Chapter \structurenumber}
\dorecurse{5}
 {\section{Section \structurenumber}
  \doifelse{\somenamedheadnumber{chapter}{current}}{1}
   {This is the first chapter.}
   {This is not the first chapter.}
  }}
  \stoptext

Just in case it might help,

Pablo



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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] Get Current Section Number

2022-01-09 Thread Michael Urban via ntg-context
I want to put a book title above the Chapter title for the first chapter of a 
book.  I suppose that this can be accomplished with a 'before=' clause that 
checks to see if it is the first chapter... but how do I look at the chapter 
number in order to set up the conditional?

Mike

___
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] \thanks inside author in section

2022-01-01 Thread Youssef Cherem via ntg-context
Wolfgang,

Thank you! Removing the auxiliary file solved the problem.

lør. 1. jan. 2022 kl. 09:32 skrev Wolfgang Schuster <
wolfgang.schuster.li...@gmail.com>:

> Youssef Cherem via ntg-context schrieb am 01.01.2022 um 13:10:
> > I've tried to implement a journal-like footnote with the authors'
> > affiliation for each section/chapter, by adapting things from the wiki
> > (https://wiki.contextgarden.net/Table_of_Contents#Author_in_ToC and
> > https://wiki.contextgarden.net/LaTeX_Thanks). However, one thing that
> > bugs me is that any note name I choose other than "thanks" does not
> > work, and I have no clue why. Am I missing something, or is there a more
> > elegant way to implement this?
> >
> > As an aside, I'd rather have the footnotes below the "thanks" notes. Is
> > there any option that does this?
> >
> > [...]
>
> Do you have a example where anything besides \thanks fails. I changed
> \thanks to another commands in the example below and there was no
> problem to do so. The only thing you *have* to do when you change the
> command is to remove the auxiliary file (context --purge) because the
> old (non existing) command is otherwise used in the next run which
> results then in an error message.
>
> \setuplist
>[section]
>[textcommand=\SectionTocEntry,
>   after=\blank]
>
> \define[1]\SectionTocEntry
>{\doifsomething{\rawstructurelistuservariable{author}}
>   {{\it\structurelistuservariable{author}} --\crlf}%
> #1%
> \doifsomething{\rawstructurelistuservariable{subtitle}}
>   {\crlf\structurelistuservariable{subtitle}}}
>
> \setuphead
>[section]
>[ after=\directsetup{section},
>  align=center,
> number=no,
>  style=bold]
>
> \startsetups [section]
>  \blank
>  \midaligned{\it\structureuservariable{author}}
>  \blank
> \stopsetups
>
> \setuphead
>[subject]
>[align=flushleft,
> style=\bfb]
>
> \definenote[someothername]
>
> \setupnote
>[someothername]
>[rule=off]
>
> \setupnotation
>[someothername]
>[numberconversion=set 2]
>
> \setupnotation
>[alternative=left,
>hang=fit,
>   indenting={yes,small},
>  indentnext=yes]
>
> \setupinteraction
>[state=start,
> color=,
> contrastcolor=]
>
> \starttext
>
> \subject{Grande lista de autores}
>
> \placecontent[alternative=c]
>
> \startsection[title={Whatever}][author={A. Uthor},subtitle={I’d like to
> say}]
> This is a section.
> \stopsection
>
> \startsection[title={Segunda seção}][author={Fulano de
> Tal},subtitle={Uma segunda seção de teste}]
> This is a section.
> \stopsection
>
> \startsection[title={Terceira seção}][author={Alberto de
> Paiva\someothername{asdf}},subtitle={Uma terceira seção de teste}]
> This is a section.
> \stopsection
>
> \startsection[title={Três autores}][author={Sicrano de
> Tal\someothername{Universidade de Tangerinas} e Alberto
> Steinenberg\someothername{Universidade de Nilfgaard}},
> subtitle={Uma seção de teste com dois autores e comentário}]
> This is a section.\footnote{Só de teste.}
> \stopsection
>
> \stoptext
>
> Wolfgang
>
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] \thanks inside author in section

2022-01-01 Thread Wolfgang Schuster via ntg-context

Youssef Cherem via ntg-context schrieb am 01.01.2022 um 13:10:
I've tried to implement a journal-like footnote with the authors' 
affiliation for each section/chapter, by adapting things from the wiki 
(https://wiki.contextgarden.net/Table_of_Contents#Author_in_ToC and 
https://wiki.contextgarden.net/LaTeX_Thanks). However, one thing that 
bugs me is that any note name I choose other than "thanks" does not 
work, and I have no clue why. Am I missing something, or is there a more 
elegant way to implement this?


As an aside, I'd rather have the footnotes below the "thanks" notes. Is 
there any option that does this?


[...]


Do you have a example where anything besides \thanks fails. I changed 
\thanks to another commands in the example below and there was no 
problem to do so. The only thing you *have* to do when you change the 
command is to remove the auxiliary file (context --purge) because the 
old (non existing) command is otherwise used in the next run which 
results then in an error message.


\setuplist
  [section]
  [textcommand=\SectionTocEntry,
 after=\blank]

\define[1]\SectionTocEntry
  {\doifsomething{\rawstructurelistuservariable{author}}
 {{\it\structurelistuservariable{author}} --\crlf}%
   #1%
   \doifsomething{\rawstructurelistuservariable{subtitle}}
 {\crlf\structurelistuservariable{subtitle}}}

\setuphead
  [section]
  [ after=\directsetup{section},
align=center,
   number=no,
style=bold]

\startsetups [section]
\blank
\midaligned{\it\structureuservariable{author}}
\blank
\stopsetups

\setuphead
  [subject]
  [align=flushleft,
   style=\bfb]

\definenote[someothername]

\setupnote
  [someothername]
  [rule=off]

\setupnotation
  [someothername]
  [numberconversion=set 2]

\setupnotation
  [alternative=left,
  hang=fit,
 indenting={yes,small},
indentnext=yes]

\setupinteraction
  [state=start,
   color=,
   contrastcolor=]

\starttext

\subject{Grande lista de autores}

\placecontent[alternative=c]

\startsection[title={Whatever}][author={A. Uthor},subtitle={I’d like to 
say}]

This is a section.
\stopsection

\startsection[title={Segunda seção}][author={Fulano de 
Tal},subtitle={Uma segunda seção de teste}]

This is a section.
\stopsection

\startsection[title={Terceira seção}][author={Alberto de 
Paiva\someothername{asdf}},subtitle={Uma terceira seção de teste}]

This is a section.
\stopsection

\startsection[title={Três autores}][author={Sicrano de 
Tal\someothername{Universidade de Tangerinas} e Alberto 
Steinenberg\someothername{Universidade de Nilfgaard}},

subtitle={Uma seção de teste com dois autores e comentário}]
This is a section.\footnote{Só de teste.}
\stopsection

\stoptext

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] \thanks inside author in section

2022-01-01 Thread Youssef Cherem via ntg-context
I've tried to implement a journal-like footnote with the authors'
affiliation for each section/chapter, by adapting things from the wiki (
https://wiki.contextgarden.net/Table_of_Contents#Author_in_ToC and
https://wiki.contextgarden.net/LaTeX_Thanks). However, one thing that bugs
me is that any note name I choose other than "thanks" does not work, and I
have no clue why. Am I missing something, or is there a more elegant way to
implement this?

As an aside, I'd rather have the footnotes below the "thanks" notes. Is
there any option that does this?

\setuplist[section][
 textcommand=\SectionTocEntry,
 after=\blank,
]

\define[1]\SectionTocEntry{%
 \doifnot{\rawstructurelistuservariable{author}}{}
{\start \it  \structurelistuservariable{author}\stop\space-- \crlf}%
 #1% title
 \doifnot{\rawstructurelistuservariable{subtitle}}{}
{\crlf\structurelistuservariable{subtitle}}}

\setuphead[section][
 after=\setup{section},
 align=center,
 number=no,
 style=\bold
]

\startsetups section
 \blank
 \midaligned{\it \structureuservariable{author}}
 \blank
\stopsetups

%\foonote{\structureuservariable{affiliation}}

%only "thanks" seems to work.
\definenote[thanks]%[numberconversion=set 2]
\setupnote[thanks][rule=off]
\setupnotation[thanks][numberconversion=set 2] % or set 1

%\setupnote[footnote][location=bottom] % does not work

%% all notes, footnotes etc.
\setupnotation[
 alternative={left,bottom},
 hang=fit, % if commented, hanging is larger
 indenting={yes,small},indentnext=yes, % please, indent everything, should
be default
]

\setupinteraction[state=start,color=black,contrastcolor=black]

\setuphead[subject][align=flushleft,style=\bfb]

\starttext

\subject{Grande lista de autores}

\placecontent[alternative=c]

\startsection[title={Whatever}][author={A. Uthor},subtitle={I’d like to
say}]
This is a section.
\stopsection

\startsection[title={Segunda seção}][author={Fulano de Tal},subtitle={Uma
segunda seção de teste}]
This is a section.
\stopsection

\startsection[title={Terceira seção}][author={Alberto de
Paiva\thanks{asdf}},subtitle={Uma terceira seção de teste}]
This is a section.
\stopsection

\startsection[title={Três autores}][author={Sicrano de
Tal\thanks{Universidade de Tangerinas} e Alberto
Steinenberg\thanks{Universidade de Nilfgaard}},
subtitle={Uma seção de teste com dois autores e comentário}]
This is a section.\footnote{Só de teste.}
\stopsection

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] \thanks inside author in section

2021-12-29 Thread Youssef Cherem via ntg-context
I've tried to implement a journal-like footnote with the authors'
affiliation for each section/chapter, by adapting things from the wiki here
<https://wiki.contextgarden.net/Table_of_Contents#Author_in_ToC> and here
<https://wiki.contextgarden.net/LaTeX_Thanks>. However, one thing that bugs
me is that any note name I choose other than "thanks" does not work, and I
have no clue why. Am I missing something, or is there a more elegant way to
implement this?

As an aside, I'd rather have the footnotes below the "thanks" notes. Is
there any option that does this?

\setuplist[section][
 textcommand=\SectionTocEntry,
 after=\blank,
]
\define[1]\SectionTocEntry{%
 \doifnot{\rawstructurelistuservariable{author}}{}
{\start \it  \structurelistuservariable{author}\stop\space-- \crlf}%
 #1% title
 \doifnot{\rawstructurelistuservariable{subtitle}}{}
{\crlf\structurelistuservariable{subtitle}}}
\setuphead[section][
 after=\setup{section},
 align=center,
 number=no,
 style=\bold
]
\startsetups section
 \blank
 \midaligned{\it \structureuservariable{author}}
 \blank\stopsetups
%\foonote{\structureuservariable{affiliation}}
\definenote[thanks]%[numberconversion=set
2]\setupnote[thanks][rule=off]\setupnotation[thanks][numberconversion=set
2] % or set 1
%\setupnote[footnote][location=bottom] % does not work
%% all notes, footnotes etc.\setupnotation[
 alternative={left,bottom},
 hang=fit, % if commented, hanging is larger
 indenting={yes,small},indentnext=yes, % please, indent everything,
should be default
]
\setupinteraction[state=start,color=black,contrastcolor=black]
\setuphead[subject][align=flushleft,style=\bfb]
\starttext
\subject{Grande lista de autores}
\placecontent[alternative=c]
  \startsection[title={Whatever}][author={A. Uthor},subtitle={I’d
like to say}]
This is a section.\stopsection
\startsection[title={Segunda seção}][author={Fulano de
Tal},subtitle={Uma segunda seção de teste}]
This is a section.\stopsection
\startsection[title={Terceira seção}][author={Alberto de
Paiva\thanks{asdf}},subtitle={Uma terceira seção de teste}]
This is a section.\stopsection
\startsection[title={Três autores}][author={Sicrano de
Tal\thanks{Universidade de Tangerinas} e Alberto
Steinenberg\thanks{Universidade de Nilfgaard}},
subtitle={Uma seção de teste com dois autores e comentário}]
This is a section.\footnote{Só de teste.}\stopsection
\stoptext
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Backmatter preventing section numbers from appearing

2021-11-25 Thread Hans Hagen via ntg-context

On 11/25/2021 10:50 AM, A A via ntg-context wrote:

Dear All,

I've noticed that the mere presence of backmatter prevents my sections 
from being numbered. Consider the following:


/\starttext
\startsection[
   title={Create Serverless Applications},
]
blablabla
\stopsection

%\startbackmatter % comment out
%\stopbackmatter % comment out
\stoptext/
/
/
Uncommenting lines 8 and 9 causes the section numbers to disappear.

Is this normal behavior? Why does the presence of backmatter affect my 
sections like this?
technically there can be many so called sectionblocks in any order and 
as one is chosen and no previous one has been set, all preceding sec 
tions will end up in that first block (kind of fix the structure) .. 
this is needed to get things like bookmarks right


so ... when you use sectionblocks used them consistently i.e. use 
bodymatter wrapping for the preceding sections



-
  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] Backmatter preventing section numbers from appearing

2021-11-25 Thread A A via ntg-context
Dear All,

I've noticed that the mere presence of backmatter prevents my sections from
being numbered. Consider the following:










*\starttext\startsection[  title={Create Serverless
Applications},]blablabla\stopsection%\startbackmatter % comment
out%\stopbackmatter % comment out\stoptext*

Uncommenting lines 8 and 9 causes the section numbers to disappear.

Is this normal behavior? Why does the presence of backmatter affect my
sections like this?

Regards,

Amine
___
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] space before section titles sometimes disappears in grid mode

2021-08-12 Thread Henning Hraban Ramm via ntg-context
E.g. in CG journal, there are usually 3 blank lines before a section title.
Most of it is single column and without grid, no problem there. But some 
articles use columnsets and are therefore in grid mode.

Sometimes the space before the section title disappears completely, so that it 
is glued to the previous paragraph.

If I include \startlinecorrection in "before" of \setuphead[section], in front 
of the \blank, the space is only reduced by 1 line, but I get the space also at 
the top of a column (or at the start of the article).

If I put \startlinecorrection after \blank, the space disappears the same as 
without linecorrection.

\setuphead[section]
  [before={\startlinecorrection\blank[BigCGblank]},
   after={\stoplinecorrection\blank[CGblank]},
   grid=both,
  ]

It happens reproducably if there is a float before \startsection, but sometimes 
I can’t find a reason.

In the other magazine I’m typesetting ATM, I get the same problem. No 
columnsets involved in that case, but still in grid mode.
There I can "fix" it with some \blank[3*line], but it doesn’t help in the 
floats case.

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
___


[NTG-context] conditionally add \vfill before section if at end of page

2021-05-04 Thread denis.maier
Hi,

I'm still playing/struggling with vertical glue to have pages of a constant 
height. The following settings give reasonable results:

=
\setuppapersize[A5][A5]

\setupalign[line]
\setuptolerance[vertical,stretch]
\setupinterlinespace[
stretch=0.001,
shrink=0.001,
]

\showframe

\starttext

\section{Section}
\input knuth\par
\input knuth\par
\input knuth\par
\input ward
\input ward
\input ward
%\vfill % can a \vfill be added automatically here?


\section{Section}
\input knuth\par

% here we don't have a \vfill as this is on the middle of the page
\section{Section}
\input knuth\par

\stoptext
==

However, I don't want the stretching if the next page starts with a section 
heading. Is there any way to add a \vfill on a page immediately before a 
section heading? \doifatpageborder \doifatpagestart or something similar ?

Thanks for you help,
Denis
___
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] bug in \headnumber[section] in LMTX?

2021-03-07 Thread Pablo Rodriguez
On 3/7/21 1:21 PM, Wolfgang Schuster wrote:
> Pablo Rodriguez schrieb am 07.03.2021 um 10:49:
>> Dear list,
>>
>> I have the following sample:
>>
>>\starttext
>>  \section{Section}
>>\currentheadnumber\\
>
> You need \determineheadnumber[section] before you can use
> \currentheadnumber.

Many thanks for your reply, Wolfgang.

I didn’t know that, but it makes sense now.

>>\headnumbercontent\\
>
> You can use \headnumbercontent only when you create a new section layout
> with \defineheadalternative.

So, I didn’t make any sense in my sample.

Many thanks for your help again,

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] bug in \headnumber[section] in LMTX?

2021-03-07 Thread Wolfgang Schuster

Pablo Rodriguez schrieb am 07.03.2021 um 10:49:

Dear list,

I have the following sample:

   \starttext
 \section{Section}
   \currentheadnumber\\


You need \determineheadnumber[section] before you can use 
\currentheadnumber.



   \headnumbercontent\\


You can use \headnumbercontent only when you create a new section layout 
with \defineheadalternative.



   \headnumber[section]


It's a bug.


   \stoptext

In LMTX, \headnumber[section] triggers an error message about missing
number.

BTW, \currentheadnumber outputs 0 in both MkIV and LMTX. I think this
may be a bug.

Could anyone confirm both issues?


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] bug in \headnumber[section] in LMTX?

2021-03-07 Thread Pablo Rodriguez
Dear list,

I have the following sample:

  \starttext
\section{Section}
  \currentheadnumber\\
  \headnumbercontent\\
  \headnumber[section]
  \stoptext

In LMTX, \headnumber[section] triggers an error message about missing
number.

BTW, \currentheadnumber outputs 0 in both MkIV and LMTX. I think this
may be a bug.

Could anyone confirm both issues?

Many thanks for your help,

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] Section head placement wrong when the after key is used

2020-11-19 Thread Marco Patzer
On Thu, 19 Nov 2020 16:53:52 +0100
Pablo Rodriguez  wrote:

> On 11/19/20 11:55 AM, Marco Patzer wrote:
> > Hi!
> > [...]
> > What's the reason the section head stays on the previous page when
> > the “after” is used and how to fix this?  
> 
> Hi Marco,
> 
> by default (according to strc-def.mkiv), \section has "after=\blank".
> 
> In some cases, I had used "after={”\blank[samepage, medium]}" to
> prevent similar issues.

In my actual document I already use \blank[halfline]. Changing this
to \blank[halfline, samepage] fixes it.

Thank you very much.

Marco
___
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] Section head placement wrong when the after key is used

2020-11-19 Thread Pablo Rodriguez
On 11/19/20 11:55 AM, Marco Patzer wrote:
> Hi!
> [...]
> What's the reason the section head stays on the previous page when
> the “after” is used and how to fix this?

Hi Marco,

by default (according to strc-def.mkiv), \section has "after=\blank".

In some cases, I had used "after={”\blank[samepage, medium]}" to prevent
similar issues.

In this case, a nasty trick could be "after={”\blackrule\blank[samepage,
Opt]}".

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
___


[NTG-context] Section head placement wrong when the after key is used

2020-11-19 Thread Marco Patzer
Hi!

In the following example the 2nd section head stays on page one when
the “after” key is used. If the blackrule is commented out the
section head moves to page two as intended.

What's the reason the section head stays on the previous page when
the “after” is used and how to fix this?

\setuphead
  [section]
  [after=\blackrule]  %% works as desired when commenting this one out

\starttext
  \startsection [title=Foo]
\samplefile{knuth}
  \stopsection

  \startsection [title=Bar]
\framed[height=15cm]{}
\samplefile{knuth}
  \stopsection
\stoptext

Marco
___
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] page ends with a section title followed by a table

2020-11-10 Thread Aditya Mahajan
On Tue, 10 Nov 2020, Sylvain Hubert wrote:
> Indeed. Thanks for the information!
> 
> For the record, this is how the problem is finally solved:
> 
> \setuphead[section][after={\blank[sampage]}]
> \begingroup\setupindenting[no]\dontleavehmode\startxtable …
> \stopxtable\endgroup

Unless you have other reasons to create a group, you can just use:

\noindentation\dontleavehmode
\startxtable
...
\stopxtable

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


Re: [NTG-context] page ends with a section title followed by a table

2020-11-10 Thread Sylvain Hubert
On Tue, 10 Nov 2020 at 19:23, Wolfgang Schuster <
wolfgang.schuster.li...@gmail.com> wrote:

> Sylvain Hubert schrieb am 10.11.2020 um 19:11:
>
> > Weirdly enough, "\hskip 0pt" solves the problem.
> >
> >  \setuphead[section][after={\blank[samepage]\hskip 0pt}]
> >  \starttext
> >  \showframe
> >  \dorecurse{50}{a }
> >  \startsection[title=spec]
> >  \startxtable
>
>
> What happens when you \hskip is that you switch to horizontal
> mode and the preferred to do this is to use \dontleavehmode.
>
> \dontleavehmode
> \startxtable
>
> Wolfgang
>

Indeed. Thanks for the information!

For the record, this is how the problem is finally solved:

\setuphead[section][after={\blank[sampage]}]
\begingroup\setupindenting[no]\dontleavehmode\startxtable …
\stopxtable\endgroup

Sylvain
___
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] page ends with a section title followed by a table

2020-11-10 Thread Wolfgang Schuster

Sylvain Hubert schrieb am 10.11.2020 um 19:11:


Weirdly enough, "\hskip 0pt" solves the problem.

     \setuphead[section][after={\blank[samepage]\hskip 0pt}]
     \starttext
     \showframe
     \dorecurse{50}{a }
     \startsection[title=spec]
     \startxtable



What happens when you \hskip is that you switch to horizontal
mode and the preferred to do this is to use \dontleavehmode.

\dontleavehmode
\startxtable

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] page ends with a section title followed by a table

2020-11-10 Thread Sylvain Hubert
On Tue, 10 Nov 2020 at 18:25, Wolfgang Schuster <
wolfgang.schuster.li...@gmail.com> wrote:

> Sylvain Hubert schrieb am 10.11.2020 um 18:06:
>
> > Thanks for the suggestion, but as illustrated by the second example,
> > copied here, where the section title is at the top of the page:
> >
> >  \starttext
> >  \showframe
> >  \dorecurse{50}{a }
> >  \startsection[title=spec][before={\blank[preference,big]},
> > after={\blank[samepage,big]}]
>
> Your settings in the second argument of \startsection make no sense
> because the optional argument is for userdata (values like author etc.)
>
> >  \startxtable
> >  \startxrow
> >  \startxcell[ny=30]a\stopxcell\startxcell 1\stopxcell
> >  \stopxrow
> >  \dorecurse{29}{\startxrow\startxcell 2\stopxcell\stopxrow}
> >  \stopxtable
> >  \stoptext
> >
> > it is sometimes difficult to predict how much remaining space should
> > trigger a line break.
>
> You can either reformat your table or put the table in a float
> environment to move it to a place where it fits.
>
> Wolfgang
>

Weirdly enough, "\hskip 0pt" solves the problem.

\setuphead[section][after={\blank[samepage]\hskip 0pt}]
\starttext
\showframe
\dorecurse{50}{a }
\startsection[title=spec]
\startxtable
\startxrow
\startxcell[ny=30]a\stopxcell\startxcell 1\stopxcell
\stopxrow
\dorecurse{29}{\startxrow\startxcell 2\stopxcell\stopxrow}
\stopxtable
\stoptext

Sylvain
___
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] page ends with a section title followed by a table

2020-11-10 Thread Wolfgang Schuster

Sylvain Hubert schrieb am 10.11.2020 um 18:06:

Thanks for the suggestion, but as illustrated by the second example, 
copied here, where the section title is at the top of the page:


     \starttext
     \showframe
     \dorecurse{50}{a }
     \startsection[title=spec][before={\blank[preference,big]}, 
after={\blank[samepage,big]}]


Your settings in the second argument of \startsection make no sense
because the optional argument is for userdata (values like author etc.)


     \startxtable
     \startxrow
     \startxcell[ny=30]a\stopxcell\startxcell 1\stopxcell
     \stopxrow
     \dorecurse{29}{\startxrow\startxcell 2\stopxcell\stopxrow}
     \stopxtable
     \stoptext

it is sometimes difficult to predict how much remaining space should 
trigger a line break.


You can either reformat your table or put the table in a float
environment to move it to a place where it fits.

Wolfgang

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] page ends with a section title followed by a table

2020-11-10 Thread Sylvain Hubert
On Tue, 10 Nov 2020 at 17:54, Wolfgang Schuster <
wolfgang.schuster.li...@gmail.com> wrote:

> Pablo Rodriguez schrieb am 10.11.2020 um 15:59:
> > On 11/10/20 9:55 AM, Sylvain Hubert wrote:
> >> Dear List,
> >>
> >> In the following example, the section title appears at the very end of
> >> the first page.
> >> [...]
> >> Does anyone know where to adjust the penalty in this case, so that the
> >> section title can be repositioned to the next page?
> > Hi Sylvain,
> >
> >\setuphead[title]
> >  [before={\blank[preference, big],
> >   after={\blank[samepage, big]]
> >
> > In this case, the blank space before sets a preference for inserting a
> > page break. The blank space after requires to be in the same page with
> > next paragraph.
>
> Another method is to move the section title to the next page when the
> remaining spaces
> is below a specified number of lines. The following setup forces a page
> break when
> less than 4 lines remain on the current page.
>
> \setuphead
>[section]
>    [before={\testpage[4]\blank[2*big]}]
>
> Wolfgang
>

Hi Wolfgang,

Thanks for the suggestion, but as illustrated by the second example, copied
here, where the section title is at the top of the page:

\starttext
\showframe
\dorecurse{50}{a }
\startsection[title=spec][before={\blank[preference,big]},
after={\blank[samepage,big]}]
\startxtable
\startxrow
\startxcell[ny=30]a\stopxcell\startxcell 1\stopxcell
\stopxrow
\dorecurse{29}{\startxrow\startxcell 2\stopxcell\stopxrow}
\stopxtable
\stoptext

it is sometimes difficult to predict how much remaining space should
trigger a line break.

Sylvain
___
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] page ends with a section title followed by a table

2020-11-10 Thread Sylvain Hubert
On Tue, 10 Nov 2020 at 17:37, Pablo Rodriguez  wrote:

> On 11/10/20 5:23 PM, Sylvain Hubert wrote:
> > My mistake, but the problem survives the fix:
> >
> >     \setuphead[section][after={\blank[samepage,big]}]
> > \starttext
> > \showframe
> > \dorecurse{50}{a }
> > \startsection[title=spec]
> > \startxtable
> Hi Sylvain,
>
> no fix is required when you allow the table to be split:
>
> \startxtable[split=yes]
>
> Pablo
>

Hi Pablo,

Thanks for the suggestion, but unlike the MWE, in the original document,
the table has ten rows and is visually not suitable for a split. The large
row span is meant to represent this restriction.

Sylvain
___
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] page ends with a section title followed by a table

2020-11-10 Thread Wolfgang Schuster

Pablo Rodriguez schrieb am 10.11.2020 um 15:59:

On 11/10/20 9:55 AM, Sylvain Hubert wrote:

Dear List,

In the following example, the section title appears at the very end of
the first page.
[...]
Does anyone know where to adjust the penalty in this case, so that the
section title can be repositioned to the next page?

Hi Sylvain,

   \setuphead[title]
 [before={\blank[preference, big],
  after={\blank[samepage, big]]

In this case, the blank space before sets a preference for inserting a
page break. The blank space after requires to be in the same page with
next paragraph.


Another method is to move the section title to the next page when the 
remaining spaces
is below a specified number of lines. The following setup forces a page 
break when

less than 4 lines remain on the current page.

\setuphead
  [section]
  [before={\testpage[4]\blank[2*big]}]

Wolfgang

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] page ends with a section title followed by a table

2020-11-10 Thread Pablo Rodriguez
On 11/10/20 5:23 PM, Sylvain Hubert wrote:
> My mistake, but the problem survives the fix:
>
>     \setuphead[section][after={\blank[samepage,big]}]
>     \starttext
>     \showframe
>     \dorecurse{50}{a }
>     \startsection[title=spec]
>     \startxtable
Hi Sylvain,

no fix is required when you allow the table to be split:

\startxtable[split=yes]

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] page ends with a section title followed by a table

2020-11-10 Thread Sylvain Hubert
My mistake, but the problem survives the fix:

\setuphead[section][after={\blank[samepage,big]}]
\starttext
\showframe
\dorecurse{50}{a }
\startsection[title=spec]
\startxtable
\startxrow
\startxcell[ny=30]a\stopxcell\startxcell 1\stopxcell
\stopxrow
\dorecurse{29}{\startxrow\startxcell 2\stopxcell\stopxrow}
\stopxtable
\stoptext

Sylvain

On Tue, 10 Nov 2020 at 17:11, Sylvain Hubert  wrote:

>
> On Tue, 10 Nov 2020 at 16:00, Pablo Rodriguez  wrote:
>
>> On 11/10/20 9:55 AM, Sylvain Hubert wrote:
>> > Dear List,
>> >
>> > In the following example, the section title appears at the very end of
>> > the first page.
>> > [...]
>> > Does anyone know where to adjust the penalty in this case, so that the
>> > section title can be repositioned to the next page?
>>
>> Hi Sylvain,
>>
>>   \setuphead[title]
>> [before={\blank[preference, big],
>>  after={\blank[samepage, big]]
>>
>> In this case, the blank space before sets a preference for inserting a
>> page break. The blank space after requires to be in the same page with
>> next paragraph.
>>
>> Of course, you don’t need both simultaneously.
>>
>> Just in case it helps,
>>
>> Pablo
>>
>
> Hello Pablo,
>
> Thank you very much for the help. The penalty of \blank indeed brings the
> solution closer and it does format the previous example correctly.
>
> However, when I went back to the original document, neither
> [before={\blank[preference, big]}] nor [after={\blank[samepage, big]}] nor
> both worked. I trimmed it into the following example which behaves the same:
>
> \starttext
> \showframe
> \dorecurse{50}{a }
> \startsection[title=spec][before={\blank[preference,big]},
> after={\blank[samepage,big]}]
> \startxtable
> \startxrow
> \startxcell[ny=30]a\stopxcell\startxcell 1\stopxcell
> \stopxrow
> \dorecurse{29}{\startxrow\startxcell 2\stopxcell\stopxrow}
> \stopxtable
> \stoptext
>
> Do you have an idea on how this could also be formatted correctly or how
> one could inspect and debug the penalty?
>
> Thanks again!
>
> Sylvain
>
___
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] page ends with a section title followed by a table

2020-11-10 Thread Sylvain Hubert
On Tue, 10 Nov 2020 at 16:00, Pablo Rodriguez  wrote:

> On 11/10/20 9:55 AM, Sylvain Hubert wrote:
> > Dear List,
> >
> > In the following example, the section title appears at the very end of
> > the first page.
> > [...]
> > Does anyone know where to adjust the penalty in this case, so that the
> > section title can be repositioned to the next page?
>
> Hi Sylvain,
>
>   \setuphead[title]
> [before={\blank[preference, big],
>  after={\blank[samepage, big]]
>
> In this case, the blank space before sets a preference for inserting a
> page break. The blank space after requires to be in the same page with
> next paragraph.
>
> Of course, you don’t need both simultaneously.
>
> Just in case it helps,
>
> Pablo
>

Hello Pablo,

Thank you very much for the help. The penalty of \blank indeed brings the
solution closer and it does format the previous example correctly.

However, when I went back to the original document, neither
[before={\blank[preference, big]}] nor [after={\blank[samepage, big]}] nor
both worked. I trimmed it into the following example which behaves the same:

\starttext
\showframe
\dorecurse{50}{a }
\startsection[title=spec][before={\blank[preference,big]},
after={\blank[samepage,big]}]
\startxtable
\startxrow
\startxcell[ny=30]a\stopxcell\startxcell 1\stopxcell
\stopxrow
\dorecurse{29}{\startxrow\startxcell 2\stopxcell\stopxrow}
\stopxtable
\stoptext

Do you have an idea on how this could also be formatted correctly or how
one could inspect and debug the penalty?

Thanks again!

Sylvain
___
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] page ends with a section title followed by a table

2020-11-10 Thread Pablo Rodriguez
On 11/10/20 9:55 AM, Sylvain Hubert wrote:
> Dear List,
>
> In the following example, the section title appears at the very end of
> the first page.
> [...]
> Does anyone know where to adjust the penalty in this case, so that the
> section title can be repositioned to the next page?

Hi Sylvain,

  \setuphead[title]
[before={\blank[preference, big],
 after={\blank[samepage, big]]

In this case, the blank space before sets a preference for inserting a
page break. The blank space after requires to be in the same page with
next paragraph.

Of course, you don’t need both simultaneously.

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
___


[NTG-context] page ends with a section title followed by a table

2020-11-10 Thread Sylvain Hubert
Dear List,

In the following example, the section title appears at the very end of the
first page.

\showframe

\starttext
\dorecurse{94}{a b c }\\
\dorecurse{94}{a b c }\\
\dorecurse{94}{a b c }\\
\dorecurse{94}{a b c }\\
\dorecurse{94}{a b c }\\
\dorecurse{30}{a b c }

\section{title}
\startxtable
\startxrow
\startxcell[ny=10]a\stopxcell\startxcell 1\stopxcell
\stopxrow
\dorecurse{9}{\startxrow\startxcell 2\stopxcell\stopxrow}
\stopxtable
\stoptext

Does anyone know where to adjust the penalty in this case, so that the
section title can be repositioned to the next page?

Thanks!

Best,
Sylvain
___
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] temporarily move up a section title

2020-11-08 Thread Sylvain Hubert
On Sun, 8 Nov 2020 at 10:12, Wolfgang Schuster <
wolfgang.schuster.li...@gmail.com> wrote:

> Sylvain Hubert schrieb am 08.11.2020 um 03:19:
> > Dear List,
> >
> > I'm trying to move up a section title (section b) 2cm upward:
> >
> >  \starttext
> >  \section{a}
> >  \blank[-2cm,force]\
>
> \blank[back,disable]
>
> Wolfgang
>

Works as a charm! Thanks!

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


  1   2   3   4   5   6   7   8   9   >