Re: FWD: [NTG-context] \inmargin, \setupindenting, and overfull boxes

2005-05-09 Thread Hans Hagen
Taco Hoekwater wrote:
If there are a lot of margin notes, this can clutter the output
considerably, and that's not so much a problem, but an annoyance.
I've run into this as well, in context as well as in latex and
in my own macros. The problem is usually something like:
i've added a \dontcomplain to the main macro now
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
-
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


RE: FWD: [NTG-context] \inmargin, \setupindenting, and overfull boxes

2005-05-09 Thread Idris Samawi Hamid
Hi Hans

Could you send me/post a copy of the modified macro/file (I'm at a 
mission-critical stage on a project and don't want to install a new beta 
before it's 
done unless absolutely necessary-)

Also, is there a similar \dontcomplain fix for \start-\stopalignment[left] 
(underfull hbox)?

Idris
= Original Message From Hans Hagen [EMAIL PROTECTED] =
 If there are a lot of margin notes, this can clutter the output
 considerably, and that's not so much a problem, but an annoyance.
 I've run into this as well, in context as well as in latex and
 in my own macros. The problem is usually something like:

i've added a \dontcomplain to the main macro now


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

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: FWD: [NTG-context] \inmargin, \setupindenting, and overfull boxes

2005-05-08 Thread Taco Hoekwater
Idris Samawi Hamid wrote:
Taco, any more hacks up your sleeve?
;-)
And thank you very much for the last ones!
It seems you have a working solution now, but
I'll look into this next week to see if I we can
come up with a more permanent solution.
Greetings, Taco
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: FWD: [NTG-context] \inmargin, \setupindenting, and overfull boxes

2005-05-08 Thread Hans Hagen
Idris Samawi Hamid wrote:
CORRECTION: should be
===
\let\normalinmargin\inmargin
\def\inmargin#1{{\parindent0pt \normalinmargin{#1}}}
\def\INMARGIN#1{{\advance\leftskip by -2\parindent
\inmargin{#1}
\advance\rightskip by -2\parindent}}
===
can you make me a minimal example showing the problem?
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
-
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: FWD: [NTG-context] \inmargin, \setupindenting, and overfull boxes

2005-05-08 Thread Taco Hoekwater
Hans Hagen wrote:
can you make me a minimal example showing the problem?
Idris' original example shows the 'problem':
  \setupindenting[medium]
  \starttext
  \input knuth \inmargin{This is a test.}
  \stoptext
The output will be fine, but there will be one  'Overfull hbox'
message printed on the terminal for each \inmargin command.
If there are a lot of margin notes, this can clutter the output
considerably, and that's not so much a problem, but an annoyance.
I've run into this as well, in context as well as in latex and
in my own macros. The problem is usually something like:
   \vbox{\hsize 0pt \dontleavehmode}
Greetings, Taco

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


RE: FWD: [NTG-context] \inmargin, \setupindenting, and overfull boxes

2005-05-08 Thread Idris Samawi Hamid
= Original Message From Hans Hagen [EMAIL PROTECTED] =
can you make me a minimal example showing the problem?

Sure, here are 2: both produce overfull hboxes.

All the best
Idris
==
\setupoutput[pdftex]%

\setupindenting[medium]

\starttext

\input knuth \inmargin{This is a test.}

\stoptext


log=
systems : begin file test at line 5
(c:\CONTEXT\tex\texmf-local/tex/context/sample/knuth.tex)
Overfull \hbox (17.62474pt too wide) in paragraph at lines 7--7
[][]

\hbox(10.41603+4.05064)x0.0
.\hbox(0.0+0.0)x17.62474
.\hbox(10.41603+4.05064)x0.0
.\rule(10.41603+4.05064)x0.0
.\glue 0.0 plus 1.0fil minus 1.0fil
.\penalty 1
.\glue(\parfillskip) 0.0 plus 1.0fil
.\glue(\rightskip) 0.0
===

===
\setupoutput[pdftex]%

\definestartstop
[quote]
[before={\startnarrower[1*left,1*right]\blank[big]},
after={\stopnarrower\blank[big]}]

\starttext

\startquote

\input knuth \inmargin{This is a test.}

\stopquote

\stoptext
==


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

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: FWD: [NTG-context] \inmargin, \setupindenting, and overfull boxes

