mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-25 22:06:15 +00:00
Fix forward search with okular
Implement a placeholder 2008f which points to the tex file with full path, since this is what okular expects nowadays.
This commit is contained in:
parent
56e6549b11
commit
458c143e49
@ -7064,7 +7064,21 @@ $$t
|
|||||||
|
|
||||||
\end_inset
|
\end_inset
|
||||||
|
|
||||||
: name of the (temporary) exported .tex file
|
: name of the (temporary) exported .tex file (without path)
|
||||||
|
\end_layout
|
||||||
|
|
||||||
|
\begin_layout Itemize
|
||||||
|
\noindent
|
||||||
|
\begin_inset Flex Code
|
||||||
|
status collapsed
|
||||||
|
|
||||||
|
\begin_layout Plain Layout
|
||||||
|
$$f
|
||||||
|
\end_layout
|
||||||
|
|
||||||
|
\end_inset
|
||||||
|
|
||||||
|
: name of the (temporary) exported .tex file (including path)
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\begin_layout Itemize
|
\begin_layout Itemize
|
||||||
|
@ -7452,7 +7452,25 @@ $$t
|
|||||||
|
|
||||||
\end_inset
|
\end_inset
|
||||||
|
|
||||||
: name of the (temporary) exported .tex file
|
: name of the (temporary) exported .tex file (without path)
|
||||||
|
\end_layout
|
||||||
|
|
||||||
|
\begin_layout Itemize
|
||||||
|
\noindent
|
||||||
|
|
||||||
|
\lang english
|
||||||
|
\begin_inset Flex Code
|
||||||
|
status collapsed
|
||||||
|
|
||||||
|
\begin_layout Plain Layout
|
||||||
|
|
||||||
|
\lang english
|
||||||
|
$$f
|
||||||
|
\end_layout
|
||||||
|
|
||||||
|
\end_inset
|
||||||
|
|
||||||
|
: name of the (temporary) exported .tex file (including path)
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\begin_layout Itemize
|
\begin_layout Itemize
|
||||||
|
@ -407,13 +407,13 @@ PrefOutput::PrefOutput(GuiPreferences * form)
|
|||||||
dviCB->addItem("");
|
dviCB->addItem("");
|
||||||
dviCB->addItem("xdvi -sourceposition '$$n:\\ $$t' $$o");
|
dviCB->addItem("xdvi -sourceposition '$$n:\\ $$t' $$o");
|
||||||
dviCB->addItem("yap -1 -s \"$$n $$t\" $$o");
|
dviCB->addItem("yap -1 -s \"$$n $$t\" $$o");
|
||||||
dviCB->addItem("okular --unique \"file:$$o#src:$$n $$t\"");
|
dviCB->addItem("okular --unique \"$$o#src:$$n $$f\"");
|
||||||
dviCB->addItem("synctex view -i $$n:0:$$t -o $$o -x \"evince -i %{page+1} $$o\"");
|
dviCB->addItem("synctex view -i $$n:0:$$t -o $$o -x \"evince -i %{page+1} $$o\"");
|
||||||
pdfCB->addItem("");
|
pdfCB->addItem("");
|
||||||
pdfCB->addItem("CMCDDE SUMATRA control [ForwardSearch(\\\"$$o\\\",\\\"$$t\\\",$$n,0,0,1)]");
|
pdfCB->addItem("CMCDDE SUMATRA control [ForwardSearch(\\\"$$o\\\",\\\"$$t\\\",$$n,0,0,1)]");
|
||||||
pdfCB->addItem("SumatraPDF -reuse-instance $$o -forward-search $$t $$n");
|
pdfCB->addItem("SumatraPDF -reuse-instance $$o -forward-search $$t $$n");
|
||||||
pdfCB->addItem("synctex view -i $$n:0:$$t -o $$o -x \"xpdf -raise -remote $$t.tmp $$o %{page+1}\"");
|
pdfCB->addItem("synctex view -i $$n:0:$$t -o $$o -x \"xpdf -raise -remote $$t.tmp $$o %{page+1}\"");
|
||||||
pdfCB->addItem("okular --unique \"file:$$o#src:$$n $$t\"");
|
pdfCB->addItem("okular --unique \"$$o#src:$$n $$f\"");
|
||||||
pdfCB->addItem("synctex view -i $$n:0:$$t -o $$o -x \"evince -i %{page+1} $$o\"");
|
pdfCB->addItem("synctex view -i $$n:0:$$t -o $$o -x \"evince -i %{page+1} $$o\"");
|
||||||
pdfCB->addItem("/Applications/Skim.app/Contents/SharedSupport/displayline $$n $$o $$t");
|
pdfCB->addItem("/Applications/Skim.app/Contents/SharedSupport/displayline $$n $$o $$t");
|
||||||
}
|
}
|
||||||
|
@ -3643,6 +3643,8 @@ void GuiView::dispatch(FuncRequest const & cmd, DispatchResult & dr)
|
|||||||
doc_buffer->absFileName(),
|
doc_buffer->absFileName(),
|
||||||
"tex")).mangledFileName()
|
"tex")).mangledFileName()
|
||||||
: doc_buffer->latexName();
|
: doc_buffer->latexName();
|
||||||
|
string const fulltexname =
|
||||||
|
support::makeAbsPath(texname, doc_master->temppath()).absFileName();
|
||||||
string const mastername =
|
string const mastername =
|
||||||
removeExtension(doc_master->latexName());
|
removeExtension(doc_master->latexName());
|
||||||
FileName const dviname(addName(path.absFileName(),
|
FileName const dviname(addName(path.absFileName(),
|
||||||
@ -3678,6 +3680,7 @@ void GuiView::dispatch(FuncRequest const & cmd, DispatchResult & dr)
|
|||||||
string texrow = convert<string>(row);
|
string texrow = convert<string>(row);
|
||||||
|
|
||||||
command = subst(command, "$$n", texrow);
|
command = subst(command, "$$n", texrow);
|
||||||
|
command = subst(command, "$$f", fulltexname);
|
||||||
command = subst(command, "$$t", texname);
|
command = subst(command, "$$t", texname);
|
||||||
command = subst(command, "$$o", outname);
|
command = subst(command, "$$o", outname);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user