ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Writing between lines
@ 2015-04-13  8:00 Otared Kavian
  2015-04-13 16:30 ` Hans Hagen
  0 siblings, 1 reply; 3+ messages in thread
From: Otared Kavian @ 2015-04-13  8:00 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi all,

How can one write in small print something between lines, in an efficient manner?
I have come up with the following:
	\define[1]\betweenlines{${\rlap{{\mbox{\darkgray{\infofont #1}}}\atop{}}\atop{}}$}
in order to make visible certain informations just above a cited reference. But the use of \atop which a macro for mathmode, together with \mbos, doesn’t seem a wise idea. 

has any one a better idea how to obtain the same result?

A minimal example of its use follows
Best regards: OK	

%%%% begin write-between-lines.tex
\define[1]\betweenlines{${\rlap{{\mbox{\darkgray{\infofont #1}}}\atop{}}\atop{}}$}

\def\placeformularef[#1]{\doifmode{proofreading}%
	{\inrightmargin{\infofont #1}}%
	\placeformula[#1]}

\definereferenceformat[Eqref][left=(,right=)] 
\def\eqref[#1]{\betweenlines{#1}\Eqref[#1]}

\setupformulas[location=right]

\enablemode[proofreading]

\starttext
We have
\placeformularef[eq:Square]
\startformula
a^2 + 2ab + b^2 = (a + b)^2,
\stopformula
for $a,b\in {\Bbb C}$. Also,
\placeformularef[eq:Identity]
\startformula
\alpha^2 -2\alpha\beta + \beta^2 \NC = (\alpha - \beta)^2. 
\stopformula  
Note that \eqref[eq:Square] is true whenever we have $ab = ba$ for $b,a \in {\Bbb A}$. This is not the case when ${\Bbb A}$ is the ring of the matrices.
It is clear that \eqref[eq:Identity] is a consequence of \eqref[eq:Square].

\stoptext
%%%% begin write-between-lines.tex
___________________________________________________________________________________
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] 3+ messages in thread

* Re: Writing between lines
  2015-04-13  8:00 Writing between lines Otared Kavian
@ 2015-04-13 16:30 ` Hans Hagen
  2015-04-13 17:16   ` Otared Kavian
  0 siblings, 1 reply; 3+ messages in thread
From: Hans Hagen @ 2015-04-13 16:30 UTC (permalink / raw)
  To: ntg-context

On 4/13/2015 10:00 AM, Otared Kavian wrote:
> Hi all,
>
> How can one write in small print something between lines, in an efficient manner?
> I have come up with the following:
> 	\define[1]\betweenlines{${\rlap{{\mbox{\darkgray{\infofont #1}}}\atop{}}\atop{}}$}
> in order to make visible certain informations just above a cited reference. But the use of \atop which a macro for mathmode, together with \mbos, doesn’t seem a wise idea.
>
> has any one a better idea how to obtain the same result?

pushing stuff in between will probably mess up spacing etc etc so if you 
follow that route just accept that your proof is not what you will 
eventually get

anyway, i added some ref tracing to the upcoming beta

(1) \showreferences : just shows labels of references as well as 
destinations
(2) \usemodule[references-show] : does the same but also shows a list 
per page

both work ok with

\enabletrackers[nodes.references,nodes.destinations]

> A minimal example of its use follows
> Best regards: OK	
>
> %%%% begin write-between-lines.tex
> \define[1]\betweenlines{${\rlap{{\mbox{\darkgray{\infofont #1}}}\atop{}}\atop{}}$}
>
> \def\placeformularef[#1]{\doifmode{proofreading}%
> 	{\inrightmargin{\infofont #1}}%
> 	\placeformula[#1]}
>
> \definereferenceformat[Eqref][left=(,right=)]
> \def\eqref[#1]{\betweenlines{#1}\Eqref[#1]}
>
> \setupformulas[location=right]
>
> \enablemode[proofreading]
>
> \starttext
> We have
> \placeformularef[eq:Square]
> \startformula
> a^2 + 2ab + b^2 = (a + b)^2,
> \stopformula
> for $a,b\in {\Bbb C}$. Also,
> \placeformularef[eq:Identity]
> \startformula
> \alpha^2 -2\alpha\beta + \beta^2 \NC = (\alpha - \beta)^2.
> \stopformula
> Note that \eqref[eq:Square] is true whenever we have $ab = ba$ for $b,a \in {\Bbb A}$. This is not the case when ${\Bbb A}$ is the ring of the matrices.
> It is clear that \eqref[eq:Identity] is a consequence of \eqref[eq:Square].
>
> \stoptext
> %%%% begin write-between-lines.tex
> ___________________________________________________________________________________
> 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
> ___________________________________________________________________________________
>


-- 

-----------------------------------------------------------------
                                           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] 3+ messages in thread

* Re: Writing between lines
  2015-04-13 16:30 ` Hans Hagen
@ 2015-04-13 17:16   ` Otared Kavian
  0 siblings, 0 replies; 3+ messages in thread
From: Otared Kavian @ 2015-04-13 17:16 UTC (permalink / raw)
  To: mailing list for ConTeXt users


> On 13 Apr 2015, at 18:30, Hans Hagen <pragma@wxs.nl> wrote:
> 
> […]
> pushing stuff in between will probably mess up spacing etc etc so if you follow that route just accept that your proof is not what you will eventually get
> 
> anyway, i added some ref tracing to the upcoming beta
> 
> (1) \showreferences : just shows labels of references as well as destinations
> (2) \usemodule[references-show] : does the same but also shows a list per page
> 
> both work ok with
> 
> \enabletrackers[nodes.references,nodes.destinations]

Dear Hans,

Many thanks for your new solution! Indeed a built-in feature is much much better than a poor hack…
As soon as the upcoming beta is available, I'll experiment the new feature and then I’ll wikify about it.

Best regards: OK
___________________________________________________________________________________
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] 3+ messages in thread

end of thread, other threads:[~2015-04-13 17:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-13  8:00 Writing between lines Otared Kavian
2015-04-13 16:30 ` Hans Hagen
2015-04-13 17:16   ` Otared Kavian

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