Scott Kostyshak | 25 Apr 08:18 2015

LyX is broken on Ubuntu 15.04

Reported to lyx-users here: <at>

Reported and confirmed by multiple users here:

I've reproduced this with both self-compiled and from the repos.

The reason for why the menus are greyed out is not because the LFUNs
are disabled. In fact, if you run the command on the minibuffer it
works just fine. The problem is that Menu::updateView() is not even
being called when I click on the menu categories. For example, usually
(when this bug does not appear, e.g. on Ubuntu 14.10)
Menu::updateView() is called twice every time I click on "Document" (I
would be curious to know by the way why it is called twice and not
once). But on 15.04 it is not called at all when I click on the
"Document" menu.

I have found a (partial) work around: if you press "alt" in Ubuntu it
brings up the HUD which searches the menu of the open application. For
example, if I press alt and then "sett" it shows me "Settings
(Document)", meaning that it found an entry under Document that
matches my search string. I can then press return and it is as if I
went to Document > Settings. After I open the HUD and type a letter,
all of the menus are refreshed (Menu::updateView() was called).
However, you have to do this each time you want the menus to be

Does anyone feel like using Virtual Box to test out LyX on 15.04?

(Continue reading)

Scott Kostyshak | 25 Apr 05:52 2015

Behavior of second preview after error

Suppose there is an error during LaTeX compilation, and then the user
immediate previews again. We should show the same error again.

This doesn't happen since adding a "show output anyway" button at
09700d5b. The reason for this is that before, we used to remove output
files on error. This way, in the above case to know whether to show
the error again, we just would check whether there was a PDF file.
Now, however, we keep PDF files around even if there is an error (in
case the user wants to use the "show output anyway" button).

To fix this, I propose to store the error status in a buffer variable.
Then on preview, if there is already a valid cached PDF, we can just
check log_status and process it accordingly.

Any thoughts?


Jari-Matti Mäkelä | 24 Apr 14:37 2015

Re: lyx fi translation update

On 23.04.2015 11:29, Jürgen Spitzmüller wrote:
> 2015-04-22 11:11 GMT+02:00 Jari-Matti Mäkelä:
>> Updated the finnish translation from ~2900 strings to 3500. Used the
>> stable version but I hope it's useful for the dev version, too.
> Thanks. I have pushed this to stable and master (dev).
> Could you also please post a message to lyx-devel, stating something along
> the line of the following:
> I hereby grant permission to license my contributions to LyX
> under the GNU General Public License, version 2 or later.
> Please keep the translations coming!
> Jürgen


Sorry for spamming, but I was asked to state this:

I hereby grant permission to license my contributions to LyX
under the GNU General Public License, version 2 or later. This applies
to everything I've posted unless otherwise noted in the source code files.

Jari-Matti Mäkelä

(Continue reading)

Sven Schreiber | 22 Apr 22:44 2015

Re: #9442: Paste via keyboard shortcut (sometimes) not working on Windows

today I have consciously experienced the behavior that James had
described: I cut a paragraph that contained some math insets and when I
pasted it the math insets were gone and instead the TeX equivalent code
was pasted as text.

After closing and restarting LyX (not the computer) the problem
disappeared. That was on Win 7 with Lyx 2.1.3.


Am 19.04.2015 um 20:09 schrieb LyX Ticket Tracker:
> #9442: Paste via keyboard shortcut (sometimes) not working on Windows
> ------------------------+-------------------------
>  Reporter:  svetosch    |       Owner:  lasgouttes
>      Type:  defect      |      Status:  new
>  Priority:  normal      |   Milestone:  2.1.4
> Component:  general     |     Version:  2.1.3
>  Severity:  major       |  Resolution:
>  Keywords:  os=windows  |
> ------------------------+-------------------------
> Comment (by skostysh):
>  Note another related bug, in addition to #8695 (mentioned by the OP),
>  there is also #9155.

(Continue reading)

Scott Kostyshak | 22 Apr 03:37 2015

C++ question about const

My question is in regards to the patch I propose for #6173:

I move the definition of cur up because I need it before the return. I
then need to pass it to notifyCursorLeavesOrEnters(), which requires
it not to be const, so I removed the const in the definition. But what
should I do? Alternatives to what I did are: (b) use a different
definition, cur2, and leave cur alone. (c) use a const cast in the
call to notifyCursorLeavesOrEnters()?

