Z. Bian wrote:
I am trying to write a book with lyx. The book is mostly tutorials with step by
step instructions. For each step, I need to have step number, a block of text
on left as instruction, and a image on right as figure showing what the
instruction means.
I am currently using a custom list. For each item/step, I use two boxes within
another box. This works ok, but too painful with the insertion of all the boxes
and setting width etc.
Can I create a custom layout that I can simply insert into document that has
two predefined fields for me to put in the text and figure, and it will layout
the text and figure by passing the text and figure to a predefined latex class?
I can create a cuxtom layout that passes one item, but not two, to a latex
class.
This is a shortcoming of LyX, one I'd love to remedy. But here's a hack:
Define your layout so that it calls a two-argument command. Then, in ERT
at the very beginning of each one, put: {whatever you want}, as your
first argument.
Other way: Make the first argument optional, turn on optional arguments
in the layout, and then put your first argument in the misnamed "short
title" inset (under Insert).
Richard