Attached is a patch that removes \it from math completion, since \it has
been deprecated for a while, only giving a warning in TL 2015, but an
error in 2016.

I think the patch is consistent with 24d01111 in the concept of removing
math completion but if the user insists on using it, LyX still displays
it with built-in support.

I don't think this will have much impact since \it is so short that I
doubt anyone uses completion to access it, but perhaps it is better than
nothing.

Scott
From 4d7e5edf8753e237467bfdaac79cd3c376e7310f Mon Sep 17 00:00:00 2001
From: Scott Kostyshak <skost...@lyx.org>
Date: Sat, 25 Jun 2016 04:49:02 -0400
Subject: [PATCH] Remove \it from math completion

\it is deprecated and \mathit should be used instead. \it can lead
to a warning in TeX Live 2015 and an error in TeX Live 2016.

Note that with this commit only affects completion, so LyX still
supports displaying \it in math if the user enters it without
completion.

This is consistent with 24d01111.
---
 src/mathed/InsetMathNest.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/mathed/InsetMathNest.cpp b/src/mathed/InsetMathNest.cpp
index d1c413b..843deb1 100644
--- a/src/mathed/InsetMathNest.cpp
+++ b/src/mathed/InsetMathNest.cpp
@@ -2216,7 +2216,9 @@ MathCompletionList::MathCompletionList(Cursor const & cur)
        for (it2 = words.begin(); it2 != words.end(); ++it2) {
                if (it2->second.inset != "macro" && !it2->second.hidden) {
                        // macros are already read from 
MacroTable::globalMacros()
-                       globals.push_back('\\' + it2->first);
+                       // \it is deprecated in math (should use \mathit)
+                       if (it2->first != "it")
+                               globals.push_back('\\' + it2->first);
                        //lyxerr << '\\' + it2->first << ' ';
                }
        }
-- 
2.7.4

Attachment: signature.asc
Description: PGP signature

Reply via email to