Is there a clear correct way?


Jürgen Spitzmüller | 20 Apr 14:43 2015

[patch] PassThruChars

In order to implement a linguistic feature properly (support for the forest package to generate structure trees), I need a way to pass only selected chars verbatim (here, [ and ], since these are active characters in the package and thus must not be escaped by braces). Making the whole inset PassThru is not a good option, neither the need to use ERT for the brackets.

Thus, I propose the following patch, which adds PassThruChars tags to InsetLayout and Layout, where a comma.separated list of characters that should be treated verbatim can be specified.

I think this might also be useful in other cases.

diff --git a/lib/scripts/ b/lib/scripts/
index 1957633..95412ca 100644
--- a/lib/scripts/
+++ b/lib/scripts/
 <at>  <at>  -180,6 +180,9  <at>  <at>  import os, re, string, sys
 # Incremented to format 54, 11 Jan 2014 by gb
 # New InsetLayout tag "FixedWidthPreambleEncoding"

+# Incremented to format 55, 20 April 2015 by spitz
+# New InsetLayout and Layout tags "PassThruChars"
 # Do not forget to document format change in Customization
 # Manual (section "Declaring a new text class").

 <at>  <at>  -187,7 +190,7  <at>  <at>  import os, re, string, sys
 # development/tools/ script to update all
 # layout files to the new format.

-currentFormat = 54
+currentFormat = 55

 def usage(prog_name):
 <at>  <at>  -411,7 +414,7  <at>  <at>  def convert(lines):
                 i += 1

-        if format >= 50 and format <= 53:
+        if format >= 50 and format <= 54:
             # nothing to do.
             i += 1
