1

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)

\documentclass{article}
%\usepackage[most]{tcolorbox}
\begin{document}
test
\end{document}

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?

Ignasi
  • 136,588
  • 1
    I can confirm this behaviour with TeXWorks on Linux (installed it right for this ;-) –  Feb 28 '17 at 12:23
  • 2
    The problem is known see https://tex.stackexchange.com/questions/300079/goto-source-opens-pgflibraryfadings-code-tex and https://tex.stackexchange.com/questions/346215/todonotes-interferes-with-ctrl-left-click-in-texmaker – Ulrike Fischer Feb 28 '17 at 12:28
  • It does not occur with \usepackage{tcolorbox} alone, however. –  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 01 '17 at 10:01
  • @ThomasF.Sturm: While you have been here (;-)) : Please take a look on this question http://tex.stackexchange.com/questions/355201/overlay-for-lowerpart-of-a-breakable-tcolorbox –  Mar 01 '17 at 20:48
  • @ChristianHupfer Thank you for pointing me to this question. I missed that one in the flood of incoming messages... I think I have an answer for it. – Thomas F. Sturm Mar 02 '17 at 11:10

0 Answers0