LyxFun questions

Richard Kimberly Heck rikiheck at gmail.com
Sat Apr 1 16:47:32 UTC 2023


On 3/31/23 17:30, Matthew Bandy wrote:
> Dear fellow Lyx enthusiasts -
>
> I am developing some scripts that automate table creation in Lyx based 
> on database queries. I'm using lyxserver, but I am running into some 
> issues. Please help!
>
> The following commands will insert a 1x2 table and populate the first 
> cell with some text and the second with a graphics inset.
>
> LYXCMD:copilot:tabular-insert:1 2
> LYXCMD:copilot:repeat:2 char-left
> LYXCMD:copilot:self-insert:Here is some text
> LYXCMD:copilot:char-right:
> LYXCMD:copilot:inset-apply:graphics filename photo.png
>
> I need to modify the properties of the graphics inset, let's say to 
> set the width at 3 inches. I can't figure out how to either 1) apply 
> more than one property (filename, width, lyxscale, etc) when the inset 
> is created
The way to find this out is the open the Messages pane and activate the 
"action" messages. Then you can see the actual dispatch messages being 
produced on the fly. In this case, you just enter the extra arguments as 
well, e.g.:

graphics filename graphics/HeadShot-200.jpg scale 80 clip

The pane shows these as on new lines, but I don't think that's required. 
(I hope not.)

> 2) change the properties after the inset is already in place.

inset-apply will modify an inset. It's just an alias to inset-modify or 
inset-insert, depending. So you could just use inset-modify, too. See 
Help> LyX Functions for the details.

Riki

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lyx.org/pipermail/lyx-users/attachments/20230401/cd322242/attachment-0001.html>


More information about the lyx-users mailing list