2005-05-07 Thread Taco Hoekwater
Idris Samawi Hamid wrote:
Hi Taco,
Ok your hack works for small files but in my larger work this is causing TeX's 
capacity to overload (indeed, I don't think I've run into this particular 
overload message before; does the `255' signify some ceiling here?):
The definition is not recursive, but it should not be executed more 
than once because it saves the definition of \inmargin. Perhaps 
you have the \let line inside another macro or inside a buffer that 
is called more than once something similar.

If you can't figure out what goes wrong, send me a file please?
Taco
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: FWD: [NTG-context] \inmargin, \setupindenting, and overfull boxes

2005-05-07 Thread Taco Hoekwater
Idris Samawi Hamid wrote:
I placed your definition in a \start-\stopenvironment file. The \inmargins are 
in \product files each of which calls the environment file in its preamble. If 
I compile just one product (say the second \product from the project), there 
appears to be no problem. But if I compile the entire project, TeX chokes on 
that same product.

Do you think this may be the problem?
Yes, because the environment file is read twice, you need a guard against 
redefining the redefinition. Placing a guard around it, like this, should work:
 \expandafter\ifx\csname normalinmargin \endcsname  \relax \else
   \let\normalinmargin\inmargin
   \def\inmargin#1{{\parindent0pt \normalinmargin{#1}}}
 \fi
(yes, that is an ugly hack, but it is one I can write withour actually having 
to test it before sending :))
Greetings, Taco
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


RE: FWD: [NTG-context] \inmargin, \setupindenting, and overfull boxes

2005-05-07 Thread Idris Samawi Hamid
Hi Taco and all,

More on \inmargin and overfull boxes: If I define, e.g. a quote \start-stop 
the overfull boxes come back, even with Taco's definition:

==
\setupoutput[pdftex]%
\setupindenting[medium]

\let\normalinmargin\inmargin
\def\inmargin#1{{\parindent0pt\normalinmargin{#1}}}

\definestartstop
  [quote]
  [before={\startnarrower[1*left,1*right]\blank[big]},
after={\stopnarrower\blank[big]}]

\starttext

\startquote

\input knuth \inmargin{This is a test.}

\input knuth {\parindent0pt\inmargin{This is a test.}}

\stopquote

\stoptext
==

Taco, any more hacks up your sleeve?
;-)

And thank you very much for the last ones!

Best
Idris


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

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


RE: FWD: [NTG-context] \inmargin, \setupindenting, and overfull boxes

2005-05-07 Thread Idris Samawi Hamid
Hi Taco and all,

I found a temporary solution: Given a \start-\stopnarrower environment like

===
\definestartstop
  [quote]
  [before={\startnarrower[1*middle]\blank[big]},
after={\stopnarrower\blank[big]}]
===

Then the following will avoid the overfull box:

===
\let\normalinmargin\inmargin
\def\inmargin#1{{\parindent0pt \normalinmargin{#1}}}

\def\INMARGIN#1{\advance\leftskip by -2\parindent
\inmargin{#1}
\advance\rightskip by -2\parindent}
===

Of course this solution is not general, and depends on the actual setup of 
\start-\stopnarrower. The general problem with \inmargin appears to be that 
all parindents need to be reset.

I could not find a correct way to incorporate my solution above into Taco's 
original definition. If any of you have a better idea, please let me know!

Best
Idris


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

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


RE: FWD: [NTG-context] \inmargin, \setupindenting, and overfull boxes

2005-05-07 Thread Idris Samawi Hamid
CORRECTION: should be

===
\let\normalinmargin\inmargin
\def\inmargin#1{{\parindent0pt \normalinmargin{#1}}}

\def\INMARGIN#1{{\advance\leftskip by -2\parindent
\inmargin{#1}
\advance\rightskip by -2\parindent}}
===


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

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: Fwd: [NTG-context] \inmargin, \setupindenting, and overfull boxes

2005-05-06 Thread Taco Hoekwater
Hi Idris,
It's definately a \parindent, but I cannot figure whence it came.
Anyway, if you need an immediate fix, the following hack works:
  \let\normalinmargin\inmargin
  \def\inmargin#1{{\parindent0pt \normalinmargin{#1}}}
Greetings, Taco
Idris Samawi Hamid wrote:
Hi gang,
I sent this about ten days ago; trying again:-)
Best
Idris
--- Forwarded message ---
Dear cartel,
Here is one for you-) If you uncomment the \setupindenting you will get an
overfull hbox; a real nuisance when you have dozens of \inmargin's...
Awaiting advice:-)
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: Fwd: [NTG-context] \inmargin, \setupindenting, and overfull boxes

2005-05-06 Thread Idris Samawi Hamid
Hi Taco,
On Fri, 06 May 2005 08:46:04 +0200, Taco Hoekwater [EMAIL PROTECTED] 
wrote:

Hi Idris,
It's definately a \parindent, but I cannot figure whence it came.
Anyway, if you need an immediate fix, the following hack works:
   \let\normalinmargin\inmargin
   \def\inmargin#1{{\parindent0pt \normalinmargin{#1}}}
Thank you for the fix; I'll test it after work.
This is interesting, because the original output looks fine in the 
argument to \inmargin, there is no actual indentation going on...

Thnx again
Idris
--- Forwarded message ---
Dear cartel,
Here is one for you-) If you uncomment the \setupindenting you will get 
an
overfull hbox; a real nuisance when you have dozens of \inmargin's...
--
Professor Idris Samawi Hamid
Department of Philosophy
Colorado State University
Fort Collins, CO 80523
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


RE: FWD: [NTG-context] \inmargin, \setupindenting, and overfull boxes

2005-05-06 Thread Idris Samawi Hamid
Hi Taco,

Ok your hack works for small files but in my larger work this is causing TeX's 
capacity to overload (indeed, I don't think I've run into this particular 
overload message before; does the `255' signify some ceiling here?):

===
! TeX capacity exceeded, sorry [grouping levels=255].
\normalinmargin #1-{
 \parindent 0pt \normalinmargin {#1}}
\normalinmargin ...indent 0pt \normalinmargin {#1}
  }
\normalinmargin ...indent 0pt \normalinmargin {#1}
  }
\normalinmargin ...indent 0pt \normalinmargin {#1}
  }
\normalinmargin ...indent 0pt \normalinmargin {#1}
  }
\normalinmargin ...indent 0pt \normalinmargin {#1}
  }
...
=

Although if I implement this manually it does not overload TeX:

===
\setupoutput[pdftex]%

\setupindenting[medium]

%\let\normalinmargin\inmargin
%\def\inmargin#1{{\parindent0pt \normalinmargin{#1}}}

\starttext

\input knuth {\parindent0pt\inmargin{This is a test.}}

\stoptext
===

Something about that pseudo-recursive definition I suppose? It may take a 
while for me to narrow this new problem down to a small file, but I can 
privately send you the larger files if you care to look at this.

Thnx 4 all your help.

Best
Idris

= Original Message From Taco Hoekwater [EMAIL PROTECTED] =
Hi Idris,

It's definately a \parindent, but I cannot figure whence it came.
Anyway, if you need an immediate fix, the following hack works:


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

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context