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