Simon Pepping wrote: > Indeed. Something like ICLM is needed, which creates an inline area > containing the block areas.
A block inside another block <fo:block>Normal text <fo:block>inner block</fo:block> normal text.</fo:block> creates 3 different paragraphs: - Normal text - inner block - normal text. and each paragraph's layout is unrelated to the other paragraphs' layout (there are 3 LineLM). A block inside an inline inside a block <fo:block>Normal text <fo:inline background-color="lightgreen">inline text 1 <fo:block>inner block</fo:block> inline text 2</fo:inline> normal text.</fo:block> creates: a) 3 different paragraphs too: - Normal text inline text 1 - inner block - inline text 2 normal text. or b) a single paragraph with all the text: - Normal text inline text 1 inner block inline text 2 normal text. ??? I'd say a), but I'm not sure. If this were true, there should be 3 different LineLMs. This is the LM tree at the moment: BlockLM1 | LineLM1 | -------------+------------- | | | TextLM InlineLM TextLM "Normal text" | "normal text." | -------------+------------- | | | TextLM BlockLM2 TextLM "inline text 1" | "inline text 2" LineLM2 | TextLM "inner block" LineLM1 tries to have get elements from all its chidren, and fails. But, even if it could be given the elements representing "inner block", it could layout them wrongly, because of the block properties: the inner block could have different alignment, borders, margins, indents, .... So, the LM tree could be: BlockLM1 ------------------+----------------- | | | LineLM BlockLM2 LineLM ------+------ | -----+----- | | | | | TextLM InlineLM LineLM InlineLM TextLM "Normal text" | | | "normal text." | | | TextLM TextLM TextLM "inline text 1" "inner block" "inline text 2" This modified tree can be "easily" obtained from the previous one: - the new BlockLM is created - if the LM which should add it to its children list is an InlineLevelLM or a LineLM, the new BlockLM is given to its parent, i.e. it will become a child of the nearest BlockLM ancestor - an instance of the LM which could not handle the new BlockLM (in the example, InlineLM son of LineLM) must be created in order to handle inline siblings of the inner fo:block. I hope this can help ... Regards, Luca