Bo Peng wrote:

>> I'd need a way to get the LaTeX export of a text
>> segment, generally from a DocIterator to another.
>> Looking at the code, the single paragraph seems
>> the finest granularity at which LaTeX export may
>> be done easily, through the lyx::TeXOnePar() function.

Yes, the export has granularity of one paragraph; still you have texrow
granularity afterwards (~80 char wide line of latex output <-> a pair of
iterators). In the end I would like to have finer granularity, for instance
to have decent search in the latex source.

> Yes. ViewSource exports paragraphs.
> 
>> Also, I'd like to know if there is any function that, given
>> a position on the LaTeX export, provides the DocIterator
>> (almost) equivalent position in the Buffer. Guess I could
>> exploit this TexRow stuff for this purpose, but I'd need
>> some hand-written logics to finish the work inside the
>> single-line granularity.
> 
> There was a patch from Alfredo a while ago that tries to highlight
> lines in ViewSource window, search "linking source view with text" for
> the patch. It handles TexTow stuff.

Right, I plan to update and try to commit it soonish. 

Alfredo


Reply via email to