Sun, 20 Aug 2017 23:52:26 +0200
|
Hi,
On Wed, 2017-08-09 at 09:50 +0100, Joseph Wright wrote:
> On 09/08/2017 00:18, Benjamin Berg wrote:
> > just ran into the same issue myself. I haven't been able to solve my
> > usage yet but noticed in the processes that \vbox_set_top:Nw seems to
> > be still missing.
>
> Could you give a bit more detail of the case you need to solve?
I would expect it to be added either way, just so that the API is the
same for the different boxes :)
Anyway, the case I am trying to solve is a macro which in reality puts
the content into a box (this can be a vtop or hbox depending on the
command).
So my user would type something like:
\question[text=some text]{\verb^some text^}
Here the "some text" is exported as metadata and the \verb should be
put into the box. I could implement the above command correctly using
\vbox_set_top:Nw by swallowing the opening braces and emitting
\vbox_set_end: using \group_insert_after: for the closing brace.
For now I have done a workaround using \vtop directly.
The reason to use \vtop is a bit more odd. I was unhappy that I
wouldn't get the correct interline skip for the first row of the vbox.
So my solution was to put it into a \vtop to measure the height and
then unpack it into a normal \vbox to get the correct \prevdepth value
after the box has been added to the vertical list.
Note that this works as I am calculating the interline skip myself.
There are a number of other (weird) things which make everything more
complicated, but I think this might explain enough.
I am happy to explain in more detail or point to the code.
Benjamin
|
|
|