* rgheck wrote, On 15/07/09 17:28:

> Here's what the docs say:
> 
> LFUN_SERVER_GOTO_FILE_ROW
> 
> * Action Sets the cursor position based on the row number of generated
> TeX file.
> 
> * Notion This can be useful for DVI inverse-search or detection of the
> problematic line from LaTeX compilation. Note that before this function
> can be used export to LaTeX output must occur (in order to map the row
> numbers).
> 
> * Syntax server-goto-file-row <FILE[.ext]> <ROW_NUMBER>
> 
> * Params <FILE>: the filename. Environment variables are expaned in the
> path. In case this LFUN does not work make sure you are giving correct
> path to the file.If the file is located inside LyX temporary directory
> it will be mapped back into the appropriate opened buffer (e.g. for the
> case of generated .tex file). .ext: extensions will be automatically
> replaced by .lyx.
> 
> Note that the row number is that of the LaTeX output file, NOT the LyX
> file on screen.


atm this isn't working as you say either (for me)...

I fired up a fresh invocation of Lyx, CTRL+N and typed:
now is the time
for all good men
to drink lemonade
at the party

CTRL+S to save as /tmp/file.lyx

I then did a dvi preview, In /tmp/lyx_tmpdir.J19856/lyx_tmpbuf0 I can
see the files that were generated. file.tex shows:

--8<-----8<-----8<---
\batchmode
\makeatletter
\def\in...@path{{/tmp//}}
\makeatother
\documentclass[english]{article}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}

\usepackage{babel}

\begin{document}
now is the time

for all good men

to drink lemonade

at the party
\end{document}
--8<-----8<-----8<---

and in the command buffer I type (to jump to "for all good men"):

server-goto-file-row /tmp/file.lyx 14

but the cursor just goes back to line 1 again...

I even tried (for good luck):
server-goto-file-row /tmp/lyx_tmpdir.J19856/lyx_tmpbuf0/file.tex 14

but the cursor jumps to line 1 still.

I've tried lines 1-17 but still it won't do anything apart from jump
back to line 1.


I then switched to "Article (noweb)".

I note that a .nw is created as an intermediate file - is this the file
used for the line number mappings or is it the text file generated by
noweave? This question really concerns me because I am trying to map
from source files back to the lyx document, not from the dvi back to the
lyx document.

Sam

Reply via email to