I mainly use TeXworks (windows) as tex editor and I like its "Go to Source" command which allows to Ctrl+click somewhere in .tex (or .pdf) file and cursor jump to corresponding place in result (or source) window.

Some time ago I found that when using tcolorbox in source, the jump from pdf was not correct. Some other file were opened. I supposed that the way tcolorbox works could drive synctex to take wrong decisions like happens in Synctex Go to source from pdf and comment package or TeXworks: synctex works only partially. But now I've found that only loading tcolorbox it's enough to misbehave Ctrl+click.

As an example, type following source in TeXworks (v0.6.1)


After compiling it a new preview window with the pdf result is created, and the focus is translated to the preview window. If you place the mouse over it and press Ctrl+click, the focus is translated to the source window.

Another valid options are: Open "Window" menu and select "Go to Source" command or type "Ctrl+'" as it's shown in "Window" menu.

All three options will change focus to source window.

Now delete the % from source and load tcolorbox. After compiling again, preview window gets the focus. If you select "Go to Source" command or type "Ctrl+'" the focus will change to source file, but "Ctrl+click" will open pgflibraryfadings.code.tex and select line 17.

Why Ctrl+click behaves different from Ctrl+' in this case? What's wrong: synctex, TeXworks, tcolorbox or pgf?

  • 1
    I can confirm this behaviour with TeXWorks on Linux (installed it right for this ;-) – user31729 Feb 28 '17 at 12:23
  • 2
  • It does not occur with \usepackage{tcolorbox} alone, however. – user31729 Feb 28 '17 at 12:31
  • The problem occurs with the vignette library since there pgflibraryfadings.code.tex is included and new shadings are defined. It seems to be a pgf or TeXworks problem as Ulrike Fischer already commented. With SumatraPDF, I do not get this problem on Windows. – Thomas F. Sturm Mar 1 '17 at 10:01
  • @ThomasF.Sturm: While you have been here (;-)) : Please take a look on this question tex.stackexchange.com/questions/355201/… – user31729 Mar 1 '17 at 20:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.