]> git.lyx.org Git - lyx.git/commitdiff
Put \protect before paragraph alignment commands
authorDekel Tsur <dekelts@tau.ac.il>
Sat, 13 Jan 2001 20:32:10 +0000 (20:32 +0000)
committerDekel Tsur <dekelts@tau.ac.il>
Sat, 13 Jan 2001 20:32:10 +0000 (20:32 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1330 a592a061-630c-0410-9148-cb99ea01b6c8

src/ChangeLog
src/paragraph.C

index 664f582ff54b87b0cab7e457420279c964be1451..a886f7da676cd027df7e11c1f9e62c2807285f57 100644 (file)
@@ -1,4 +1,7 @@
 2001-01-13  Dekel Tsur  <dekelts@tau.ac.il>
 
+       * paragraph.C (SimpleTeXOnePar) Put \protect before paragraph
+       alignment commands (when needed).
+
        * text.C (InsertChar): Add ':' to number separator chars.
 
index 68c85766bcb3c4de0035bb79c0b23d7b1bb56040..4178582b7091cc1e31cf294c803fa4539699cbf6 100644 (file)
@@ -2563,6 +2563,8 @@ bool LyXParagraph::SimpleTeXOnePar(Buffer const * buf,
                        case LYX_ALIGN_SPECIAL:
                                break;
                        case LYX_ALIGN_LEFT:
+                               if (moving_arg)
+                                       os << "\\protect";
                                if (getParLanguage(bparams)->babel() != "hebrew") {
                                        os << "\\raggedright ";
                                        column+= 13;
@@ -2572,6 +2574,8 @@ bool LyXParagraph::SimpleTeXOnePar(Buffer const * buf,
                                }
                                break;
                        case LYX_ALIGN_RIGHT:
+                               if (moving_arg)
+                                       os << "\\protect";
                                if (getParLanguage(bparams)->babel() != "hebrew") {
                                        os << "\\raggedleft ";
                                        column+= 12;
@@ -2581,6 +2585,8 @@ bool LyXParagraph::SimpleTeXOnePar(Buffer const * buf,
                                }
                                break;
                        case LYX_ALIGN_CENTER:
+                               if (moving_arg)
+                                       os << "\\protect";
                                os << "\\centering ";
                                column+= 11;
                                break;