prevent hyphenation (flush left)
Hello, I urgently need to have my \framed texts left-justified (no hyphenation and nothing may go over the right border) I know that it must be trivial, but I assume that explicit \exhyphenpenalty=10000 \hyphenpenalty=10000 are replaced inside \framed anyway. Thank you, Mojca
On Sun, 16 Jul 2006, Mojca Miklavec wrote:
Hello,
I urgently need to have my \framed texts left-justified (no hyphenation and nothing may go over the right border)
Hi Mojca, Does this do what you want? \starttext \framed[width=5cm,align={leftflushed,stretch,tolerant,nothyphenated}] {\input knuth \endgraf} \stoptext Aditya
I know that it must be trivial, but I assume that explicit \exhyphenpenalty=10000 \hyphenpenalty=10000 are replaced inside \framed anyway.
Thank you, Mojca _______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
-- Aditya Mahajan, EECS Systems, University of Michigan http://www.eecs.umich.edu/~adityam || Ph: 7342624008
On 7/16/06, Aditya Mahajan wrote:
On Sun, 16 Jul 2006, Mojca Miklavec wrote:
Hello,
I urgently need to have my \framed texts left-justified (no hyphenation and nothing may go over the right border)
Hi Mojca,
Does this do what you want?
\starttext \framed[width=5cm,align={leftflushed,stretch,tolerant,nothyphenated}] {\input knuth \endgraf} \stoptext
Hello, Aditya! I'm replying a bit late, but this tip "saved my life" today! (I replaced leftflushed with flushleft) I guessed that it was probably because each box sets its own hyphenations, aliggnment and such, but I didn't know how to control this. It still doesn't do exactly what I wanted: some words extend beyond the frame boundary, but I was faking a bit by setting the frame to some smaller size and it still came out OK. Thank you very very much again! (I spent hours trying to fix that and some other seemingly minor issues.) Mojca Is there any chance that the interface would be documented in cont-en.xml? I have no idea which options are available, but those are not described yet.
Mojca Miklavec wrote:
Hello,
I urgently need to have my \framed texts left-justified (no hyphenation and nothing may go over the right border)
I know that it must be trivial, but I assume that explicit \exhyphenpenalty=10000 \hyphenpenalty=10000 are replaced inside \framed anyway.
align={flushleft,nothyphenated,verytolerant} Hans ----------------------------------------------------------------- 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 -----------------------------------------------------------------
On 7/17/06, Hans Hagen wrote:
Mojca Miklavec wrote:
Hello,
I urgently need to have my \framed texts left-justified (no hyphenation and nothing may go over the right border)
I know that it must be trivial, but I assume that explicit \exhyphenpenalty=10000 \hyphenpenalty=10000 are replaced inside \framed anyway.
align={flushleft,nothyphenated,verytolerant}
I tested a bit and \framed seems to work OK, but I have no idea how to prevent the name to extend outside of the frame in the next example: \setuppapersize [S6][S6] %\definetypeface [iwona] [ss] [sans] [iwona] [default] [encoding=ec] %\setupbodyfont [iwona,12pt,ss] \setupbackgrounds [page] [background=page] \definelayer [page] [width=\paperwidth, height=\paperheight] \def\contestant#1#2#3{\page \setlayerframed [page] [voffset=3cm, hoffset=3cm, preset=lefttop] [height=6cm, width=9cm, align={flushleft,lohi,nothyphenated,verytolerant}, frame=on, ]{{\switchtobodyfont[35pt]\bf #1 #2\crlf}\crlf\switchtobodyfont[30pt]#3}\strut} \starttext \contestant{Someone}{Withavery long Surname}{Country} \stoptext ̣(All those people Withextremelylongnames are already leaving today, so one problem less now: I had to improvise a bit to get the names approximately OK on the slides, but I still wonder how to handle the problem in the future if it arises again.) Would it be possible to add those definitions somewhere to cont-en.xml? Thank you, Mojca
On 18 juil. 2006, at 17:27, Mojca Miklavec wrote:
\setuppapersize [S6][S6]
%\definetypeface [iwona] [ss] [sans] [iwona] [default] [encoding=ec] %\setupbodyfont [iwona,12pt,ss]
\setupbackgrounds [page] [background=page] \definelayer [page] [width=\paperwidth, height=\paperheight]
\def\contestant#1#2#3{\page \setlayerframed [page] [voffset=3cm, hoffset=3cm, preset=lefttop] [height=6cm, width=9cm, align={flushleft,lohi,nothyphenated,verytolerant}, frame=on, ]{{\switchtobodyfont[35pt]\bf #1 #2\crlf}\crlf\switchtobodyfont[30pt]#3}\strut}
\starttext \contestant{Someone}{Withavery long Surname}{Country} \stoptext
Does adding the keyword stretch in align={...} give what you want: \def\contestant#1#2#3{\page \setlayerframed [page] [voffset=3cm, hoffset=3cm, preset=lefttop] [height=6cm, width=9cm, align={flushleft,lohi,nothyphenated,stretch,verytolerant}, frame=on, ]{{\switchtobodyfont[35pt]\bf #1 #2\crlf}\crlf\switchtobodyfont[30pt]#3}\strut} Best regards: OK
On 7/18/06, Otared Kavian wrote:
On 18 juil. 2006, at 17:27, Mojca Miklavec wrote:
I urgently need to have my \framed texts left-justified (no hyphenation and nothing may go over the right border)
\setuppapersize [S6][S6]
%\definetypeface [iwona] [ss] [sans] [iwona] [default] [encoding=ec] %\setupbodyfont [iwona,12pt,ss]
\setupbackgrounds [page] [background=page] \definelayer [page] [width=\paperwidth, height=\paperheight]
\def\contestant#1#2#3{\page \setlayerframed [page] [voffset=3cm, hoffset=3cm, preset=lefttop] [height=6cm, width=9cm, align={flushleft,lohi,nothyphenated,verytolerant}, frame=on, ]{{\switchtobodyfont[35pt]\bf #1 #2\crlf}\crlf\switchtobodyfont[30pt]#3}\strut}
\starttext \contestant{Someone}{Withavery long Surname}{Country} \stoptext
Does adding the keyword stretch in align={...} give what you want:
No, not always (though it seems to be better than without it). The original string was align={flushleft,lohi,stretch,verytolerant,nothyphenated} which surely didn't work, but I have to do some more testing. Does the order of parameters make any difference? Mojca
Dear Sirs. I have a large buffer that include several items packed in a initial startitemize environment. Using this list, I want build a several small lists with five inital items in the random order. I try to do in this way, but without success :-(( %%%%%%%%%%%%%%%%% \startsetups SmallList:make \getbuffer[LargeList] \stopsetups \starttext \startbuffer[LargeList] \startitemize[1,random,packed][items=5] %%% -- this d'ont work. Why? \startitem item 1 \stopitem \startitem item 2 \stopitem \startitem item 3 \stopitem \startitem item 4 \stopitem \startitem item 5 \stopitem \startitem item 6 \stopitem \startitem item 7 \stopitem \startitem item 9 \stopitem \startitem item 9 \stopitem \startitem item 10 \stopitem \stopitemize \stopbuffer %\setuprandomize[1234] \dorecurse{3} {\setups[SmallList:make]} \stoptext %%%%%%%%%%%%%%%%% Thanks a lot Jorge
batela wrote:
Dear Sirs.
I have a large buffer that include several items packed in a initial startitemize environment. Using this list, I want build a several small lists with five inital items in the random order. I try to do in this way, but without success :-((
%%%%%%%%%%%%%%%%% \startsetups SmallList:make
\getbuffer[LargeList]
\stopsetups
\starttext
\startbuffer[LargeList]
\startitemize[1,random,packed][items=5] %%% -- this d'ont work. Why?
items=... has to do with questionares, not with randomize of course such a feature can be added but where does adding such one-shot extensions end ... Hans
participants (5)
-
Aditya Mahajan
-
batela
-
Hans Hagen
-
Mojca Miklavec
-
Otared Kavian