ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* \textwidth vs local
@ 2013-05-17 15:03 Idris Samawi Hamid ادريس   سماوي حامد
  2013-05-17 22:52 ` Hans Hagen
  2013-05-17 23:08 ` Hans Hagen
  0 siblings, 2 replies; 4+ messages in thread
From: Idris Samawi Hamid ادريس   سماوي حامد @ 2013-05-17 15:03 UTC (permalink / raw)
  To: ntg-context

[-- Attachment #1: Type: text/plain, Size: 927 bytes --]

Dear gang,

Is there a \dimen variable for the local key for the width of a text  
column? Take a look at the attached pdf: Clearly local is different from  
\textwidth and \makeupwidth.

=============
\starttext
\framed[width=\textwidth,frame=on]{\type{\textwidth}}
\framed[width=\makeupwidth,frame=on]{\type{\makeupwidth}}
\framed[width=local,frame=on]{\type{local}}

\startitemize
\item \framed[width=\textwidth,frame=on]{\type{\textwidth}}
\framed[width=\makeupwidth,frame=on]{\type{\makeupwidth}}
\item \framed[width=local,frame=on]{\type{local}}
\stopitemize
\stoptext
=============

I'm working on a macro that depends on the local width and I need to be  
able to do work with fractions of the local width, e.g.

\framed[width=0.9\localwidth]{local width}

Thanks in advance for any advice and

Best wishes
Idris
-- 
Professor Idris Samawi Hamid
Department of Philosophy
Colorado State University
Fort Collins, CO 80523

[-- Attachment #2: local.pdf --]
[-- Type: application/pdf, Size: 8838 bytes --]

[-- Attachment #3: local.tex --]
[-- Type: application/x-tex, Size: 381 bytes --]

[-- Attachment #4: 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] 4+ messages in thread

* Re: \textwidth vs local
  2013-05-17 15:03 \textwidth vs local Idris Samawi Hamid ادريس   سماوي حامد
@ 2013-05-17 22:52 ` Hans Hagen
  2013-05-17 23:08 ` Hans Hagen
  1 sibling, 0 replies; 4+ messages in thread
From: Hans Hagen @ 2013-05-17 22:52 UTC (permalink / raw)
  To: ntg-context

On 5/17/2013 5:03 PM, Idris Samawi Hamid ادريس   سماوي حامد wrote:
> Dear gang,
>
> Is there a \dimen variable for the local key for the width of a text
> column? Take a look at the attached pdf: Clearly local is different from
> \textwidth and \makeupwidth.
>
> =============
> \starttext
> \framed[width=\textwidth,frame=on]{\type{\textwidth}}
> \framed[width=\makeupwidth,frame=on]{\type{\makeupwidth}}
> \framed[width=local,frame=on]{\type{local}}
>
> \startitemize
> \item \framed[width=\textwidth,frame=on]{\type{\textwidth}}
> \framed[width=\makeupwidth,frame=on]{\type{\makeupwidth}}
> \item \framed[width=local,frame=on]{\type{local}}
> \stopitemize
> \stoptext
> =============
>
> I'm working on a macro that depends on the local width and I need to be
> able to do work with fractions of the local width, e.g.
>
> \framed[width=0.9\localwidth]{local width}

sometimes you can use \localhsize, in some cases \hsize is ok, and 
there's also \setlocalhsize that calculates \localhsize

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 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] 4+ messages in thread

* Re: \textwidth vs local
  2013-05-17 15:03 \textwidth vs local Idris Samawi Hamid ادريس   سماوي حامد
  2013-05-17 22:52 ` Hans Hagen
@ 2013-05-17 23:08 ` Hans Hagen
  2013-05-17 23:35   ` Idris Samawi Hamid ادريس   سماوي حامد
  1 sibling, 1 reply; 4+ messages in thread
From: Hans Hagen @ 2013-05-17 23:08 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 5/17/2013 5:03 PM, Idris Samawi Hamid ادريس   سماوي حامد wrote:
> Dear gang,
>
> Is there a \dimen variable for the local key for the width of a text
> column? Take a look at the attached pdf: Clearly local is different from
> \textwidth and \makeupwidth.
>
> =============
> \starttext
> \framed[width=\textwidth,frame=on]{\type{\textwidth}}
> \framed[width=\makeupwidth,frame=on]{\type{\makeupwidth}}
> \framed[width=local,frame=on]{\type{local}}
>
> \startitemize
> \item \framed[width=\textwidth,frame=on]{\type{\textwidth}}
> \framed[width=\makeupwidth,frame=on]{\type{\makeupwidth}}
> \item \framed[width=local,frame=on]{\type{local}}
> \stopitemize
> \stoptext
> =============
>
> I'm working on a macro that depends on the local width and I need to be
> able to do work with fractions of the local width, e.g.
>
> \framed[width=0.9\localwidth]{local width}


\showframe

\startbuffer
\setlocalhsize
\dontleavehmode\framed[width=\hsize] 
{\the\hsize,\the\localhsize,\setlocalhsize\the\localhsize,\type{\hsize 
     }} \par
\dontleavehmode\framed[width=\localhsize] 
{\the\hsize,\the\localhsize,\setlocalhsize\the\localhsize,\type{\localhsize 
}} \par
\dontleavehmode\framed[width=\textwidth] 
{\the\hsize,\the\localhsize,\setlocalhsize\the\localhsize,\type{\textwidth 
  }} \par
\dontleavehmode\framed[width=\makeupwidth]{\the\hsize,\the\localhsize,\setlocalhsize\the\localhsize,\type{\makeupwidth}} 
\par
\dontleavehmode\framed[width=local] 
{\the\hsize,\the\localhsize,\setlocalhsize\the\localhsize,\type{local}} 
        \par
\dontleavehmode\blackrule[width=\hsize]       \par
\dontleavehmode\blackrule[width=\localhsize]  \par
\dontleavehmode\blackrule[width=\textwidth]   \par
\dontleavehmode\blackrule[width=\makeupwidth] \par
\dontleavehmode\ruledhbox to \hsize      {x\hss x} \par
\dontleavehmode\ruledhbox to \localhsize {x\hss x} \par
\dontleavehmode\ruledhbox to \textwidth  {x\hss x} \par
\dontleavehmode\ruledhbox to \makeupwidth{x\hss x} \par
\stopbuffer

\starttext

\startitemize
     \startitem
         \getbuffer
     \stopitem
\stopitemize

\getbuffer

\stoptext


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 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] 4+ messages in thread

* Re: \textwidth vs local
  2013-05-17 23:08 ` Hans Hagen
@ 2013-05-17 23:35   ` Idris Samawi Hamid ادريس   سماوي حامد
  0 siblings, 0 replies; 4+ messages in thread
From: Idris Samawi Hamid ادريس   سماوي حامد @ 2013-05-17 23:35 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Hans Hagen

This is an *immense* help... Thanks a million!!

Best wishes
Idris

On Fri, 17 May 2013 17:08:15 -0600, Hans Hagen <pragma@wxs.nl> wrote:

> \showframe
>  \startbuffer
> \setlocalhsize
> \dontleavehmode\framed[width=\hsize]  
> {\the\hsize,\the\localhsize,\setlocalhsize\the\localhsize,\type{\hsize      
> }} \par
> \dontleavehmode\framed[width=\localhsize]  
> {\the\hsize,\the\localhsize,\setlocalhsize\the\localhsize,\type{\localhsize  
> }} \par
> \dontleavehmode\framed[width=\textwidth]  
> {\the\hsize,\the\localhsize,\setlocalhsize\the\localhsize,\type{\textwidth   
> }} \par
> \dontleavehmode\framed[width=\makeupwidth]{\the\hsize,\the\localhsize,\setlocalhsize\the\localhsize,\type{\makeupwidth}}  
> \par
> \dontleavehmode\framed[width=local]  
> {\the\hsize,\the\localhsize,\setlocalhsize\the\localhsize,\type{local}}         
> \par
> \dontleavehmode\blackrule[width=\hsize]       \par
> \dontleavehmode\blackrule[width=\localhsize]  \par
> \dontleavehmode\blackrule[width=\textwidth]   \par
> \dontleavehmode\blackrule[width=\makeupwidth] \par
> \dontleavehmode\ruledhbox to \hsize      {x\hss x} \par
> \dontleavehmode\ruledhbox to \localhsize {x\hss x} \par
> \dontleavehmode\ruledhbox to \textwidth  {x\hss x} \par
> \dontleavehmode\ruledhbox to \makeupwidth{x\hss x} \par
> \stopbuffer
>  \starttext
>  \startitemize
>     \startitem
>         \getbuffer
>     \stopitem
> \stopitemize
>  \getbuffer
>  \stoptext


-- 
Professor Idris Samawi Hamid
Department of Philosophy
Colorado State University
Fort Collins, CO 80523
___________________________________________________________________________________
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] 4+ messages in thread

end of thread, other threads:[~2013-05-17 23:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-17 15:03 \textwidth vs local Idris Samawi Hamid ادريس   سماوي حامد
2013-05-17 22:52 ` Hans Hagen
2013-05-17 23:08 ` Hans Hagen
2013-05-17 23:35   ` Idris Samawi Hamid ادريس   سماوي حامد

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