The place I find mutable members most problematic is in OutputParams. I
    once tried to sort that out but gave up after a while.

    Riki


I'll try to handle this. Are there any mutables to leave here?
The first refactoring step is in attached patch.

Yuriy


And here is the second step.

Yuriy

From 5169583c9d0562d4f07517c37ab83024d255cade Mon Sep 17 00:00:00 2001
From: Yuriy Skalko <yuriy.ska...@gmail.com>
Date: Mon, 2 Nov 2020 14:10:04 +0200
Subject: [PATCH] Drop `mutable` in OutputParams

---
 src/Buffer.cpp                  | 10 +++++-----
 src/Buffer.h                    | 10 +++++-----
 src/Changes.cpp                 |  2 +-
 src/Changes.h                   |  2 +-
 src/Font.cpp                    |  4 ++--
 src/Font.h                      |  4 ++--
 src/LaTeXFeatures.cpp           |  2 +-
 src/LaTeXFeatures.h             |  5 +++--
 src/OutputParams.h              | 30 +++++++++++++++---------------
 src/Paragraph.cpp               |  4 ++--
 src/Paragraph.h                 |  4 ++--
 src/insets/Inset.cpp            |  2 +-
 src/insets/Inset.h              |  4 ++--
 src/insets/InsetArgument.cpp    |  2 +-
 src/insets/InsetArgument.h      |  4 ++--
 src/insets/InsetBibitem.cpp     |  2 +-
 src/insets/InsetBibitem.h       |  2 +-
 src/insets/InsetBibtex.cpp      |  4 ++--
 src/insets/InsetBibtex.h        |  4 ++--
 src/insets/InsetBox.cpp         |  4 ++--
 src/insets/InsetBox.h           |  4 ++--
 src/insets/InsetBranch.cpp      |  4 ++--
 src/insets/InsetBranch.h        |  4 ++--
 src/insets/InsetCaption.cpp     |  6 +++---
 src/insets/InsetCaption.h       |  6 +++---
 src/insets/InsetCitation.cpp    |  4 ++--
 src/insets/InsetCitation.h      |  4 ++--
 src/insets/InsetCommand.cpp     |  4 ++--
 src/insets/InsetCommand.h       |  4 ++--
 src/insets/InsetCounter.cpp     |  4 ++--
 src/insets/InsetCounter.h       |  4 ++--
 src/insets/InsetERT.cpp         |  2 +-
 src/insets/InsetERT.h           |  2 +-
 src/insets/InsetExternal.cpp    |  5 ++---
 src/insets/InsetExternal.h      |  4 ++--
 src/insets/InsetFloat.cpp       |  8 ++++----
 src/insets/InsetFloat.h         |  6 +++---
 src/insets/InsetFloatList.cpp   |  2 +-
 src/insets/InsetFloatList.h     |  4 ++--
 src/insets/InsetFoot.cpp        |  2 +-
 src/insets/InsetFoot.h          |  2 +-
 src/insets/InsetGraphics.cpp    |  5 ++---
 src/insets/InsetGraphics.h      |  4 ++--
 src/insets/InsetHyperlink.cpp   |  5 ++---
 src/insets/InsetHyperlink.h     |  4 ++--
 src/insets/InsetIPA.cpp         |  4 ++--
 src/insets/InsetIPA.h           |  4 ++--
 src/insets/InsetIPAMacro.cpp    |  9 ++++-----
 src/insets/InsetIPAMacro.h      |  8 ++++----
 src/insets/InsetInclude.cpp     |  4 ++--
 src/insets/InsetInclude.h       |  4 ++--
 src/insets/InsetIndex.cpp       |  6 +++---
 src/insets/InsetIndex.h         |  6 +++---
 src/insets/InsetLabel.cpp       |  4 ++--
 src/insets/InsetLabel.h         |  4 ++--
 src/insets/InsetLine.cpp        |  4 ++--
 src/insets/InsetLine.h          |  4 ++--
 src/insets/InsetListings.cpp    |  6 +++---
 src/insets/InsetListings.h      |  6 +++---
 src/insets/InsetMarginal.cpp    |  2 +-
 src/insets/InsetMarginal.h      |  2 +-
 src/insets/InsetNewline.cpp     |  4 ++--
 src/insets/InsetNewline.h       |  4 ++--
 src/insets/InsetNewpage.cpp     |  4 ++--
 src/insets/InsetNewpage.h       |  4 ++--
 src/insets/InsetNomencl.cpp     |  6 +++---
 src/insets/InsetNomencl.h       |  6 +++---
 src/insets/InsetNote.cpp        |  4 ++--
 src/insets/InsetNote.h          |  4 ++--
 src/insets/InsetPhantom.cpp     |  4 ++--
 src/insets/InsetPhantom.h       |  4 ++--
 src/insets/InsetQuotes.cpp      |  4 ++--
 src/insets/InsetQuotes.h        |  4 ++--
 src/insets/InsetRef.cpp         |  4 ++--
 src/insets/InsetRef.h           |  4 ++--
 src/insets/InsetScript.cpp      |  2 +-
 src/insets/InsetScript.h        |  2 +-
 src/insets/InsetSeparator.cpp   |  4 ++--
 src/insets/InsetSeparator.h     |  4 ++--
 src/insets/InsetSpace.cpp       |  4 ++--
 src/insets/InsetSpace.h         |  4 ++--
 src/insets/InsetSpecialChar.cpp |  4 ++--
 src/insets/InsetSpecialChar.h   |  4 ++--
 src/insets/InsetTOC.cpp         |  2 +-
 src/insets/InsetTOC.h           |  2 +-
 src/insets/InsetTabular.cpp     | 20 ++++++++++----------
 src/insets/InsetTabular.h       | 20 ++++++++++----------
 src/insets/InsetText.cpp        |  5 ++---
 src/insets/InsetText.h          |  4 ++--
 src/insets/InsetVSpace.cpp      |  4 ++--
 src/insets/InsetVSpace.h        |  4 ++--
 src/insets/InsetWrap.cpp        |  4 ++--
 src/insets/InsetWrap.h          |  4 ++--
 src/mathed/InsetMathHull.cpp    |  2 +-
 src/mathed/InsetMathHull.h      |  2 +-
 src/mathed/InsetMathNest.cpp    |  2 +-
 src/mathed/InsetMathNest.h      |  2 +-
 src/mathed/InsetMathRef.cpp     |  2 +-
 src/mathed/InsetMathRef.h       |  2 +-
 src/output_docbook.cpp          | 14 +++++++-------
 src/output_docbook.h            |  4 ++--
 src/output_latex.cpp            |  8 ++++----
 src/output_latex.h              |  4 ++--
 src/output_xhtml.cpp            |  2 +-
 src/output_xhtml.h              |  2 +-
 105 files changed, 242 insertions(+), 246 deletions(-)