diff --git a/src/Layout.cpp b/src/Layout.cpp
index bb31287..be51756 100644
--- a/src/Layout.cpp
+++ b/src/Layout.cpp
 <at>  <at>  -51,6 +51,7  <at>  <at>  enum LayoutTags {
 <at>  <at>  -235,6 +236,7  <at>  <at>  bool Layout::readIgnoreForcelocal(Lexer & lex, TextClass const & tclass)
 		{ "parsep",         LT_PARSEP },
 		{ "parskip",        LT_PARSKIP },
 		{ "passthru",       LT_PASS_THRU },
+		{ "passthruchars",  LT_PASS_THRU_CHARS },
 		{ "preamble",       LT_PREAMBLE },
 		{ "refprefix",      LT_REFPREFIX },
 		{ "requires",       LT_REQUIRES },
 <at>  <at>  -548,6 +550,10  <at>  <at>  bool Layout::readIgnoreForcelocal(Lexer & lex, TextClass const & tclass)
 			lex >> pass_thru;

+			lex >> pass_thru_chars;
+			break;
 			lex >> parbreak_is_newline;
 <at>  <at>  -1280,6 +1286,7  <at>  <at>  void Layout::write(ostream & os) const
 		os << "\tLabelCounter \"" << to_utf8(counter) << "\"\n";
 	os << "\tFreeSpacing " << free_spacing << '\n';
 	os << "\tPassThru " << pass_thru << '\n';
+	os << "\tPassThruChars " << to_utf8(pass_thru_chars) << '\n';
 	os << "\tParbreakIsNewline " << parbreak_is_newline << '\n';
 	switch (spacing.getSpace()) {
 	case Spacing::Double:
diff --git a/src/Layout.h b/src/Layout.h
index 2da831e..9f98f0a 100644
--- a/src/Layout.h
+++ b/src/Layout.h
 <at>  <at>  -285,6 +285,8  <at>  <at>  public:
 	bool free_spacing;
 	bool pass_thru;
+	/// Individual chars to be passed verbatim
+	docstring pass_thru_chars;
 	bool parbreak_is_newline;
 	/// show this in toc
diff --git a/src/OutputParams.h b/src/OutputParams.h
index 8663c17..e5e9ad0 100644
--- a/src/OutputParams.h
+++ b/src/OutputParams.h
 <at>  <at>  -254,6 +254,9  <at>  <at>  public:
 	/// Should we output verbatim or escape LaTeX's special chars?
 	bool pass_thru;

+	/// Should we output verbatim specific chars?
+	docstring pass_thru_chars;
 	/// Should we output captions?
 	bool html_disable_captions;

diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp
index 906a069..35e86a1 100644
--- a/src/Paragraph.cpp
+++ b/src/Paragraph.cpp
 <at>  <at>  -1139,7 +1139,13  <at>  <at>  void Paragraph::Private::latexSpecialChar(otexstream & os,
 	char_type const c = (runparams.use_polyglossia) ?
 		owner_->getUChar(bparams, i) : text_[i];

-	if (style.pass_thru || runparams.pass_thru) {
+	// Characters that are requested ny layout/insetlayout to be handled verbatim
+	vector<docstring> pass_thru_chars = getVectorFromString(style.pass_thru_chars);
+	vector<docstring> il_pass_thru_chars = getVectorFromString(runparams.pass_thru_chars);
+	pass_thru_chars.insert(pass_thru_chars.end(), il_pass_thru_chars.begin(), il_pass_thru_chars.end());
+	if (style.pass_thru || runparams.pass_thru
+	    || (std::find(pass_thru_chars.begin(), pass_thru_chars.end(), docstring(1, c)) !=
pass_thru_chars.end())) {
 		if (c != '\0') {
 			Encoding const * const enc = runparams.encoding;
 			if (enc && !enc->encodable(c))
diff --git a/src/insets/InsetLayout.cpp b/src/insets/InsetLayout.cpp
index 6b30f5a..6e081d9 100644
--- a/src/insets/InsetLayout.cpp
+++ b/src/insets/InsetLayout.cpp
 <at>  <at>  -117,6 +117,7  <at>  <at>  bool InsetLayout::read(Lexer & lex, TextClass const & tclass)
 <at>  <at>  -171,6 +172,7  <at>  <at>  bool InsetLayout::read(Lexer & lex, TextClass const & tclass)
 		{ "obsoletedby", IL_OBSOLETEDBY },
 		{ "parbreakisnewline", IL_PARBREAKISNEWLINE },
 		{ "passthru", IL_PASSTHRU },
+		{ "passthruchars", IL_PASSTHRU_CHARS },
 		{ "preamble", IL_PREAMBLE },
 		{ "refprefix", IL_REFPREFIX },
 		{ "requires", IL_REQUIRES },
 <at>  <at>  -296,6 +298,9  <at>  <at>  bool InsetLayout::read(Lexer & lex, TextClass const & tclass)
 		case IL_PASSTHRU:
 			lex >> passthru_;
+			lex >> passthru_chars_;
+			break;
 			lex >> parbreakisnewline_;
diff --git a/src/insets/InsetLayout.h b/src/insets/InsetLayout.h
index d2e6458..9589fad 100644
--- a/src/insets/InsetLayout.h
+++ b/src/insets/InsetLayout.h
 <at>  <at>  -156,6 +156,8  <at>  <at>  public:
 	bool isPassThru() const { return passthru_; }
+	docstring passThruChars() const { return passthru_chars_; }
+	///
 	bool parbreakIsNewline() const { return parbreakisnewline_; }
 	bool isNeedProtect() const { return needprotect_; }
 <at>  <at>  -262,6 +264,8  <at>  <at>  private:
 	bool passthru_;
+	docstring passthru_chars_;
+	///
 	bool parbreakisnewline_;
 	bool freespacing_;
diff --git a/src/insets/InsetText.cpp b/src/insets/InsetText.cpp
index 7a67123..43749f9 100644
--- a/src/insets/InsetText.cpp
+++ b/src/insets/InsetText.cpp
 <at>  <at>  -478,6 +478,11  <at>  <at>  void InsetText::latex(otexstream & os, OutputParams const & runparams) const
 		rp.pass_thru = true;
 	if (il.isNeedProtect())
 		rp.moving_arg = true;
+	if (!il.passThruChars().empty()) {
+		if (!rp.pass_thru_chars.empty())
+			rp.pass_thru_chars += ",";
+		rp.pass_thru_chars += il.passThruChars();
+	}
 	rp.par_begin = 0;
 	rp.par_end = paragraphs().size();

Jean-Marc Lasgouttes | 18 Apr 19:18 2015

[PATCH] Auto feature for minibuffer toolbar

This patch makes minibuffer work like it does in emacs: it is open when 
invoking M-x, and gets closed when the command has been executed.

It may be necessary to remove you session data (.config/LyX/lyx.conf for 
linux) so that the toolbar gets the proper flags. This is probably a 
problem when upgrading, I am not sure that we have a good solution for that.


Phil Chalmers | 17 Apr 17:15 2015

Re: #9506: Macro's outside of math mode

I completely understand now, thanks so much. 

While I have your attention, I'd like to make improvements to one of the default class file layouts that ships with LyX (namely, the JSS layout). What's the standard protocol for this? Open a feature ticket, attach an example of the proposed changes with a working example? Or should there be documents comparing the additions pre- and post to emphases the proposed changes? Cheers.

On Fri, Apr 17, 2015 at 6:20 AM, LyX Ticket Tracker <trac <at>> wrote:
#9506: Macro's outside of math mode
 Reporter:  philchalmers  |       Owner:  lasgouttes
     Type:  enhancement   |      Status:  closed
 Priority:  normal        |   Milestone:
Component:  general       |     Version:  2.1.3
 Severity:  normal        |  Resolution:  duplicate
 Keywords:                |

Comment (by lasgouttes):

 Note that a way to create what you want is through Flex inset, that is
 inset that out put the the command you want. A good example is the
 'Logical Markup' module, that add inset types like {{{code}}} to the
 Edit>Text Style menu. It is not difficult to create your own modules, or
 even to define one of those new insets using the "Local Layout" document

Ticket URL: <>
The LyX Project <>
LyX -- The Document Processor

Uwe Stöhr | 17 Apr 02:04 2015

some feedback for the new LyX toolbar buttons

Hello Enrico,

many thanks for your work with the buttons. I don't have a strong 
opinion for the colors and style, I only want to give feedback for the 
So far all buttons are OK except of:

- the insert index entry button. It is very hard to understand what this 
is about because it appears as big blob (dark blue bar within black 
bars). I find that the button in LyX 2.1 is much better recognizable. 
Maybe you can use it as base for a better button for LyX 2.2?

- the list buttons. it is hard to distinguish the different buttons. I 
Personally I have problems to distinguish the List and the Description 
button. Older people have the same problem also with the List and the 
Item button. Maybe you can so what is done in the buttons in LyX 2.1: 
different blue bar width for List and Description and a bit more 
horizontal space between the bars.

regards Uwe

Jean-Marc Lasgouttes | 15 Apr 11:57 2015

Question for Richard

Hi Richard,

I have a question about an old commit (see bleow). Basically, what you 
do here causes the message machinery to be invoked before the locale is 
properly set up. It is not a big problem per se, but the patch looks 
very dubious to me. Can you remember what the problem was?


commit c4f8a516bd917acdf305891f46f29138bd92b8c7
Author: Richard Heck <rgheck <at>>
Date:   Tue Apr 15 15:32:02 2008 +0000

     This string cannot be translated here, because it is a layout 

svn:// <at> 24266a592a061-630c-0410-9148-cb99ea01b6c8

diff --git a/src/TextClass.cpp b/src/TextClass.cpp
index a735710..0ed38f3 100644
--- a/src/TextClass.cpp
+++ b/src/TextClass.cpp
 <at>  <at>  -109,7 +109,8  <at>  <at>  std::string translateRT(TextClass::ReadType rt)
  } // namespace anon

-docstring const TextClass::emptylayout_ = from_ascii(N_("Plain Layout"));
+// This string cannot be translated, because it is a layout identifier.
+docstring const TextClass::emptylayout_ = from_ascii("Plain Layout");

  InsetLayout DocumentClass::empty_insetlayout_;
 <at>  <at>  -129,6 +130,7  <at>  <at>  TextClass::TextClass()
         titletype_ = TITLE_COMMAND_AFTER;
         titlename_ = "maketitle";
         loaded_ = false;
+       _("Plain Layout"); // a hack to make this translatable

mayank25080562 | 15 Apr 11:35 2015

mayank25080562 <at> has indicated you're a friend. Accept?

Click here to discover mayank25080562 <at>'s favorite content!

mayank25080562 <at> says you're a friend

I would like to add you as a friend


Connecting with mayank25080562 <at> helps you discover great content they recommend :)