]> git.lyx.org Git - features.git/blobdiff - src/buffer.h
Make the output of \inputencoding commands (and the change of output
[features.git] / src / buffer.h
index cdf07d68c6fb862d99b807792354b4cb8f66fc76..98d7669eae4a6de0f6e7b5e00948ce7adc265aac 100644 (file)
@@ -146,13 +146,31 @@ public:
        /// Write file. Returns \c false if unsuccesful.
        bool writeFile(support::FileName const &) const;
 
-       /// Just a wrapper for the method below, first creating the ofstream.
+       /// Just a wrapper for writeLaTeXSource, first creating the ofstream.
        bool makeLaTeXFile(support::FileName const & filename,
                           std::string const & original_path,
                           OutputParams const &,
                           bool output_preamble = true,
                           bool output_body = true);
-       ///
+       /** Export the buffer to LaTeX.
+           If \p os is a file stream, and params().inputenc == "auto", and
+           the buffer contains text in different languages with more than
+           one encoding, then this method will change the encoding
+           associated to \p os. Therefore you must not call this method with
+           a string stream if the output is supposed to go to a file. \code
+           odocfstream ofs;
+           ofs.open("test.tex");
+           writeLaTeXSource(ofs, ...);
+           ofs.close();
+           \endcode is NOT equivalent to \code
+           odocstringstream oss;
+           writeLaTeXSource(oss, ...);
+           odocfstream ofs;
+           ofs.open("test.tex");
+           ofs << oss.str();
+           ofs.close();
+           \endcode
+        */
        void writeLaTeXSource(odocstream & os,
                           std::string const & original_path,
                           OutputParams const &,