Le 29/11/2015 22:13, Uwe Stöhr a écrit :
Am 27.11.2015 um 11:39 schrieb Jean-Marc Lasgouttes:
Are we sure that minipage always requires centering without extra
spacing? I am really not sure...
I am sure. See the attached file:
Emphasis was on "always" above. If your reasoning is correct, then iot
should hold for the top level text too. Remember that minipage is a
"mini page". For example I tend to use it for things like
Text text text text text text text text text text text text text text
text text text text text text text text text text text text text text
[Mini page 50% width [nice image here]
text text text text text
text text text text text
text text text text text
text text text text text
text text text text text
]
text text text text text text text text text text text text text
text text text text text text text text text text text text text
Why would the text in the minipage need different vertical spacing than
the main text? They are of same nature.
The paragraph separation in this file is the default - indentation not
vertical space.
So users just want to e.g. right-align a paragraph in the box. there is
no reason that vertical space is added. This is definitely not wanted.
You basically argue that this vertical spacing is never wanted in LaTeX.
This is an opinion I respct, but it has far-fetching consequences.
As I already said earlier, magic happens here:
bool noTrivlistCentering(InsetCode code)
{
return code == FLOAT_CODE
|| code == WRAP_CODE
|| code == CELL_CODE;
}
These are the inset codes for which we do not want to use \begin{center}
and friends but the more compact versions. It would not be difficult to
add boxes to the list, but I am not sure that this is a good idea.
I am asking for the LaTeX code that will be created in this case.
because we have to different settings we should not mix up:
- The box dialog provides an alignment for the whole box content. For
this setting \raggedleft etc. should be used for the WHOLE content of
the box, no matter if there are several paragraphs or not.
- The paragraph alignment is independent of this!!! (see the attached
example)
This separation between box alignment and paragraph alignment does not
exist in LaTeX. This is a creation that you propose.
That is exactly how I once implemented it. If adding BOX_CODE to
noTrivlistCentering does this, then this should be done.
Adding BOX_CODE to noTrivListCentering would make all paragraph
alignment changes use \raggedleft and friends.
I'd be interested to see what your real world use cases look like. I
tend to use hfills a lot instead of weird alignments. But probably we
don't use boxes in the same settings.
JMarc