From 372712cfd99269cfcaf57ebb86048c1457e38075 Mon Sep 17 00:00:00 2001 From: Juergen Spitzmueller Date: Sun, 29 Jul 2018 15:16:44 +0200 Subject: [PATCH] Fix problem of unwanted spaces caused by macro definitions Patch by Gilbert J. M. Forkel Fixes: #11216 --- src/mathed/InsetMathMacroTemplate.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mathed/InsetMathMacroTemplate.cpp b/src/mathed/InsetMathMacroTemplate.cpp index a2fc064c00..8435d4819b 100644 --- a/src/mathed/InsetMathMacroTemplate.cpp +++ b/src/mathed/InsetMathMacroTemplate.cpp @@ -1217,7 +1217,7 @@ int InsetMathMacroTemplate::write(WriteStream & os, bool overwriteRedefinition) // \global\def\long\foo#1#2{#1,#2} // We use the \long prefix as this is the equivalent to \newcommand. // We cannot use \newcommand directly because \global does not work with it. - os << "\\global\\long\\def\\" << name(); + os << "\n\\global\\long\\def\\" << name(); docstring param = from_ascii("#0"); for (int i = 1; i <= numargs_; ++i) { param[1] = '0' + i; @@ -1249,7 +1249,7 @@ int InsetMathMacroTemplate::write(WriteStream & os, bool overwriteRedefinition) if (os.latex()) { // writing .tex. done. - os << "\n"; + os << "%\n"; ++num_lines; } else { // writing .lyx, write special .tex export only if necessary -- 2.39.2