**** Point 1 : Jürgen Vigna wrote : > I read all of the above and am still confused. You want to do this all > to have WYSIWYG (more or less) on screen isn't it? Why do we need more > variables for this?
I don't want to do all this JUST for the display, but let's start with this. My goal is to help the display without changing the display methods too much (because I cannot learn all of LyX at once, and it is a good practice to avoid mixing display stuffs with "semantics" ones). The mechanism I propose for that (I changed just a little bit my mind) is just the one already used when the alignment of a paragraph is set to LYX_ALIGN_LAYOUT, i.e. the alignment information is given by the "context". But it would be cumbersome (and meaningless?) to define a layout for each column of each table of document, so I propose to add a variable in the paragraph parameters to store the appropriate information. > Couldn't we just have some parameters that tell the > draw function what it should draw? I wonder if it would imply much more changes to the drawing routines and to the tabular code too (I assume that tabular is yet the only place we can use such a mechanism). But once again, I didn't investigate too much this way. **** Point 2: > As the final output is all right I don't see a necessity to add more > buttons to the layouts. Here, let me first apologize, I should have treated this 2 points separately. The final output is no more right now. As long as, in a tabular, we allowed left,center and right alignment only, LYX_ALIGN_BLOCK was used to indicate "default" or "context" alignment, and it was perfect. Now that block is a legitimate value to ask for (i.e. you want a justified text), we should distinguish between "default" and "justified". Note that everytime you apply the paragraph popup changes, the paragraph alignment is set to either BLOCK,CENTER,LEFT or RIGHT. I thought that a "default" or "context" button was the simplest way to allow us to preserve the original information. And I guess that THIS could be usefull elsewhere, wherever the default alignment is not "justified". This would imply to modify the LaTeX output (i.e. output a parbox when needed), but this may be more (difficult, dangerous?) and can be treated separately. **** Point 3: >>Note : the patch forces column alignment to switch to "block" anytime >>you enter the InsetTabular::tabularFeatures function with argument >>feature==SET_PWIDTH. The corresponding line of code should be >>deleted, or at least executed only if tmplen.zero(). > Could you explain this and/or send a patch? I mean that, when you just change the width of a column, you don't want to reset the column alignment to _BLOCK (this is what occurs with Dekel's patch). So I propose either not to change the alignment, either to set it only when we switch from an "unlimited length" column to a "fixed length" one. I can send a patch for each or both, your choice (I would prefer not to change the alignment at all, as one can delete a width by mistake, then change its mind). Thank's again to go on reading me, I understand it can be a pain ;-) Alain P.S. (Implementation RFC, you can skip it) What I would like to do to indicate that the information must be taken from the new variable contextAlign, is to use a 2 steps mechanism : - if (par->align()==LYX_ALIGN_LAYOUT) if (par->contextAlign() == LYX_ALIGN_LAYOUT) align = par->layout()->align(); else align = par->contextAlign(); I agree it would be more readable to define a new constant LYX_ALIGN_CONTEXT, but the above would allow to change the tabular and paragraph code only, without checking (at least, right now) for clashes everywhere in the code, e.g. if you copy a paragraph from a tabular cell to a different "context" which could not yet handle LYX_ALIGN_CONTEXT right now. This way, we can change the code only where it is usefull and step by step. (lazzy, isn't it?). -- ******************************************************************* * Alain Castera * * IPNL - UCB Lyon 1 | e-mail : [EMAIL PROTECTED] * * Bat. Paul Dirac | or [EMAIL PROTECTED] * * Campus de la Doua | Telephone : (+33) 472448429 * * F69622 Villeurbanne CEDEX | Fax : (+33) 472448004 * *******************************************************************