synctex icon indicating copy to clipboard operation
synctex copied to clipboard

Forward search failed when input a tex file with relative path containing /../

Open changlichun opened this issue 10 months ago • 4 comments

Forward search failed when input a tex file with relative path containing /../

\documentclass[]{article}
\usepackage{lipsum}

\begin{document}
\section[1]{sec 1}
\lipsum[1-3]

\subsection{sub 1}
\input{../main/example-section}

\end{document}

main.zip

I use vscode + sumatrapdf.

changlichun avatar Feb 01 '25 15:02 changlichun

It seems to be a problem with vscode. Both, forward and backward search work with your example inside TeXworks.

jlaurens avatar Feb 03 '25 18:02 jlaurens

Yes, I tried TeXworks but I'm still not sure. There are indeed user who think it's SyncTeX related, such as this issue. I originally thought it was related to my reader, but I'm now leaning more towards it being related to SyncTeX, (this issue).

I once tried to modify the synctex_parser_utils.c file in my reader. (this commit). However, the author recently replaced it with a new version of SyncTeX (this commit).

changlichun avatar Feb 04 '25 13:02 changlichun

Can you include in your main.zip both the main.pdf and main.synctex.gz

jlaurens avatar Feb 06 '25 10:02 jlaurens

Here it is. main.zip

changlichun avatar Feb 06 '25 10:02 changlichun