ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* prevent hyphenation (flush left)
@ 2006-07-16  2:34 Mojca Miklavec
  2006-07-16  5:42 ` Aditya Mahajan
  2006-07-17  9:50 ` Hans Hagen
  0 siblings, 2 replies; 9+ messages in thread
From: Mojca Miklavec @ 2006-07-16  2:34 UTC (permalink / raw)


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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: prevent hyphenation (flush left)
  2006-07-16  2:34 prevent hyphenation (flush left) Mojca Miklavec
@ 2006-07-16  5:42 ` Aditya Mahajan
  2006-07-16 23:23   ` Mojca Miklavec
  2006-07-17  9:50 ` Hans Hagen
  1 sibling, 1 reply; 9+ messages in thread
From: Aditya Mahajan @ 2006-07-16  5:42 UTC (permalink / raw)


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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: prevent hyphenation (flush left)
  2006-07-16  5:42 ` Aditya Mahajan
@ 2006-07-16 23:23   ` Mojca Miklavec
  0 siblings, 0 replies; 9+ messages in thread
From: Mojca Miklavec @ 2006-07-16 23:23 UTC (permalink / raw)


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.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: prevent hyphenation (flush left)
  2006-07-16  2:34 prevent hyphenation (flush left) Mojca Miklavec
  2006-07-16  5:42 ` Aditya Mahajan
@ 2006-07-17  9:50 ` Hans Hagen
  2006-07-18 15:27   ` Mojca Miklavec
  1 sibling, 1 reply; 9+ messages in thread
From: Hans Hagen @ 2006-07-17  9:50 UTC (permalink / raw)


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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: prevent hyphenation (flush left)
  2006-07-17  9:50 ` Hans Hagen
@ 2006-07-18 15:27   ` Mojca Miklavec
  2006-07-18 15:38     ` Otared Kavian
  0 siblings, 1 reply; 9+ messages in thread
From: Mojca Miklavec @ 2006-07-18 15:27 UTC (permalink / raw)


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
_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: prevent hyphenation (flush left)
  2006-07-18 15:27   ` Mojca Miklavec
@ 2006-07-18 15:38     ` Otared Kavian
  2006-07-18 18:17       ` Mojca Miklavec
  0 siblings, 1 reply; 9+ messages in thread
From: Otared Kavian @ 2006-07-18 15:38 UTC (permalink / raw)



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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: prevent hyphenation (flush left)
  2006-07-18 15:38     ` Otared Kavian
@ 2006-07-18 18:17       ` Mojca Miklavec
  2006-07-18 21:55         ` control the number of items in the startitemize environment batela
  0 siblings, 1 reply; 9+ messages in thread
From: Mojca Miklavec @ 2006-07-18 18:17 UTC (permalink / raw)


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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* control the number of items in the startitemize environment
  2006-07-18 18:17       ` Mojca Miklavec
@ 2006-07-18 21:55         ` batela
  2006-07-18 23:38           ` Hans Hagen
  0 siblings, 1 reply; 9+ messages in thread
From: batela @ 2006-07-18 21:55 UTC (permalink / raw)



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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: control the number of items in the startitemize environment
  2006-07-18 21:55         ` control the number of items in the startitemize environment batela
@ 2006-07-18 23:38           ` Hans Hagen
  0 siblings, 0 replies; 9+ messages in thread
From: Hans Hagen @ 2006-07-18 23:38 UTC (permalink / raw)


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

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2006-07-18 23:38 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-07-16  2:34 prevent hyphenation (flush left) Mojca Miklavec
2006-07-16  5:42 ` Aditya Mahajan
2006-07-16 23:23   ` Mojca Miklavec
2006-07-17  9:50 ` Hans Hagen
2006-07-18 15:27   ` Mojca Miklavec
2006-07-18 15:38     ` Otared Kavian
2006-07-18 18:17       ` Mojca Miklavec
2006-07-18 21:55         ` control the number of items in the startitemize environment batela
2006-07-18 23:38           ` 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).