* Achieving the effect of \overset outside math mode
@ 2021-11-12 2:47 kauśika via ntg-context
2021-11-12 2:49 ` kauśika via ntg-context
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: kauśika via ntg-context @ 2021-11-12 2:47 UTC (permalink / raw)
To: ntg-context; +Cc: kauśika
Dear list,
I don't have a MWE per se, but as the title suggests, I want to be able to
achieve the effect of \overset outside math mode. As I understand, \overset
itself is implemented using \mathop and \limits.
Currently to achieve this I have defined some macros using \offset thus :
\define[1]\pabv{\dontleavehmode\offset[width=0em,y=-16pt,x=3pt]{#1}}
Unfortunately, I have to hard code the x values. So I have define several such
macros with different offsets. Not an elegant solution, but it is what I could
muster.
So, my objective is to place a smaller piece of text above another larger
piece of text so that the text above is centered w.r.t the text below.
Please advise.
Thanks,
kauśika
___________________________________________________________________________________
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://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Achieving the effect of \overset outside math mode
2021-11-12 2:47 Achieving the effect of \overset outside math mode kauśika via ntg-context
@ 2021-11-12 2:49 ` kauśika via ntg-context
2021-11-12 3:02 ` Rik Kabel via ntg-context
2021-11-12 4:45 ` Aditya Mahajan via ntg-context
2 siblings, 0 replies; 8+ messages in thread
From: kauśika via ntg-context @ 2021-11-12 2:49 UTC (permalink / raw)
To: ntg-context; +Cc: kauśika
On Friday, November 12, 2021 8:17:24 AM IST kauśika wrote:
> Dear list,
>
> I don't have a MWE per se, but as the title suggests, I want to be able to
> achieve the effect of \overset outside math mode. As I understand, \overset
> itself is implemented using \mathop and \limits.
>
> Currently to achieve this I have defined some macros using \offset thus :
> \define[1]\pabv{\dontleavehmode\offset[width=0em,y=-16pt,x=3pt]{#1}}
> Unfortunately, I have to hard code the x values. So I have define several such
> macros with different offsets. Not an elegant solution, but it is what I could
> muster.
>
> So, my objective is to place a smaller piece of text above another larger
> piece of text so that the text above is centered w.r.t the text below.
>
> Please advise.
>
> Thanks,
> kauśika
I was able to get some working examples using the second answer here:
https://tex.stackexchange.com/questions/42456/creating-non-math-mode-substitutes-for-overset-and-underset-not-dependent-on-t
But, I was just curious if there is a more elegant ConTeXt specific way to achieve this.
Thanks,
kauśika
___________________________________________________________________________________
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://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Achieving the effect of \overset outside math mode
2021-11-12 2:47 Achieving the effect of \overset outside math mode kauśika via ntg-context
2021-11-12 2:49 ` kauśika via ntg-context
@ 2021-11-12 3:02 ` Rik Kabel via ntg-context
2021-11-12 3:20 ` kauśika via ntg-context
2021-11-12 4:45 ` Aditya Mahajan via ntg-context
2 siblings, 1 reply; 8+ messages in thread
From: Rik Kabel via ntg-context @ 2021-11-12 3:02 UTC (permalink / raw)
To: ntg-context; +Cc: Rik Kabel
On 2021-11-11 21:47, kauśika via ntg-context wrote:
> Dear list,
>
> I don't have a MWE per se, but as the title suggests, I want to be able to
> achieve the effect of \overset outside math mode. As I understand, \overset
> itself is implemented using \mathop and \limits.
>
> Currently to achieve this I have defined some macros using \offset thus :
> \define[1]\pabv{\dontleavehmode\offset[width=0em,y=-16pt,x=3pt]{#1}}
> Unfortunately, I have to hard code the x values. So I have define several such
> macros with different offsets. Not an elegant solution, but it is what I could
> muster.
>
> So, my objective is to place a smaller piece of text above another larger
> piece of text so that the text above is centered w.r.t the text below.
>
> Please advise.
>
> Thanks,
> kauśika
Search for defineruby on the mailing list archives.
--
Rik
___________________________________________________________________________________
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://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Achieving the effect of \overset outside math mode
2021-11-12 3:02 ` Rik Kabel via ntg-context
@ 2021-11-12 3:20 ` kauśika via ntg-context
0 siblings, 0 replies; 8+ messages in thread
From: kauśika via ntg-context @ 2021-11-12 3:20 UTC (permalink / raw)
To: ntg-context; +Cc: kauśika, Rik Kabel via ntg-context
On Friday, November 12, 2021 8:32:17 AM IST Rik Kabel via ntg-context wrote:
> Search for defineruby on the mailing list archives.
>
> --
> Rik
Dear Rik,
First of all, thank you for the quick response! Wow! With the very first search
result itself, I was able to achieve what I wanted.
ConTeXt is a gift that keeps on giving! Simply fantastic! This made my day!
Many thanks,
kauśika
___________________________________________________________________________________
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://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Achieving the effect of \overset outside math mode
2021-11-12 2:47 Achieving the effect of \overset outside math mode kauśika via ntg-context
2021-11-12 2:49 ` kauśika via ntg-context
2021-11-12 3:02 ` Rik Kabel via ntg-context
@ 2021-11-12 4:45 ` Aditya Mahajan via ntg-context
2021-11-12 5:34 ` Wolfgang Schuster via ntg-context
2 siblings, 1 reply; 8+ messages in thread
From: Aditya Mahajan via ntg-context @ 2021-11-12 4:45 UTC (permalink / raw)
To: kauśika via ntg-context; +Cc: Aditya Mahajan
[-- Attachment #1: Type: text/plain, Size: 973 bytes --]
On Fri, 12 Nov 2021, kauśika via ntg-context wrote:
> Dear list,
>
> I don't have a MWE per se, but as the title suggests, I want to be able to
> achieve the effect of \overset outside math mode. As I understand, \overset
> itself is implemented using \mathop and \limits.
>
> Currently to achieve this I have defined some macros using \offset thus :
> \define[1]\pabv{\dontleavehmode\offset[width=0em,y=-16pt,x=3pt]{#1}}
> Unfortunately, I have to hard code the x values. So I have define several such
> macros with different offsets. Not an elegant solution, but it is what I could
> muster.
>
> So, my objective is to place a smaller piece of text above another larger
> piece of text so that the text above is centered w.r.t the text below.
Wolfgang has a ruby module, which provides this feature.
https://ctan.org/pkg/context-ruby
Doc: https://ctan.org/tex-archive/macros/context/contrib/context-ruby/doc/context/third/ruby
Aditya
[-- Attachment #2: Type: text/plain, Size: 493 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://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Achieving the effect of \overset outside math mode
2021-11-12 4:45 ` Aditya Mahajan via ntg-context
@ 2021-11-12 5:34 ` Wolfgang Schuster via ntg-context
2021-11-12 6:25 ` kauśika via ntg-context
2021-11-12 6:26 ` kauśika via ntg-context
0 siblings, 2 replies; 8+ messages in thread
From: Wolfgang Schuster via ntg-context @ 2021-11-12 5:34 UTC (permalink / raw)
To: mailing list for ConTeXt users, Aditya Mahajan via ntg-context
Cc: Wolfgang Schuster
Aditya Mahajan via ntg-context schrieb am 12.11.2021 um 05:45:
> On Fri, 12 Nov 2021, kauśika via ntg-context wrote:
>
>> Dear list,
>>
>> I don't have a MWE per se, but as the title suggests, I want to be able to
>> achieve the effect of \overset outside math mode. As I understand, \overset
>> itself is implemented using \mathop and \limits.
>>
>> Currently to achieve this I have defined some macros using \offset thus :
>> \define[1]\pabv{\dontleavehmode\offset[width=0em,y=-16pt,x=3pt]{#1}}
>> Unfortunately, I have to hard code the x values. So I have define several such
>> macros with different offsets. Not an elegant solution, but it is what I could
>> muster.
>>
>> So, my objective is to place a smaller piece of text above another larger
>> piece of text so that the text above is centered w.r.t the text below.
> Wolfgang has a ruby module, which provides this feature.
>
> https://ctan.org/pkg/context-ruby
>
> Doc: https://ctan.org/tex-archive/macros/context/contrib/context-ruby/doc/context/third/ruby
Use the built-in \ruby function, the module broke at some point after
Hans added a similar function himself and I never fixed my own code
afterwards.
Wolfgang
___________________________________________________________________________________
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://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Achieving the effect of \overset outside math mode
2021-11-12 5:34 ` Wolfgang Schuster via ntg-context
@ 2021-11-12 6:25 ` kauśika via ntg-context
2021-11-12 6:26 ` kauśika via ntg-context
1 sibling, 0 replies; 8+ messages in thread
From: kauśika via ntg-context @ 2021-11-12 6:25 UTC (permalink / raw)
To: mailing list for ConTeXt users, Aditya Mahajan via ntg-context
Cc: kauśika, Wolfgang Schuster via ntg-context
On Friday, November 12, 2021 11:04:20 AM IST Wolfgang Schuster via ntg-context
wrote:
> Aditya Mahajan via ntg-context schrieb am 12.11.2021 um 05:45:
> > On Fri, 12 Nov 2021, kauśika via ntg-context wrote:
> >> Dear list,
> >>
> >> I don't have a MWE per se, but as the title suggests, I want to be able
> >> to
> >> achieve the effect of \overset outside math mode. As I understand,
> >> \overset
> >> itself is implemented using \mathop and \limits.
> >>
> >> Currently to achieve this I have defined some macros using \offset thus :
> >> \define[1]\pabv{\dontleavehmode\offset[width=0em,y=-16pt,x=3pt]{#1}}
> >> Unfortunately, I have to hard code the x values. So I have define several
> >> such macros with different offsets. Not an elegant solution, but it is
> >> what I could muster.
> >>
> >> So, my objective is to place a smaller piece of text above another larger
> >> piece of text so that the text above is centered w.r.t the text below.
> >
> > Wolfgang has a ruby module, which provides this feature.
> >
> > https://ctan.org/pkg/context-ruby
> >
> > Doc:
> > https://ctan.org/tex-archive/macros/context/contrib/context-ruby/doc/cont
> > ext/third/ruby
> Use the built-in \ruby function, the module broke at some point after
> Hans added a similar function himself and I never fixed my own code
> afterwards.
>
> Wolfgang
>
> ____________________________________________________________________________
> _______ 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://context.aanhet.net
> archive : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ____________________________________________________________________________
> _______
Thanks Aditya and Wolfgang! After following Rik's initial response, I am now
using the \ruby function in LMTX to achieve this.
Thanks,
kauśika
___________________________________________________________________________________
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://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Achieving the effect of \overset outside math mode
2021-11-12 5:34 ` Wolfgang Schuster via ntg-context
2021-11-12 6:25 ` kauśika via ntg-context
@ 2021-11-12 6:26 ` kauśika via ntg-context
1 sibling, 0 replies; 8+ messages in thread
From: kauśika via ntg-context @ 2021-11-12 6:26 UTC (permalink / raw)
To: mailing list for ConTeXt users, Aditya Mahajan via ntg-context
Cc: kauśika, Wolfgang Schuster via ntg-context
On Friday, November 12, 2021 11:04:20 AM IST Wolfgang Schuster via ntg-context
wrote:
> Aditya Mahajan via ntg-context schrieb am 12.11.2021 um 05:45:
> > On Fri, 12 Nov 2021, kauśika via ntg-context wrote:
> >> Dear list,
> >>
> >> I don't have a MWE per se, but as the title suggests, I want to be able
> >> to
> >> achieve the effect of \overset outside math mode. As I understand,
> >> \overset
> >> itself is implemented using \mathop and \limits.
> >>
> >> Currently to achieve this I have defined some macros using \offset thus :
> >> \define[1]\pabv{\dontleavehmode\offset[width=0em,y=-16pt,x=3pt]{#1}}
> >> Unfortunately, I have to hard code the x values. So I have define several
> >> such macros with different offsets. Not an elegant solution, but it is
> >> what I could muster.
> >>
> >> So, my objective is to place a smaller piece of text above another larger
> >> piece of text so that the text above is centered w.r.t the text below.
> >
> > Wolfgang has a ruby module, which provides this feature.
> >
> > https://ctan.org/pkg/context-ruby
> >
> > Doc:
> > https://ctan.org/tex-archive/macros/context/contrib/context-ruby/doc/cont
> > ext/third/ruby
> Use the built-in \ruby function, the module broke at some point after
> Hans added a similar function himself and I never fixed my own code
> afterwards.
>
> Wolfgang
>
> ____________________________________________________________________________
> _______ 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://context.aanhet.net
> archive : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ____________________________________________________________________________
> _______
Thanks Aditya and Wolfgang! I am now using the \ruby function in LMTX to
achieve this.
Thanks,
kauśika
___________________________________________________________________________________
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://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2021-11-12 6:26 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-12 2:47 Achieving the effect of \overset outside math mode kauśika via ntg-context
2021-11-12 2:49 ` kauśika via ntg-context
2021-11-12 3:02 ` Rik Kabel via ntg-context
2021-11-12 3:20 ` kauśika via ntg-context
2021-11-12 4:45 ` Aditya Mahajan via ntg-context
2021-11-12 5:34 ` Wolfgang Schuster via ntg-context
2021-11-12 6:25 ` kauśika via ntg-context
2021-11-12 6:26 ` kauśika via ntg-context
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).