* framedtext
@ 2016-04-11 10:08 Meer, Hans van der
2016-04-11 10:28 ` framedtext Mari Voipio
0 siblings, 1 reply; 10+ messages in thread
From: Meer, Hans van der @ 2016-04-11 10:08 UTC (permalink / raw)
To: NTG ConTeXt
[-- Attachment #1.1: Type: text/plain, Size: 733 bytes --]
I am getting an unexpected results with framedtexts.Why is the second "centered" not centered?
\starttext
\startframedtext[left][frame=on,offset=0pt,width=broad]
left\hfill
\stopframedtext
\startframedtext[middle][frame=on,offset=0pt,width=broad]
\hfil centered\hfil
\stopframedtext
\startframedtext[middle][frame=on,offset=0pt,width=broad]
\hfill centered\hfill
\stopframedtext
\startframedtext[right][frame=on,offset=0pt,width=broad]
\hfill right
\stopframedtext
\startframedtext[none][frame=on,offset=0pt,width=broad]
none
\stopframedtext
\stoptext
This is LuaTeX, Version beta-0.90.0 (TeX Live 2016)
ConTeXt ver: 2016.04.01 13:01 MKIV beta fmt: 2016.4.5 int: english/english
Hans van der Meer
[-- Attachment #1.2: Type: text/html, Size: 2849 bytes --]
[-- Attachment #2: framedtext-middle.pdf --]
[-- Type: application/pdf, Size: 6061 bytes --]
[-- Attachment #3: Type: text/plain, Size: 485 bytes --]
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: framedtext
2016-04-11 10:08 framedtext Meer, Hans van der
@ 2016-04-11 10:28 ` Mari Voipio
2016-04-11 10:36 ` framedtext Meer, Hans van der
2016-04-11 16:13 ` framedtext Alan BRASLAU
0 siblings, 2 replies; 10+ messages in thread
From: Mari Voipio @ 2016-04-11 10:28 UTC (permalink / raw)
To: mailing list for ConTeXt users
On Mon, Apr 11, 2016 at 1:08 PM, Meer, Hans van der <H.vanderMeer@uva.nl> wrote:
> \startframedtext[middle][frame=on,offset=0pt,width=broad]
> \hfil centered\hfil
> \stopframedtext
> \startframedtext[middle][frame=on,offset=0pt,width=broad]
> \hfill centered\hfill
> \stopframedtext
One has \hfil with one l and the other has \hfill with two l:s. \hfil
with one l seems to produce centering, while \hfill with two l:s makes
the text end up on the right.
Don't know if this is a feature or a bug, but this is the reason to
why those lines differ.
Mari
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: framedtext
2016-04-11 10:28 ` framedtext Mari Voipio
@ 2016-04-11 10:36 ` Meer, Hans van der
2016-04-11 16:13 ` framedtext Alan BRASLAU
1 sibling, 0 replies; 10+ messages in thread
From: Meer, Hans van der @ 2016-04-11 10:36 UTC (permalink / raw)
To: NTG ConTeXt
[-- Attachment #1.1: Type: text/plain, Size: 914 bytes --]
> On 11 Apr 2016, at 12:28, Mari Voipio <mari.voipio@iki.fi> wrote:
>
> On Mon, Apr 11, 2016 at 1:08 PM, Meer, Hans van der <H.vanderMeer@uva.nl> wrote:
>
>> \startframedtext[middle][frame=on,offset=0pt,width=broad]
>> \hfil centered\hfil
>> \stopframedtext
>> \startframedtext[middle][frame=on,offset=0pt,width=broad]
>> \hfill centered\hfill
>> \stopframedtext
>
> One has \hfil with one l and the other has \hfill with two l:s. \hfil
> with one l seems to produce centering, while \hfill with two l:s makes
> the text end up on the right.
>
> Don't know if this is a feature or a bug, but this is the reason to
> why those lines differ.
Indeed, but that is just what puzzles me and why I posted my question.
\hfill is stronger than \hfil and thus it seems all the more strange that the left and right \hfill do not produce the same centering as the \hfil's do.
Hans van der Meer
[-- Attachment #1.2: Type: text/html, Size: 1479 bytes --]
[-- Attachment #2: framedtext-middle.pdf --]
[-- Type: application/pdf, Size: 6061 bytes --]
[-- Attachment #3: Type: text/plain, Size: 485 bytes --]
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: framedtext
2016-04-11 10:28 ` framedtext Mari Voipio
2016-04-11 10:36 ` framedtext Meer, Hans van der
@ 2016-04-11 16:13 ` Alan BRASLAU
2016-04-11 16:49 ` framedtext Meer, Hans van der
1 sibling, 1 reply; 10+ messages in thread
From: Alan BRASLAU @ 2016-04-11 16:13 UTC (permalink / raw)
To: mailing list for ConTeXt users
Would it not be better to use ConTeXt alignment, rather than the TeX
primitives \hfil and \hfill?
\starttext
\startframedtext[left][frame=on,offset=0pt,width=broad,align=flushleft]
left
\stopframedtext
\startframedtext[middle][frame=on,offset=0pt,width=broad,align=middle]
centered
\stopframedtext
\startframedtext[right][frame=on,offset=0pt,width=broad,align=flushright]
right
\stopframedtext
\stoptext
On Mon, 11 Apr 2016 13:28:47 +0300
Mari Voipio <mari.voipio@iki.fi> wrote:
> On Mon, Apr 11, 2016 at 1:08 PM, Meer, Hans van der
> <H.vanderMeer@uva.nl> wrote:
>
> > \startframedtext[middle][frame=on,offset=0pt,width=broad]
> > \hfil centered\hfil
> > \stopframedtext
> > \startframedtext[middle][frame=on,offset=0pt,width=broad]
> > \hfill centered\hfill
> > \stopframedtext
>
> One has \hfil with one l and the other has \hfill with two l:s. \hfil
> with one l seems to produce centering, while \hfill with two l:s makes
> the text end up on the right.
>
> Don't know if this is a feature or a bug, but this is the reason to
> why those lines differ.
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: framedtext
2016-04-11 16:13 ` framedtext Alan BRASLAU
@ 2016-04-11 16:49 ` Meer, Hans van der
2016-04-11 16:59 ` framedtext Hans Hagen
2016-04-11 17:10 ` framedtext Wolfgang Schuster
0 siblings, 2 replies; 10+ messages in thread
From: Meer, Hans van der @ 2016-04-11 16:49 UTC (permalink / raw)
To: NTG ConTeXt
[-- Attachment #1.1: Type: text/plain, Size: 488 bytes --]
On 11 Apr 2016, at 18:13, Alan BRASLAU <alan.braslau@cea.fr<mailto:alan.braslau@cea.fr>> wrote:
Would it not be better to use ConTeXt alignment, rather than the TeX
primitives \hfil and \hfill?
\startframedtext[left][frame=on,offset=0pt,width=broad,align=flushleft]
left
\stopframedtext
Could be of course. But the question is: from where the counterintuitive behavioud of \hfil and \hfil?
It is my nature to be not satisfied until I know ;-)
Hans van der Meer
[-- Attachment #1.2: Type: text/html, Size: 3120 bytes --]
[-- Attachment #2: Type: text/plain, Size: 485 bytes --]
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: framedtext
2016-04-11 16:49 ` framedtext Meer, Hans van der
@ 2016-04-11 16:59 ` Hans Hagen
2016-04-11 17:10 ` framedtext Wolfgang Schuster
1 sibling, 0 replies; 10+ messages in thread
From: Hans Hagen @ 2016-04-11 16:59 UTC (permalink / raw)
To: ntg-context
On 4/11/2016 6:49 PM, Meer, Hans van der wrote:
>
>> On 11 Apr 2016, at 18:13, Alan BRASLAU <alan.braslau@cea.fr
>> <mailto:alan.braslau@cea.fr>> wrote:
>>
>> Would it not be better to use ConTeXt alignment, rather than the TeX
>> primitives \hfil and \hfill?
>>
>> \startframedtext[left][frame=on,offset=0pt,width=broad,align=flushleft]
>> left
>> \stopframedtext
>
> Could be of course. But the question is: from where the counterintuitive
> behavioud of \hfil and \hfil?
> It is my nature to be not satisfied until I know ;-)
because internally the framed align can inject \hfil \hfill \hss or
whatever was decided best ... it's already complex enough to write
macros like \framed that adapt to all cases users throw at it so the
options (like align) are there for a reason
if you don't want that you need to wrap your stuff in a box in which
case you can do inside that box what you like
Hans
(you can use \showmakeup to see what is in a \framed box)
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.com | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: framedtext
2016-04-11 16:49 ` framedtext Meer, Hans van der
2016-04-11 16:59 ` framedtext Hans Hagen
@ 2016-04-11 17:10 ` Wolfgang Schuster
2016-04-11 19:44 ` framedtext Meer, Hans van der
1 sibling, 1 reply; 10+ messages in thread
From: Wolfgang Schuster @ 2016-04-11 17:10 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 981 bytes --]
> Meer, Hans van der <mailto:H.vanderMeer@uva.nl>
> 11. April 2016 um 18:49
>
>
> Could be of course. But the question is: from where the
> counterintuitive behavioud of \hfil and \hfil?
> It is my nature to be not satisfied until I know ;-)
It's easy to explain on the following example.
%%%% begin example
\starttext
\hfil Text\hfil
\hfill Text\hfill
\stoptext
%%%% end example
At the end of a paragraph TeX removes the last skip and inserts the
\parskipfill [1] value which is by default "0pt plus 1fil".
For the first text line this results in the expected output but not for
the second line because the inserted "fil" is smaller than the needed
"fill". You can check this when you change the \parskipfill
stretchability from fil to fill:
%%%% begin example
\starttext
\hfill Text\hfill
\start \parfillskip = 0pt plus 1 fill
\hfill Text\hfill \par
\stop
\stoptext
%%%% end example
[1] https://www.tug.org/utilities/plain/cseq.html#parfillskip-rp
Wolfgang
[-- Attachment #1.2: Type: text/html, Size: 2401 bytes --]
[-- Attachment #2: Type: text/plain, Size: 485 bytes --]
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: framedtext
2016-04-11 17:10 ` framedtext Wolfgang Schuster
@ 2016-04-11 19:44 ` Meer, Hans van der
0 siblings, 0 replies; 10+ messages in thread
From: Meer, Hans van der @ 2016-04-11 19:44 UTC (permalink / raw)
To: NTG ConTeXt
[-- Attachment #1.1: Type: text/plain, Size: 1772 bytes --]
Wolfgang, Hans,
Thanks for your explanations.
Hans van der Meer
On 11 Apr 2016, at 19:10, Wolfgang Schuster <schuster.wolfgang@gmail.com<mailto:schuster.wolfgang@gmail.com>> wrote:
Meer, Hans van der<mailto:H.vanderMeer@uva.nl>
11. April 2016 um 18:49
Could be of course. But the question is: from where the counterintuitive behavioud of \hfil and \hfil?
It is my nature to be not satisfied until I know ;-)
It’s easy to explain on the following example.
%%%% begin example
\starttext
\hfil Text\hfil
\hfill Text\hfill
\stoptext
%%%% end example
At the end of a paragraph TeX removes the last skip and inserts the \parskipfill [1] value which is by default "0pt plus 1fil".
For the first text line this results in the expected output but not for the second line because the inserted “fil” is smaller than the needed “fill”. You can check this when you change the \parskipfill stretchability from fil to fill:
%%%% begin example
\starttext
\hfill Text\hfill
\start \parfillskip = 0pt plus 1 fill
\hfill Text\hfill \par
\stop
\stoptext
%%%% end example
[1] https://www.tug.org/utilities/plain/cseq.html#parfillskip-rp
Wolfgang
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl<mailto:ntg-context@ntg.nl> / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
met vriendelijke groet
Hans van der Meer
[-- Attachment #1.2: Type: text/html, Size: 4375 bytes --]
[-- Attachment #2: Type: text/plain, Size: 485 bytes --]
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: framedtext
2010-03-23 12:34 framedtext Hans van der Meer
@ 2010-03-23 18:00 ` Hans Hagen
0 siblings, 0 replies; 10+ messages in thread
From: Hans Hagen @ 2010-03-23 18:00 UTC (permalink / raw)
To: mailing list for ConTeXt users
On 23-3-2010 13:34, Hans van der Meer wrote:
> I experience the following behaviour of framedtext in relation to
> inright and inleft.
> With \startframedtext[offset=value] the positioning of left and right
> margin inserts shifts with the size of 'value'.
>
> The next example shows the shift to the right of L2 and R2 (both mkii
> and mkiv). Change the offset to see the margin notes L2/R2 shift.
> \starttext
> \showframe[text,margin,edge]
> ABC
> \inright{\framed[width=10mm,height=5mm]{R1}}
> \inleft{\framed[width=10mm,height=5mm]{L1}}
> \startframedtext[offset=2cm]
> XYZ
> \inright{\framed[width=10mm,height=5mm]{R2}}
> \inleft{\framed[width=10mm,height=5mm]{L2}}
> \stopframedtext
> \stoptext
>
> Pictured:
> ...L1.|...................|.R1
> ......|.L2................|.....R2
> ......|...................|
> ......^...................^
> ^ = frame lines of showpage
>
> I wonder if this is correct behaviour. The margins are imho fixed areas,
> defined as the areas on the left/right of the textframe. One would
> expect the margin texts put just there, not influenced by something that
> happens to be placed in the text.
> Or am I amiss?
indeed ... inleft and inright use vadjust and that is somewhat special
i will come up with an alternative in mkiv
maybe \margintitle{...} works ok (delays till a paragraph)
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
| www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 10+ messages in thread
* framedtext
@ 2010-03-23 12:34 Hans van der Meer
2010-03-23 18:00 ` framedtext Hans Hagen
0 siblings, 1 reply; 10+ messages in thread
From: Hans van der Meer @ 2010-03-23 12:34 UTC (permalink / raw)
To: NTG ConTeXt
I experience the following behaviour of framedtext in relation to
inright and inleft.
With \startframedtext[offset=value] the positioning of left and right
margin inserts shifts with the size of 'value'.
The next example shows the shift to the right of L2 and R2 (both mkii
and mkiv). Change the offset to see the margin notes L2/R2 shift.
\starttext
\showframe[text,margin,edge]
ABC
\inright{\framed[width=10mm,height=5mm]{R1}}
\inleft{\framed[width=10mm,height=5mm]{L1}}
\startframedtext[offset=2cm]
XYZ
\inright{\framed[width=10mm,height=5mm]{R2}}
\inleft{\framed[width=10mm,height=5mm]{L2}}
\stopframedtext
\stoptext
Pictured:
..L1.|...................|.R1
.....|.L2................|.....R2
.....|...................|
.....^...................^
^ = frame lines of showpage
I wonder if this is correct behaviour. The margins are imho fixed
areas, defined as the areas on the left/right of the textframe. One
would expect the margin texts put just there, not influenced by
something that happens to be placed in the text.
Or am I amiss?
Hans van der Meer
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2016-04-11 19:44 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-11 10:08 framedtext Meer, Hans van der
2016-04-11 10:28 ` framedtext Mari Voipio
2016-04-11 10:36 ` framedtext Meer, Hans van der
2016-04-11 16:13 ` framedtext Alan BRASLAU
2016-04-11 16:49 ` framedtext Meer, Hans van der
2016-04-11 16:59 ` framedtext Hans Hagen
2016-04-11 17:10 ` framedtext Wolfgang Schuster
2016-04-11 19:44 ` framedtext Meer, Hans van der
-- strict thread matches above, loose matches on Subject: below --
2010-03-23 12:34 framedtext Hans van der Meer
2010-03-23 18:00 ` framedtext Hans Hagen
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).