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