[LyX/master] Fix make check.
commit c9c2179c1faf383badead96a58e7826afdcc4fb0 Author: Pavel SandaDate: Thu Jan 19 17:00:18 2017 -0800 Fix make check. --- src/Makefile.am |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index 4a46f38..3f3e99a 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -738,7 +738,7 @@ ADD_FRAMEWORKS = -framework QtGui -framework QtCore -framework AppKit -framework endif check_layout_CPPFLAGS = $(AM_CPPFLAGS) -check_layout_LDADD = support/liblyxsupport.a $(LIBICONV) $(BOOST_LIBS) @LIBS@ \ +check_layout_LDADD = support/liblyxsupport.a CiteEnginesList.o $(LIBICONV) $(BOOST_LIBS) @LIBS@ \ $(ICONV_LIBS) $(ZLIB_LIBS) $(QT_LIB) $(LIBSHLWAPI) check_layout_LDFLAGS = $(QT_LDFLAGS) $(ADD_FRAMEWORKS) check_layout_SOURCES = \
[LyX/master] Fix make distcheck, step1.
commit 0637e9d19fb5e3db7b5d27d3dcea14c3ad80ad98 Author: Pavel SandaDate: Thu Jan 19 16:42:43 2017 -0800 Fix make distcheck, step1. This only let tarball creation to proceed, whether there is something new needed by autotest needs to be tested by anyone who is in charge. --- autotests/Makefile.am | 12 ++-- 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/autotests/Makefile.am b/autotests/Makefile.am index 9f58336..968ccea 100644 --- a/autotests/Makefile.am +++ b/autotests/Makefile.am @@ -4,14 +4,14 @@ EXTRA_DIST = $(TEST_FILES) TEST_FILES = \ export/IncludeMissingEndTagDiv.lyx \ - export/ja/wrong_auto_encoding.lyx \ - export/languagenesting1.lyx \ - export/languagenesting2.lyx \ - export/LongestLabelWithUnderscore.lyx \ + export/latex/ja_wrong_auto_encoding.lyx \ + export/latex/languagenesting1.lyx \ + export/latex/languagenesting2.lyx \ + export/latex/LongestLabelWithUnderscore.lyx \ export/MissingEndLayoutBetweenTables.lyx \ export/MissingEndTagDiv.lyx \ - export/TableErrorIfSlovakTextInserted.lyx \ - export/utf8-plain-with-tex-fonts.lyx \ + export/latex/TableErrorIfSlovakTextInserted.lyx \ + export/latex/utf8-plain-with-tex-fonts.lyx \ export/WrongDfnTagHandling.lyx \ mathmacros/architecture.lyx \ mathmacros/architecture.lyx \
[LyX/2.2.x] Allow LyX to open empty files (created, e.g., via "touch").
commit 239be02234dbffcf42eaeabb5576208a7ac69e41 Author: Richard HeckDate: Thu Jan 19 15:34:45 2017 -0500 Allow LyX to open empty files (created, e.g., via "touch"). Patch from new contributor Jan Niklas Hasse. (cherry picked from commit 0d77a7e3251aa7a971a365e3fa698ce9f26e2b9d) --- lib/generate_contributions.py |8 src/buffer_funcs.cpp | 18 -- 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/lib/generate_contributions.py b/lib/generate_contributions.py index 41c4961..50ad4dc 100755 --- a/lib/generate_contributions.py +++ b/lib/generate_contributions.py @@ -827,6 +827,14 @@ contributors = [ "9 June 2015", u"Haiku OS support"), + contributor(u"Jan Niklas Hasse", + "jhasse () bixense ! com", + "GPL", + "Re: Patch to make it possible to open empty files", + "m=148163124122780", + "23 December 2016", + u"File opening enhancement"), + contributor(u"Richard Heck", "rgheck () comcast ! net", "GPL", diff --git a/src/buffer_funcs.cpp b/src/buffer_funcs.cpp index 03ecc90..beab239 100644 --- a/src/buffer_funcs.cpp +++ b/src/buffer_funcs.cpp @@ -95,12 +95,18 @@ Buffer * checkAndLoadLyXFile(FileName const & filename, bool const acceptDirty) bool const exists = filename.exists(); bool const tryVC = exists ? false : LyXVC::fileInVC(filename); if (exists || tryVC) { - if (exists && !filename.isReadableFile()) { - docstring text = bformat(_("The file %1$s exists but is not " - "readable by the current user."), - from_utf8(filename.absFileName())); - Alert::error(_("File not readable!"), text); - return 0; + if (exists) { + if (!filename.isReadableFile()) { + docstring text = bformat(_("The file %1$s exists but is not " + "readable by the current user."), + from_utf8(filename.absFileName())); + Alert::error(_("File not readable!"), text); + return 0; + } + if (filename.extension() == "lyx" && filename.isFileEmpty()) { + // Makes it possible to open an empty (0 bytes) .lyx file + return newFile(filename.absFileName(), "", true); + } } Buffer * b = theBufferList().newBuffer(filename.absFileName()); if (!b) {
r41081 - www-user/trunk/farm/cookbook/LyX
Author: rgheck Date: Thu Jan 19 21:40:04 2017 New Revision: 41081 URL: http://www.lyx.org/trac/changeset/41081 Log: Regenerate contributors. Modified: www-user/trunk/farm/cookbook/LyX/blanket-permission.inc www-user/trunk/farm/cookbook/LyX/credits.inc Modified: www-user/trunk/farm/cookbook/LyX/blanket-permission.inc == --- www-user/trunk/farm/cookbook/LyX/blanket-permission.inc Sun Jan 15 17:40:34 2017(r41080) +++ www-user/trunk/farm/cookbook/LyX/blanket-permission.inc Thu Jan 19 21:40:04 2017(r41081) @@ -421,6 +421,12 @@ "m=143381137411598", "9 June 2015"); +$output=$output.blanket_contrib("Jan Niklas Hasse", +"jhasse () bixense ! com", +"Re: Patch to make it possible to open empty files", +"m=148163124122780", +"23 December 2016"); + $output=$output.blanket_contrib("Richard Heck", "rgheck () comcast ! net", "GPL Statement", Modified: www-user/trunk/farm/cookbook/LyX/credits.inc == --- www-user/trunk/farm/cookbook/LyX/credits.incSun Jan 15 17:40:34 2017(r41080) +++ www-user/trunk/farm/cookbook/LyX/credits.incThu Jan 19 21:40:04 2017(r41081) @@ -318,6 +318,10 @@ "jessica.l.hamilton () gmail ! com", "Haiku OS support"); +$output=$output.credits_contrib("Jan Niklas Hasse", +"jhasse () bixense ! com", +"File opening enhancement"); + $output=$output.credits_contrib("Richard Heck", "rgheck () comcast ! net", "Bug fixes, layout modules, BibTeX code, XHTML export.
[LyX/master] Regenerate contributions.
commit 30690d78f936be8d6a50c28697d199dd25b5210c Author: Richard HeckDate: Thu Jan 19 15:39:14 2017 -0500 Regenerate contributions. --- lib/CREDITS |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/lib/CREDITS b/lib/CREDITS index 9922a58..9590cfc 100644 --- a/lib/CREDITS +++ b/lib/CREDITS @@ -196,6 +196,9 @@ @bJessica Hamilton @iE-mail: jessica.l.hamilton () gmail ! com Haiku OS support +@bJan Niklas Hasse +@iE-mail: jhasse () bixense ! com + File opening enhancement @bRichard Heck @iE-mail: rgheck () comcast ! net Bug fixes, layout modules, BibTeX code, XHTML export. Current stable branch maintainer.
[LyX/master] Allow LyX to open empty files (created, e.g., via "touch").
commit 0d77a7e3251aa7a971a365e3fa698ce9f26e2b9d Author: Richard HeckDate: Thu Jan 19 15:34:45 2017 -0500 Allow LyX to open empty files (created, e.g., via "touch"). Patch from new contributor Jan Niklas Hasse. --- lib/generate_contributions.py |8 src/buffer_funcs.cpp | 18 -- 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/lib/generate_contributions.py b/lib/generate_contributions.py index 4fce7c1..90be99c 100755 --- a/lib/generate_contributions.py +++ b/lib/generate_contributions.py @@ -855,6 +855,14 @@ contributors = [ "9 June 2015", u"Haiku OS support"), + contributor(u"Jan Niklas Hasse", + "jhasse () bixense ! com", + "GPL", + "Re: Patch to make it possible to open empty files", + "m=148163124122780", + "23 December 2016", + u"File opening enhancement"), + contributor(u"Richard Heck", "rgheck () comcast ! net", "GPL", diff --git a/src/buffer_funcs.cpp b/src/buffer_funcs.cpp index 03ecc90..beab239 100644 --- a/src/buffer_funcs.cpp +++ b/src/buffer_funcs.cpp @@ -95,12 +95,18 @@ Buffer * checkAndLoadLyXFile(FileName const & filename, bool const acceptDirty) bool const exists = filename.exists(); bool const tryVC = exists ? false : LyXVC::fileInVC(filename); if (exists || tryVC) { - if (exists && !filename.isReadableFile()) { - docstring text = bformat(_("The file %1$s exists but is not " - "readable by the current user."), - from_utf8(filename.absFileName())); - Alert::error(_("File not readable!"), text); - return 0; + if (exists) { + if (!filename.isReadableFile()) { + docstring text = bformat(_("The file %1$s exists but is not " + "readable by the current user."), + from_utf8(filename.absFileName())); + Alert::error(_("File not readable!"), text); + return 0; + } + if (filename.extension() == "lyx" && filename.isFileEmpty()) { + // Makes it possible to open an empty (0 bytes) .lyx file + return newFile(filename.absFileName(), "", true); + } } Buffer * b = theBufferList().newBuffer(filename.absFileName()); if (!b) {
[LyX/master] Add some notes to User Guide about defining your own reference formats.
commit 400d13b960fa27f68c98809ae8bca362bfd88b04 Author: Richard HeckDate: Thu Jan 19 11:34:36 2017 -0500 Add some notes to User Guide about defining your own reference formats. --- lib/doc/UserGuide.lyx | 59 +--- 1 files changed, 55 insertions(+), 4 deletions(-) diff --git a/lib/doc/UserGuide.lyx b/lib/doc/UserGuide.lyx index 9774567..065a127 100644 --- a/lib/doc/UserGuide.lyx +++ b/lib/doc/UserGuide.lyx @@ -27526,7 +27526,11 @@ fig ) can be done \change_inserted 424524441 1483414614 -, for refstyle, +, for +\series bold +refstyle +\series default +, \change_unchanged with this command \change_inserted 424524441 1483414616 @@ -27543,13 +27547,60 @@ fig newref{fig}{refcmd={Image on page \backslash pageref{#1}}} +\change_inserted 424524441 1484843594 + \series default \begin_inset Newline newline \end_inset -For more information about the format, have a look at the package documentations -, +Please note that neither +\series bold +prettyref +\series default + nor +\series bold +refstyle +\series default + (nor \SpecialChar LyX + itself) predefines reference formats for all available types. + This is especially true for the wide variety of mathematical `theorem' + environments. + So if you want to make formatted references to, say, Propositions, then + you will need to define the relevant format yourself. + For +\series bold +prettyref +\series default +, you could do so as follows: +\begin_inset Newline newline +\end_inset + + +\series bold + +\backslash +newrefformat{prop}{Proposition +\backslash +ref{#1}} +\change_unchanged + +\series default + +\begin_inset Newline newline +\end_inset + +For more information about +\change_inserted 424524441 1484843645 +defining formatted references +\change_deleted 424524441 1484843647 +the format +\change_unchanged +, have a look at the package documentation +\change_deleted 424524441 1484843659 +s, +\change_unchanged + \begin_inset CommandInset citation LatexCommand cite key "prettyref,refstyle" @@ -27557,7 +27608,7 @@ key "prettyref,refstyle" \end_inset . -\change_inserted 424524441 1483414624 +\change_inserted 424524441 1484843594 \begin_inset Newline newline \end_inset
[LyX/master] Typo.
commit 8048ce294a4e76edeca02b09c5f82f010ecde009 Author: Richard HeckDate: Thu Jan 19 15:29:14 2017 -0500 Typo. --- lib/doc/UserGuide.lyx |8 ++-- 1 files changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/doc/UserGuide.lyx b/lib/doc/UserGuide.lyx index 065a127..d1fd4e8 100644 --- a/lib/doc/UserGuide.lyx +++ b/lib/doc/UserGuide.lyx @@ -8320,14 +8320,12 @@ Verbatim \end_layout \begin_layout Verbatim - This is Verbatim. \end_layout \begin_layout Verbatim \noindent \align block - The following 2 lines are empty: \end_layout @@ -8340,7 +8338,6 @@ The following 2 lines are empty: \end_layout \begin_layout Verbatim - Almost everything is allowed in Verbatim:"%&$ยง#~'` \backslash }][{| @@ -8364,7 +8361,6 @@ Verbatim \end_layout \begin_layout Verbatim* - This is Verbatim*. \end_layout @@ -27547,7 +27543,7 @@ refstyle newref{fig}{refcmd={Image on page \backslash pageref{#1}}} -\change_inserted 424524441 1484843594 +\change_inserted 424524441 1484857490 \series default @@ -27572,7 +27568,7 @@ refstyle \series bold prettyref \series default -, you could do so as follows: +, you might do so as follows: \begin_inset Newline newline \end_inset
[LyX/2.2.x] Add some remarks about defining formatted references.
commit 6693fe5d6df5617a2cc2b13262293fba15518e4f Author: Richard HeckDate: Thu Jan 19 15:23:35 2017 -0500 Add some remarks about defining formatted references. --- lib/doc/UserGuide.lyx | 45 + status.22x|3 +++ 2 files changed, 44 insertions(+), 4 deletions(-) diff --git a/lib/doc/UserGuide.lyx b/lib/doc/UserGuide.lyx index 15995f3..9b189b3 100644 --- a/lib/doc/UserGuide.lyx +++ b/lib/doc/UserGuide.lyx @@ -26479,8 +26479,12 @@ newref \series default (refstyle) in the \SpecialChar LaTeX preamble of the document. - For example redefining all references to figures (which have the label - shortcut + For example, if you are using +\series bold +refstyle +\series default +, then redefining all references to figures (which have the label shortcut + \begin_inset Quotes eld \end_inset @@ -26508,8 +26512,41 @@ pageref{#1}}} \begin_inset Newline newline \end_inset -For more information about the format, have a look at the package documentations -, +Please note that neither +\series bold +prettyref +\series default + nor +\series bold +refstyle +\series default + (nor LyX itself) defines reference formats for all available types. + This is especially true for the wide variety of mathematical `theorem' + environments. + So if you want to make formatted references to, say, Propositions, then + you will need to define the relevant format yourself. + For +\series bold +prettyref +\series default +, you might do so as follows: +\begin_inset Newline newline +\end_inset + + +\series bold + +\backslash +newrefformat{prop}{Proposition +\backslash +ref{#1}} +\series default + +\begin_inset Newline newline +\end_inset + +For more information about the defining formatted references, have a look + at the package documentations, \begin_inset CommandInset citation LatexCommand cite key "prettyref,refstyle" diff --git a/status.22x b/status.22x index a9f1fb2..6897b34 100644 --- a/status.22x +++ b/status.22x @@ -192,6 +192,9 @@ What's new - Fix compilation of the Fexynman diagram example file. +- Added some comments to User Guide section 6.1 about defining formatted + references (bug 10545). + * LYXHTML
[LyX/master] BOX tweak
commit d712c67be9231c84d6acf88e75a2cc08ba6a1b42 Author: Jean-Marc LasgouttesDate: Fri Jan 13 10:17:05 2017 +0100 BOX tweak Add a pixel gap around boxes. When a box is invisible, its width should be null (but keep the weight to avoid drawing problems (think empty sqrt in a macro). --- src/mathed/MathRow.cpp | 22 ++ 1 files changed, 14 insertions(+), 8 deletions(-) diff --git a/src/mathed/MathRow.cpp b/src/mathed/MathRow.cpp index 9465b32..0c6995a 100644 --- a/src/mathed/MathRow.cpp +++ b/src/mathed/MathRow.cpp @@ -51,10 +51,10 @@ MathRow::MathRow(MetricsInfo & mi, MathData const * ar) // Then insert the MathData argument bool const has_contents = ar->addToMathRow(*this, mi); - // empty arrays are visible when they are editable - // we reserve the necessary space anyway (even if nothing gets drawn) + // A MathRow should not be completely empty if (!has_contents) { Element e(mi, BOX, MC_ORD); + // empty arrays are visible when they are editable e.color = mi.base.macro_nesting == 0 ? Color_mathline : Color_none; push_back(e); } @@ -175,7 +175,13 @@ void MathRow::metrics(MetricsInfo & mi, Dimension & dim) const break; case BOX: d = theFontMetrics(mi.base.font).dimension('I'); - d.wid += e.before + e.after; + if (e.color != Color_none) { + // allow for one pixel before/after the box. + d.wid += e.before + e.after + 2; + } else { + // hide the box, but give it some height + d.wid = 0; + } break; } @@ -285,12 +291,12 @@ void MathRow::draw(PainterInfo & pi, int x, int const y) const pi.pain.enterMonochromeMode(Color_mathbg, Color_mathmacroblend); break; case BOX: { + if (e.color == Color_none) + break; Dimension const d = theFontMetrics(pi.base.font).dimension('I'); - // the box is not visible in non-editable context (except for grey macro boxes). - if (e.color != Color_none) - pi.pain.rectangle(x + e.before, y - d.ascent(), - d.width() - 1, d.height() - 1, e.color); - x += d.wid + e.before + e.after; + pi.pain.rectangle(x + e.before + 1, y - d.ascent(), + d.width() - 1, d.height() - 1, e.color); + x += d.wid + 2 + e.before + e.after; break; } case DUMMY: