* [NTG-context] Draw leftframe to a description
@ 2024-07-08 13:00 Gerion Entrup
2024-09-30 0:03 ` [NTG-context] " Gerion Entrup
0 siblings, 1 reply; 5+ messages in thread
From: Gerion Entrup @ 2024-07-08 13:00 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1.1: Type: text/plain, Size: 1703 bytes --]
Hi,
I want to typeset an "excurses" description that is marked with a leftframe.
The problem is that it spans about multiple pages and has footnotes.
Here is an MWE:
```
%% -> mwe-framedtext.pdf
\defineframedtext[excursusbg][
frame=off,
leftframe=on,
rulethickness=1mm,
framecolor=blue,
toffset=0mm, % there is an offset anyways
]
%% -> mwe-textbackground.pdf
% \definetextbackground[excursusbg] [
% location=text,
% background=color,
% backgroundcolor=lightblue,
% frame=on,
% loffset=10cm, % seems to have no impact
% ]
\definedescription[excursus][
text={Excursus:\ },
alternative=top,
headstyle=bold,
margin=1cm,
width=broad,
before={\startexcursusbg},
after={\stopexcursusbg},
]
\starttext
\input ward
\startexcursus[title={A Knuth extract}]
\input knuth
\stopexcursus
\input ward
\startexcursus[title={A much longer Knuth extract}]
\input knuth
Sometimes, sentences have footnotes\footnote{Some footnote}.
\input knuth
\input knuth
\stopexcursus
\stoptext
```
See the attached PDFs for the different results.
In principal, I would like the excurses typesetted like to solution with
\defineframedtext. However, this does not work with pagebreaks.
Additionally, the leftframe is too long (it begins above the "Excursus" text).
I tried toffset to let the leftframe begin exactly at the "Excurses" text
without success.
The solution with \textbackground looks somewhat promising. It supports
pagebreaks, but draws above footnotes and prints a small rectangle at the end
of the excursus. I also didn't found a way to specify a leftframe only.
Also, loffset seems to have no effect, here.
Do I use the false environments? Do you know a better solution?
Gerion
[-- Attachment #1.1.2: mwe-textbackground.pdf --]
[-- Type: application/pdf, Size: 16471 bytes --]
[-- Attachment #1.1.3: mwe-framedtext.pdf --]
[-- Type: application/pdf, Size: 16668 bytes --]
[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
[-- Attachment #2: Type: text/plain, Size: 511 bytes --]
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 5+ messages in thread
* [NTG-context] Re: Draw leftframe to a description
2024-07-08 13:00 [NTG-context] Draw leftframe to a description Gerion Entrup
@ 2024-09-30 0:03 ` Gerion Entrup
2024-09-30 3:58 ` ai2472206007
0 siblings, 1 reply; 5+ messages in thread
From: Gerion Entrup @ 2024-09-30 0:03 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 375 bytes --]
Am Montag, 8. Juli 2024, 15:00:30 MESZ schrieb Gerion Entrup:
> Hi,
>
> I want to typeset an "excurses" description that is marked with a leftframe.
> The problem is that it spans about multiple pages and has footnotes.
> ...
I just also asked on Stackexchange: https://tex.stackexchange.com/questions/727604/draw-a-multi-page-leftframe-with-e-g-defineframedtext
Gerion
[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
[-- Attachment #2: Type: text/plain, Size: 511 bytes --]
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 5+ messages in thread
* [NTG-context] Re: Draw leftframe to a description
2024-09-30 0:03 ` [NTG-context] " Gerion Entrup
@ 2024-09-30 3:58 ` ai2472206007
2024-10-06 0:21 ` Gerion Entrup
0 siblings, 1 reply; 5+ messages in thread
From: ai2472206007 @ 2024-09-30 3:58 UTC (permalink / raw)
To: ntg-context
I'm not sure I understand your needs.
But if you don't want a background, but just need a border.
You can try command “startsidebar“ :
https://wiki.contextgarden.net/Command/setupsidebar
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 5+ messages in thread
* [NTG-context] Re: Draw leftframe to a description
2024-09-30 3:58 ` ai2472206007
@ 2024-10-06 0:21 ` Gerion Entrup
2024-10-07 2:09 ` Aditya Mahajan
0 siblings, 1 reply; 5+ messages in thread
From: Gerion Entrup @ 2024-10-06 0:21 UTC (permalink / raw)
To: ntg-context
[-- Attachment #1.1: Type: text/plain, Size: 1001 bytes --]
Am Montag, 30. September 2024, 05:58:10 MESZ schrieb ai2472206007@yeah.net:
> I'm not sure I understand your needs.
> But if you don't want a background, but just need a border.
> You can try command “startsidebar“ :
> https://wiki.contextgarden.net/Command/setupsidebar
Thank you for that command, it is pretty much that what I want.
In contrast to a textbackground, it seems to be always in the margin of the page.
I tried:
```
\definesidebar[excursussb][
rulethickness=1mm,
rulecolor=darkred,
distance=1mm, % <- this seems to be not respected for text that is narrower
]
\definedescription[excursus][
text={Excursus:\ },
alternative=top,
headstyle=bold,
width=broad,
before={\startnarrower\startsidebar[exkursussb]},
after={\stopsidebar\stopnarrower},
]
```
The more relevant problem, however, is that it does not work with footnotes.
I got exactly the same problems like with textbackground (see the stackexchange post for screenshots).
Gerion
[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
[-- Attachment #2: Type: text/plain, Size: 511 bytes --]
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 5+ messages in thread
* [NTG-context] Re: Draw leftframe to a description
2024-10-06 0:21 ` Gerion Entrup
@ 2024-10-07 2:09 ` Aditya Mahajan
0 siblings, 0 replies; 5+ messages in thread
From: Aditya Mahajan @ 2024-10-07 2:09 UTC (permalink / raw)
To: mailing list for ConTeXt users
On Sun, 6 Oct 2024, Gerion Entrup wrote:
> I got exactly the same problems like with textbackground (see the stackexchange post for screenshots).
I had replied to you on stackexachange, but I think that the mailing list is a better place to discuss this, so I am following up here.
Regarding the footnote, what is happening is that text-background extends to the "end of the page". This is from one of my old files where I had encountered a similar issue:
%D By default, the textbackground extends till the page boundary. This does
%D not look good if a page break occurs when there is not enough material to
%D fit in the page. So, we want to limit textbackground till the typeset
%D material. This has not been interfaced yet, so I use a low level \TEX\
%D command.
\chardef\kindofpagetextareas\plusone
Adding the same works in your example:
\definetextbackground
[leftbartext]
[
location=paragraph,
mp=mpos:region:leftbar,
width=broad,
frame=off,
framecolor=darkgray,
rulethickness=2ex,
leftoffset=5ex,
rightoffset=2.25ex,
topoffset=2.25ex,
bottomoffset=2.25ex,
background=color,
backgroundcolor=lightgray,
]
\startuseMPgraphic{mpos:region:leftbar}
draw_multi_pars;
draw_multi_side;
\stopuseMPgraphic
\definecolor[lightblue] [0.95(blue,white)]
\definetextbackground
[blocktext]
[leftbartext]
[
framecolor=darkblue,
backgroundcolor=lightblue,
]
\definedescription
[excursus]
[
text={Excursus},
alternative=top,
headstyle=bold,
margin=1cm,
width=broad,
before={\startblocktext},
after={\stopblocktext},
]
\chardef\kindofpagetextareas\plusone
\starttext
\input ward
\startexcursus[title={A Knuth extract}]
\input knuth
\stopexcursus
\input ward
\startexcursus[title={A much longer Knuth extract}]
\input knuth
Sometimes, sentences have footnotes\footnote{Some footnote}.
\input knuth
\input knuth
\stopexcursus
\stoptext
Aditya
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-10-07 2:20 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-07-08 13:00 [NTG-context] Draw leftframe to a description Gerion Entrup
2024-09-30 0:03 ` [NTG-context] " Gerion Entrup
2024-09-30 3:58 ` ai2472206007
2024-10-06 0:21 ` Gerion Entrup
2024-10-07 2:09 ` Aditya Mahajan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).