]> git.lyx.org Git - features.git/commitdiff
Tiny cleanup
authorJuergen Spitzmueller <spitz@lyx.org>
Fri, 16 Aug 2019 09:48:57 +0000 (11:48 +0200)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 18 Jun 2020 13:48:44 +0000 (15:48 +0200)
No change in functionality

src/Paragraph.cpp
src/output_latex.cpp

index 311e9528070f7cf0dfe23ade396091b36d741dac..eb2bb9548cc6f3fe1c152fb4cd0a6da86e75c923 100644 (file)
@@ -2748,7 +2748,7 @@ void Paragraph::latex(BufferParams const & bparams,
                runparams.post_macro = rp.post_macro;
        }
 
-    // Close wrapper for alien script
+       // Close wrapper for alien script
        if (!alien_script.empty()) {
                os << "}";
                alien_script.clear();
index d320e0efe694f606f5bb2b5a9168889cb7cb316f..0866317702bad726045252fdc71b7947f41fc8e5 100644 (file)
@@ -780,7 +780,7 @@ void TeXOnePar(Buffer const & buf,
        Paragraph const * nextpar = runparams.isLastPar
                ? nullptr : &paragraphs.at(pit + 1);
 
-       bool const intitle_command = style.intitle && style.latextype == LATEX_COMMAND;
+       bool const intitle_command = style.intitle && style.isCommand();
 
        if (style.pass_thru) {
                Font const outerfont = text.outerFont(pit);
@@ -847,7 +847,7 @@ void TeXOnePar(Buffer const & buf,
                        && priorpar->layout().isEnvironment()
                        && (priorpar->getDepth() > par.getDepth()
                            || (priorpar->getDepth() == par.getDepth()
-                                   && priorpar->layout() != par.layout()));
+                               && priorpar->layout() != par.layout()));
        Language const * const prev_language =
                runparams_in.for_search ?
                        languages.getLanguage("ignore")
@@ -1282,23 +1282,21 @@ void TeXOnePar(Buffer const & buf,
 
        // InTitle commands need to be closed after the language has been closed.
        if (intitle_command) {
-               if (is_command) {
-                       os << '}';
-                       if (!style.postcommandargs().empty())
-                               latexArgInsets(par, os, runparams, style.postcommandargs(), "post:");
-                       if (!runparams.post_macro.empty()) {
-                               // Output the stored fragile commands (labels, indices etc.)
-                               // that need to be output after the command with moving argument.
-                               os << runparams.post_macro;
-                               runparams.post_macro.clear();
-                       }
-                       if (par.needsCProtection(runparams.moving_arg)
-                           && contains(runparams.active_chars, '^'))
-                               os << "\\endgroup";
-                       if (runparams.encoding != prev_encoding) {
-                               runparams.encoding = prev_encoding;
-                               os << setEncoding(prev_encoding->iconvName());
-                       }
+               os << '}';
+               if (!style.postcommandargs().empty())
+                       latexArgInsets(par, os, runparams, style.postcommandargs(), "post:");
+               if (!runparams.post_macro.empty()) {
+                       // Output the stored fragile commands (labels, indices etc.)
+                       // that need to be output after the command with moving argument.
+                       os << runparams.post_macro;
+                       runparams.post_macro.clear();
+               }
+               if (par.needsCProtection(runparams.moving_arg)
+                   && contains(runparams.active_chars, '^'))
+                       os << "\\endgroup";
+               if (runparams.encoding != prev_encoding) {
+                       runparams.encoding = prev_encoding;
+                       os << setEncoding(prev_encoding->iconvName());
                }
        }