This enables error reporting for the preamble, provided the preamble is written
using the new InPreamble layouts.
In the future, I find it preferable to deprecate the usual preamble in favour of
InPreamble layouts rather than implementing error reporting for the usual
preamble. This requires some improvements to code editing in the buffer view
first (line breaking behaviour, syntax highlighting).
texstring is a pair of a docstring and a corresponding TexRow. The row count in
the TexRow has to match the number of lines in the docstring.
otexstringstream is an output string stream that can be used to create
texstrings (i.e. it's an odocstringstream that records the TexRow information
and let us extract a texstring from it).
texstrings can be passed around and output to otexstream and otexrowstream,
which produces an accurate TexRow information by concatenating TexRows.
TexRow now returns a range {start, end} when looking up a particular row.
Reverse-search now selects the whole range instead of simply moving the cursor.
Please use the new function otexstream.append(str, texrow) to append an
odocstringstream with texrow information to the output when outputing to a
string buffer (e.g. case of subcaptions).
This is preliminary work for extending the cursor<->row tracking to math.
TexRow used to associate, to each row, a location id/pos where id determines a
paragraph and pos the position in the paragraph.
TexRow now associates to each row a list of entries, text or math. A math is a
pair uid/idx where uid will determine a math inset and idx is the number of the
cell.
The analogy id/pos<->inset/idx works better than the analogy id/pos<->idx/pos,
because what matters for the TexRow algorithm(TM) is the behaviour in terms of
line breaks.
This only improves the source view and the forward search, not the error report
and the reverse search (though this could be easily added now).
* TexRow now computes rows from a DocIterator. In practice, the cursor
highlighting is now correct inside insets, it is no longer restricted to the
topmost level. It certainly also makes forward-search more precise.
* Added the option to disable a texrow when not needed, for perf.
* Fixed a bug where the last paragraph was not properly highlighted.
Limitations:
* TexRow still does not handle: math (e.g. multi-cell), sub-captions, inset
arguments.
of the first call of TexRow::start(), rather than the last before a newline.
This is what was causing some recent grief (bug #7325, for example).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37894 a592a061-630c-0410-9148-cb99ea01b6c8
getRowFromIdPos returns row shifted by 1 (we count internally from 0).
The function still doesn't work properly looking at the
the comments of the original writer (last *nonempty* row),
but its hopefully better now.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34172 a592a061-630c-0410-9148-cb99ea01b6c8
Wrong line count with parent math macros:
* TeXRow.{cpp,h}:
- new helper function to insert multiple newline at once.
* mathed/MacroTable.{cpp,h}:
* mathed/MacroTemplate.{cpp,h}:
- make write() an int, returning number of newlines
* Buffer.cpp (writeLaTeXSource):
- update texrow's newline on parent macro output.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33367 a592a061-630c-0410-9148-cb99ea01b6c8
Now support/* should have no dependencies on src/* anymore.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21851 a592a061-630c-0410-9148-cb99ea01b6c8
(operator+=): remove unused method
(getRowFromIdPos) new method to get the texrow from id,pos
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19502 a592a061-630c-0410-9148-cb99ea01b6c8