]> git.lyx.org Git - lyx.git/blob - src/output_latex.h
more latin1..utf8 schanges. all of src/* should be utf8 now
[lyx.git] / src / output_latex.h
1 // -*- C++ -*-
2 /**
3  * \file output_latex.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Lars Gullik Bjønnes
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #ifndef OUTPUT_LATEX_H
13 #define OUTPUT_LATEX_H
14
15 #include <utility>
16
17 #include "support/docstream.h"
18
19
20 namespace lyx {
21
22 class Buffer;
23 class BufferParams;
24 class Encoding;
25 class Paragraph;
26 class OutputParams;
27 class TexRow;
28 class Text;
29
30 /// Export up to \p number optarg insets
31 int latexOptArgInsets(Paragraph const & par,
32                       odocstream & os, OutputParams const & runparams,
33                       int number);
34
35 /** Export \p paragraphs of buffer \p buf to LaTeX.
36     Don't use a temporary stringstream for \p os if the final output is
37     supposed to go to a file.
38     \sa Buffer::writeLaTeXSource for the reason.
39  */
40 void latexParagraphs(Buffer const & buf,
41                      Text const & text,
42                      odocstream & ofs,
43                      TexRow & texrow,
44                      OutputParams const &,
45                      std::string const & everypar = std::string());
46
47 /** Switch the encoding of \p os from runparams.encoding to \p newEnc if needed.
48     \p force forces this also within non-default or -auto encodings.
49     \return (did the encoding change?, number of characters written to \p os)
50  */
51 std::pair<bool, int> switchEncoding(odocstream & os,
52                      BufferParams const & bparams,
53                      OutputParams const &, Encoding const & newEnc,
54                      bool force = false);
55
56 } // namespace lyx
57
58 #endif