ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* combination with lua
@ 2021-10-11 11:38 Adam Reviczky via ntg-context
  2021-10-12 12:12 ` Hans Hagen via ntg-context
  0 siblings, 1 reply; 4+ messages in thread
From: Adam Reviczky via ntg-context @ 2021-10-11 11:38 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Adam Reviczky


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

Hi,

I am trying to use a combination figure with luacode (both with latest MKIV
and LMTX).
However, the figures do not line up in the grid of the combination.

I get the correct result with examples 1 and 2 below, but example 3 using
lua functions for combination and externalfigure is what I wanted to use in
the first place.

MWE:

\starttext

\startluacode

-- Combination 1
context.startplacefigure({title = "Figure"})
context.startcombination({nx = "2", ny = "2"},

"\\externalfigure[cow][width=50mm]","Caption 1",
"\\externalfigure[cow][width=50mm]","Caption 2",
"\\externalfigure[cow][width=50mm]","Caption 3",
"\\externalfigure[cow][width=50mm]","Caption 4"
)

context.stopcombination()
context.stopplacefigure()

-- Combination 2

context.startplacefigure({title = "Figure"})
context.startcombination({nx = "2", ny = "2"},

"Picture 1","Caption 1",
"Picture 2","Caption 2",
"Picture 3","Caption 3",
"Picture 4","Caption 4"
)

context.stopcombination()
context.stopplacefigure()

-- Combination 3

context.startplacefigure({title = "Figure"})
context.startcombination({nx = "2", ny = "2"},

context.externalfigure({"cow"},{width = "50mm"}),"Caption 1",
context.externalfigure({"cow"},{width = "50mm"}),"Caption 2",
context.externalfigure({"cow"},{width = "50mm"}),"Caption 3",
context.externalfigure({"cow"},{width = "50mm"}),"Caption 4"
)

context.stopcombination()
context.stopplacefigure()

\stopluacode
\stoptext

Any hints on what I am doing wrong in example 3?

Thanks,
Adam

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

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

end of thread, other threads:[~2021-10-12 16:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-11 11:38 combination with lua Adam Reviczky via ntg-context
2021-10-12 12:12 ` Hans Hagen via ntg-context
2021-10-12 15:22   ` Wolfgang Schuster via ntg-context
2021-10-12 16:18     ` Adam Reviczky 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).