diff --git a/src/Buffer.cpp b/src/Buffer.cpp
index d1831d49aa..1beac4e56a 100644
--- a/src/Buffer.cpp
+++ b/src/Buffer.cpp
@@ -1826,7 +1826,7 @@ Buffer::ExportStatus Buffer::makeLaTeXFile(FileName const 
& fname,
 
 Buffer::ExportStatus Buffer::writeLaTeXSource(otexstream & os,
                           string const & original_path,
-                          OutputParams const & runparams_in,
+                          OutputParams & runparams_in,
                           OutputWhat output) const
 {
        // The child documents, if any, shall be already loaded at this point.
@@ -2088,7 +2088,7 @@ Buffer::ExportStatus Buffer::writeLaTeXSource(otexstream 
& os,
 
 
 Buffer::ExportStatus Buffer::makeDocBookFile(FileName const & fname,
-                             OutputParams const & runparams,
+                             OutputParams & runparams,
                              OutputWhat output) const
 {
        LYXERR(Debug::LATEX, "makeDocBookFile...");
@@ -2115,7 +2115,7 @@ Buffer::ExportStatus Buffer::makeDocBookFile(FileName 
const & fname,
 
 
 Buffer::ExportStatus Buffer::writeDocBookSource(odocstream & os,
-                            OutputParams const & runparams,
+                            OutputParams & runparams,
                             OutputWhat output) const
 {
        LaTeXFeatures features(*this, params(), runparams);
@@ -2169,7 +2169,7 @@ Buffer::ExportStatus 
Buffer::writeDocBookSource(odocstream & os,
 
 
 Buffer::ExportStatus Buffer::makeLyXHTMLFile(FileName const & fname,
-                             OutputParams const & runparams) const
+                             OutputParams & runparams) const
 {
        LYXERR(Debug::LATEX, "makeLyXHTMLFile...");
 
@@ -2194,7 +2194,7 @@ Buffer::ExportStatus Buffer::makeLyXHTMLFile(FileName 
const & fname,
 
 
 Buffer::ExportStatus Buffer::writeLyXHTMLSource(odocstream & os,
-                            OutputParams const & runparams,
+                            OutputParams & runparams,
                             OutputWhat output) const
 {
        LaTeXFeatures features(*this, params(), runparams);
diff --git a/src/Buffer.h b/src/Buffer.h
index a917c6e9f7..ae332a7779 100644
--- a/src/Buffer.h
+++ b/src/Buffer.h
@@ -322,22 +322,22 @@ public:
         */
        ExportStatus writeLaTeXSource(otexstream & os,
                           std::string const & original_path,
-                          OutputParams const &,
+                          OutputParams &,
                           OutputWhat output = FullSource) const;
        ///
        ExportStatus makeDocBookFile(support::FileName const & filename,
-                            OutputParams const & runparams_in,
+                            OutputParams & runparams_in,
                             OutputWhat output = FullSource) const;
        ///
        ExportStatus writeDocBookSource(odocstream & os,
-                                OutputParams const & runparams_in,
+                                OutputParams & runparams_in,
                                 OutputWhat output = FullSource) const;
        ///
        ExportStatus makeLyXHTMLFile(support::FileName const & filename,
-                            OutputParams const & runparams_in) const;
+                            OutputParams & runparams_in) const;
        ///
        ExportStatus writeLyXHTMLSource(odocstream & os,
-                            OutputParams const & runparams_in,
+                            OutputParams & runparams_in,
                             OutputWhat output = FullSource) const;
        /// returns the main language for the buffer (document)
        Language const * language() const;
diff --git a/src/Changes.cpp b/src/Changes.cpp
index dfe04cd306..becb239987 100644
--- a/src/Changes.cpp
+++ b/src/Changes.cpp
@@ -421,7 +421,7 @@ docstring getLaTeXMarkup(docstring const & macro, Author 
const & author,
 
 int Changes::latexMarkChange(otexstream & os, BufferParams const & bparams,
                             Change const & oldChange, Change const & change,
-                            OutputParams const & runparams)
+                            OutputParams & runparams)
 {
        if (!bparams.output_changes || oldChange == change)
                return 0;
diff --git a/src/Changes.h b/src/Changes.h
index 61e32b7dd9..34e2eddbc6 100644
--- a/src/Changes.h
+++ b/src/Changes.h
@@ -125,7 +125,7 @@ public:
        /// returns length of text outputted
        static int latexMarkChange(otexstream & os, BufferParams const & 
bparams,
                                   Change const & oldChange, Change const & 
change,
-                                  OutputParams const & runparams);
+                                  OutputParams & runparams);
 
        /// output .lyx file format for transitions between changes
        static void lyxMarkChange(std::ostream & os, BufferParams const & 
bparams,
diff --git a/src/Font.cpp b/src/Font.cpp
index b70c237db4..ae848f7327 100644
--- a/src/Font.cpp
+++ b/src/Font.cpp
@@ -225,7 +225,7 @@ void Font::lyxWriteChanges(Font const & orgfont,
 /// Writes the head of the LaTeX needed to impose this font
 // Returns number of chars written.
 int Font::latexWriteStartChanges(otexstream & os, BufferParams const & bparams,
-                                   OutputParams const & runparams,
+                                   OutputParams & runparams,
                                    Font const & base,
                                    Font const & prev,
                                    bool non_inherit_inset,
@@ -518,7 +518,7 @@ int Font::latexWriteStartChanges(otexstream & os, 
BufferParams const & bparams,
 // Returns number of chars written
 // This one corresponds to latexWriteStartChanges(). (Asger)
 int Font::latexWriteEndChanges(otexstream & os, BufferParams const & bparams,
-                                 OutputParams const & runparams,
+                                 OutputParams & runparams,
                                  Font const & base,
                                  Font const & next,
                                  bool & needPar,
diff --git a/src/Font.h b/src/Font.h
index fdcdb7d3e3..3d157fb00b 100644
--- a/src/Font.h
+++ b/src/Font.h
@@ -73,7 +73,7 @@ public:
            font state active now.
        */
        int latexWriteStartChanges(otexstream &, BufferParams const & bparams,
-                                  OutputParams const & runparams,
+                                  OutputParams & runparams,
                                   Font const & base,
                                   Font const & prev,
                                   bool non_inherit_inset = false,
@@ -84,7 +84,7 @@ public:
            to achieve.
        */
        int latexWriteEndChanges(otexstream &, BufferParams const & bparams,
-                                OutputParams const & runparams,
+                                OutputParams & runparams,
                                 Font const & base,
                                 Font const & next,
                                 bool & needPar,
diff --git a/src/LaTeXFeatures.cpp b/src/LaTeXFeatures.cpp
index 59769a02f5..4c3d817a54 100644
--- a/src/LaTeXFeatures.cpp
+++ b/src/LaTeXFeatures.cpp
@@ -599,7 +599,7 @@ static docstring const lyxstrikeout_style = from_ascii(
 
 
 LaTeXFeatures::LaTeXFeatures(Buffer const & b, BufferParams const & p,
-                                                        OutputParams const & r)
+                                                        OutputParams & r)
        : buffer_(&b), params_(p), runparams_(r), in_float_(false),
          in_deleted_inset_(false)
 {}
diff --git a/src/LaTeXFeatures.h b/src/LaTeXFeatures.h
index 2cc90cdbac..c8cc7c285c 100644
--- a/src/LaTeXFeatures.h
+++ b/src/LaTeXFeatures.h
@@ -53,7 +53,7 @@ public:
        };
        ///
        LaTeXFeatures(Buffer const &, BufferParams const &,
-                     OutputParams const &);
+                     OutputParams &);
        /// The color packages
        std::string const getColorOptions() const;
        /// The requested package options
@@ -172,6 +172,7 @@ public:
        /// return savenote environment
        void saveNoteEnv(std::string const & s) { savenote_env_ = s; }
        /// Runparams that will be used for exporting this file.
+       OutputParams & runparams() { return runparams_; }
        OutputParams const & runparams() const { return runparams_; }
        /// Resolve alternatives like "esint|amsmath|wasysym"
        void resolveAlternatives();
@@ -226,7 +227,7 @@ private:
        /** Some insets need to know details about the to-be-produced file
         *  in validate().
         */
-       OutputParams const & runparams_;
+       OutputParams & runparams_;
        ///
        bool in_float_;
        ///
diff --git a/src/OutputParams.h b/src/OutputParams.h
index e64e623079..95670a6db2 100644
--- a/src/OutputParams.h
+++ b/src/OutputParams.h
@@ -99,7 +99,7 @@ public:
            This depends on wherefrom we export the buffer. Even children
            that have a master can be compiled standalone.
        */
-       mutable bool is_child = false;
+       bool is_child = false;
 
        /** moving_arg == true means that the environment in which the inset
            is typeset is a moving argument. The inset should take care about
@@ -116,11 +116,11 @@ public:
        /** need_maketitle == true means that the last layout was a title layout
         * this is to track when \maketitle needs to be output.
        */
-       mutable bool need_maketitle = false;
+       bool need_maketitle = false;
 
        /** have_maketitle == true means that \maketitle already hase been 
output.
        */
-       mutable bool have_maketitle = false;
+       bool have_maketitle = false;
 
        /** inbranch == true means that the environment being typeset
            is inside an active branch inset.
@@ -133,7 +133,7 @@ public:
            relying on local assignments (such as \cite) should enclose such
            commands in \mbox{} in order to avoid breakage.
        */
-       mutable int inulemcmd = 0;
+       int inulemcmd = 0;
 
        /** the font at the point where the inset is
         */
@@ -150,7 +150,7 @@ public:
            Note that this is not the language of the top level master, but
            of the direct parent for nested includes.
         */
-       mutable Language const * master_language = nullptr;
+       Language const * master_language = nullptr;
 
        /// Active characters
        std::string active_chars;
@@ -172,7 +172,7 @@ public:
            }
            \endcode
         */
-       mutable Encoding const * encoding;
+       Encoding const * encoding;
 
        /** free_spacing == true means that the inset is in a free-spacing
            paragraph.
@@ -240,17 +240,17 @@ public:
         *  (if \ref postpone_fragile_stuff is true). Used for labels and index
         *  entries in commands with moving arguments (\\section, \\caption 
etc.)
         */
-       mutable docstring post_macro;
+       docstring post_macro;
 
        /** Whether we are entering a display math inset.
         *  Needed to correctly strike out deleted math in change tracking.
         */
-       mutable bool inDisplayMath = false;
+       bool inDisplayMath = false;
 
        /** Whether we are leaving a display math inset.
         *  Needed to correctly track nested ulem commands in change tracking.
         */
-       mutable bool wasDisplayMath = false;
+       bool wasDisplayMath = false;
 
        /** Whether we are inside a comment inset. Insets that are including
         *  external files like InsetGraphics, InsetInclude and InsetExternal
@@ -266,7 +266,7 @@ public:
 
        /** Whether a btUnit (for multiple biblographies) is open.
         */
-       mutable bool openbtUnit = false;
+       bool openbtUnit = false;
 
        /** Process only the children's aux files with BibTeX.
         *  This is necessary with chapterbib.
@@ -306,24 +306,24 @@ public:
        /** What kind of change tracking object is this?
         * Relevant for strikeout method in output
         */
-       mutable CtObject ctObject = CT_NORMAL;
+       CtObject ctObject = CT_NORMAL;
 
        /** allow output of only part of the top-level paragraphs
         *  par_begin: beginning paragraph
         */
-       mutable pit_type par_begin = 0;
+       pit_type par_begin = 0;
 
        /** allow output of only part of the top-level paragraphs
         *  par_end: par_end-1 is the ending paragraph
         *  if par_begin=par_end, output all paragraphs
         */
-       mutable pit_type par_end = 0;
+       pit_type par_end = 0;
 
        /// Id of the last paragraph before an inset
-       mutable int lastid = -1;
+       int lastid = -1;
 
        /// Last position in the last paragraph before an inset
-       mutable pos_type lastpos = 0;
+       pos_type lastpos = 0;
 
        /// is this the last paragraph in the current buffer/inset?
        bool isLastPar = false;
diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp
index c668f3b686..07d1493229 100644
--- a/src/Paragraph.cpp
+++ b/src/Paragraph.cpp
@@ -2376,7 +2376,7 @@ bool Paragraph::Private::endTeXParParams(BufferParams 
const & bparams,
 void Paragraph::latex(BufferParams const & bparams,
        Font const & outerfont,
        otexstream & os,
-       OutputParams const & runparams,
+       OutputParams & runparams,
        int start_pos, int end_pos, bool force) const
 {
        LYXERR(Debug::LATEX, "Paragraph::latex...     " << this);
@@ -3027,7 +3027,7 @@ string Paragraph::getID(Buffer const &, OutputParams 
const &)
 }
 
 
-pos_type Paragraph::firstWordDocBook(XMLStream & xs, OutputParams const & 
runparams) const
+pos_type Paragraph::firstWordDocBook(XMLStream & xs, OutputParams & runparams) 
const
 {
        pos_type i;
        for (i = 0; i < size(); ++i) {
diff --git a/src/Paragraph.h b/src/Paragraph.h
index 4812684c3d..5cc41558d5 100644
--- a/src/Paragraph.h
+++ b/src/Paragraph.h
@@ -187,7 +187,7 @@ public:
 
        /// \param force means: output even if layout.inpreamble is true.
        void latex(BufferParams const &, Font const & outerfont, otexstream &,
-               OutputParams const &, int start_pos = 0, int end_pos = -1,
+               OutputParams &, int start_pos = 0, int end_pos = -1,
                bool force = false) const;
 
        /// Can we drop the standard paragraph wrapper?
@@ -197,7 +197,7 @@ public:
        std::string getID(Buffer const & buf, OutputParams const & runparams) 
const;
 
        /// Output the first word of a paragraph, return the position where it 
left.
-       pos_type firstWordDocBook(XMLStream & xs, OutputParams const & 
runparams) const;
+       pos_type firstWordDocBook(XMLStream & xs, OutputParams & runparams) 
const;
 
        /// Output the first word of a paragraph, return the position where it 
left.
        pos_type firstWordLyXHTML(XMLStream & xs, OutputParams const & 
runparams) const;
diff --git a/src/insets/Inset.cpp b/src/insets/Inset.cpp
index 14f9f7f19b..91bcdec843 100644
--- a/src/insets/Inset.cpp
+++ b/src/insets/Inset.cpp
@@ -467,7 +467,7 @@ bool Inset::idxUpDown(Cursor &, bool) const
 }
 
 
-void Inset::docbook(XMLStream & xs, OutputParams const &) const
+void Inset::docbook(XMLStream & xs, OutputParams &) const
 {
        xs << "[[Inset: " << from_ascii(insetName(lyxCode())) << "]]";
 }
diff --git a/src/insets/Inset.h b/src/insets/Inset.h
index bf165d91c5..910ca2e309 100644
--- a/src/insets/Inset.h
+++ b/src/insets/Inset.h
@@ -338,7 +338,7 @@ public:
        virtual int plaintext(odocstringstream &, OutputParams const &,
                              size_t max_length = INT_MAX) const = 0;
        /// docbook output
-       virtual void docbook(XMLStream &, OutputParams const &) const;
+       virtual void docbook(XMLStream &, OutputParams &) const;
        /// XHTML output
        /// the inset is expected to write XHTML to the XMLStream
        /// \return any "deferred" material that should be written outside the
@@ -523,7 +523,7 @@ public:
         *  supposed to go to a file.
         *  \sa Buffer::writeLaTeXSource for the reason.
         */
-       virtual void latex(otexstream &, OutputParams const &) const {}
+       virtual void latex(otexstream &, OutputParams &) const {}
        /// returns true to override begin and end inset in file
        virtual bool directWrite() const;
        ///
diff --git a/src/insets/InsetArgument.cpp b/src/insets/InsetArgument.cpp
index f29ca995a5..f113310e56 100644
--- a/src/insets/InsetArgument.cpp
+++ b/src/insets/InsetArgument.cpp
@@ -311,7 +311,7 @@ InsetLayout::InsetDecoration InsetArgument::decoration() 
const
 }
 
 
-void InsetArgument::docbook(XMLStream & xs, OutputParams const & rp) const {
+void InsetArgument::docbook(XMLStream & xs, OutputParams & rp) const {
        if (docbooktag_ != from_ascii("NONE")) {
                // TODO: implement docbooktagtype_.
                xs << xml::StartTag(docbooktag_, docbookattr_);
diff --git a/src/insets/InsetArgument.h b/src/insets/InsetArgument.h
index d5d54a6a5b..032fd80fad 100644
--- a/src/insets/InsetArgument.h
+++ b/src/insets/InsetArgument.h
@@ -50,11 +50,11 @@ public:
        /// Update the label string of this inset
        void updateBuffer(ParIterator const &, UpdateType, bool const deleted = 
false) override;
        ///
-       void latex(otexstream &, OutputParams const &) const override { }
+       void latex(otexstream &, OutputParams &) const override { }
        ///
        int plaintext(odocstringstream &, OutputParams const &, size_t) const 
override { return 0; }
        ///
-       void docbook(XMLStream & xs, OutputParams const &) const override;
+       void docbook(XMLStream & xs, OutputParams &) const override;
        ///
        docstring xhtml(XMLStream &, OutputParams const &) const override
                { return docstring(); }
diff --git a/src/insets/InsetBibitem.cpp b/src/insets/InsetBibitem.cpp
index b16687e7d7..ef9655c20b 100644
--- a/src/insets/InsetBibitem.cpp
+++ b/src/insets/InsetBibitem.cpp
@@ -343,7 +343,7 @@ void InsetBibitem::updateBuffer(ParIterator const & it, 
UpdateType utype, bool c
 }
 
 
-void InsetBibitem::docbook(XMLStream &, OutputParams const &) const
+void InsetBibitem::docbook(XMLStream &, OutputParams &) const
 {
        // Nothing to do: everything is implemented in 
makeParagraphBibliography.
 }
diff --git a/src/insets/InsetBibitem.h b/src/insets/InsetBibitem.h
index 2a210e8c90..3615063619 100644
--- a/src/insets/InsetBibitem.h
+++ b/src/insets/InsetBibitem.h
@@ -58,7 +58,7 @@ public:
        ///
        docstring xhtml(XMLStream &, OutputParams const &) const override;
        ///
-       void docbook(XMLStream &, OutputParams const &) const override;
+       void docbook(XMLStream &, OutputParams &) const override;
        ///
        void collectBibKeys(InsetIterator const &, support::FileNameList &) 
const override;
        /// update the counter of this inset
diff --git a/src/insets/InsetBibtex.cpp b/src/insets/InsetBibtex.cpp
index bb578117e2..33819e70e2 100644
--- a/src/insets/InsetBibtex.cpp
+++ b/src/insets/InsetBibtex.cpp
@@ -249,7 +249,7 @@ docstring InsetBibtex::toolTip(BufferView const & /*bv*/, 
int /*x*/, int /*y*/)
 }
 
 
-void InsetBibtex::latex(otexstream & os, OutputParams const & runparams) const
+void InsetBibtex::latex(otexstream & os, OutputParams & runparams) const
 {
        // The sequence of the commands:
        // With normal BibTeX:
@@ -1080,7 +1080,7 @@ docstring InsetBibtex::xhtml(XMLStream & xs, OutputParams 
const &) const
 }
 
 
-void InsetBibtex::docbook(XMLStream & xs, OutputParams const &) const
+void InsetBibtex::docbook(XMLStream & xs, OutputParams &) const
 {
        BiblioInfo const & bibinfo = buffer().masterBibInfo();
        bool const all_entries = getParam("btprint") == "btPrintAll";
diff --git a/src/insets/InsetBibtex.h b/src/insets/InsetBibtex.h
index be7659f223..2ad34cfec0 100644
--- a/src/insets/InsetBibtex.h
+++ b/src/insets/InsetBibtex.h
@@ -49,7 +49,7 @@ public:
        ///
        RowFlags rowFlags() const override { return Display; }
        ///
-       void latex(otexstream &, OutputParams const &) const override;
+       void latex(otexstream &, OutputParams &) const override;
        ///
        int plaintext(odocstringstream & ods, OutputParams const & op,
                      size_t max_length = INT_MAX) const override;
@@ -65,7 +65,7 @@ public:
        ///
        docstring xhtml(XMLStream &, OutputParams const &) const override;
        ///
-       void docbook(XMLStream &, OutputParams const &) const override;
+       void docbook(XMLStream &, OutputParams &) const override;
        ///
        std::string contextMenuName() const override;
        //@}
diff --git a/src/insets/InsetBox.cpp b/src/insets/InsetBox.cpp
index 9cf0169422..dbb2d39057 100644
--- a/src/insets/InsetBox.cpp
+++ b/src/insets/InsetBox.cpp
@@ -341,7 +341,7 @@ const string defaultThick = "0.4pt";
 const string defaultSep = "3pt";
 const string defaultShadow = "4pt";
 
-void InsetBox::latex(otexstream & os, OutputParams const & runparams) const
+void InsetBox::latex(otexstream & os, OutputParams & runparams) const
 {
        BoxType btype = boxtranslator().find(params_.type);
 
@@ -716,7 +716,7 @@ int InsetBox::plaintext(odocstringstream & os,
 }
 
 
-void InsetBox::docbook(XMLStream & xs, OutputParams const & runparams) const
+void InsetBox::docbook(XMLStream & xs, OutputParams & runparams) const
 {
        // There really should be a wrapper tag for this layout.
        bool hasBoxTag = !getLayout().docbookwrappertag().empty();
diff --git a/src/insets/InsetBox.h b/src/insets/InsetBox.h
index cc80da3ecd..5c8169cdb3 100644
--- a/src/insets/InsetBox.h
+++ b/src/insets/InsetBox.h
@@ -129,12 +129,12 @@ public:
        ///
        bool inheritFont() const override { return false; }
        ///
-       void latex(otexstream &, OutputParams const &) const override;
+       void latex(otexstream &, OutputParams &) const override;
        ///
        int plaintext(odocstringstream & ods, OutputParams const & op,
                      size_t max_length = INT_MAX) const override;
        ///
-       void docbook(XMLStream &, OutputParams const &) const override;
+       void docbook(XMLStream &, OutputParams &) const override;
        ///
        docstring xhtml(XMLStream &, OutputParams const &) const override;
        ///
diff --git a/src/insets/InsetBranch.cpp b/src/insets/InsetBranch.cpp
index a70ff27463..d2a4b821a1 100644
--- a/src/insets/InsetBranch.cpp
+++ b/src/insets/InsetBranch.cpp
@@ -306,7 +306,7 @@ bool InsetBranch::producesOutput() const
 }
 
 
-void InsetBranch::latex(otexstream & os, OutputParams const & runparams) const
+void InsetBranch::latex(otexstream & os, OutputParams & runparams) const
 {
        if (producesOutput()) {
                OutputParams rp = runparams;
@@ -330,7 +330,7 @@ int InsetBranch::plaintext(odocstringstream & os,
 }
 
 
-void InsetBranch::docbook(XMLStream & xs, OutputParams const & runparams) const
+void InsetBranch::docbook(XMLStream & xs, OutputParams & runparams) const
 {
        if (producesOutput()) {
                OutputParams rp = runparams;
diff --git a/src/insets/InsetBranch.h b/src/insets/InsetBranch.h
index 6106ce5a5c..dc542ea338 100644
--- a/src/insets/InsetBranch.h
+++ b/src/insets/InsetBranch.h
@@ -71,12 +71,12 @@ private:
        ///
        ColorCode backgroundColor(PainterInfo const &) const override;
        ///
-       void latex(otexstream &, OutputParams const &) const override;
+       void latex(otexstream &, OutputParams &) const override;
        ///
        int plaintext(odocstringstream & ods, OutputParams const & op,
                      size_t max_length = INT_MAX) const override;
        ///
-       void docbook(XMLStream &, OutputParams const &) const override;
+       void docbook(XMLStream &, OutputParams &) const override;
        ///
        docstring xhtml(XMLStream &, OutputParams const &) const override;
        ///
diff --git a/src/insets/InsetCaption.cpp b/src/insets/InsetCaption.cpp
index 8297c6fcde..0e81b2b934 100644
--- a/src/insets/InsetCaption.cpp
+++ b/src/insets/InsetCaption.cpp
@@ -253,7 +253,7 @@ bool InsetCaption::getStatus(Cursor & cur, FuncRequest 
const & cmd,
 
 
 void InsetCaption::latex(otexstream & os,
-                        OutputParams const & runparams_in) const
+                        OutputParams & runparams_in) const
 {
        if (runparams_in.inFloat == OutputParams::SUBFLOAT)
                // caption is output as an optional argument
@@ -292,7 +292,7 @@ int InsetCaption::plaintext(odocstringstream & os,
 }
 
 
-void InsetCaption::docbook(XMLStream &, OutputParams const &) const
+void InsetCaption::docbook(XMLStream &, OutputParams &) const
 {
        // This function should never be called (rather InsetFloat::docbook, 
the titles should be skipped in floats).
 }
@@ -321,7 +321,7 @@ docstring InsetCaption::xhtml(XMLStream & xs, OutputParams 
const & rp) const
 
 
 void InsetCaption::getArgument(otexstream & os,
-                       OutputParams const & runparams) const
+                       OutputParams & runparams) const
 {
        InsetLayout const & il = getLayout();
 
diff --git a/src/insets/InsetCaption.h b/src/insets/InsetCaption.h
index 734564aaaf..200d6f0734 100644
--- a/src/insets/InsetCaption.h
+++ b/src/insets/InsetCaption.h
@@ -27,7 +27,7 @@ public:
        ///
        docstring layoutName() const override;
        /// return the mandatory argument (LaTeX format) only
-       void getArgument(otexstream & os, OutputParams const &) const;
+       void getArgument(otexstream & os, OutputParams &) const;
        /// return the caption text
        int getCaptionAsPlaintext(odocstream & os, OutputParams const &) const;
        /// write the caption text as DocBook in os
@@ -73,12 +73,12 @@ private:
        // Update the counters of this inset and of its contents
        void updateBuffer(ParIterator const &, UpdateType, bool const deleted) 
override;
        ///
-       void latex(otexstream & os, OutputParams const &) const override;
+       void latex(otexstream & os, OutputParams &) const override;
        ///
        int plaintext(odocstringstream & ods, OutputParams const & op,
                      size_t max_length = INT_MAX) const override;
        ///
-       void docbook(XMLStream &, OutputParams const &) const override;
+       void docbook(XMLStream &, OutputParams &) const override;
        ///
        docstring xhtml(XMLStream & os, OutputParams const & runparams) const 
override;
        ///
diff --git a/src/insets/InsetCitation.cpp b/src/insets/InsetCitation.cpp
index ead9d3a8a0..89c151b813 100644
--- a/src/insets/InsetCitation.cpp
+++ b/src/insets/InsetCitation.cpp
@@ -618,7 +618,7 @@ static docstring const cleanupWhitespace(docstring const & 
citelist)
 }
 
 
-void InsetCitation::docbook(XMLStream & xs, OutputParams const &) const
+void InsetCitation::docbook(XMLStream & xs, OutputParams &) const
 {
        if (getCmdName() == "nocite")
                return;
@@ -674,7 +674,7 @@ void InsetCitation::forOutliner(docstring & os, size_t 
const, bool const) const
 // citations and then changes his mind, turning natbib support off. The output
 // should revert to the default citation command as provided by the citation
 // engine, e.g. \cite[]{} for the basic engine.
-void InsetCitation::latex(otexstream & os, OutputParams const & runparams) 
const
+void InsetCitation::latex(otexstream & os, OutputParams & runparams) const
 {
        // When this is a child compiled on its own, we use the children
        // own bibinfo, else the master's
diff --git a/src/insets/InsetCitation.h b/src/insets/InsetCitation.h
index 3be20013cb..ca9bb718cd 100644
--- a/src/insets/InsetCitation.h
+++ b/src/insets/InsetCitation.h
@@ -52,12 +52,12 @@ public:
        ///
        InsetCode lyxCode() const override { return CITE_CODE; }
        ///
-       void latex(otexstream &, OutputParams const &) const override;
+       void latex(otexstream &, OutputParams &) const override;
        ///
        int plaintext(odocstringstream & ods, OutputParams const & op,
                      size_t max_length = INT_MAX) const override;
        ///
-       void docbook(XMLStream &, OutputParams const &) const override;
+       void docbook(XMLStream &, OutputParams &) const override;
        ///
        docstring xhtml(XMLStream &, OutputParams const &) const override;
        ///
diff --git a/src/insets/InsetCommand.cpp b/src/insets/InsetCommand.cpp
index c3fd15fed5..3abddca6a2 100644
--- a/src/insets/InsetCommand.cpp
+++ b/src/insets/InsetCommand.cpp
@@ -141,7 +141,7 @@ void InsetCommand::setParams(InsetCommandParams const & p)
 }
 
 
-void InsetCommand::latex(otexstream & os, OutputParams const & runparams_in) 
const
+void InsetCommand::latex(otexstream & os, OutputParams & runparams_in) const
 {
        OutputParams runparams = runparams_in;
        docstring command = getCommand(runparams);
@@ -162,7 +162,7 @@ int InsetCommand::plaintext(odocstringstream & os,
 }
 
 
-void InsetCommand::docbook(XMLStream &, OutputParams const &) const
+void InsetCommand::docbook(XMLStream &, OutputParams &) const
 {
        return;
 }
diff --git a/src/insets/InsetCommand.h b/src/insets/InsetCommand.h
index 7b2b5bde08..63b47f479e 100644
--- a/src/insets/InsetCommand.h
+++ b/src/insets/InsetCommand.h
@@ -84,12 +84,12 @@ public:
        ///
        void drawBackground(PainterInfo &, int, int) const override {}
        ///
-       void latex(otexstream &, OutputParams const &) const override;
+       void latex(otexstream &, OutputParams &) const override;
        ///
        int plaintext(odocstringstream & ods, OutputParams const & op,
                      size_t max_length = INT_MAX) const override;
        ///
-       void docbook(XMLStream &, OutputParams const &) const override;
+       void docbook(XMLStream &, OutputParams &) const override;
        ///
        void validate(LaTeXFeatures & features) const override;
        ///
diff --git a/src/insets/InsetCounter.cpp b/src/insets/InsetCounter.cpp
index 4a2cda02e9..92bf6f07be 100644
--- a/src/insets/InsetCounter.cpp
+++ b/src/insets/InsetCounter.cpp
@@ -90,7 +90,7 @@ ParamInfo const & InsetCounter::findInfo(string const & /* 
cmdName */)
 }
 
 
-void InsetCounter::latex(otexstream & os, OutputParams const &) const
+void InsetCounter::latex(otexstream & os, OutputParams &) const
 {
        bool const lyxonly = lowercase(getParam("lyxonly")) == "true";
        if (lyxonly)
@@ -184,7 +184,7 @@ void InsetCounter::trackCounters(string const & cmd) const
        }
 }
 
-void InsetCounter::docbook(XMLStream &, OutputParams const &) const
+void InsetCounter::docbook(XMLStream &, OutputParams &) const
 {
        // Here, we need to track counter values ourselves,
        // since unlike in the LaTeX case, there is no external
diff --git a/src/insets/InsetCounter.h b/src/insets/InsetCounter.h
index 92d6f5b061..da7a89e7b3 100644
--- a/src/insets/InsetCounter.h
+++ b/src/insets/InsetCounter.h
@@ -34,12 +34,12 @@ public:
        ///
        InsetCode lyxCode() const override { return COUNTER_CODE; }
        ///
-       void latex(otexstream &, OutputParams const &) const override;
+       void latex(otexstream &, OutputParams &) const override;
        ///
        int plaintext(odocstringstream & ods, OutputParams const & op,
                      size_t max_length = INT_MAX) const override;
        ///
-       void docbook(XMLStream &, OutputParams const &) const override;
+       void docbook(XMLStream &, OutputParams &) const override;
        ///
        docstring xhtml(XMLStream &, OutputParams const &) const override;
        ///
diff --git a/src/insets/InsetERT.cpp b/src/insets/InsetERT.cpp
index 1af67e1e31..21f02348cd 100644
--- a/src/insets/InsetERT.cpp
+++ b/src/insets/InsetERT.cpp
@@ -92,7 +92,7 @@ int InsetERT::plaintext(odocstringstream & os,
 }
 
 
-void InsetERT::docbook(XMLStream & xs, OutputParams const & runparams) const
+void InsetERT::docbook(XMLStream & xs, OutputParams & runparams) const
 {
        auto const begin = paragraphs().begin();
        auto par = begin;
diff --git a/src/insets/InsetERT.h b/src/insets/InsetERT.h
index 72220d07d0..cc402f7fc0 100644
--- a/src/insets/InsetERT.h
+++ b/src/insets/InsetERT.h
@@ -50,7 +50,7 @@ private:
        int plaintext(odocstringstream & ods, OutputParams const & op,
                      size_t max_length = INT_MAX) const override;
        ///
-       void docbook(XMLStream &, OutputParams const &) const override;
+       void docbook(XMLStream &, OutputParams &) const override;
        ///
        docstring xhtml(XMLStream &, OutputParams const &) const override;
        ///
diff --git a/src/insets/InsetExternal.cpp b/src/insets/InsetExternal.cpp
index a2f7216eaa..73d7e0f6fb 100644
--- a/src/insets/InsetExternal.cpp
+++ b/src/insets/InsetExternal.cpp
@@ -694,7 +694,7 @@ void InsetExternal::read(Lexer & lex)
 }
 
 
-void InsetExternal::latex(otexstream & os, OutputParams const & runparams) 
const
+void InsetExternal::latex(otexstream & os, OutputParams & runparams) const
 {
        if (params_.draft) {
                // FIXME UNICODE
@@ -788,8 +788,7 @@ void InsetExternal::generateXML(XMLStream & xs, 
OutputParams const & runparams,
 }
 
 
-void InsetExternal::docbook(XMLStream & xs,
-                            OutputParams const & runparams) const
+void InsetExternal::docbook(XMLStream & xs, OutputParams & runparams) const
 {
        generateXML(xs, runparams, "DocBook");
 }
diff --git a/src/insets/InsetExternal.h b/src/insets/InsetExternal.h
index f124445f5e..94865690fb 100644
--- a/src/insets/InsetExternal.h
+++ b/src/insets/InsetExternal.h
@@ -110,7 +110,7 @@ public:
        /// Update not loaded previews
        void updatePreview() const;
        /// \returns the number of rows (\n's) of generated code.
-       void latex(otexstream &, OutputParams const &) const override;
+       void latex(otexstream &, OutputParams &) const override;
        ///
        std::string contextMenuName() const override;
        ///
@@ -148,7 +148,7 @@ public:
        ///
        void generateXML(XMLStream &, OutputParams const &, std::string const 
&) const;
        ///
-       void docbook(XMLStream &, OutputParams const &) const override;
+       void docbook(XMLStream &, OutputParams &) const override;
        /// For now, this does nothing. Someone who knows about this
        /// should see what needs doing for XHTML output.
        docstring xhtml(XMLStream &, OutputParams const &) const override;
diff --git a/src/insets/InsetFloat.cpp b/src/insets/InsetFloat.cpp
index 92d3ad0457..46bd3c8b17 100644
--- a/src/insets/InsetFloat.cpp
+++ b/src/insets/InsetFloat.cpp
@@ -379,7 +379,7 @@ docstring InsetFloat::xhtml(XMLStream & xs, OutputParams 
const & rp) const
 }
 
 
-void InsetFloat::latex(otexstream & os, OutputParams const & runparams_in) 
const
+void InsetFloat::latex(otexstream & os, OutputParams & runparams_in) const
 {
        if (runparams_in.inFloat != OutputParams::NONFLOAT) {
                if (!paragraphs().empty() && !runparams_in.nice)
@@ -627,7 +627,7 @@ std::tuple<InsetCode, const Inset *, const InsetCaption *, 
const InsetLabel *> d
 }
 
 
-void docbookSubfigures(XMLStream & xs, OutputParams const & runparams, const 
InsetCaption * caption,
+void docbookSubfigures(XMLStream & xs, OutputParams & runparams, const 
InsetCaption * caption,
                                           const InsetLabel * label, 
std::vector<const InsetCollapsible *> const & subfigures)
 {
        // Ensure there is no label output, it is supposed to be handled as 
xml:id.
@@ -808,7 +808,7 @@ void docbookNoSubfigures(XMLStream & xs, OutputParams const 
& runparams, const I
 }
 
 
-void InsetFloat::docbook(XMLStream & xs, OutputParams const & runparams) const
+void InsetFloat::docbook(XMLStream & xs, OutputParams & runparams) const
 {
        // Determine whether the float has a title or not. For this, iterate 
through the paragraphs and look
        // for an InsetCaption. Do the same for labels and subfigures.
@@ -915,7 +915,7 @@ bool InsetFloat::allowsCaptionVariation(std::string const & 
newtype) const
 }
 
 
-TexString InsetFloat::getCaption(OutputParams const & runparams) const
+TexString InsetFloat::getCaption(OutputParams & runparams) const
 {
        InsetCaption const * ins = getCaptionInset();
        if (ins == 0)
diff --git a/src/insets/InsetFloat.h b/src/insets/InsetFloat.h
index bb9b645191..aef40febfd 100644
--- a/src/insets/InsetFloat.h
+++ b/src/insets/InsetFloat.h
@@ -94,12 +94,12 @@ private:
        ///
        InsetCode lyxCode() const override { return FLOAT_CODE; }
        ///
-       void latex(otexstream &, OutputParams const &) const override;
+       void latex(otexstream &, OutputParams &) const override;
        ///
        int plaintext(odocstringstream & ods, OutputParams const & op,
                      size_t max_length = INT_MAX) const override;
        ///
-       void docbook(XMLStream &, OutputParams const &) const override;
+       void docbook(XMLStream &, OutputParams &) const override;
        ///
        docstring xhtml(XMLStream &, OutputParams const &) const override;
        ///
@@ -119,7 +119,7 @@ private:
        /// Is the content of this inset part of the immediate (visible) text 
sequence?
        bool isPartOfTextSequence() const override { return false; }
        ///
-       TexString getCaption(OutputParams const &) const;
+       TexString getCaption(OutputParams &) const;
        ///
        std::string getAlignment() const;
        ///
diff --git a/src/insets/InsetFloatList.cpp b/src/insets/InsetFloatList.cpp
index e711feebf4..50e45c4a5f 100644
--- a/src/insets/InsetFloatList.cpp
+++ b/src/insets/InsetFloatList.cpp
@@ -132,7 +132,7 @@ void InsetFloatList::read(Lexer & lex)
 }
 
 
-void InsetFloatList::latex(otexstream & os, OutputParams const &) const
+void InsetFloatList::latex(otexstream & os, OutputParams &) const
 {
        FloatList const & floats = buffer().params().documentClass().floats();
        FloatList::const_iterator cit = floats[to_ascii(getParam("type"))];
diff --git a/src/insets/InsetFloatList.h b/src/insets/InsetFloatList.h
index 489b0fea98..2ea9e55488 100644
--- a/src/insets/InsetFloatList.h
+++ b/src/insets/InsetFloatList.h
@@ -38,9 +38,9 @@ public:
        ///
        void read(Lexer &) override;
        ///
-       void latex(otexstream &, OutputParams const &) const override;
+       void latex(otexstream &, OutputParams &) const override;
        ///
-       void docbook(XMLStream &, OutputParams const &) const override { 
return; }
+       void docbook(XMLStream &, OutputParams &) const override { return; }
        ///
        int plaintext(odocstringstream & ods, OutputParams const & op,
                      size_t max_length = INT_MAX) const override;
diff --git a/src/insets/InsetFoot.cpp b/src/insets/InsetFoot.cpp
index 3a2f5b377d..026f22e3ac 100644
--- a/src/insets/InsetFoot.cpp
+++ b/src/insets/InsetFoot.cpp
@@ -123,7 +123,7 @@ int InsetFoot::plaintext(odocstringstream & os,
 }
 
 
-void InsetFoot::docbook(XMLStream & xs, OutputParams const & runparams) const
+void InsetFoot::docbook(XMLStream & xs, OutputParams & runparams) const
 {
        OutputParams rp = runparams;
        rp.docbook_force_pars = true;
diff --git a/src/insets/InsetFoot.h b/src/insets/InsetFoot.h
index 1e4b0d26e8..013df5277a 100644
--- a/src/insets/InsetFoot.h
+++ b/src/insets/InsetFoot.h
@@ -35,7 +35,7 @@ private:
        int plaintext(odocstringstream & ods, OutputParams const & op,
                      size_t max_length = INT_MAX) const override;
        ///
-       void docbook(XMLStream &, OutputParams const &) const override;
+       void docbook(XMLStream &, OutputParams &) const override;
        ///
        void validate(LaTeXFeatures & features) const override;
        /// Update the counters of this inset and of its contents
diff --git a/src/insets/InsetGraphics.cpp b/src/insets/InsetGraphics.cpp
index ff4ac6e550..b8db7d6aef 100644
--- a/src/insets/InsetGraphics.cpp
+++ b/src/insets/InsetGraphics.cpp
@@ -815,8 +815,7 @@ string InsetGraphics::prepareFile(OutputParams const & 
runparams) const
 }
 
 
-void InsetGraphics::latex(otexstream & os,
-                         OutputParams const & runparams) const
+void InsetGraphics::latex(otexstream & os, OutputParams & runparams) const
 {
        // If there is no file specified or not existing,
        // just output a message about it in the latex output.
@@ -944,7 +943,7 @@ int InsetGraphics::plaintext(odocstringstream & os,
 // For explanation on inserting graphics into DocBook checkout:
 // http://en.tldp.org/LDP/LDP-Author-Guide/html/inserting-pictures.html
 // See also the docbook guide at http://www.docbook.org/
-void InsetGraphics::docbook(XMLStream & xs, OutputParams const & runparams) 
const
+void InsetGraphics::docbook(XMLStream & xs, OutputParams & runparams) const
 {
        string fn = params().filename.relFileName(runparams.export_folder);
        string tag = runparams.docbook_in_float ? "mediaobject" : 
"inlinemediaobject";
diff --git a/src/insets/InsetGraphics.h b/src/insets/InsetGraphics.h
index c68356569d..bcf31affd4 100644
--- a/src/insets/InsetGraphics.h
+++ b/src/insets/InsetGraphics.h
@@ -73,12 +73,12 @@ public:
         #fragile == true# means, that the inset should take care about
         fragile commands by adding a #\protect# before.
         */
-       void latex(otexstream &, OutputParams const &) const override;
+       void latex(otexstream &, OutputParams &) const override;
        ///
        int plaintext(odocstringstream & ods, OutputParams const & op,
                      size_t max_length = INT_MAX) const override;
        ///
-       void docbook(XMLStream &, OutputParams const &) const override;
+       void docbook(XMLStream &, OutputParams &) const override;
        ///
        docstring xhtml(XMLStream & os, OutputParams const &) const override;
        /** Tell LyX what the latex features you need i.e. what latex packages
diff --git a/src/insets/InsetHyperlink.cpp b/src/insets/InsetHyperlink.cpp
index 8894794186..7562978ace 100644
--- a/src/insets/InsetHyperlink.cpp
+++ b/src/insets/InsetHyperlink.cpp
@@ -139,8 +139,7 @@ void InsetHyperlink::viewTarget() const
 }
 
 
-void InsetHyperlink::latex(otexstream & os,
-                          OutputParams const & runparams) const
+void InsetHyperlink::latex(otexstream & os, OutputParams & runparams) const
 {
        docstring url = getParam("target");
        docstring name = getParam("name");
@@ -226,7 +225,7 @@ int InsetHyperlink::plaintext(odocstringstream & os,
 }
 
 
-void InsetHyperlink::docbook(XMLStream & xs, OutputParams const &) const
+void InsetHyperlink::docbook(XMLStream & xs, OutputParams &) const
 {
        xs << xml::StartTag("link", "xlink:href=\"" + subst(getParam("target"), 
from_ascii("&"), from_ascii("&amp;")) + "\"");
        xs << xml::escapeString(getParam("name"));
diff --git a/src/insets/InsetHyperlink.h b/src/insets/InsetHyperlink.h
index cfbc51e1c6..7503652139 100644
--- a/src/insets/InsetHyperlink.h
+++ b/src/insets/InsetHyperlink.h
@@ -46,12 +46,12 @@ public:
        ///
        void validate(LaTeXFeatures &) const override;
        ///
-       void latex(otexstream &, OutputParams const &) const override;
+       void latex(otexstream &, OutputParams &) const override;
        ///
        int plaintext(odocstringstream & ods, OutputParams const & op,
                      size_t max_length = INT_MAX) const override;
        ///
-       void docbook(XMLStream &, OutputParams const &) const override;
+       void docbook(XMLStream &, OutputParams &) const override;
        ///
        docstring xhtml(XMLStream &, OutputParams const &) const override;
        //@}
diff --git a/src/insets/InsetIPA.cpp b/src/insets/InsetIPA.cpp
index 1597d0d423..9e9edf99e0 100644
--- a/src/insets/InsetIPA.cpp
+++ b/src/insets/InsetIPA.cpp
@@ -215,7 +215,7 @@ void InsetIPA::validate(LaTeXFeatures & features) const
 }
 
 
-void InsetIPA::latex(otexstream & os, OutputParams const & runparams_in) const
+void InsetIPA::latex(otexstream & os, OutputParams & runparams_in) const
 {
        OutputParams runparams(runparams_in);
        runparams.inIPA = true;
@@ -234,7 +234,7 @@ void InsetIPA::latex(otexstream & os, OutputParams const & 
runparams_in) const
 }
 
 
-void InsetIPA::docbook(XMLStream & xs, OutputParams const & runparams) const
+void InsetIPA::docbook(XMLStream & xs, OutputParams & runparams) const
 {
        OutputParams rp(runparams);
        rp.inIPA = true;
diff --git a/src/insets/InsetIPA.h b/src/insets/InsetIPA.h
index 2df77ce159..771de255c1 100644
--- a/src/insets/InsetIPA.h
+++ b/src/insets/InsetIPA.h
@@ -74,9 +74,9 @@ public:
        void edit(Cursor & cur, bool front, EntryDirection entry_from) override;
 
        ///
-       void latex(otexstream &, OutputParams const &) const override;
+       void latex(otexstream &, OutputParams &) const override;
        ///
-       void docbook(XMLStream &, OutputParams const &) const override;
+       void docbook(XMLStream &, OutputParams &) const override;
        ///
        docstring xhtml(XMLStream & xs, OutputParams const &) const override;
        ///
diff --git a/src/insets/InsetIPAMacro.cpp b/src/insets/InsetIPAMacro.cpp
index 82f6c48e84..94f6e89f63 100644
--- a/src/insets/InsetIPAMacro.cpp
+++ b/src/insets/InsetIPAMacro.cpp
@@ -271,7 +271,7 @@ bool InsetIPADeco::getStatus(Cursor & cur, FuncRequest 
const & cmd,
 }
 
 
-void InsetIPADeco::latex(otexstream & os, OutputParams const & runparams) const
+void InsetIPADeco::latex(otexstream & os, OutputParams & runparams) const
 {
        if (params_.type == InsetIPADecoParams::Toptiebar)
                os << "\\texttoptiebar{";
@@ -305,7 +305,7 @@ int InsetIPADeco::plaintext(odocstringstream & os,
 }
 
 
-void InsetIPADeco::docbook(XMLStream & xs, OutputParams const & runparams) 
const
+void InsetIPADeco::docbook(XMLStream & xs, OutputParams & runparams) const
 {
        // The special combining character must be put in the middle, between 
the two other characters.
        // It will not work if there is anything else than two pure characters, 
so going back to plaintext.
@@ -515,8 +515,7 @@ void InsetIPAChar::read(Lexer & lex)
 }
 
 
-void InsetIPAChar::latex(otexstream & os,
-                        OutputParams const &) const
+void InsetIPAChar::latex(otexstream & os, OutputParams &) const
 {
        string const command = ipachartranslator().find(kind_);
        os << command;
@@ -552,7 +551,7 @@ int InsetIPAChar::plaintext(odocstringstream & os, 
OutputParams const &, size_t)
 }
 
 
-void InsetIPAChar::docbook(XMLStream & xs, OutputParams const &) const
+void InsetIPAChar::docbook(XMLStream & xs, OutputParams &) const
 {
        switch (kind_) {
        case TONE_FALLING:
diff --git a/src/insets/InsetIPAMacro.h b/src/insets/InsetIPAMacro.h
index 3305e6bf6e..06a26b92ea 100644
--- a/src/insets/InsetIPAMacro.h
+++ b/src/insets/InsetIPAMacro.h
@@ -74,12 +74,12 @@ private:
        ///
        bool neverIndent() const override { return true; }
        ///
-       void latex(otexstream &, OutputParams const &) const override;
+       void latex(otexstream &, OutputParams &) const override;
        ///
        int plaintext(odocstringstream & ods, OutputParams const & op,
                      size_t max_length = INT_MAX) const override;
        ///
-       void docbook(XMLStream &, OutputParams const &) const override;
+       void docbook(XMLStream &, OutputParams &) const override;
        ///
        docstring xhtml(XMLStream &, OutputParams const &) const override;
        ///
@@ -145,12 +145,12 @@ public:
        /// Will not be used when lyxf3
        void read(Lexer & lex) override;
        ///
-       void latex(otexstream &, OutputParams const &) const override;
+       void latex(otexstream &, OutputParams &) const override;
        ///
        int plaintext(odocstringstream & ods, OutputParams const & op,
                      size_t max_length = INT_MAX) const override;
        ///
-       void docbook(XMLStream &, OutputParams const &) const override;
+       void docbook(XMLStream &, OutputParams &) const override;
        ///
        docstring xhtml(XMLStream &, OutputParams const &) const override;
        ///
diff --git a/src/insets/InsetInclude.cpp b/src/insets/InsetInclude.cpp
index 75a41c3181..623152863c 100644
--- a/src/insets/InsetInclude.cpp
+++ b/src/insets/InsetInclude.cpp
@@ -542,7 +542,7 @@ bool InsetInclude::checkForRecursiveInclude(
 }
 
 
-void InsetInclude::latex(otexstream & os, OutputParams const & runparams) const
+void InsetInclude::latex(otexstream & os, OutputParams & runparams) const
 {
        string incfile = ltrim(to_utf8(params()["filename"]));
 
@@ -1036,7 +1036,7 @@ int InsetInclude::plaintext(odocstringstream & os,
 }
 
 
-void InsetInclude::docbook(XMLStream & xs, OutputParams const & rp) const
+void InsetInclude::docbook(XMLStream & xs, OutputParams & rp) const
 {
        if (rp.inComment)
                return;
diff --git a/src/insets/InsetInclude.h b/src/insets/InsetInclude.h
index a2542543e3..31ddc1673a 100644
--- a/src/insets/InsetInclude.h
+++ b/src/insets/InsetInclude.h
@@ -88,12 +88,12 @@ public:
        ///
        bool hasSettings() const override { return true; }
        ///
-       void latex(otexstream &, OutputParams const &) const override;
+       void latex(otexstream &, OutputParams &) const override;
        ///
        int plaintext(odocstringstream & ods, OutputParams const & op,
                      size_t max_length = INT_MAX) const override;
        ///
-       void docbook(XMLStream &, OutputParams const &) const override;
+       void docbook(XMLStream &, OutputParams &) const override;
        ///
        docstring xhtml(XMLStream &, OutputParams const &) const override;
        ///
diff --git a/src/insets/InsetIndex.cpp b/src/insets/InsetIndex.cpp
index 149ef6506a..0b38bc738f 100644
--- a/src/insets/InsetIndex.cpp
+++ b/src/insets/InsetIndex.cpp
@@ -62,7 +62,7 @@ InsetIndex::InsetIndex(Buffer * buf, InsetIndexParams const & 
params)
 {}
 
 
-void InsetIndex::latex(otexstream & ios, OutputParams const & runparams_in) 
const
+void InsetIndex::latex(otexstream & ios, OutputParams & runparams_in) const
 {
        OutputParams runparams(runparams_in);
        runparams.inIndexEntry = true;
@@ -185,7 +185,7 @@ void InsetIndex::latex(otexstream & ios, OutputParams const 
& runparams_in) cons
 }
 
 
-void InsetIndex::docbook(XMLStream & xs, OutputParams const & runparams) const
+void InsetIndex::docbook(XMLStream & xs, OutputParams & runparams) const
 {
        // Get the content of the inset as LaTeX, as some things may be encoded 
as ERT (like {}).
        odocstringstream odss;
@@ -765,7 +765,7 @@ void InsetPrintIndex::updateBuffer(ParIterator const &, 
UpdateType, bool const /
 }
 
 
-void InsetPrintIndex::latex(otexstream & os, OutputParams const & 
runparams_in) const
+void InsetPrintIndex::latex(otexstream & os, OutputParams & runparams_in) const
 {
        if (!buffer().masterBuffer()->params().use_indices) {
                if (getParam("type") == from_ascii("idx"))
diff --git a/src/insets/InsetIndex.h b/src/insets/InsetIndex.h
index bddb8ba380..e6685871ed 100644
--- a/src/insets/InsetIndex.h
+++ b/src/insets/InsetIndex.h
@@ -57,11 +57,11 @@ private:
        ///
        void read(Lexer & lex) override;
        ///
-       void docbook(XMLStream &, OutputParams const &) const override;
+       void docbook(XMLStream &, OutputParams &) const override;
        ///
        docstring xhtml(XMLStream &, OutputParams const &) const override;
        ///
-       void latex(otexstream &, OutputParams const &) const override;
+       void latex(otexstream &, OutputParams &) const override;
        ///
        bool showInsetDialog(BufferView *) const override;
        ///
@@ -103,7 +103,7 @@ public:
        ///
        InsetCode lyxCode() const override { return INDEX_PRINT_CODE; }
        ///
-       void latex(otexstream &, OutputParams const &) const override;
+       void latex(otexstream &, OutputParams &) const override;
        ///
        docstring xhtml(XMLStream &, OutputParams const &) const override;
        ///
diff --git a/src/insets/InsetLabel.cpp b/src/insets/InsetLabel.cpp
index b624cce119..427df8a767 100644
--- a/src/insets/InsetLabel.cpp
+++ b/src/insets/InsetLabel.cpp
@@ -312,7 +312,7 @@ void InsetLabel::doDispatch(Cursor & cur, FuncRequest & cmd)
 }
 
 
-void InsetLabel::latex(otexstream & os, OutputParams const & runparams_in) 
const
+void InsetLabel::latex(otexstream & os, OutputParams & runparams_in) const
 {
        OutputParams runparams = runparams_in;
        docstring command = getCommand(runparams);
@@ -354,7 +354,7 @@ int InsetLabel::plaintext(odocstringstream & os,
 }
 
 
-void InsetLabel::docbook(XMLStream & xs, OutputParams const & runparams) const
+void InsetLabel::docbook(XMLStream & xs, OutputParams & runparams) const
 {
        // Output an anchor only if it has not been processed before.
        docstring id = getParam("name");
diff --git a/src/insets/InsetLabel.h b/src/insets/InsetLabel.h
index 54bfa07141..6b57193113 100644
--- a/src/insets/InsetLabel.h
+++ b/src/insets/InsetLabel.h
@@ -46,12 +46,12 @@ public:
        ///
        InsetCode lyxCode() const override { return LABEL_CODE; }
        ///
-       void latex(otexstream & os, OutputParams const & runparams_in) const 
override;
+       void latex(otexstream & os, OutputParams & runparams_in) const override;
        ///
        int plaintext(odocstringstream & ods, OutputParams const & op,
                      size_t max_length = INT_MAX) const override;
        ///
-       void docbook(XMLStream &, OutputParams const &) const override;
+       void docbook(XMLStream &, OutputParams &) const override;
        ///
        docstring xhtml(XMLStream &, OutputParams const &) const override;
        ///
diff --git a/src/insets/InsetLine.cpp b/src/insets/InsetLine.cpp
index 8d6a4ada2f..a57ee88a94 100644
--- a/src/insets/InsetLine.cpp
+++ b/src/insets/InsetLine.cpp
@@ -154,7 +154,7 @@ void InsetLine::draw(PainterInfo & pi, int x, int y) const
 }
 
 
-void InsetLine::latex(otexstream & os, OutputParams const &) const
+void InsetLine::latex(otexstream & os, OutputParams &) const
 {
        bool have_offset = true;
        Length offset_len = Length(to_ascii(getParam("offset")));
@@ -184,7 +184,7 @@ int InsetLine::plaintext(odocstringstream & os,
 }
 
 
-void InsetLine::docbook(XMLStream & xs, OutputParams const &) const
+void InsetLine::docbook(XMLStream & xs, OutputParams &) const
 {
        xs << xml::CR();
 }
diff --git a/src/insets/InsetLine.h b/src/insets/InsetLine.h
index 361fbe5d6d..531956e018 100644
--- a/src/insets/InsetLine.h
+++ b/src/insets/InsetLine.h
@@ -39,12 +39,12 @@ private:
        /// Inset inherited methods.
        //@{
        InsetCode lyxCode() const override { return LINE_CODE; }
-       void docbook(XMLStream &, OutputParams const &) const override;
+       void docbook(XMLStream &, OutputParams &) const override;
        docstring xhtml(XMLStream &, OutputParams const &) const override;
        bool hasSettings() const override { return true; }
        void metrics(MetricsInfo &, Dimension &) const override;
        void draw(PainterInfo & pi, int x, int y) const override;
-       void latex(otexstream &, OutputParams const &) const override;
+       void latex(otexstream &, OutputParams &) const override;
        int plaintext(odocstringstream & ods, OutputParams const & op,
                      size_t max_length = INT_MAX) const override;
        void doDispatch(Cursor & cur, FuncRequest & cmd) override;
diff --git a/src/insets/InsetListings.cpp b/src/insets/InsetListings.cpp
index 93daab4a33..daacf90531 100644
--- a/src/insets/InsetListings.cpp
+++ b/src/insets/InsetListings.cpp
@@ -141,7 +141,7 @@ Encoding const * InsetListings::forcedEncoding(Encoding 
const * inner_enc,
 }
 
 
-void InsetListings::latex(otexstream & os, OutputParams const & runparams) 
const
+void InsetListings::latex(otexstream & os, OutputParams & runparams) const
 {
        string param_string = params().params();
        // NOTE: I use {} to quote text, which is an experimental feature
@@ -481,7 +481,7 @@ docstring InsetListings::xhtml(XMLStream & os, OutputParams 
const & rp) const
 }
 
 
-void InsetListings::docbook(XMLStream & xs, OutputParams const & rp) const
+void InsetListings::docbook(XMLStream & xs, OutputParams & rp) const
 {
        InsetLayout const & il = getLayout();
 
@@ -613,7 +613,7 @@ bool InsetListings::showInsetDialog(BufferView * bv) const
 }
 
 
-TexString InsetListings::getCaption(OutputParams const & runparams) const
+TexString InsetListings::getCaption(OutputParams & runparams) const
 {
        InsetCaption const * ins = getCaptionInset();
        if (ins == 0)
diff --git a/src/insets/InsetListings.h b/src/insets/InsetListings.h
index 41be4394ce..c1cdb492e8 100644
--- a/src/insets/InsetListings.h
+++ b/src/insets/InsetListings.h
@@ -54,11 +54,11 @@ private:
        ///
        void read(Lexer & lex) override;
        ///
-       void latex(otexstream &, OutputParams const &) const override;
+       void latex(otexstream &, OutputParams &) const override;
        ///
        docstring xhtml(XMLStream &, OutputParams const &) const override;
        ///
-       void docbook(XMLStream &, OutputParams const &) const override;
+       void docbook(XMLStream &, OutputParams &) const override;
        ///
        void validate(LaTeXFeatures &) const override;
        ///
@@ -78,7 +78,7 @@ private:
        ///
        docstring const buttonLabel(BufferView const & bv) const override;
        ///
-       TexString getCaption(OutputParams const &) const;
+       TexString getCaption(OutputParams &) const;
        ///
        bool insetAllowed(InsetCode c) const override { return c == 
CAPTION_CODE || c == QUOTE_CODE; }
        ///
diff --git a/src/insets/InsetMarginal.cpp b/src/insets/InsetMarginal.cpp
index 3a5296d089..f824ec319d 100644
--- a/src/insets/InsetMarginal.cpp
+++ b/src/insets/InsetMarginal.cpp
@@ -42,7 +42,7 @@ int InsetMarginal::plaintext(odocstringstream & os,
 }
 
 
-void InsetMarginal::docbook(XMLStream & xs, OutputParams const & runparams) 
const
+void InsetMarginal::docbook(XMLStream & xs, OutputParams & runparams) const
 {
        // Implementation as per 
http://www.sagehill.net/docbookxsl/SideFloats.html
        // Unfortunately, only for XSL-FO output with the default style sheets, 
hence the role.
diff --git a/src/insets/InsetMarginal.h b/src/insets/InsetMarginal.h
index 8b6a403258..9aa88a505e 100644
--- a/src/insets/InsetMarginal.h
+++ b/src/insets/InsetMarginal.h
@@ -34,7 +34,7 @@ public:
        int plaintext(odocstringstream & ods, OutputParams const & op,
                      size_t max_length = INT_MAX) const override;
        ///
-       void docbook(XMLStream &, OutputParams const & runparams) const 
override;
+       void docbook(XMLStream &, OutputParams & runparams) const override;
        /// Is the content of this inset part of the immediate (visible) text 
sequence?
        bool isPartOfTextSequence() const override { return false; }
 private:
diff --git a/src/insets/InsetNewline.cpp b/src/insets/InsetNewline.cpp
index 0e07af13f7..4667354f4b 100644
--- a/src/insets/InsetNewline.cpp
+++ b/src/insets/InsetNewline.cpp
@@ -143,7 +143,7 @@ ColorCode InsetNewline::ColorName() const
 }
 
 
-void InsetNewline::latex(otexstream & os, OutputParams const & rp) const
+void InsetNewline::latex(otexstream & os, OutputParams & rp) const
 {
        switch (params_.kind) {
                case InsetNewlineParams::NEWLINE:
@@ -172,7 +172,7 @@ int InsetNewline::plaintext(odocstringstream & os,
 }
 
 
-void InsetNewline::docbook(XMLStream &, OutputParams const &) const
+void InsetNewline::docbook(XMLStream &, OutputParams &) const
 {
        // New lines are handled by Paragraph::simpleDocBookOnePar.
 }
diff --git a/src/insets/InsetNewline.h b/src/insets/InsetNewline.h
index 3d540a8618..2f0384361e 100644
--- a/src/insets/InsetNewline.h
+++ b/src/insets/InsetNewline.h
@@ -60,12 +60,12 @@ private:
        ///
        void draw(PainterInfo & pi, int x, int y) const override;
        ///
-       void latex(otexstream &, OutputParams const &) const override;
+       void latex(otexstream &, OutputParams &) const override;
        ///
        int plaintext(odocstringstream & ods, OutputParams const & op,
                      size_t max_length = INT_MAX) const override;
        ///
-       void docbook(XMLStream &, OutputParams const &) const override;
+       void docbook(XMLStream &, OutputParams &) const override;
        ///
        docstring xhtml(XMLStream &, OutputParams const &) const override;
        ///
diff --git a/src/insets/InsetNewpage.cpp b/src/insets/InsetNewpage.cpp
index 7e91e689e0..9f343ae2e2 100644
--- a/src/insets/InsetNewpage.cpp
+++ b/src/insets/InsetNewpage.cpp
@@ -276,7 +276,7 @@ ColorCode InsetNewpage::ColorName() const
 }
 
 
-void InsetNewpage::latex(otexstream & os, OutputParams const & runparams) const
+void InsetNewpage::latex(otexstream & os, OutputParams & runparams) const
 {
        if (runparams.inDeletedInset) {
                os << "\\mbox{}\\\\\\makebox[\\columnwidth]{\\dotfill\\ "
@@ -318,7 +318,7 @@ int InsetNewpage::plaintext(odocstringstream & os,
 }
 
 
-void InsetNewpage::docbook(XMLStream & os, OutputParams const &) const
+void InsetNewpage::docbook(XMLStream & os, OutputParams &) const
 {
        if (params_.kind !=  InsetNewpageParams::NOPAGEBREAK)
                os << xml::CR();
diff --git a/src/insets/InsetNewpage.h b/src/insets/InsetNewpage.h
index f02048804d..c3b72aaf12 100644
--- a/src/insets/InsetNewpage.h
+++ b/src/insets/InsetNewpage.h
@@ -63,12 +63,12 @@ private:
        ///
        void draw(PainterInfo & pi, int x, int y) const override;
        ///
-       void latex(otexstream &, OutputParams const &) const override;
+       void latex(otexstream &, OutputParams &) const override;
        ///
        int plaintext(odocstringstream & ods, OutputParams const & op,
                      size_t max_length = INT_MAX) const override;
        ///
-       void docbook(XMLStream &, OutputParams const &) const override;
+       void docbook(XMLStream &, OutputParams &) const override;
        ///
        docstring xhtml(XMLStream &, OutputParams const &) const override;
        ///
diff --git a/src/insets/InsetNomencl.cpp b/src/insets/InsetNomencl.cpp
index 5e3c637a60..deb8cf97ef 100644
--- a/src/insets/InsetNomencl.cpp
+++ b/src/insets/InsetNomencl.cpp
@@ -104,7 +104,7 @@ int InsetNomencl::plaintext(odocstringstream & os,
 }
 
 
-void InsetNomencl::docbook(XMLStream & xs, OutputParams const &) const
+void InsetNomencl::docbook(XMLStream & xs, OutputParams &) const
 {
        docstring attr = "linkend=\"" + nomenclature_entry_id + "\"";
        xs << xml::StartTag("glossterm", attr);
@@ -301,7 +301,7 @@ bool InsetPrintNomencl::getStatus(Cursor & cur, FuncRequest 
const & cmd,
 }
 
 
-void InsetPrintNomencl::docbook(XMLStream & xs, OutputParams const & 
runparams) const
+void InsetPrintNomencl::docbook(XMLStream & xs, OutputParams & runparams) const
 {
        shared_ptr<Toc const> toc = buffer().tocBackend().toc("nomencl");
 
@@ -417,7 +417,7 @@ docstring nomenclWidest(Buffer const & buffer, OutputParams 
const & runparams)
 } // namespace
 
 
-void InsetPrintNomencl::latex(otexstream & os, OutputParams const & 
runparams_in) const
+void InsetPrintNomencl::latex(otexstream & os, OutputParams & runparams_in) 
const
 {
        OutputParams runparams = runparams_in;
        if (getParam("set_width") == "auto") {
diff --git a/src/insets/InsetNomencl.h b/src/insets/InsetNomencl.h
index 144064977a..a15f77cc7e 100644
--- a/src/insets/InsetNomencl.h
+++ b/src/insets/InsetNomencl.h
@@ -45,7 +45,7 @@ public:
        int plaintext(odocstringstream & ods, OutputParams const & op,
                      size_t max_length = INT_MAX) const override;
        ///
-       void docbook(XMLStream &, OutputParams const &) const override;
+       void docbook(XMLStream &, OutputParams &) const override;
        /// Does nothing at the moment.
        docstring xhtml(XMLStream &, OutputParams const &) const override;
        //@}
@@ -89,7 +89,7 @@ public:
        /// Updates needed features for this inset.
        void validate(LaTeXFeatures & features) const override;
        ///
-       void docbook(XMLStream &, OutputParams const &) const override;
+       void docbook(XMLStream &, OutputParams &) const override;
        ///
        docstring xhtml(XMLStream &, OutputParams const &) const override;
        ///
@@ -99,7 +99,7 @@ public:
        ///
        RowFlags rowFlags() const override { return Display; }
        ///
-       void latex(otexstream &, OutputParams const &) const override;
+       void latex(otexstream &, OutputParams &) const override;
        ///
        std::string contextMenuName() const override;
        //@}
diff --git a/src/insets/InsetNote.cpp b/src/insets/InsetNote.cpp
index fa84c61c87..20ffa08dea 100644
--- a/src/insets/InsetNote.cpp
+++ b/src/insets/InsetNote.cpp
@@ -208,7 +208,7 @@ bool InsetNote::isMacroScope() const
 }
 
 
-void InsetNote::latex(otexstream & os, OutputParams const & runparams_in) const
+void InsetNote::latex(otexstream & os, OutputParams & runparams_in) const
 {
        if (params_.type == InsetNoteParams::Note)
                return;
@@ -261,7 +261,7 @@ int InsetNote::plaintext(odocstringstream & os,
 }
 
 
-void InsetNote::docbook(XMLStream & xs, OutputParams const & runparams_in) 
const
+void InsetNote::docbook(XMLStream & xs, OutputParams & runparams_in) const
 {
        if (params_.type == InsetNoteParams::Note)
                return;
diff --git a/src/insets/InsetNote.h b/src/insets/InsetNote.h
index aeab8f038b..e61dfc8fe7 100644
--- a/src/insets/InsetNote.h
+++ b/src/insets/InsetNote.h
@@ -81,12 +81,12 @@ private:
        ///
        bool isMacroScope() const override;
        ///
-       void latex(otexstream &, OutputParams const &) const override;
+       void latex(otexstream &, OutputParams &) const override;
        ///
        int plaintext(odocstringstream & ods, OutputParams const & op,
                      size_t max_length = INT_MAX) const override;
        ///
-       void docbook(XMLStream &, OutputParams const &) const override;
+       void docbook(XMLStream &, OutputParams &) const override;
        ///
        docstring xhtml(XMLStream &, OutputParams const &) const override;
        ///
diff --git a/src/insets/InsetPhantom.cpp b/src/insets/InsetPhantom.cpp
index 24ad8e9118..663932f8e0 100644
--- a/src/insets/InsetPhantom.cpp
+++ b/src/insets/InsetPhantom.cpp
@@ -299,7 +299,7 @@ docstring InsetPhantom::toolTip(BufferView const &, int, 
int) const
 }
 
 
-void InsetPhantom::latex(otexstream & os, OutputParams const & runparams) const
+void InsetPhantom::latex(otexstream & os, OutputParams & runparams) const
 {
        if (runparams.moving_arg)
                os << "\\protect";
@@ -347,7 +347,7 @@ int InsetPhantom::plaintext(odocstringstream & os,
 }
 
 
-void InsetPhantom::docbook(XMLStream &, OutputParams const &) const
+void InsetPhantom::docbook(XMLStream &, OutputParams &) const
 {
        return;
 }
diff --git a/src/insets/InsetPhantom.h b/src/insets/InsetPhantom.h
index 72281df2ae..64303f5936 100644
--- a/src/insets/InsetPhantom.h
+++ b/src/insets/InsetPhantom.h
@@ -74,12 +74,12 @@ private:
        ///
        bool neverIndent() const override { return true; }
        ///
-       void latex(otexstream &, OutputParams const &) const override;
+       void latex(otexstream &, OutputParams &) const override;
        ///
        int plaintext(odocstringstream & ods, OutputParams const & op,
                      size_t max_length = INT_MAX) const override;
        ///
-       void docbook(XMLStream &, OutputParams const &) const override;
+       void docbook(XMLStream &, OutputParams &) const override;
        /// Makes no sense for XHTML.
        docstring xhtml(XMLStream &, OutputParams const &) const override;
        ///
diff --git a/src/insets/InsetQuotes.cpp b/src/insets/InsetQuotes.cpp
index b9b6557a5e..0acdcf112b 100644
--- a/src/insets/InsetQuotes.cpp
+++ b/src/insets/InsetQuotes.cpp
@@ -846,7 +846,7 @@ bool InsetQuotes::getStatus(Cursor & cur, FuncRequest const 
& cmd,
 }
 
 
-void InsetQuotes::latex(otexstream & os, OutputParams const & runparams) const
+void InsetQuotes::latex(otexstream & os, OutputParams & runparams) const
 {
        InsetQuotesParams::QuoteStyle style =
                        (style_ == InsetQuotesParams::DynamicQuotes) ? 
global_style_ : style_;
@@ -976,7 +976,7 @@ docstring InsetQuotes::getQuoteEntity(bool isHTML) const {
 }
 
 
-void InsetQuotes::docbook(XMLStream & xs, OutputParams const &) const
+void InsetQuotes::docbook(XMLStream & xs, OutputParams &) const
 {
        xs << XMLStream::ESCAPE_NONE << getQuoteEntity(false);
 }
diff --git a/src/insets/InsetQuotes.h b/src/insets/InsetQuotes.h
index b4d96ffc75..bda11becf3 100644
--- a/src/insets/InsetQuotes.h
+++ b/src/insets/InsetQuotes.h
@@ -141,12 +141,12 @@ public:
        ///
        bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const 
override;
        ///
-       void latex(otexstream &, OutputParams const &) const override;
+       void latex(otexstream &, OutputParams &) const override;
        ///
        int plaintext(odocstringstream & ods, OutputParams const & op,
                      size_t max_length = INT_MAX) const override;
        ///
-       void docbook(XMLStream &, OutputParams const &) const override;
+       void docbook(XMLStream &, OutputParams &) const override;
        ///
        docstring xhtml(XMLStream &, OutputParams const &) const override;
 
diff --git a/src/insets/InsetRef.cpp b/src/insets/InsetRef.cpp
index 063691b154..c4153efd6c 100644
--- a/src/insets/InsetRef.cpp
+++ b/src/insets/InsetRef.cpp
@@ -254,7 +254,7 @@ docstring InsetRef::getEscapedLabel(OutputParams const & 
rp) const
 }
 
 
-void InsetRef::latex(otexstream & os, OutputParams const & rp) const
+void InsetRef::latex(otexstream & os, OutputParams & rp) const
 {
        string const & cmd = getCmdName();
        docstring const & data = getEscapedLabel(rp);
@@ -315,7 +315,7 @@ int InsetRef::plaintext(odocstringstream & os,
 }
 
 
-void InsetRef::docbook(XMLStream & xs, OutputParams const &) const
+void InsetRef::docbook(XMLStream & xs, OutputParams &) const
 {
        docstring const & ref = getParam("reference");
        InsetLabel const * il = buffer().insetLabel(ref, true);
diff --git a/src/insets/InsetRef.h b/src/insets/InsetRef.h
index d18f61939c..5fdc1f8ea9 100644
--- a/src/insets/InsetRef.h
+++ b/src/insets/InsetRef.h
@@ -56,12 +56,12 @@ public:
        ///
        InsetCode lyxCode() const override { return REF_CODE; }
        ///
-       void latex(otexstream &, OutputParams const &) const override;
+       void latex(otexstream &, OutputParams &) const override;
        ///
        int plaintext(odocstringstream & ods, OutputParams const & op,
                      size_t max_length = INT_MAX) const override;
        ///
-       void docbook(XMLStream &, OutputParams const &) const override;
+       void docbook(XMLStream &, OutputParams &) const override;
        ///
        docstring xhtml(XMLStream &, OutputParams const &) const override;
        ///
diff --git a/src/insets/InsetScript.cpp b/src/insets/InsetScript.cpp
index eccf3c3029..3203351ee0 100644
--- a/src/insets/InsetScript.cpp
+++ b/src/insets/InsetScript.cpp
@@ -355,7 +355,7 @@ int InsetScript::plaintext(odocstringstream & os,
 }
 
 
-void InsetScript::docbook(XMLStream & xs, OutputParams const & runparams) const
+void InsetScript::docbook(XMLStream & xs, OutputParams & runparams) const
 {
        docstring cmdname;
        switch (params_.type) {
diff --git a/src/insets/InsetScript.h b/src/insets/InsetScript.h
index 424772cfb9..9a30ad6943 100644
--- a/src/insets/InsetScript.h
+++ b/src/insets/InsetScript.h
@@ -99,7 +99,7 @@ public:
        int plaintext(odocstringstream & ods, OutputParams const & op,
                      size_t max_length = INT_MAX) const override;
        ///
-       void docbook(XMLStream &, OutputParams const &) const override;
+       void docbook(XMLStream &, OutputParams &) const override;
        ///
        void edit(Cursor & cur, bool front,
                  EntryDirection entry_from = ENTRY_DIRECTION_IGNORE) override;
diff --git a/src/insets/InsetSeparator.cpp b/src/insets/InsetSeparator.cpp
index 16f7cdcbdf..bac4e10f43 100644
--- a/src/insets/InsetSeparator.cpp
+++ b/src/insets/InsetSeparator.cpp
@@ -137,7 +137,7 @@ ColorCode InsetSeparator::ColorName() const
 }
 
 
-void InsetSeparator::latex(otexstream & os, OutputParams const & runparams) 
const
+void InsetSeparator::latex(otexstream & os, OutputParams & runparams) const
 {
        // Do nothing if a paragraph break was just output
        if (!os.afterParbreak()) {
@@ -168,7 +168,7 @@ int InsetSeparator::plaintext(odocstringstream & os,
 }
 
 
-void InsetSeparator::docbook(XMLStream & xs, OutputParams const &) const
+void InsetSeparator::docbook(XMLStream & xs, OutputParams &) const
 {
        xs << xml::CR();
 }
diff --git a/src/insets/InsetSeparator.h b/src/insets/InsetSeparator.h
index f7e0ab9059..18c4979777 100644
--- a/src/insets/InsetSeparator.h
+++ b/src/insets/InsetSeparator.h
@@ -74,12 +74,12 @@ private:
        ///
        void draw(PainterInfo & pi, int x, int y) const override;
        ///
-       void latex(otexstream &, OutputParams const &) const override;
+       void latex(otexstream &, OutputParams &) const override;
        ///
        int plaintext(odocstringstream & ods, OutputParams const & op,
                      size_t max_length = INT_MAX) const override;
        ///
-       void docbook(XMLStream &, OutputParams const &) const override;
+       void docbook(XMLStream &, OutputParams &) const override;
        ///
        docstring xhtml(XMLStream &, OutputParams const &) const override;
        ///
diff --git a/src/insets/InsetSpace.cpp b/src/insets/InsetSpace.cpp
index d4cb7361b4..6679fb053e 100644
--- a/src/insets/InsetSpace.cpp
+++ b/src/insets/InsetSpace.cpp
@@ -576,7 +576,7 @@ void InsetSpace::read(Lexer & lex)
 }
 
 
-void InsetSpace::latex(otexstream & os, OutputParams const & runparams) const
+void InsetSpace::latex(otexstream & os, OutputParams & runparams) const
 {
        switch (params_.kind) {
        case InsetSpaceParams::NORMAL:
@@ -741,7 +741,7 @@ int InsetSpace::plaintext(odocstringstream & os,
 }
 
 
-void InsetSpace::docbook(XMLStream & xs, OutputParams const &) const
+void InsetSpace::docbook(XMLStream & xs, OutputParams &) const
 {
        switch (params_.kind) {
        case InsetSpaceParams::NORMAL:
diff --git a/src/insets/InsetSpace.h b/src/insets/InsetSpace.h
index 5cf7aa7303..d56240da4f 100644
--- a/src/insets/InsetSpace.h
+++ b/src/insets/InsetSpace.h
@@ -125,12 +125,12 @@ public:
        /// Will not be used when lyxf3
        void read(Lexer & lex) override;
        ///
-       void latex(otexstream &, OutputParams const &) const override;
+       void latex(otexstream &, OutputParams &) const override;
        ///
        int plaintext(odocstringstream & ods, OutputParams const & op,
                      size_t max_length = INT_MAX) const override;
        ///
-       void docbook(XMLStream &, OutputParams const &) const override;
+       void docbook(XMLStream &, OutputParams &) const override;
        ///
        docstring xhtml(XMLStream &, OutputParams const &) const override;
        ///
diff --git a/src/insets/InsetSpecialChar.cpp b/src/insets/InsetSpecialChar.cpp
index 3ecdaf12e9..d9b6ebce29 100644
--- a/src/insets/InsetSpecialChar.cpp
+++ b/src/insets/InsetSpecialChar.cpp
@@ -406,7 +406,7 @@ void InsetSpecialChar::read(Lexer & lex)
 
 
 void InsetSpecialChar::latex(otexstream & os,
-                            OutputParams const & rp) const
+                            OutputParams & rp) const
 {
        bool const rtl = rp.local_font->isRightToLeft();
        bool const utf8 = rp.encoding->iconvName() == "UTF-8";
@@ -530,7 +530,7 @@ int InsetSpecialChar::plaintext(odocstringstream & os,
 }
 
 
-void InsetSpecialChar::docbook(XMLStream & xs, OutputParams const &) const
+void InsetSpecialChar::docbook(XMLStream & xs, OutputParams &) const
 {
        switch (kind_) {
     case HYPHENATION:
diff --git a/src/insets/InsetSpecialChar.h b/src/insets/InsetSpecialChar.h
index 3056b105b4..f6a412ca53 100644
--- a/src/insets/InsetSpecialChar.h
+++ b/src/insets/InsetSpecialChar.h
@@ -73,12 +73,12 @@ public:
        /// Will not be used when lyxf3
        void read(Lexer & lex) override;
        ///
-       void latex(otexstream &, OutputParams const &) const override;
+       void latex(otexstream &, OutputParams &) const override;
        ///
        int plaintext(odocstringstream & ods, OutputParams const & op,
                      size_t max_length = INT_MAX) const override;
        ///
-       void docbook(XMLStream &, OutputParams const &) const override;
+       void docbook(XMLStream &, OutputParams &) const override;
        ///
        docstring xhtml(XMLStream &, OutputParams const &) const override;
        ///
diff --git a/src/insets/InsetTOC.cpp b/src/insets/InsetTOC.cpp
index af19e53fd4..0b6999154c 100644
--- a/src/insets/InsetTOC.cpp
+++ b/src/insets/InsetTOC.cpp
@@ -129,7 +129,7 @@ int InsetTOC::plaintext(odocstringstream & os,
 }
 
 
-void InsetTOC::docbook(XMLStream &, OutputParams const &) const
+void InsetTOC::docbook(XMLStream &, OutputParams &) const
 {
        // TOC are generated automatically by the DocBook processor.
        return;
diff --git a/src/insets/InsetTOC.h b/src/insets/InsetTOC.h
index 045ae07e6d..e1e7d4dd56 100644
--- a/src/insets/InsetTOC.h
+++ b/src/insets/InsetTOC.h
@@ -44,7 +44,7 @@ public:
        int plaintext(odocstringstream & ods, OutputParams const & op,
                      size_t max_length = INT_MAX) const override;
        ///
-       void docbook(XMLStream &, OutputParams const &) const override;
+       void docbook(XMLStream &, OutputParams &) const override;
        ///
        docstring xhtml(XMLStream & xs, OutputParams const &) const override;
        ///
diff --git a/src/insets/InsetTabular.cpp b/src/insets/InsetTabular.cpp
index e6c9892025..35ebf38fe3 100644
--- a/src/insets/InsetTabular.cpp
+++ b/src/insets/InsetTabular.cpp
@@ -2938,7 +2938,7 @@ void Tabular::TeXCellPostamble(otexstream & os, idx_type 
cell,
 
 
 void Tabular::TeXLongtableHeaderFooter(otexstream & os,
-                                      OutputParams const & runparams,
+                                      OutputParams & runparams,
                                       list<col_type> columns,
                                       list<col_type> logical_columns) const
 {
@@ -3021,7 +3021,7 @@ bool Tabular::isValidRow(row_type row) const
 
 
 void Tabular::TeXRow(otexstream & os, row_type row,
-                    OutputParams const & runparams,
+                    OutputParams & runparams,
                     list<col_type> columns, list<col_type> logical_columns) 
const
 {
        //output the top line
@@ -3194,7 +3194,7 @@ void Tabular::TeXRow(otexstream & os, row_type row,
 }
 
 
-void Tabular::latex(otexstream & os, OutputParams const & runparams) const
+void Tabular::latex(otexstream & os, OutputParams & runparams) const
 {
        bool const is_tabular_star = !is_long_tabular && !tabular_width.zero()
                && !hasVarwidthColumn();
@@ -3499,7 +3499,7 @@ void Tabular::latex(otexstream & os, OutputParams const & 
runparams) const
 
 
 void Tabular::docbookRow(XMLStream & xs, row_type row,
-                  OutputParams const & runparams, bool header) const
+                  OutputParams & runparams, bool header) const
 {
        switch (buffer().params().docbook_table_output) {
        case BufferParams::HTMLTable:
@@ -3513,7 +3513,7 @@ void Tabular::docbookRow(XMLStream & xs, row_type row,
 
 
 void Tabular::docbookRowAsHTML(XMLStream & xs, row_type row,
-                  OutputParams const & runparams, bool header) const
+                  OutputParams & runparams, bool header) const
 {
        string const celltag = header ? "th" : "td";
        idx_type cell = getFirstCellInRow(row);
@@ -3583,7 +3583,7 @@ void Tabular::docbookRowAsHTML(XMLStream & xs, row_type 
row,
 
 
 void Tabular::docbookRowAsCALS(XMLStream & xs, row_type row,
-                                OutputParams const & runparams) const
+                                OutputParams & runparams) const
 {
        idx_type cell = getFirstCellInRow(row);
 
@@ -3652,7 +3652,7 @@ void Tabular::docbookRowAsCALS(XMLStream & xs, row_type 
row,
 }
 
 
-void Tabular::docbook(XMLStream & xs, OutputParams const & runparams) const
+void Tabular::docbook(XMLStream & xs, OutputParams & runparams) const
 {
        docstring ret;
 
@@ -4278,7 +4278,7 @@ docstring InsetTableCell::xhtml(XMLStream & xs, 
OutputParams const & rp) const
 }
 
 
-void InsetTableCell::docbook(XMLStream & xs, OutputParams const & runparams) 
const
+void InsetTableCell::docbook(XMLStream & xs, OutputParams & runparams) const
 {
        InsetText::docbook(xs, runparams);
 }
@@ -6115,7 +6115,7 @@ Inset::RowFlags InsetTabular::rowFlags() const
 }
 
 
-void InsetTabular::latex(otexstream & os, OutputParams const & runparams) const
+void InsetTabular::latex(otexstream & os, OutputParams & runparams) const
 {
        tabular.latex(os, runparams);
 }
@@ -6131,7 +6131,7 @@ int InsetTabular::plaintext(odocstringstream & os,
 }
 
 
-void InsetTabular::docbook(XMLStream & xs, OutputParams const & runparams) 
const
+void InsetTabular::docbook(XMLStream & xs, OutputParams & runparams) const
 {
        tabular.docbook(xs, runparams);
 }
diff --git a/src/insets/InsetTabular.h b/src/insets/InsetTabular.h
index 2ee107a192..cbd29eab47 100644
--- a/src/insets/InsetTabular.h
+++ b/src/insets/InsetTabular.h
@@ -77,7 +77,7 @@ public:
        ///
        docstring xhtml(XMLStream &, OutputParams const &) const override;
        ///
-       void docbook(XMLStream &, OutputParams const &) const override;
+       void docbook(XMLStream &, OutputParams &) const override;
        ///
        void addToToc(DocIterator const & di, bool output_active,
                                  UpdateType utype, TocBackend & backend) const 
override;
@@ -576,9 +576,9 @@ public:
        ///
        void read(Lexer &);
        ///
-       void latex(otexstream &, OutputParams const &) const;
+       void latex(otexstream &, OutputParams &) const;
        /// serialise the table in DocBook, according to buffer parameters
-       void docbook(XMLStream &, OutputParams const &) const;
+       void docbook(XMLStream &, OutputParams &) const;
        ///
        docstring xhtml(XMLStream &, OutputParams const &) const;
        ///
@@ -891,13 +891,13 @@ public:
        ///
        void TeXCellPostamble(otexstream &, idx_type cell, bool ismulticol, 
bool ismultirow) const;
        ///
-       void TeXLongtableHeaderFooter(otexstream &, OutputParams const &, 
std::list<col_type>,
+       void TeXLongtableHeaderFooter(otexstream &, OutputParams &, 
std::list<col_type>,
                                      std::list<col_type>) const;
        ///
        bool isValidRow(row_type const row) const;
        ///
        void TeXRow(otexstream &, row_type const row,
-                   OutputParams const &, std::list<col_type>, 
std::list<col_type>) const;
+                   OutputParams &, std::list<col_type>, std::list<col_type>) 
const;
        ///
        // helper functions for plain text
        ///
@@ -913,13 +913,13 @@ public:
                                std::vector<unsigned int> const &,
                                bool onlydata, size_t max_length) const;
        /// auxiliary function for DocBook
-       void docbookRow(XMLStream &, row_type, OutputParams const &,
+       void docbookRow(XMLStream &, row_type, OutputParams &,
                                        bool header = false) const;
        /// auxiliary function for DocBook: export this row as HTML
-       void docbookRowAsHTML(XMLStream &, row_type, OutputParams const &,
+       void docbookRowAsHTML(XMLStream &, row_type, OutputParams &,
                                        bool header) const;
        /// auxiliary function for DocBook: export this row as CALS
-       void docbookRowAsCALS(XMLStream &, row_type, OutputParams const &) 
const;
+       void docbookRowAsCALS(XMLStream &, row_type, OutputParams &) const;
        ///
        docstring xhtmlRow(XMLStream & xs, row_type, OutputParams const &,
                           bool header = false) const;
@@ -989,12 +989,12 @@ public:
        ///
        RowFlags rowFlags() const override;
        ///
-       void latex(otexstream &, OutputParams const &) const override;
+       void latex(otexstream &, OutputParams &) const override;
        ///
        int plaintext(odocstringstream & ods, OutputParams const & op,
                      size_t max_length = INT_MAX) const override;
        ///
-       void docbook(XMLStream &, OutputParams const &) const override;
+       void docbook(XMLStream &, OutputParams &) const override;
        ///
        docstring xhtml(XMLStream &, OutputParams const &) const override;
        ///
diff --git a/src/insets/InsetText.cpp b/src/insets/InsetText.cpp
index f72b9a6396..530e059ecc 100644
--- a/src/insets/InsetText.cpp
+++ b/src/insets/InsetText.cpp
@@ -457,7 +457,7 @@ void InsetText::validate(LaTeXFeatures & features) const
 }
 
 
-void InsetText::latex(otexstream & os, OutputParams const & runparams) const
+void InsetText::latex(otexstream & os, OutputParams & runparams) const
 {
        // This implements the standard way of handling the LaTeX
        // output of a text inset, either a command or an
@@ -590,8 +590,7 @@ int InsetText::plaintext(odocstringstream & os,
 }
 
 
-
-void InsetText::docbook(XMLStream & xs, OutputParams const & rp) const
+void InsetText::docbook(XMLStream & xs, OutputParams & rp) const
 {
        docbook(xs, rp, WriteEverything);
 }
diff --git a/src/insets/InsetText.h b/src/insets/InsetText.h
index bccaaccf78..a3daede3c5 100644
--- a/src/insets/InsetText.h
+++ b/src/insets/InsetText.h
@@ -73,7 +73,7 @@ public:
        Text & text() { return text_; }
        Text const & text() const { return text_; }
        ///
-       void latex(otexstream &, OutputParams const &) const override;
+       void latex(otexstream &, OutputParams &) const override;
        ///
        int plaintext(odocstringstream & ods, OutputParams const & op,
                      size_t max_length = INT_MAX) const override;
@@ -93,7 +93,7 @@ public:
        ///
        void docbook(XMLStream &, OutputParams const &, XHTMLOptions opts) 
const;
        ///
-       void docbook(XMLStream &, OutputParams const &) const override;
+       void docbook(XMLStream &, OutputParams &) const override;
        ///
        void validate(LaTeXFeatures & features) const override;
 
diff --git a/src/insets/InsetVSpace.cpp b/src/insets/InsetVSpace.cpp
index 03a272e650..d3661fdb2b 100644
--- a/src/insets/InsetVSpace.cpp
+++ b/src/insets/InsetVSpace.cpp
@@ -210,7 +210,7 @@ void InsetVSpace::draw(PainterInfo & pi, int x, int y) const
 }
 
 
-void InsetVSpace::latex(otexstream & os, OutputParams const &) const
+void InsetVSpace::latex(otexstream & os, OutputParams &) const
 {
        os << from_ascii(space_.asLatexCommand(buffer().params())) << '\n';
 }
@@ -224,7 +224,7 @@ int InsetVSpace::plaintext(odocstringstream & os,
 }
 
 
-void InsetVSpace::docbook(XMLStream & xs, OutputParams const &) const
+void InsetVSpace::docbook(XMLStream & xs, OutputParams &) const
 {
        xs << xml::CR();
 }
diff --git a/src/insets/InsetVSpace.h b/src/insets/InsetVSpace.h
index 9b95f00ff0..7112819fd4 100644
--- a/src/insets/InsetVSpace.h
+++ b/src/insets/InsetVSpace.h
@@ -45,12 +45,12 @@ private:
        ///
        void draw(PainterInfo & pi, int x, int y) const override;
        ///
-       void latex(otexstream &, OutputParams const &) const override;
+       void latex(otexstream &, OutputParams &) const override;
        ///
        int plaintext(odocstringstream & ods, OutputParams const & op,
                      size_t max_length = INT_MAX) const override;
        ///
-       void docbook(XMLStream &, OutputParams const &) const override;
+       void docbook(XMLStream &, OutputParams &) const override;
        /// Note that this returns the inset rather than writing it,
        /// so it will actually be written after the present paragraph.
        /// The normal case is that this inset will be on a line by
diff --git a/src/insets/InsetWrap.cpp b/src/insets/InsetWrap.cpp
index b05d5dba47..6166ad13b1 100644
--- a/src/insets/InsetWrap.cpp
+++ b/src/insets/InsetWrap.cpp
@@ -176,7 +176,7 @@ void InsetWrap::validate(LaTeXFeatures & features) const
 }
 
 
-void InsetWrap::latex(otexstream & os, OutputParams const & runparams_in) const
+void InsetWrap::latex(otexstream & os, OutputParams & runparams_in) const
 {
        OutputParams runparams(runparams_in);
        runparams.inFloat = OutputParams::MAINFLOAT;
@@ -207,7 +207,7 @@ int InsetWrap::plaintext(odocstringstream & os,
 }
 
 
-void InsetWrap::docbook(XMLStream & xs, OutputParams const & runparams) const
+void InsetWrap::docbook(XMLStream & xs, OutputParams & runparams) const
 {
        InsetLayout const & il = getLayout();
 
diff --git a/src/insets/InsetWrap.h b/src/insets/InsetWrap.h
index 02e0a202b6..7d300be460 100644
--- a/src/insets/InsetWrap.h
+++ b/src/insets/InsetWrap.h
@@ -68,12 +68,12 @@ private:
        ///
        docstring toolTip(BufferView const & bv, int x, int y) const override;
        ///
-       void latex(otexstream &, OutputParams const &) const override;
+       void latex(otexstream &, OutputParams &) const override;
        ///
        int plaintext(odocstringstream & ods, OutputParams const & op,
                      size_t max_length = INT_MAX) const override;
        ///
-       void docbook(XMLStream &, OutputParams const &) const override;
+       void docbook(XMLStream &, OutputParams &) const override;
        ///
        docstring xhtml(XMLStream &, OutputParams const &) const override;
        ///
diff --git a/src/mathed/InsetMathHull.cpp b/src/mathed/InsetMathHull.cpp
index 43f49584af..a026977021 100644
--- a/src/mathed/InsetMathHull.cpp
+++ b/src/mathed/InsetMathHull.cpp
@@ -2372,7 +2372,7 @@ int InsetMathHull::plaintext(odocstringstream & os,
 }
 
 
-void InsetMathHull::docbook(XMLStream & xs, OutputParams const & runparams) 
const
+void InsetMathHull::docbook(XMLStream & xs, OutputParams & runparams) const
 {
        // Choose the tag around the MathML equation.
        docstring name;
diff --git a/src/mathed/InsetMathHull.h b/src/mathed/InsetMathHull.h
index 0b085a11f9..bfd59dfe9e 100644
--- a/src/mathed/InsetMathHull.h
+++ b/src/mathed/InsetMathHull.h
@@ -144,7 +144,7 @@ public:
        int plaintext(odocstringstream &, OutputParams const &,
                      size_t max_length = INT_MAX) const override;
        ///
-       void docbook(XMLStream &, OutputParams const &) const override;
+       void docbook(XMLStream &, OutputParams &) const override;
        ///
        docstring xhtml(XMLStream &, OutputParams const &) const override;
        ///
diff --git a/src/mathed/InsetMathNest.cpp b/src/mathed/InsetMathNest.cpp
index ada0400f18..95fba5395f 100644
--- a/src/mathed/InsetMathNest.cpp
+++ b/src/mathed/InsetMathNest.cpp
@@ -353,7 +353,7 @@ void InsetMathNest::normalize(NormalStream & os) const
 }
 
 
-void InsetMathNest::latex(otexstream & os, OutputParams const & runparams) 
const
+void InsetMathNest::latex(otexstream & os, OutputParams & runparams) const
 {
        WriteStream wi(os, runparams.moving_arg, true,
                        runparams.dryrun ? WriteStream::wsDryrun : 
WriteStream::wsDefault,
diff --git a/src/mathed/InsetMathNest.h b/src/mathed/InsetMathNest.h
index 0a6579011e..c7ec018f47 100644
--- a/src/mathed/InsetMathNest.h
+++ b/src/mathed/InsetMathNest.h
@@ -108,7 +108,7 @@ public:
        /// writes [, name(), and args in []
        void normalize(NormalStream & os) const override;
        ///
-       void latex(otexstream & os, OutputParams const & runparams) const 
override;
+       void latex(otexstream & os, OutputParams & runparams) const override;
        ///
        bool setMouseHover(BufferView const * bv, bool mouse_hover) const 
override;
        ///
diff --git a/src/mathed/InsetMathRef.cpp b/src/mathed/InsetMathRef.cpp
index 99058d776f..64a730e720 100644
--- a/src/mathed/InsetMathRef.cpp
+++ b/src/mathed/InsetMathRef.cpp
@@ -182,7 +182,7 @@ void InsetMathRef::validate(LaTeXFeatures & features) const
 }
 
 
-void InsetMathRef::docbook(XMLStream & xs, OutputParams const &) const
+void InsetMathRef::docbook(XMLStream & xs, OutputParams &) const
 {
        if (cell(1).empty()) {
                docstring attr = from_utf8("linkend=\"") + 
xml::cleanID(asString(cell(0))) + from_utf8("\"");
diff --git a/src/mathed/InsetMathRef.h b/src/mathed/InsetMathRef.h
index 33df8bc96d..1094f017db 100644
--- a/src/mathed/InsetMathRef.h
+++ b/src/mathed/InsetMathRef.h
@@ -48,7 +48,7 @@ public:
        InsetMathRef * asRefInset() override { return this; }
 
        /// docbook output
-       void docbook(XMLStream &, OutputParams const &) const override;
+       void docbook(XMLStream &, OutputParams &) const override;
        /// generate something that will be understood by the Dialogs.
        std::string const createDialogStr() const;
 
diff --git a/src/output_docbook.cpp b/src/output_docbook.cpp
index a843a40f38..2dc00baed5 100644
--- a/src/output_docbook.cpp
+++ b/src/output_docbook.cpp
@@ -515,7 +515,7 @@ void makeParagraph(
 void makeEnvironment(Text const &text,
                                         Buffer const &buf,
                      XMLStream &xs,
-                     OutputParams const &runparams,
+                     OutputParams &runparams,
                      ParagraphList::const_iterator const & par)
 {
        auto const end = text.paragraphs().end();
@@ -611,7 +611,7 @@ ParagraphList::const_iterator findEndOfEnvironment(
 ParagraphList::const_iterator makeListEnvironment(Text const &text,
                                                                                
                  Buffer const &buf,
                                                          XMLStream &xs,
-                                                         OutputParams const 
&runparams,
+                                                         OutputParams 
&runparams,
                                                          
ParagraphList::const_iterator const & begin)
 {
        auto par = begin;
@@ -864,7 +864,7 @@ DocBookInfoTag getParagraphsWithInfo(ParagraphList const 
&paragraphs,
 ParagraphList::const_iterator makeAny(Text const &text,
                                       Buffer const &buf,
                                       XMLStream &xs,
-                                      OutputParams const &runparams,
+                                      OutputParams &runparams,
                                       ParagraphList::const_iterator par)
 {
        switch (par->layout().latextype) {
@@ -906,7 +906,7 @@ void outputDocBookInfo(
                Text const & text,
                Buffer const & buf,
                XMLStream & xs,
-               OutputParams const & runparams,
+               OutputParams & runparams,
                ParagraphList const & paragraphs,
                DocBookInfoTag const & info)
 {
@@ -1015,7 +1015,7 @@ void docbookSimpleAllParagraphs(
                Text const & text,
                Buffer const & buf,
                XMLStream & xs,
-               OutputParams const & runparams)
+               OutputParams & runparams)
 {
        // Handle the given text, supposing it has no sections (i.e. a "simple" 
text). The input may vary in length
        // between a single paragraph to a whole document.
@@ -1042,7 +1042,7 @@ void docbookSimpleAllParagraphs(
 void docbookParagraphs(Text const &text,
                                           Buffer const &buf,
                                           XMLStream &xs,
-                                          OutputParams const &runparams) {
+                                          OutputParams &runparams) {
        ParagraphList const &paragraphs = text.paragraphs();
        if (runparams.par_begin == runparams.par_end) {
                runparams.par_begin = 0;
@@ -1256,4 +1256,4 @@ void docbookParagraphs(Text const &text,
        }
 }
 
-} // namespace lyx
\ No newline at end of file
+} // namespace lyx
diff --git a/src/output_docbook.h b/src/output_docbook.h
index 401018d6dc..c95d76753f 100644
--- a/src/output_docbook.h
+++ b/src/output_docbook.h
@@ -37,13 +37,13 @@ xml::EndFontTag docbookEndFontTag(xml::FontTypes type);
 void docbookParagraphs(Text const &,
                               Buffer const &,
                        XMLStream &,
-                              OutputParams const &);
+                              OutputParams &);
 
 /// output a single paragraph into the XMLStream
 ParagraphList::const_iterator makeAny(Text const &,
                                       Buffer const &,
                                       XMLStream &,
-                                      OutputParams const &,
+                                      OutputParams &,
                                       ParagraphList::const_iterator);
 
 } // namespace lyx
diff --git a/src/output_latex.cpp b/src/output_latex.cpp
index 97a5077bb5..bc29964b45 100644
--- a/src/output_latex.cpp
+++ b/src/output_latex.cpp
@@ -320,7 +320,7 @@ static TeXEnvironmentData prepareEnvironment(Buffer const & 
buf,
 }
 
 
-static void finishEnvironment(otexstream & os, OutputParams const & runparams,
+static void finishEnvironment(otexstream & os, OutputParams & runparams,
                              TeXEnvironmentData const & data)
 {
        OutputState * state = getOutputState();
@@ -377,7 +377,7 @@ static void finishEnvironment(otexstream & os, OutputParams 
const & runparams,
 
 
 void TeXEnvironment(Buffer const & buf, Text const & text,
-                   OutputParams const & runparams,
+                   OutputParams & runparams,
                    pit_type & pit, otexstream & os)
 {
        ParagraphList const & paragraphs = text.paragraphs();
@@ -736,7 +736,7 @@ void TeXOnePar(Buffer const & buf,
               Text const & text,
               pit_type pit,
               otexstream & os,
-              OutputParams const & runparams_in,
+              OutputParams & runparams_in,
               string const & everypar,
               int start_pos, int end_pos,
               bool const force)
@@ -1514,7 +1514,7 @@ void TeXOnePar(Buffer const & buf,
 void latexParagraphs(Buffer const & buf,
                     Text const & text,
                     otexstream & os,
-                    OutputParams const & runparams,
+                    OutputParams & runparams,
                     string const & everypar)
 {
        LASSERT(runparams.par_begin <= runparams.par_end,
diff --git a/src/output_latex.h b/src/output_latex.h
index 65a41516e1..683f7bba48 100644
--- a/src/output_latex.h
+++ b/src/output_latex.h
@@ -71,7 +71,7 @@ void latexArgInsetsForParent(ParagraphList const & pars, 
otexstream & os,
 void latexParagraphs(Buffer const & buf,
                     Text const & text,
                     otexstream & ofs,
-                    OutputParams const &,
+                    OutputParams &,
                     std::string const & everypar = std::string());
 
 /** Switch the encoding of \p os from runparams.encoding to \p newEnc if 
needed.
@@ -88,7 +88,7 @@ void TeXOnePar(Buffer const & buf,
                   Text const & text,
                   pit_type pit,
                   otexstream & os,
-                  OutputParams const & runparams,
+                  OutputParams & runparams,
                   std::string const & everypar = std::string(),
                   int start_pos = -1, int end_pos = -1,
                   bool const force = false);
diff --git a/src/output_xhtml.cpp b/src/output_xhtml.cpp
index a4aced68b0..02559d50d7 100644
--- a/src/output_xhtml.cpp
+++ b/src/output_xhtml.cpp
@@ -570,7 +570,7 @@ void makeCommand(Buffer const & buf,
 void xhtmlParagraphs(Text const & text,
                       Buffer const & buf,
                       XMLStream & xs,
-                      OutputParams const & runparams)
+                      OutputParams & runparams)
 {
        ParagraphList const & paragraphs = text.paragraphs();
        if (runparams.par_begin == runparams.par_end) {
diff --git a/src/output_xhtml.h b/src/output_xhtml.h
index e9ca2716b8..7d62bea4d8 100644
--- a/src/output_xhtml.h
+++ b/src/output_xhtml.h
@@ -36,7 +36,7 @@ xml::EndFontTag xhtmlEndFontTag(xml::FontTypes type);
 void xhtmlParagraphs(Text const & text,
                       Buffer const & buf,
                       XMLStream & xs,
-                      OutputParams const & runparams);
+                      OutputParams & runparams);
 
 /// \return a string appropriate for setting alignment in CSS
 /// Does NOT return "justify" for "block"
-- 
2.28.0.windows.1

-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel

Reply via email to