ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* [NTG-context] Inline figures
@ 2025-09-14 23:43 Matthias Weber
  2025-09-15  6:28 ` [NTG-context] " Henning Hraban Ramm
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Matthias Weber @ 2025-09-14 23:43 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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

Dear All, 

I am occasionally using inline figures instead of characters/words where it seems suggestive and appropriate(to me), like in the example below:

 \setupexternalfigures[location=default]
 \starttext
Can the \im{12\times 9} rectangle be tiled with the  \externalfigure[cow.pdf][inline]{}-hexomino?
\stoptext

(I am actually using instead of cow.pdf the attached file R-hexomino.pdf, in case someone is interested in what this is good for)

Two questions: The inline figure is a little bit raised and too big. How can I lower and scale it?

Also, adding alternativetext={Cow} after inline undoes the inline effect. Is it possible to have an alternative text for inline images?

Or are there other options I should consider?

Thanks,

Matthias



[-- Attachment #2: R-hexomino.pdf --]
[-- Type: application/pdf, Size: 7475 bytes --]

[-- Attachment #3: Type: text/plain, Size: 511 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [NTG-context] Re: Inline figures
  2025-09-14 23:43 [NTG-context] Inline figures Matthias Weber
@ 2025-09-15  6:28 ` Henning Hraban Ramm
  2025-09-15  6:36 ` Henning Hraban Ramm
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Henning Hraban Ramm @ 2025-09-15  6:28 UTC (permalink / raw)
  To: ntg-context

Am 15.09.25 um 01:43 schrieb Matthias Weber:
> Dear All,
> 
> I am occasionally using inline figures instead of characters/words where it seems suggestive and appropriate(to me), like in the example below:
> 
>   \setupexternalfigures[location=default]
>   \starttext
> Can the \im{12\times 9} rectangle be tiled with the  \externalfigure[cow.pdf][inline]{}-hexomino?
> \stoptext
> 
> (I am actually using instead of cow.pdf the attached file R-hexomino.pdf, in case someone is interested in what this is good for)
> 
> Two questions: The inline figure is a little bit raised and too big. How can I lower and scale it?

Look up \offset and \scale.

But you won’t need the latter; "inline" just sets the height to 
\bodyfontsize (or similar, didn’t check).

> Also, adding alternativetext={Cow} after inline undoes the inline effect. Is it possible to have an alternative text for inline images?

I guess the problem is that you can’t mix keyword and key=value options 
within one pair of brackets.


HTH
Hraban
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [NTG-context] Re: Inline figures
  2025-09-14 23:43 [NTG-context] Inline figures Matthias Weber
  2025-09-15  6:28 ` [NTG-context] " Henning Hraban Ramm
@ 2025-09-15  6:36 ` Henning Hraban Ramm
  2025-09-15  8:32 ` John Was
  2025-09-15 15:14 ` Hans Hagen via ntg-context
  3 siblings, 0 replies; 6+ messages in thread
From: Henning Hraban Ramm @ 2025-09-15  6:36 UTC (permalink / raw)
  To: ntg-context

Am 15.09.25 um 01:43 schrieb Matthias Weber:
> Or are there other options I should consider?

In a similar case, I defined symbols like

\definesymbol[hexo][{\offset[bottomoffset=-.33em]{\externalfigure[R-hexomino][height=1.33em,alternativetext=hexomino 
icon]}}]

\symbol[hexo]

Hraban
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [NTG-context] Re: Inline figures
  2025-09-14 23:43 [NTG-context] Inline figures Matthias Weber
  2025-09-15  6:28 ` [NTG-context] " Henning Hraban Ramm
  2025-09-15  6:36 ` Henning Hraban Ramm
@ 2025-09-15  8:32 ` John Was
  2025-09-16  3:40   ` Matthias Weber
  2025-09-15 15:14 ` Hans Hagen via ntg-context
  3 siblings, 1 reply; 6+ messages in thread
From: John Was @ 2025-09-15  8:32 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 2443 bytes --]

Hello Matthias

I'm still very inexperienced with Context - and will probably have to start
again since I've been busy with other matters recently and have forgotten
nearly everything - but the following clumsy code might work until some
Contexpert comes up with a proper solution:

Can the \im{12\times 9} rectangle be tiled with
the\llap{\externalfigure[cow] [width=0pt,height=0pt,label={Here we have a
picture of a cow}]} \externalfigure[cow.pdf][inline]{}-hexomino?

If it is any good at all, it could be condensed into a cs such as:

\intextlabel{Here we have a picture of a cow}

(the cow figure could remain since it's always available and is only used
to create an invisible (zero width and height) graphic).


Best wishes

John


<http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
Virus-free.www.avg.com
<http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

On Mon, 15 Sept 2025 at 00:44, Matthias Weber <matthiasweber64@gmail.com>
wrote:

> Dear All,
>
> I am occasionally using inline figures instead of characters/words where
> it seems suggestive and appropriate(to me), like in the example below:
>
>  \setupexternalfigures[location=default]
>  \starttext
> Can the \im{12\times 9} rectangle be tiled with the
> \externalfigure[cow.pdf][inline]{}-hexomino?
> \stoptext
>
> (I am actually using instead of cow.pdf the attached file R-hexomino.pdf,
> in case someone is interested in what this is good for)
>
> Two questions: The inline figure is a little bit raised and too big. How
> can I lower and scale it?
>
> Also, adding alternativetext={Cow} after inline undoes the inline effect.
> Is it possible to have an alternative text for inline images?
>
> Or are there other options I should consider?
>
> Thanks,
>
> Matthias
>
>
>
> ___________________________________________________________________________________
> 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
>
> ___________________________________________________________________________________
>

