4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author Lars Gullik Bjønnes
9 * Full author contact details are available in file CREDITS.
12 #ifndef OUTPUT_LATEX_H
13 #define OUTPUT_LATEX_H
17 #include "support/docstream.h"
18 #include "Paragraph.h"
19 #include "ParIterator.h"
20 #include "ParagraphList.h"
34 /// Export up to \p reqargs required arguments and
35 /// \p optargs optional ones. If not enough required
36 /// ones are given, we'll output: {}. The optional ones
37 /// must all come first.
38 int latexArgInsets(Paragraph const & par,
39 odocstream & os, OutputParams const & runparams,
40 unsigned int reqargs, unsigned int optargs);
42 /** Export \p paragraphs of buffer \p buf to LaTeX.
43 Don't use a temporary stringstream for \p os if the final output is
44 supposed to go to a file.
45 \sa Buffer::writeLaTeXSource for the reason.
47 void latexParagraphs(Buffer const & buf,
52 std::string const & everypar = std::string());
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)
58 std::pair<bool, int> switchEncoding(odocstream & os,
59 BufferParams const & bparams,
60 OutputParams const &, Encoding const & newEnc,
63 /// FIXME: this should not be visible.
64 void TeXOnePar(Buffer const & buf,
66 ParagraphList::const_iterator pit,
67 odocstream & os, TexRow & texrow,
68 OutputParams const & runparams,
69 std::string const & everypar = std::string(),
70 int start_pos = -1, int end_pos = -1);