]> git.lyx.org Git - lyx.git/blob - src/output_latex.h
Don't know how this slipped in
[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 #include "Layout.h"
19 #include "Paragraph.h"
20 #include "ParIterator.h"
21 #include "ParagraphList.h"
22
23
24 namespace lyx {
25
26 class Buffer;
27 class BufferParams;
28 class Encoding;
29 class Layout;
30 class Paragraph;
31 class OutputParams;
32 class TexRow;
33 class Text;
34
35 /// Export up to \p reqargs required arguments and
36 /// \p optargs optional ones. If not enough required
37 /// ones are given, we'll output: {}. The optional ones
38 /// must all come first.
39 void latexArgInsets(Paragraph const & par,
40                 otexstream & os, OutputParams const & runparams,
41                 Layout::LaTeXArgMap const & latexargs);
42
43 /** Export \p paragraphs of buffer \p buf to LaTeX.
44     Don't use a temporary stringstream for \p os if the final output is
45     supposed to go to a file.
46     \sa Buffer::writeLaTeXSource for the reason.
47  */
48 void latexParagraphs(Buffer const & buf,
49                      Text const & text,
50                      otexstream & ofs,
51                      OutputParams const &,
52                      std::string const & everypar = std::string());
53
54 /** Switch the encoding of \p os from runparams.encoding to \p newEnc if needed.
55     \p force forces this also within non-default or -auto encodings.
56     \return (did the encoding change?, number of characters written to \p os)
57  */
58 std::pair<bool, int> switchEncoding(odocstream & os,
59                      BufferParams const & bparams,
60                      OutputParams const &, Encoding const & newEnc,
61                      bool force = false);
62
63 /// FIXME: this should not be visible.
64 void TeXOnePar(Buffer const & buf,
65                    Text const & text,
66                    pit_type pit,
67                    otexstream & os,
68                    OutputParams const & runparams,
69                    std::string const & everypar = std::string(),
70                    int start_pos = -1, int end_pos = -1);
71
72 } // namespace lyx
73
74 #endif