[-- Attachment #1.2: Type: text/html, Size: 5030 bytes --]

[-- Attachment #2: Type: text/plain, Size: 511 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [NTG-context] Re: Inline figures
  2025-09-14 23:43 [NTG-context] Inline figures Matthias Weber
                   ` (2 preceding siblings ...)
  2025-09-15  8:32 ` John Was
@ 2025-09-15 15:14 ` Hans Hagen via ntg-context
  3 siblings, 0 replies; 6+ messages in thread
From: Hans Hagen via ntg-context @ 2025-09-15 15:14 UTC (permalink / raw)
  To: ntg-context; +Cc: Hans Hagen

On 9/15/2025 1:43 AM, Matthias Weber wrote:
> Dear All,
> 
> I am occasionally using inline figures instead of characters/words where it seems suggestive and appropriate(to me), like in the example below:
> 
>   \setupexternalfigures[location=default]
>   \starttext
> Can the \im{12\times 9} rectangle be tiled with the  \externalfigure[cow.pdf][inline]{}-hexomino?
> \stoptext
> 
> (I am actually using instead of cow.pdf the attached file R-hexomino.pdf, in case someone is interested in what this is good for)
> 
> Two questions: The inline figure is a little bit raised and too big. How can I lower and scale it?
> 
> Also, adding alternativetext={Cow} after inline undoes the inline effect. Is it possible to have an alternative text for inline images?
> 
> Or are there other options I should consider?

\defineexternalfigure
   [myilf]
   [height=lh,
    frame=on,
    location=depth]

\starttext
     test {\showstruts\strut} \externalfigure[t:/sources/cow.pdf][myilf] 
test
\stoptext



-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | 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 / 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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [NTG-context] Re: Inline figures
  2025-09-15  8:32 ` John Was
@ 2025-09-16  3:40   ` Matthias Weber
  0 siblings, 0 replies; 6+ messages in thread
From: Matthias Weber @ 2025-09-16  3:40 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 3418 bytes --]

Thanks Hans, Henning, and John,

This has been very helpful!

Matthias 

> On Sep 15, 2025, at 4:32 AM, John Was <johnoxuk@gmail.com> wrote:
> 
> Hello Matthias
> 
> I'm still very inexperienced with Context - and will probably have to start again since I've been busy with other matters recently and have forgotten nearly everything - but the following clumsy code might work until some Contexpert comes up with a proper solution:
> 
> Can the \im{12\times 9} rectangle be tiled with the\llap{\externalfigure[cow] [width=0pt,height=0pt,label={Here we have a picture of a cow}]} \externalfigure[cow.pdf][inline]{}-hexomino?
> 
> 
> If it is any good at all, it could be condensed into a cs such as:
> 
> \intextlabel{Here we have a picture of a cow} 
> 
> (the cow figure could remain since it's always available and is only used to create an invisible (zero width and height) graphic).
> 
> 
> Best wishes
> 
> John 
> 
> 
>  <http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>	Virus-free.www.avg.com <http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail> <x-msg://8/#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
> On Mon, 15 Sept 2025 at 00:44, Matthias Weber <matthiasweber64@gmail.com <mailto:matthiasweber64@gmail.com>> wrote:
>> Dear All, 
>> 
>> I am occasionally using inline figures instead of characters/words where it seems suggestive and appropriate(to me), like in the example below:
>> 
>>  \setupexternalfigures[location=default]
>>  \starttext
>> Can the \im{12\times 9} rectangle be tiled with the  \externalfigure[cow.pdf][inline]{}-hexomino?
>> \stoptext
>> 
>> (I am actually using instead of cow.pdf the attached file R-hexomino.pdf, in case someone is interested in what this is good for)
>> 
>> Two questions: The inline figure is a little bit raised and too big. How can I lower and scale it?
>> 
>> Also, adding alternativetext={Cow} after inline undoes the inline effect. Is it possible to have an alternative text for inline images?
>> 
>> Or are there other options I should consider?
>> 
>> Thanks,
>> 
>> Matthias
>> 
>> 
>> ___________________________________________________________________________________
>> If your question is of interest to others as well, please add an entry to the Wiki!
>> 
>> maillist : ntg-context@ntg.nl <mailto:ntg-context@ntg.nl> / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
>> webpage  : https://www.pragma-ade.nl <https://www.pragma-ade.nl/> / https://context.aanhet.net <https://context.aanhet.net/> (mirror)
>> archive  : https://github.com/contextgarden/context
>> wiki     : https://wiki.contextgarden.net <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
> ___________________________________________________________________________________


[-- Attachment #1.2: Type: text/html, Size: 6201 bytes --]

[-- Attachment #2: Type: text/plain, Size: 511 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2025-09-16  3:46 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-14 23:43 [NTG-context] Inline figures Matthias Weber
2025-09-15  6:28 ` [NTG-context] " Henning Hraban Ramm
2025-09-15  6:36 ` Henning Hraban Ramm
2025-09-15  8:32 ` John Was
2025-09-16  3:40   ` Matthias Weber
2025-09-15 15:14 ` Hans Hagen 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).