On Wed, Jan 26, 2011 at 05:24:24PM +0100, Jean-Marc Lasgouttes wrote:
> Le 26/01/2011 17:13, Pavel Sanda a écrit :
> >Enrico Forestieri wrote:
> >>No, I already tried to audit that. The only possibility of missing
> >>a newline would be when outputing "\nblabla", i.e., when the '\n'
> >>is the first char of a string. So, checking is quite strightforward.
> >
> >thanks for looking into this. if no other comments appear
> >this looks ok to go in.
> 
> I would have preferred a more explicit syntax like
> os << breakl << "\\begin"
> and have all explicit \n be output.

Hmm... iomanip's work at a lower level and that is a simple wrapper
around an output stream. You are however right that it may be better
to have some explicit way to break a line. It could be done by a
os.breakline() method, returning 0 or 1 depending on whether a newline
had to be output or not. This would also help in the computation of
the number of lines. I'll review the patch along your suggestion.

> Also, what happens with the << operators that you have not yet overridden?

They work as usual. I only cared for the latex export. Currently, only
the code between \begin{document} and \end{document} is output through
the class. The preamble part is directly output through odocstream.
Let's do one small step at a time...

-- 
Enrico

Reply via email to