From 63295f9dc54267dcfe4f55b33303f366ec7a84e2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Uwe=20St=C3=B6hr?= Date: Mon, 19 Nov 2012 01:13:37 +0100 Subject: [PATCH] Font.cpp: fix bug #8424 We must group the content which should be changed in size wit a pair of braces because the LaTeX size commands are otherwise switches. We already do so for many case, but not for the case that a size command is inside another command. This patch adds now always a brace pair around the selected text which is the safest method. --- src/Font.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Font.cpp b/src/Font.cpp index 08501759c7..6e7ab34733 100644 --- a/src/Font.cpp +++ b/src/Font.cpp @@ -332,7 +332,7 @@ int Font::latexWriteStartChanges(odocstream & os, BufferParams const & bparams, } } - // When the current language is Hebrew, Arabic, or Farsi + // If the current language is Hebrew, Arabic, or Farsi // the numbers are written Left-to-Right. ArabTeX package // reorders the number automatically but the packages used // for Hebrew and Farsi (Arabi) do not. @@ -428,7 +428,7 @@ int Font::latexWriteStartChanges(odocstream & os, BufferParams const & bparams, } os << '\\' << LaTeXSizeNames[f.size()] - << ' '; + << '{'; count += strlen(LaTeXSizeNames[f.size()]) + 2; } return count; @@ -513,6 +513,8 @@ int Font::latexWriteEndChanges(otexstream & os, BufferParams const & bparams, os << '}'; ++count; } + os << '}'; + ++count; } // When the current language is Hebrew, Arabic, or Farsi -- 2.39.2