Re: [LyX/master] Always place the cursor before a separator inset when clicking
Le 19/01/2016 18:42, Enrico Forestieri a écrit : On Tue, Jan 19, 2016 at 05:19:24PM -0500, Scott Kostyshak wrote: On Sat, Jan 16, 2016 at 04:41:26PM +0100, Enrico Forestieri wrote: commit 55b3374f3e3047a0aa7584e0737d1fcd40fe6809 Author: Enrico Forestieri Date: Sat Jan 16 16:41:04 2016 +0100 Always place the cursor before a separator inset when clicking Note that this commit might have triggered the assertion #9936. Thanks. The attached patch fixes it for me. You have added similar lines at several other places recently, after my remarks. Should they be amended similarly? Also, would it be better if you factored the shared code in a new function? Guillaume
Re: Test results for 2.2.0dev on Mac
Stephan Witt wrote: > Am 19.01.2016 um 20:10 schrieb Scott Kostyshak : >> >> On Tue, Jan 19, 2016 at 08:10:59AM +0100, Stephan Witt wrote: >> >>> BTW, when debugging tex2lyx it complains about missing USERDIR and I >>> have to add -userdir >>> /Users/stephan/git/lyx-build/cmake/2.2.0dev/Testing/.lyx explicitly. Is >>> it passed via environment in ctest runs? Or is it simply not printed? >>> Shouldn't these options passed via command line when calling tex2lyx? >> >> I do not have to do this (unless I set something up automatically >> so long ago that I forgot) so maybe this could be the problem. Kornel or >> Georg will probably have an idea. I don't need that either. >>> Other possible differences except the OS? :) >>> - version or availability of algorithm2e.sty? >> >> I've tested on latest TeX Live 2015 and also with an older TeX Live 2015 >> (the file says "algorithm2e.sty,v 5.0 2013/01/06 14:40:35“) > > Nearly the same here: > "$Id: algorithm2e.sty,v 5.0 2013/01/06 14:40:35 cfiorio Exp $“ Does not matter. tex2lyx does not read .sty files (it only needs to exist so that the package list for LyX and tex2lyx lists it as available). The warning is expected. >>> - remnants of previous runs somewhere? >> >> I use a clean build directory. > > Me too - I really meant *somewhere* - > perhaps tex2lyx reads some file from outside the build directory. No. It reads from the system LyX dir which is the source dir when running the tests, and from the user dir which is Testing/.lyx when running ctest. BTW, cmake copies stuff from the source dir there, but this is not needed. support::Package is supposed to handle this for non-installed builds. > Tracing Preamble::handle_package I have two calls with: > > package: fontenc, options = T1 > package: inputenc, options = latin1 > > As you already noticed I don’t have the "Ignoring options…“ active. > There are never any options left at the end of handle_package. This is wrong. There should be exactly one of those warnings. > Georg, do you have an idea what I can do to find the explanation for this? Unfortunately I am too busy with other stuff currently, so I could not investigate thoroughly. My wild guess (based on the missing user dir) would be that either something in support::Package is wrong for OS X, or that cmake does not configure the hidden user dir correctly. To rule out the latter, you could run the tests using autotools. Does that work? I'll hopefully have some more time tonight. Georg
Re: [patch] fix bug #4430
On Wed, Jan 20, 2016 at 01:49:01AM +0100, Uwe Stöhr wrote: > The attached one liner fixes the longstanding regression bug > http://www.lyx.org/trac/ticket/4430 > > OK to go in? The fix is similar to the fix that was tried before and that caused #9084. Why are you confident that this will not cause #9084? Scott signature.asc Description: PGP signature
Re: [LyX/master] Always place the cursor before a separator inset when clicking
On Wed, Jan 20, 2016 at 12:42:51AM +0100, Enrico Forestieri wrote: > On Tue, Jan 19, 2016 at 05:19:24PM -0500, Scott Kostyshak wrote: > > On Sat, Jan 16, 2016 at 04:41:26PM +0100, Enrico Forestieri wrote: > > > commit 55b3374f3e3047a0aa7584e0737d1fcd40fe6809 > > > Author: Enrico Forestieri > > > Date: Sat Jan 16 16:41:04 2016 +0100 > > > > > > Always place the cursor before a separator inset when clicking > > > > Note that this commit might have triggered the assertion #9936. > > Thanks. The attached patch fixes it for me. Works well. Thanks. Scott signature.asc Description: PGP signature
Re: Beta hopefully soon, only waiting on Windows installer(s)
On Tue, Jan 19, 2016 at 09:59:07PM +0100, Uwe Stöhr wrote: > Am 19.01.2016 um 04:53 schrieb Scott Kostyshak: > > >Please, do not sacrifice hours of sleep. > > I know but I had only this week and will soon have not much time for LyX. So > the task was now or never. I see. It is nice of you but you really should not sacrifice your health. > >This was not my intention. I just meant that the Windows installer was > >the only thing left before beta. That is all I wanted to say. Nothing > >more. Perhaps this is a language issue. I think I see what you mean that > >"waiting" could mean that I am sitting around impatiently wondering > >where the Windows installer is. > > Yes, this was how I understood it. OK glad we figured that out. > However, I had some time the weekend to almost finish the documentation. I > hope it will be ready this week. Thanks for this work! > >>Then it is even proposed to state in the release announcement that LyX has > >>no developer to build on Windows and to create an installer. That hurts! > > > >I thought this is what you wanted. I thought you wanted help with > >development of a Windows installer or for someone to replace you so that > >LyX development would not be so stressful. > > I want more developers on Windows. And if anybody else could build the > installer it would be perfect. So asking for new developers is always fine > with me, but we cannot state that we don't have anybody to build a > sufficient installer. That would be marketing suicide. That is a good point. I often do not think often enough about marketing, even though I do recognize the importance. Scott signature.asc Description: PGP signature
Re: [LyX/master] Revert "Fix the display of column spacing in AMS environments"
On Tue, Jan 19, 2016 at 05:36:29PM -0500, Guillaume Munch wrote: > Le 19/01/2016 16:49, Stephan Witt a écrit : > >Am 19.01.2016 um 22:40 schrieb Uwe Stöhr : > >> > >>commit 360992cb9ff36f882e47036b6f6b1a5e3fe4efd7 > >>Author: Uwe Stöhr > >>Date: Tue Jan 19 22:40:38 2016 +0100 > >> > >>Revert "Fix the display of column spacing in AMS environments" > >> > >>This reverts commit bb5470b5d1ec1b2f7394164686d6035a0c4bce0f. > >> > >>I have no clue what is with my GIT. I apologize. Can anybody please > >> check if it is now OK again? > > > >I don’t think so. > > > >You had a merge conflict in change f1a388584fb2c043d17127d7db49c36cb8427cfa. > > > >Sorry, I cannot help right now. > > > > > It seems you have correctly put everything back in order. git diff e5936b49 > 764a2163 shows no change for me. Please, someone double check. Also no change shows but I don't know why the changes in c7ad447f (which is in-between the two commits) aren't shown in that output. Scott signature.asc Description: PGP signature
Re: "Splitting of consecutive environments has been reworked and enhanced"
On Sun, Jan 17, 2016 at 03:03:20AM +, Guillaume Munch wrote: > Le 16/01/2016 22:26, Enrico Forestieri a écrit : > >On Sat, Jan 16, 2016 at 06:29:32PM +, Guillaume Munch wrote: > > > >>Le 16/01/2016 17:06, Enrico Forestieri a écrit : > >>>On Fri, Jan 15, 2016 at 07:45:35PM +, Guillaume Munch wrote: > > However, this reveals new ways of creating an "after" cursor > position: > > * A visually-after cursor position appears with > Ctrl+Shift+Arrows (LFUN_*_SELECT_WORD of something like this). > It remains a right position after deselection, for instance by > doing copy and immediately paste. > >>> > >>>I could not reproduce this one. > >> > >>I can reproduce it systematically. > >> > >>1. New file 2. Type something in an itemize environment 3. Enter > >>three times, get a separator 4. Place the cursor at the beginning > >>of the document 5. Ctrl+Shift+Right until the after position is > >>reached > >> > >>optionally: > >> > >>6. Do copy+paste, to get the same cursor position but with the > >>selection removed. > > > >This only occurs when the separator is the last character in the > >document. In this case you don't need Ctrl+Shift+Right but simply > >use → to get there. > > I cannot reproduce your description. My recipe works as well if there is > some paragraph after. (Also you can probably deduce from the context > that I would have noticed.) Sorry, but it seems that I was simply using Shift+Right, even if I was talking about Ctrl+Shift+Right... Yes, I can reproduce it and it also happens with Left. I am attaching an updated patch taking also this into account. I verified that it is still possible to get to that position when randomly multiple clicking but did not discover a way to sistematically trigger it. I fear that this may take some time to fix. However, with this patch it should not be so easy to get after a separator. -- Enrico diff --git a/src/Text3.cpp b/src/Text3.cpp index fbcd9b7..d9cadd6 100644 --- a/src/Text3.cpp +++ b/src/Text3.cpp @@ -864,7 +864,9 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd) case LFUN_WORD_FORWARD: case LFUN_WORD_FORWARD_SELECT: { needsUpdate |= cur.selHandle(cmd.action() == LFUN_WORD_FORWARD_SELECT); - bool const cur_moved = cursorForwardOneWord(cur); + bool cur_moved = cursorForwardOneWord(cur); + if (cur.pos() && cur.paragraph().isEnvSeparator(cur.pos() - 1)) + cur_moved |= cursorForward(cur); needsUpdate |= cur_moved; if (!cur_moved && oldTopSlice == cur.top() @@ -916,7 +918,9 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd) case LFUN_WORD_BACKWARD: case LFUN_WORD_BACKWARD_SELECT: { needsUpdate |= cur.selHandle(cmd.action() == LFUN_WORD_BACKWARD_SELECT); - bool const cur_moved = cursorBackwardOneWord(cur); + bool cur_moved = cursorBackwardOneWord(cur); + if (cur.pos() && cur.paragraph().isEnvSeparator(cur.pos() - 1)) + cur_moved |= cursorBackward(cur); needsUpdate |= cur_moved; if (!cur_moved && oldTopSlice == cur.top() @@ -1594,6 +1598,8 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd) case LFUN_MOUSE_DOUBLE: if (cmd.button() == mouse_button::button1) { + if (cur.pos() && cur.paragraph().isEnvSeparator(cur.pos() - 1)) + cur.posBackward(); selectWord(cur, WHOLE_WORD); bv->cursor() = cur; } diff --git a/src/TextMetrics.cpp b/src/TextMetrics.cpp index 325fb6c..9cd03b4 100644 --- a/src/TextMetrics.cpp +++ b/src/TextMetrics.cpp @@ -1581,7 +1581,8 @@ bool TextMetrics::cursorEnd(Cursor & cur) boundary = true; else --end; - } + } else if (cur.paragraph().isEnvSeparator(end-1)) + --end; return text_->setCursor(cur, cur.pit(), end, true, boundary); }
Re: [patch] Display the correct horizontal alignment in AMS environments
Am 19.01.2016 um 23:45 schrieb Guillaume Munch: Note that I do not know if it applies cleanly now. Hmm, seems the bug in my git client is to "apply patch serial". This means to apply 2 or more patches at once. When I apply them one after another no problem occurs. I did this (applied patch 1 and then patch 2) and compiled LyX without problems. Result: I used the attached LyX file to test and cannot see a difference with your patch compared to LyX 2.1.4 in the LyX screen. If you view the PDF of the file you see what I expected as alignment. Did I make a mistake? thanks and regards Uwe #LyX 2.1 created this file. For more info see http://www.lyx.org/ \lyxformat 474 \begin_document \begin_header \textclass article \use_default_options true \maintain_unincluded_children false \language english \language_package default \inputencoding auto \fontencoding global \font_roman default \font_sans default \font_typewriter default \font_math auto \font_default_family default \use_non_tex_fonts false \font_sc false \font_osf false \font_sf_scale 100 \font_tt_scale 100 \graphics default \default_output_format default \output_sync 0 \bibtex_command default \index_command default \paperfontsize default \use_hyperref false \papersize default \use_geometry false \use_package amsmath 1 \use_package amssymb 1 \use_package cancel 1 \use_package esint 1 \use_package mathdots 1 \use_package mathtools 1 \use_package mhchem 1 \use_package stackrel 1 \use_package stmaryrd 1 \use_package undertilde 1 \cite_engine basic \cite_engine_type default \biblio_style plain \use_bibtopic false \use_indices false \paperorientation portrait \suppress_date false \justification true \use_refstyle 1 \index Index \shortcut idx \color #008000 \end_index \secnumdepth 3 \tocdepth 3 \paragraph_separation indent \paragraph_indentation default \quotes_language english \papercolumns 1 \papersides 1 \paperpagestyle default \tracking_changes false \output_changes false \html_math_output 0 \html_css_as_file 0 \html_be_strict false \end_header \begin_body \begin_layout Standard \begin_inset Formula \begin{multline*} A=Bbb\\ C=De\\ E=Fee \end{multline*} \end_inset \end_layout \begin_layout Standard \begin_inset Formula \begin{flalign*} A & =B & dos & sd\\ C & =D & as & sd\\ E & =F & asf & sd \end{flalign*} \end_inset \begin_inset Formula \begin{align*} a & s & s & s \end{align*} \end_inset \end_layout \begin_layout Standard \begin_inset Formula \begin{alignat*}{2} s\hspace{1cm} & s & s & s \end{alignat*} \end_inset \end_layout \end_body \end_document
Re: "Splitting of consecutive environments has been reworked and enhanced"
On Tue, Jan 19, 2016 at 05:27:47PM -0500, Guillaume Munch wrote: > Le 19/01/2016 16:44, Enrico Forestieri a écrit : > >On Mon, Jan 18, 2016 at 10:37:23PM -0500, Guillaume Munch wrote: > >> > >>Enrico: the width of the line of the plain separator changed, as you can > >>see, which I guess was not intended. > > > >For the new symbol I used the width of 'n' instead of 'm'. As both kind > >share the same base width, I tried to compensate choosing the width of > >the plain separator as 8 times the width of 'n', while it previously > >was 5 times the width of 'm'. I didn't care to measure the widths as I > >deemed it not so important. Note also that this is font dependent. > >You are welcome to suggest something different than 8 if you find it > >is too large or too narrow with respect to the previous width. > > > > I do not mind so much about the width itself. However what my screenshot > showed is that the line is shorter than the actual width of the spearator. > As you can see the paragraph mark is further on the right, which maybe is > confusing, and I thought was not intended. > > If this is really intended, tell me and I will review your patch. Otherwise > I will be waiting for a corrected patch. Sorry, I misunderstood. I had updated the width in metrics() but forgot to do it in draw(). Updated patch attached. -- Enrico diff --git a/src/frontends/Painter.h b/src/frontends/Painter.h index d077a1f..c72d813 100644 --- a/src/frontends/Painter.h +++ b/src/frontends/Painter.h @@ -95,6 +95,23 @@ public: fill_style = fill_none, line_style = line_solid, int line_width = thin_line) = 0; + /** +* path - draw a path with bezier curves +* @param xp array of points' x co-ords +* @param yp array of points' y co-ords +* @param c1x array of first control points' x co-ords +* @param c1y array of first control points' y co-ords +* @param c2x array of second control points' x co-ords +* @param c2y array of second control points' y co-ords +* @param np size of the points array +*/ + virtual void path(int const * xp, int const * yp, + int const * c1x, int const * c1y, + int const * c2x, int const * c2y, + int np, Color, + fill_style = fill_none, line_style = line_solid, + int line_width = thin_line) = 0; + /// draw a rectangle virtual void rectangle(int x, int y, int w, int h, Color, line_style = line_solid, int line_width = thin_line) = 0; diff --git a/src/frontends/qt4/GuiPainter.cpp b/src/frontends/qt4/GuiPainter.cpp index 2b024d8..9407825 100644 --- a/src/frontends/qt4/GuiPainter.cpp +++ b/src/frontends/qt4/GuiPainter.cpp @@ -229,6 +229,40 @@ void GuiPainter::lines(int const * xp, int const * yp, int np, } +void GuiPainter::path(int const * xp, int const * yp, + int const * c1x, int const * c1y, + int const * c2x, int const * c2y, + int np, + Color col, + fill_style fs, + line_style ls, + int lw) +{ + if (!isDrawingEnabled()) + return; + + QPainterPath bpath; + bpath.moveTo(xp[0], yp[0]); + + for (int i = 1; i < np; ++i) { + bool line = c1x[i] == xp[i - 1] && c1y[i] == yp[i - 1] && + c2x[i] == xp[i] && c2y[i] == yp[i]; + if (line) + bpath.lineTo(xp[i], yp[i]); + else + bpath.cubicTo(c1x[i], c1y[i], c2x[i], c2y[i], xp[i], yp[i]); + } + QColor const color = computeColor(col); + setQPainterPen(color, ls, lw); + bool const text_is_antialiased = renderHints() & TextAntialiasing; + setRenderHint(Antialiasing, text_is_antialiased); + drawPath(bpath); + if (fs != fill_none) + fillPath(bpath, QBrush(color)); + setRenderHint(Antialiasing, false); +} + + void GuiPainter::rectangle(int x, int y, int w, int h, Color col, line_style ls, diff --git a/src/frontends/qt4/GuiPainter.h b/src/frontends/qt4/GuiPainter.h index eadf985..3819ff3 100644 --- a/src/frontends/qt4/GuiPainter.h +++ b/src/frontends/qt4/GuiPainter.h @@ -18,6 +18,7 @@ #include "frontends/Painter.h" #include +#include #include class QString; @@ -59,6 +60,23 @@ public: line_style ls = line_solid, int lw = thin_line); + /** +* path - draw a path with bezier curves +* @param xp array of points' x co-ords +* @param yp array of points' y co-ords +* @param c1x array of first control points' x co-ords +* @param c1y array of first control points' y co-ords +* @param c2x array of second control points' x co-ords +* @param c2y array of second control points' y co-ords +* @param np size of the points array +*/ + virtual void path(int const * xp, int const * yp, +
Re: Questions for Uwe once you are back
Am 19.01.2016 um 22:36 schrieb Stephan Witt: I wrote this once somewhere and that is why I set up my git folder this way. I meant I read this somewhere. Then I propose to make this location a parameter too. It really shouldn’t be inside the git repository. OK. regards Uwe
Re: [LyX/master] Always place the cursor before a separator inset when clicking
On Tue, Jan 19, 2016 at 05:19:24PM -0500, Scott Kostyshak wrote: > On Sat, Jan 16, 2016 at 04:41:26PM +0100, Enrico Forestieri wrote: > > commit 55b3374f3e3047a0aa7584e0737d1fcd40fe6809 > > Author: Enrico Forestieri > > Date: Sat Jan 16 16:41:04 2016 +0100 > > > > Always place the cursor before a separator inset when clicking > > Note that this commit might have triggered the assertion #9936. Thanks. The attached patch fixes it for me. -- Enrico diff --git a/src/BufferView.cpp b/src/BufferView.cpp index 6de832d..81ebe79 100644 --- a/src/BufferView.cpp +++ b/src/BufferView.cpp @@ -2514,7 +2514,8 @@ bool BufferView::mouseSetCursor(Cursor & cur, bool select) bool update = leftinset; if (!do_selection && d->cursor_.inTexted()) { update |= checkDepm(cur, d->cursor_); - if (cur.pos() && cur.paragraph().isEnvSeparator(cur.pos() - 1)) + if (cur.inTexted() && cur.pos() + && cur.paragraph().isEnvSeparator(cur.pos() - 1)) cur.posBackward(); }
Re: [patch] Display the correct horizontal alignment in AMS environments
Le 19/01/2016 16:52, Uwe Stöhr a écrit : Am 11.01.2016 um 03:21 schrieb Guillaume Munch: See the attached for two "safe" (and easy to read) patches, if you agree that a safe patch that we have been discussing for a month can still get in for 2.2. I wanted to apply the patches at once and this way destroyed my complete git folder. Seems to be a bug in TortoiseGit. After the application it tells me that nothing was changed, also the Git log is empty. But all line endings are destroyed and the editor of MSVC cannot read the files anymore. I was not quite expecting my patch to be unsafe in this way! Please tell us if you find the cause. However, I think I fixed it, re-applied the patches and tried to compile but get: ..\..\..\src\mathed\InsetMathHull.cpp(1257): error C2039: 'isMutable': Is no element of 'lyx::InsetMathHull' [D:\LyXGit\Master\compile-2010\src\mathed\mathed.vcxproj] You are right, this is something I just forgot to remove during the rebase (and belongs to the third patch not proposed here). Try the attached (if you fixed your other bug!). Note that I do not know if it applies cleanly now. I tried to rebase against newest master but your manipulation error now inteferes. I will have to rebase by hand. >From fd5691e6489c34db3120ba24ce03cd496aacb134 Mon Sep 17 00:00:00 2001 From: Guillaume Munch Date: Sun, 13 Dec 2015 03:32:32 + Subject: [PATCH 1/2] Display the correct horizontal alignment in AMS environments A longstanding problem... (related: #1861) The columns in AMS math environments have a fixed alignment (colAlign() in InsetMathGrid.cpp). We set this alignment for display (Georg's displayColAlign()) in InsetMathHull and InsetMathSplit. This is done according to tests and documentation for the various environments. There is also some mechanical code factoring via colAlign(). Finally, I disable setting the horizontal alignment in InsetMathSplit, which has no impact on the LaTeX output, and has no longer any impact on the screen. (As for vertical alignment I discovered that it was in fact customisable for \aligned & friends! I hope that the more faithful interface will let other users discover that too.) --- src/mathed/InsetMathGrid.cpp | 25 + src/mathed/InsetMathGrid.h| 5 +++-- src/mathed/InsetMathHull.cpp | 26 -- src/mathed/InsetMathSplit.cpp | 37 +++-- src/mathed/InsetMathSplit.h | 2 ++ 5 files changed, 77 insertions(+), 18 deletions(-) diff --git a/src/mathed/InsetMathGrid.cpp b/src/mathed/InsetMathGrid.cpp index 536f4bd..fca5722 100644 --- a/src/mathed/InsetMathGrid.cpp +++ b/src/mathed/InsetMathGrid.cpp @@ -1838,4 +1838,29 @@ bool InsetMathGrid::getStatus(Cursor & cur, FuncRequest const & cmd, } +// static +char InsetMathGrid::colAlign(HullType type, col_type col) +{ + switch (type) { + case hullEqnArray: + return "rcl"[col % 3]; + + case hullMultline: + case hullGather: + return 'c'; + + case hullAlign: + case hullAlignAt: + case hullXAlignAt: + case hullXXAlignAt: + case hullFlAlign: + return "rl"[col & 1]; + + default: + return 'c'; + } +} + + + } // namespace lyx diff --git a/src/mathed/InsetMathGrid.h b/src/mathed/InsetMathGrid.h index bd3066d..709f492 100644 --- a/src/mathed/InsetMathGrid.h +++ b/src/mathed/InsetMathGrid.h @@ -258,10 +258,11 @@ protected: virtual docstring eocString(col_type col, col_type lastcol) const; /// splits cells and shifts right part to the next cell void splitCell(Cursor & cur); - /// Column aligmment for display of cell \p idx. + /// Column alignment for display of cell \p idx. /// Must not be written to file! virtual char displayColAlign(idx_type idx) const; - + /// The value of a fixed col align for a certain hull type + static char colAlign(HullType type, col_type col); /// row info. /// rowinfo_[nrows()] is a dummy row used only for hlines. diff --git a/src/mathed/InsetMathHull.cpp b/src/mathed/InsetMathHull.cpp index 097a344..78137de 100644 --- a/src/mathed/InsetMathHull.cpp +++ b/src/mathed/InsetMathHull.cpp @@ -349,28 +349,34 @@ bool InsetMathHull::idxLast(Cursor & cur) const } +//FIXME: This has probably no effect and can be removed. char InsetMathHull::defaultColAlign(col_type col) { - if (type_ == hullEqnArray) - return "rcl"[col]; - if (type_ == hullMultline) - return 'c'; - if (type_ == hullGather) - return 'c'; - if (type_ >= hullAlign) - return "rl"[col & 1]; - return 'c'; + return colAlign(type_, col); } char InsetMathHull::displayColAlign(idx_type idx) const { - if (type_ == hullMultline) { + switch (type_) { + case hullMultline: { row_type const r = row(idx); if (r == 0) return 'l'; if (r == nrows() - 1) return 'r'; + return 'c'; + } + case hullEqnArray: + case hullGather: + case hullAlign: + case hullAlignAt: + case hullXAlignAt: + case hullXXAlignAt: + case hullFlAlign: + return colAlign(type_, col(idx)); + default: + break; } return In
Re: [LyX/master] Revert "Fix the display of column spacing in AMS environments"
Le 19/01/2016 16:49, Stephan Witt a écrit : Am 19.01.2016 um 22:40 schrieb Uwe Stöhr : commit 360992cb9ff36f882e47036b6f6b1a5e3fe4efd7 Author: Uwe Stöhr Date: Tue Jan 19 22:40:38 2016 +0100 Revert "Fix the display of column spacing in AMS environments" This reverts commit bb5470b5d1ec1b2f7394164686d6035a0c4bce0f. I have no clue what is with my GIT. I apologize. Can anybody please check if it is now OK again? I don’t think so. You had a merge conflict in change f1a388584fb2c043d17127d7db49c36cb8427cfa. Sorry, I cannot help right now. It seems you have correctly put everything back in order. git diff e5936b49 764a2163 shows no change for me. Please, someone double check. Guillaume
Re: [patch] Display the correct horizontal alignment in AMS environments
Am 19.01.2016 um 22:52 schrieb Uwe Stöhr: However, I think I fixed it No, my Git is completely broken. It tells me that I have never committed anything the last hour but I made several commits that played ping pong. It also telly me that my tree is completely clean and that there are no changes. But when I try to compile LyX I get more than 4000 errors. Whenever I want to open a mathed source file MSVC refuses to open the files because of line ending errors it cannot resolve. I deleted my git folder and started from scratch. But as soon as I apply your patches, I get again a broken git tree and it even tried to commit the applied changed immediately. I have never seen this before. Can you therefore please help me out in testing if Git master is OK now (I committed from my second PC) and send one patch with the changes you want to have in? sorry again, thanks and regards Uwe
Re: Questions for Uwe once you are back
Am 19.01.2016 um 22:09 schrieb Uwe Stöhr: Am 19.01.2016 um 17:15 schrieb Peter Kümmel: I'll move them again out of the source tree. But then users might have a problem. For example my git older for master is D:\LyXGit\Master. It is forbidden to create a new folder in D:\LyXGit to assure that no folders can be deleted there. But this is only a special setting on your system. (E.g. that due to a bug or whatever D:\LyXGit\Master is deleted.) Within master one can of course write. I wrote this once somewhere and that is why I set up my git folder this way. But OK, your decision. - I also added RMDIR /S /Q %LYX_SOURCE%\build-result-5-2010 to assure a clean rebuild. Otherwise files that were removed or renamed in Git or for a new LyX release could still be in the LYX_INSTALLED folder. This was already there. setting LYX_BUILD could be done at any time. And each run ensures LYX_BUILD exists, then removed LYX_BUILD and then creates it again: mkdir %LYX_BUILD% rmdir /s/q %LYX_BUILD% mkdir %LYX_BUILD% So LYX_BUILD is always empty at the beginning. But at the wrong position. It must be before set LYX_BUILD=%LYX_SOURCE%\..\build-result-5-2010 Otherwise you get an error when compiling LyX with your script the second time. because when executing the script the second time the folder build-result-5-2010 already exists so the creation of it fails. Th result is that LyX is then built inside the CMake folder and lots of warnings - things that newbies won't understand and that is not the desired behavior. Just execute the script twice to the the problem. Therefore please leave RMDIR before set LYX_BUILD. -- Could you nevertheless please look at the CMake bugs: http://www.lyx.org/trac/ticket/9927 so that others won't have the same problems as I had? You mean, these flags should be automatically enabled by cmake without the need to pass them as argument when calling cmake? many thanks and best regards Uwe
Re: "Splitting of consecutive environments has been reworked and enhanced"
Le 19/01/2016 16:44, Enrico Forestieri a écrit : On Mon, Jan 18, 2016 at 10:37:23PM -0500, Guillaume Munch wrote: Enrico: the width of the line of the plain separator changed, as you can see, which I guess was not intended. For the new symbol I used the width of 'n' instead of 'm'. As both kind share the same base width, I tried to compensate choosing the width of the plain separator as 8 times the width of 'n', while it previously was 5 times the width of 'm'. I didn't care to measure the widths as I deemed it not so important. Note also that this is font dependent. You are welcome to suggest something different than 8 if you find it is too large or too narrow with respect to the previous width. I do not mind so much about the width itself. However what my screenshot showed is that the line is shorter than the actual width of the spearator. As you can see the paragraph mark is further on the right, which maybe is confusing, and I thought was not intended. If this is really intended, tell me and I will review your patch. Otherwise I will be waiting for a corrected patch.
Re: [LyX/master] Always place the cursor before a separator inset when clicking
On Sat, Jan 16, 2016 at 04:41:26PM +0100, Enrico Forestieri wrote: > commit 55b3374f3e3047a0aa7584e0737d1fcd40fe6809 > Author: Enrico Forestieri > Date: Sat Jan 16 16:41:04 2016 +0100 > > Always place the cursor before a separator inset when clicking Note that this commit might have triggered the assertion #9936. Scott signature.asc Description: PGP signature
Re: [patch] Display the correct horizontal alignment in AMS environments
Am 11.01.2016 um 03:21 schrieb Guillaume Munch: See the attached for two "safe" (and easy to read) patches, if you agree that a safe patch that we have been discussing for a month can still get in for 2.2. I wanted to apply the patches at once and this way destroyed my complete git folder. Seems to be a bug in TortoiseGit. After the application it tells me that nothing was changed, also the Git log is empty. But all line endings are destroyed and the editor of MSVC cannot read the files anymore. However, I think I fixed it, re-applied the patches and tried to compile but get: ..\..\..\src\mathed\InsetMathHull.cpp(1257): error C2039: 'isMutable': Is no element of 'lyx::InsetMathHull' [D:\LyXGit\Master\compile-2010\src\mathed\mathed.vcxproj] regards Uwe
Re: [LyX/master] Revert "Fix the display of column spacing in AMS environments"
Am 19.01.2016 um 22:40 schrieb Uwe Stöhr : > > commit 360992cb9ff36f882e47036b6f6b1a5e3fe4efd7 > Author: Uwe Stöhr > Date: Tue Jan 19 22:40:38 2016 +0100 > >Revert "Fix the display of column spacing in AMS environments" > >This reverts commit bb5470b5d1ec1b2f7394164686d6035a0c4bce0f. > >I have no clue what is with my GIT. I apologize. Can anybody please check > if it is now OK again? I don’t think so. You had a merge conflict in change f1a388584fb2c043d17127d7db49c36cb8427cfa. Sorry, I cannot help right now. Stephan
Re: "Splitting of consecutive environments has been reworked and enhanced"
On Mon, Jan 18, 2016 at 10:37:23PM -0500, Guillaume Munch wrote: > > Enrico: the width of the line of the plain separator changed, as you can > see, which I guess was not intended. For the new symbol I used the width of 'n' instead of 'm'. As both kind share the same base width, I tried to compensate choosing the width of the plain separator as 8 times the width of 'n', while it previously was 5 times the width of 'm'. I didn't care to measure the widths as I deemed it not so important. Note also that this is font dependent. You are welcome to suggest something different than 8 if you find it is too large or too narrow with respect to the previous width. -- Enrico
Re: Questions for Uwe once you are back
Am 19.01.2016 um 22:09 schrieb Uwe Stöhr : > > Am 19.01.2016 um 17:15 schrieb Peter Kümmel: > >> I'll move them again out of the source tree. > > But then users might have a problem. For example my git older for master is > D:\LyXGit\Master. It is forbidden to create a new folder in > D:\LyXGit > to assure that no folders can be deleted there. (E.g. that due to a bug or > whatever D:\LyXGit\Master is deleted.) Within master one can of course write. > I wrote this once somewhere and that is why I set up my git folder this way. Then I propose to make this location a parameter too. It really shouldn’t be inside the git repository. Stephan
Re: Test results for 2.2.0dev on Mac
Am 19.01.2016 um 20:10 schrieb Scott Kostyshak : > > On Tue, Jan 19, 2016 at 08:10:59AM +0100, Stephan Witt wrote: > >> I have this: >> >> $ cat >> /Users/stephan/git/lyx-build/cmake/2.2.0dev/Testing/.lyx/layouts/testalgorithm2e.layout >> >> #% Do not delete the line below; configure depends on this >> # \DeclareLaTeXClass{testalgorithm2e} >> Format 55 >> Input algorithm2e.module >> >> Do you have the same in /home/scott/lyxbuilds/master/CMakeBuild/Testing/.lyx? > > Yes: > > $ cat Testing/.lyx/layouts/testalgorithm2e.layout > #% Do not delete the line below; configure depends on this > # \DeclareLaTeXClass{testalgorithm2e} > Format 55 > Input algorithm2e.module > >> BTW, when debugging tex2lyx it complains about missing USERDIR and I have to >> add >> -userdir /Users/stephan/git/lyx-build/cmake/2.2.0dev/Testing/.lyx explicitly. >> Is it passed via environment in ctest runs? Or is it simply not printed? >> Shouldn't these options passed via command line when calling tex2lyx? > > I do not have to do this (unless I set something up automatically > so long ago that I forgot) so maybe this could be the problem. Kornel or > Georg will probably have an idea. > >> Other possible differences except the OS? :) >> - version or availability of algorithm2e.sty? > > I've tested on latest TeX Live 2015 and also with an older TeX Live 2015 > (the file says "algorithm2e.sty,v 5.0 2013/01/06 14:40:35“) Nearly the same here: "$Id: algorithm2e.sty,v 5.0 2013/01/06 14:40:35 cfiorio Exp $“ > >> - remnants of previous runs somewhere? > > I use a clean build directory. Me too - I really meant *somewhere* - perhaps tex2lyx reads some file from outside the build directory. Tracing Preamble::handle_package I have two calls with: package: fontenc, options = T1 package: inputenc, options = latin1 As you already noticed I don’t have the "Ignoring options…“ active. There are never any options left at the end of handle_package. Georg, do you have an idea what I can do to find the explanation for this? Stephan
Re: [LyX/master] Fix typos in paralist module. The correct command is not compactdescr, etc, but compactdesc. At least this is true in the most recent version on CTAN.
Am 19.01.2016 um 13:19 schrieb Richard Heck: Since Uwe asked for an example file, I took it that he'd implicity +1'd it, so I went ahead and committed it. In creating it, I also ran into the problem fixed here. Seems like the request for an example file served its purpose! Many thanks Richard! For the record, here is my +1: +1 ;-) regards Uwe
Re: Questions for Uwe once you are back
Am 19.01.2016 um 17:15 schrieb Peter Kümmel: I'll move them again out of the source tree. But then users might have a problem. For example my git older for master is D:\LyXGit\Master. It is forbidden to create a new folder in D:\LyXGit to assure that no folders can be deleted there. (E.g. that due to a bug or whatever D:\LyXGit\Master is deleted.) Within master one can of course write. I wrote this once somewhere and that is why I set up my git folder this way. But OK, your decision. - I also added RMDIR /S /Q %LYX_SOURCE%\build-result-5-2010 to assure a clean rebuild. Otherwise files that were removed or renamed in Git or for a new LyX release could still be in the LYX_INSTALLED folder. This was already there. But at the wrong position. It must be before set LYX_BUILD=%LYX_SOURCE%\..\build-result-5-2010 Otherwise you get an error when compiling LyX with your script the second time. because when executing the script the second time the folder build-result-5-2010 already exists so the creation of it fails. Th result is that LyX is then built inside the CMake folder and lots of warnings - things that newbies won't understand and that is not the desired behavior. Just execute the script twice to the the problem. Therefore please leave RMDIR before set LYX_BUILD. -- Could you nevertheless please look at the CMake bugs: http://www.lyx.org/trac/ticket/9927 so that others won't have the same problems as I had? many thanks and best regards Uwe
Re: Beta hopefully soon, only waiting on Windows installer(s)
Am 19.01.2016 um 04:53 schrieb Scott Kostyshak: Please, do not sacrifice hours of sleep. I know but I had only this week and will soon have not much time for LyX. So the task was now or never. This was not my intention. I just meant that the Windows installer was the only thing left before beta. That is all I wanted to say. Nothing more. Perhaps this is a language issue. I think I see what you mean that "waiting" could mean that I am sitting around impatiently wondering where the Windows installer is. Yes, this was how I understood it. However, I had some time the weekend to almost finish the documentation. I hope it will be ready this week. Then it is even proposed to state in the release announcement that LyX has no developer to build on Windows and to create an installer. That hurts! I thought this is what you wanted. I thought you wanted help with development of a Windows installer or for someone to replace you so that LyX development would not be so stressful. I want more developers on Windows. And if anybody else could build the installer it would be perfect. So asking for new developers is always fine with me, but we cannot state that we don't have anybody to build a sufficient installer. That would be marketing suicide. regards Uwe
Re: Test results for 2.2.0dev on Mac
On Tue, Jan 19, 2016 at 08:10:59AM +0100, Stephan Witt wrote: > I have this: > > $ cat > /Users/stephan/git/lyx-build/cmake/2.2.0dev/Testing/.lyx/layouts/testalgorithm2e.layout > > #% Do not delete the line below; configure depends on this > # \DeclareLaTeXClass{testalgorithm2e} > Format 55 > Input algorithm2e.module > > Do you have the same in /home/scott/lyxbuilds/master/CMakeBuild/Testing/.lyx? Yes: $ cat Testing/.lyx/layouts/testalgorithm2e.layout #% Do not delete the line below; configure depends on this # \DeclareLaTeXClass{testalgorithm2e} Format 55 Input algorithm2e.module > BTW, when debugging tex2lyx it complains about missing USERDIR and I have to > add > -userdir /Users/stephan/git/lyx-build/cmake/2.2.0dev/Testing/.lyx explicitly. > Is it passed via environment in ctest runs? Or is it simply not printed? > Shouldn't these options passed via command line when calling tex2lyx? I do not have to do this (unless I set something up automatically so long ago that I forgot) so maybe this could be the problem. Kornel or Georg will probably have an idea. > Other possible differences except the OS? :) > - version or availability of algorithm2e.sty? I've tested on latest TeX Live 2015 and also with an older TeX Live 2015 (the file says "algorithm2e.sty,v 5.0 2013/01/06 14:40:35") > - remnants of previous runs somewhere? I use a clean build directory. > - mismatch of config files somewhere? Not sure. Scott signature.asc Description: PGP signature
Re: [LyX/master] Fix typos in paralist module. The correct command is not compactdescr, etc, but compactdesc. At least this is true in the most recent version on CTAN.
On Tue, Jan 19, 2016 at 07:19:19AM -0500, Richard Heck wrote: > > Since Uwe asked for an example file, I took it that he'd implicity +1'd it, > so I went ahead and committed it. In creating it, I also ran into the > problem fixed here. Seems like the request for an example file served its > purpose! > > Richard Loks good. Thanks, Scott signature.asc Description: PGP signature
Re: Questions for Uwe once you are back
Am 19.01.2016 um 02:24 schrieb Uwe Stöhr: Am 18.01.2016 um 10:18 schrieb Peter Kümmel: Maybe there is still a Qt 4 qmake.exe in PATH. No, the solution are path changes: - Qt is installed here in C:\Qt\Qt5-5-1-2010\5.5\msvc2010\bin Ah, this explains all problems! not in C:\Qt\Qt5.5.1-2010\5.5\msvc2010\bin (don't know why, I could change that if you prefer) - set LYX_BUILD=%LYX_SOURCE%\build-result-5-2010 instead of set LYX_BUILD=%LYX_SOURCE%\..\build-result-5-2010 (this quit the build operations because the folder could not be created) - set GNUWIN32_DIR=%LYX_SOURCE%\lyx-windows-deps-msvc2010 instead of set GNUWIN32_DIR=%LYX_SOURCE%\..\lyx-windows-deps-msvc2010 (same issue as above) I'll move them again out of the source tree. - I also added RMDIR /S /Q %LYX_SOURCE%\build-result-5-2010 to assure a clean rebuild. Otherwise files that were removed or renamed in Git or for a new LyX release could still be in the LYX_INSTALLED folder. This was already there. With these changes your script works for me. Also the merged build works. To avoid confusions and to re-enable myself to build devel versions of LyX 2.2 I restored my script in Git and upload your version with my changes as "build5-2010-installer" to clarify that this is the one-click file to build LyX for an installer. I removed the now 2 unused build scripts. I hope that this is fine for you. Feel free to change something in the one-click script and I will change my paths accordingly. OK. Many thanks, Peter regards Uwe
Re: [LyX/master] Fix typos in paralist module. The correct command is not compactdescr, etc, but compactdesc. At least this is true in the most recent version on CTAN.
Since Uwe asked for an example file, I took it that he'd implicity +1'd it, so I went ahead and committed it. In creating it, I also ran into the problem fixed here. Seems like the request for an example file served its purpose! Richard On 01/19/2016 06:52 AM, Richard Heck wrote: commit 29703f07d6718c53b3b13841f29c5d49ba35929d Author: Richard Heck Date: Tue Jan 19 06:49:33 2016 -0500 Fix typos in paralist module. The correct command is not compactdescr, etc, but compactdesc. At least this is true in the most recent version on CTAN. diff --git a/lib/layouts/paralist.module b/lib/layouts/paralist.module index e717f81..2e42cbb 100644 --- a/lib/layouts/paralist.module +++ b/lib/layouts/paralist.module @@ -104,7 +104,7 @@ End Style AsParagraphDescr CopyStyle Description - LatexName asparadescr + LatexName asparadesc Argument 1 LabelString "As Paragraph Description Options" Tooltip "Optional arguments for this list (see paralist manual)" @@ -113,7 +113,7 @@ End Style InParagraphDescr CopyStyle Description - LatexName inparadescr + LatexName inparadesc Argument 1 LabelString "In Paragraph Description Options" Tooltip "Optional arguments for this list (see paralist manual)" @@ -122,7 +122,7 @@ End Style CompactDescr CopyStyle Description - LatexName compactdescr + LatexName compactdesc TopSep0.0 BottomSep 0.0 ParSep0.0
Re: What does new module paralist do?
On 01/19/2016 05:28 AM, Richard Heck wrote: On 01/18/2016 08:30 PM, Uwe Stöhr wrote: Hi Georg, you added a new module "paralist". What is this for? Do you have a documentation how to use this module? I would like to have at least a small example files in our examples folder. This assures that the module will be usable in future (e.g. at least before a new release all examples files are compiled and possible regressions will this way become visible). If you like, we can also link it to the special files in the Help menu. If you don't have a documentation or no time, please give me a pointer to create this. Can this be used with enumitem? I'm guessing maybe not. And if not, then we should put an exclusion into the module. The answer seems to come in parts: (1) The enumitem and paralist packages CAN be used together, but paralist MUST be loaded before enumitem [1]. We do not have any way to ensure that, however. It might therefore be better not to allow them to be used together. (2) As of version 3.0, which has been out since 2011, inline lists, which are the main purpose of paralist, can be used in enumitem, as well. You have to give the package option "inline". The inline lists themselves are then starred versions of the usual lists. Possibly, we should add this behavior to enumitem. Then the exclusion of paralist won't matter so much. Richard [1] http://tex.stackexchange.com/questions/162799/compilation-error-when-including-enumitem-and-paralist-packages
Re: What does new module paralist do?
On 01/18/2016 08:30 PM, Uwe Stöhr wrote: Hi Georg, you added a new module "paralist". What is this for? Do you have a documentation how to use this module? I would like to have at least a small example files in our examples folder. This assures that the module will be usable in future (e.g. at least before a new release all examples files are compiled and possible regressions will this way become visible). If you like, we can also link it to the special files in the Help menu. If you don't have a documentation or no time, please give me a pointer to create this. It provides an interface to the paralist.sty package, for which documentation is here: http://mirrors.ctan.org/macros/latex/contrib/paralist/paralist.pdf The package is similar in spirit to enumitem, but does somewhat different things. There are basically three new types of "lists": 1. "as paragraph": The \items are set as separate paragraphs, but as normal paragraphs, so without any special indentation. 2. "in paragraph": The \items are set inline within a paragraph, e.g.: (1) the first \item; (2) the second \item; (3) the third \item. 3. "compact": This "is just a compact version of the standard enumerate environment [with a]ll the vertical skips are set to zero". I think the most widely used one here is "in paragraph". It's advantage is that you can still label these items and reference them. Each of these three types works for description, enumerate, and itemize, so there are nine new environments altogether in the module. There are also tons of optional arguments, as with enumitem, that can be used to perform various tricks, but these just have to be entered by hand. Richard
Re: What does new module paralist do?
On 01/18/2016 08:30 PM, Uwe Stöhr wrote: Hi Georg, you added a new module "paralist". What is this for? Do you have a documentation how to use this module? I would like to have at least a small example files in our examples folder. This assures that the module will be usable in future (e.g. at least before a new release all examples files are compiled and possible regressions will this way become visible). If you like, we can also link it to the special files in the Help menu. If you don't have a documentation or no time, please give me a pointer to create this. Can this be used with enumitem? I'm guessing maybe not. And if not, then we should put an exclusion into the module. Richard
Re: [patch] - GIT - version control for LyX documents not detected
> Am 19.01.2016 um 08:09 schrieb Stephan Witt : > > Am 19.01.2016 um 07:56 schrieb Peter Kümmel : >> >> Am 18. Januar 2016 23:25:03 MEZ, schrieb Pavel Sanda : >> Stephan Witt wrote: >> The attached patch fixes the broken detection of GIT version control. >> It seems so that Qt is caching the file meta data and fools the test >> of file emptiness. Perhaps this has changed with Qt5 and didn???t happen >> with Qt4??? >> >> Bad news, if your analysis is correct, we might encounter the same problem >> in other parts of the code as well. I don't have easy access to qt5 to test. >> >> Quick check says we use is FileEmpty also in: >> Buffer.cpp: enable = (d->preview_file_).exists() && >> !(d->preview_file_).isFileEmpty(); >> LaTeX.cpp:rerun = idxfile.exists() && idxfile.isFileEmpty(); >> LaTeX.cpp:if (head.haschanged(nlofile) || (nlofile.exists() && >> nlofile.isFileEmpty())) >> >> Pavel >> >> I did not follow this git stuff, but I assume current implementation tries >> to use system git calls via Qt classes, am I right? > > No. It is hand crafted stuff. The problem is the temporary file to collect > the output of system calls. > After creation it’s empty - of course. The system call changes this and the > next call to QFileInfo::size() returns 0 on my system. This is documented here: http://doc.qt.io/qt-5/qfileinfo.html I don’t know when this was changed and/or if this is/was platform dependent. Stephan > This I couldn’t debug further because of... I don’t know. In the past I’ve > been able to step into the Qt code. > After doing an upgrade of my OS and of the development system I have to get > it working again :( > > Stephan > >> I really could imagine this makes problems, because of Qt. >> >> Afaik QtCreator tries the same, is any code used from there in LyX? >> >> Had someone the idea to use libgit2 instead of the system git? Was it >> evaluated? > > No, this would add another external library to the list of dependencies…
Re: why Babel with dvi3 (LuTeX)?
On 2016-01-18, Kornel Benko wrote: > Am 18. Januar 2016 um 15:59:16, schrieb Guenter Milde >> As a short measure, everyone running the tests and realizing an error >> could/should add it to "suspiciousTests" as "todo" with a comment like >> "fails at commit ". This would help to narrow the possible breaking >> commits. > Correct me if I am wrong. Rephrasing the sentence: > Everyone realizing an error is supposed to change the test. > The error vanishes. Almost. I would phrase this so: Everyone realizing an error is supposed to change the test labelling patterns: invert the failing test and (at a minimum) give a comment about its first occurence. The export error is not reported in subsequent test runs. The section "todo" in "suspiciousTests" (resulting in the label inverted:todo or suspended:todo) is exactly for this kind of problems: * The failure is accnowledged and does not "pollute" further test runs. * Further action is required. This is similar to a bug report: a bug report does not solve the problem but is the right measure in case you realize something is broken but don't have the ressources (time, knowledge) to fix this immediately: -> you record the problem and available information -> the issue is not solved but also not forgotten Also similar to the bug reports, we have a backlog of unsolved issues: +1 it allows us to prioritize -1 it removes the urge to solve something fast For inverted tests, the sublabels give a hint of importance (from high to low to none) (see doc/Development.lyx, sec 3.3.1.6 "Inverted tests"): todo test failures that require attention: lyxbugs LyX bugs with a Trac number. ert Export failures due to "raw" LaTeX use in ERT or preamble code. "Wontfix" if demonstrating correct use and OK in the default output format. texissues Export fails due to LaTeX limitations like non-ASCII characters in verbatim or listings, incompatible packages, ... "Wontfix" if documents demonstrate correct use in the default output format: attic Documents in the attic. "Wontfix" Günter