[NTG-context] Re: underbrace label across two lines

2023-12-20 Thread Dean Hung
Hi Mikael,

Thanks for your reply -- I was able to get great results after using the
\startbuffer ... \stopbuffer approach.

I'm still a bit of a beginner with ConText so I wasn't clear on what the
meaning of the $ symbols in your reply?

The reason I have been using the underbraces is for explaining how
botanical naming conventions work.
In certain fields of botany/horticulture, plant types follow certain rules
for naming.  Here is a fictitious name
as an example:

Loremphylla mikaelii forma alba 'Aditya'

Genus = Loremphylla
Species = mikaelii
botanical form = forma
Cultivar Epithet = 'Aditya'

The problem I was running into was the labels might have more words than
can be contained within the space allotted
on one line (i.e., Cultivar Epithet would not fit in the space on the same
line, and hence my question on how to force a \crlf
between those two words).

Best,

Dean


On Wed, Dec 20, 2023 at 2:27 AM Mikael Sundqvist  wrote:

> Hi,
>
> On Wed, Dec 20, 2023 at 8:01 AM Dean Hung  wrote:
> >
> > Hi list,
> >
> > Following on from Aditya's solution to my previous question, I have run
> into a separate issue and would appreciate any assistance.
> >
> > Sometimes text under the underbrace can become quite long, and should be
> split into two (or more) lines.  In the example below, "firstline" should
> be the top line of the underbrace label, and "secondline" should be on the
> lower line of the underbrace label, but as it stands, both are printed on
> the same line.
> >
> > \underbrace[mindepth=0.5cm]{\tf x+y+z}_{\vrule width 0pt height
> 0.5cm\relax\text{firstline secondline}}
> >
> > I have tried using \\ and \crlf, but to no avail.
> >
> > Any help would be greatly appreciated!
> >
> > Dean
>
> Hi,
>
> Hans will add some annotation mechanism (already on my computer to
> test a bit). In your case you can use the first example here:
>
> \startbuffer
> \unframed
> [align=middle,toffset=0.5cm]
> {firstline\crlf secondline}
> \stopbuffer
>
> $
> \underbrace
> [mindepth=0.5cm]
> {\tf x + y + z}
> _
> {\mtext{\getbuffer}}
>
> \quad
>
> \mathannotation
> [bottom={\getbuffer}]
> {\underbrace
> [mindepth=0.5cm]
> {\tf x + y + z}
> }
> $
>
> Since I am the curious type, I wonder a bit what is the use case here?
> Do you mind explaining and providing the complete example? (The reason
> I ask is that there might be better ways to do what you are doing.)
>
> /Mikael
>
> ___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive  : https://github.com/contextgarden/context
> wiki : https://wiki.contextgarden.net
>
> ___
>
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] underbrace label across two lines

2023-12-19 Thread Dean Hung
Hi list,

Following on from Aditya's solution to my previous question, I have run
into a separate issue and would appreciate any assistance.

Sometimes text under the underbrace can become quite long, and should be
split into two (or more) lines.  In the example below, "firstline" should
be the top line of the underbrace label, and "secondline" should be on the
lower line of the underbrace label, but as it stands, both are printed on
the same line.

\underbrace[mindepth=0.5cm]{\tf x+y+z}_{\vrule width 0pt height
0.5cm\relax\text{firstline secondline}}

I have tried using \\ and \crlf, but to no avail.

Any help would be greatly appreciated!

Dean
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: increase vertical between underbrace and equation

2023-12-18 Thread Dean Hung
Thank you, Wolfgang!

On Mon, Dec 18, 2023 at 3:13 PM Wolfgang Schuster <
wolfgang.schuster.li...@gmail.com> wrote:

> Aditya Mahajan schrieb am 18.12.2023 um 21:55:
> > On Mon, 18 Dec 2023, Aditya Mahajan wrote:
> >
> >> On Mon, 18 Dec 2023, Dean Hung wrote:
> >>
> >>> The documentation on underbrace (and overbrace, underbracket, etc...)
> in
> >>> the ContextGarden wiki seems to be very limited, and I was not able to
> find
> >>> any user-supplied arguments for increasing this vertical distance.
> >>>
> >>> There are various solutions available for LaTex, and they require
> external
> >>> packages (e.g., BigStrut, vphantom) that redefine the strut height.
> >>>
> >>> I hope I'm missing something simple... Any help would be greatly
> >>> appreciated!
> >> Hey, this is context. We don't need any packages for simple stuff:
> >>
> >> \startformula
> >> \underbrace[mindepth=1cm]{x+y+z}_{\mathrm{my text here}}
> >> \stopformula
> > Actually, realized that you want more distance in the other direction.
> One option is to use \vrule.
> >
> > \underbrace{x+y+z}_{\vrule width 0pt height 1cm\relax\mathrm{my text
> here}}
> >
> > You probably also want \text{...} instead of \mathrm{...}.
>
> \underbrace{x+y+z}_{\unframed[toffset=1cm]{my text here}}
>
> Wolfgang
>
>
> ___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive  : https://github.com/contextgarden/context
> wiki : https://wiki.contextgarden.net
>
> ___
>
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: increase vertical between underbrace and equation

2023-12-18 Thread Dean Hung
Hi Aditya,

Many thanks for the help!  It works great!

On Mon, Dec 18, 2023 at 2:41 PM Aditya Mahajan  wrote:

> On Mon, 18 Dec 2023, Dean Hung wrote:
>
> > Hi ConText friends,
> >
> > I am trying to increase the vertical distance between the underbrace and
> > the part of the equation above the underbrace.
> >
> > \startformula
> > \underbrace{x+y+z}_{\blank[1cm]\mathrm{my text here}}
> > \stopformula
> >
> > I've tried using \blank and \vspace, but to no avail.  For example:
> >
> > \underbrace{x+y+z}_{\blank[1cm]\mathrm{my text here}}
> > ...does not work.
> >
> > The documentation on underbrace (and overbrace, underbracket, etc...) in
> > the ContextGarden wiki seems to be very limited, and I was not able to
> find
> > any user-supplied arguments for increasing this vertical distance.
> >
> > There are various solutions available for LaTex, and they require
> external
> > packages (e.g., BigStrut, vphantom) that redefine the strut height.
> >
> > I hope I'm missing something simple... Any help would be greatly
> > appreciated!
>
> Hey, this is context. We don't need any packages for simple stuff:
>
> \startformula
> \underbrace[mindepth=1cm]{x+y+z}_{\mathrm{my text here}}
> \stopformula
>
>
> Aditya
>
>
>
>
> ___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive  : https://github.com/contextgarden/context
> wiki : https://wiki.contextgarden.net
>
> ___
>
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] increase vertical between underbrace and equation

2023-12-18 Thread Dean Hung
Hi ConText friends,

I am trying to increase the vertical distance between the underbrace and
the part of the equation above the underbrace.

\startformula
\underbrace{x+y+z}_{\blank[1cm]\mathrm{my text here}}
\stopformula

I've tried using \blank and \vspace, but to no avail.  For example:

\underbrace{x+y+z}_{\blank[1cm]\mathrm{my text here}}
...does not work.

The documentation on underbrace (and overbrace, underbracket, etc...) in
the ContextGarden wiki seems to be very limited, and I was not able to find
any user-supplied arguments for increasing this vertical distance.

There are various solutions available for LaTex, and they require external
packages (e.g., BigStrut, vphantom) that redefine the strut height.

I hope I'm missing something simple... Any help would be greatly
appreciated!

DY Hung
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___