Syncing skim with LyX
Stephan Witt
st.witt at gmx.net
Wed Jul 27 06:00:58 UTC 2022
Am 27.07.2022 um 00:45 schrieb ehud.behar at protonmail.com:
>
> Wonderful
>
> Synctex indeed was not activated. I inserted \synctex=-1 to the document preamble and a synctex.gz file was generated and back and forth jumps work fine now.
>
> Actually, after a few checks, I prefer to not write this command in the document preamble, but rather to insert it in Doc Settings->Formats->Custom Macro \synctex=-1
Ok, but why is it needed?
Either you’re not using pdflatex or you didn’t do the first step of my recipe (enable the „synchronize with output“ option in preferences).
Stephan
>
> Your help is very much appreciated.
>
> Thanks a lot!
>
>
>
> ------- Original Message -------
> On Tuesday, July 26th, 2022 at 8:50 PM, Stephan Witt <st.witt at gmx.net> wrote:
>
>
>>
>>
>> Am 25.07.2022 um 22:35 schrieb ehud.behar at protonmail.com:
>>
>>> Stephan Witt,
>>>
>>> Thank you very much for your detailed reply.
>>>
>>> Only now did I try it.
>>>
>>> Alas, it doesn't work.
>>>
>>> I wrote a simple 2 pages document in LyX. A few words and then \cleardoublepage and the a few words.
>>>
>>> I select a word in LyX and go click Navigate->Foreword search
>>>
>>> and Skim is indeed raised but I can't see any red dot as the one seen in your screenshot.
>>>
>>> Any idea what is else is there to fix?
>>
>>
>> Ok, it should work. Let’s see how to find the problem with your setup.
>>
>> First, it’s not needed to make some selection in LyX to get forward-search working.
>>
>> After doing the pdflatex run (you’re using pdflatex too, are you?) you can check the LaTeX log file and there is a button „Open Containing Directory“. Please open it and check the generated TeX file for the line with "\synctex=-1“ and a file named like your document plus .synctex.gz
>>
>> I made the experiment and it looks like that:
>>
>> $ ls -l /private/var/folders/y8/l_k5f2ms4rngwbwvt9jp53hw0000gt/T/lyx_tmpdir.TRMAcnQibDFe/lyx_tmpbuf2
>> total 72
>> -rw-r--r-- 1 stephan staff 88 26 Jul 10:08 newfile1.aux
>> -rw-r--r-- 1 stephan staff 4177 26 Jul 10:08 newfile1.log
>> -rw-r--r--@ 1 stephan staff 11735 26 Jul 10:08 newfile1.pdf
>> -rw-r--r-- 1 stephan staff 627 26 Jul 10:08 newfile1.synctex.gz
>> -rw-r--r-- 1 stephan staff 285 26 Jul 10:08 newfile1.tex
>> -rw-r--r-- 1 stephan staff 1094 26 Jul 10:08 newfile1.tex.dep-pdf
>>
>> The difference between synctex active and not ist that line only:
>>
>> $ diff -u *synctex.tex
>> --- nosynctex.tex 2022-07-26 10:08:23.000000000 +0200
>> +++ synctex.tex 2022-07-26 10:09:34.000000000 +0200
>> @@ -5,6 +5,7 @@
>> \documentclass[english]{article}
>> \usepackage[T1]{fontenc}
>> \usepackage[latin9]{inputenc}
>> +\synctex=-1
>> \usepackage{babel}
>> \begin{document}
>> Zeile 1
>>
>> This line has to be present to get forward-search (and backward-search) working.
>>
>> BR, Stephan
>>
>>> ------- Original Message -------
>>> On Friday, July 22nd, 2022 at 8:11 PM, Stephan Witt st.witt at gmx.net wrote:
>>>
>>>> Sorry, I don’t have the time for that. Instead I made some screen shots to help you to activate forward search first. This is the prerequisite for backward search.
>>>>
>>>> 1. You have to enable the „synchronize with output“ option in preferences.
>>>>
>>>> 2. Compile the document and wait for Skim to open.
>>>>
>>>> 3. Use the LyX menu item for Forward search.
>>>>
>>>> 4. Skim should raise and highlight the current LyX cursor position
>>>>
>>>> Beware: the is one question by Mac OS (only once!) you have to agree:
>>>>
>>>> If this works backward search is probably working too.
>>>>
>>>> BR, Stephan
More information about the lyx-users
mailing list