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"
33 /// Export up to \p number optarg insets
34 int latexOptArgInsets(Paragraph
const & par
,
35 odocstream
& os
, OutputParams
const & runparams
,
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.
43 void latexParagraphs(Buffer
const & buf
,
48 std::string
const & everypar
= std::string());
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)
54 std::pair
<bool, int> switchEncoding(odocstream
& os
,
55 BufferParams
const & bparams
,
56 OutputParams
const &, Encoding
const & newEnc
,
59 /// FIXME: this should not be visible.
60 ParagraphList::const_iterator
TeXOnePar(Buffer
const & buf
,
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);