It seems that Texmaker does not allow DDE commands,
but since version 1.9 SumatraPDF supports forward search not only via DDE commands,
but also via command line switches.
Since version 3.2.1 Texmaker has all variables that are needed to use forward search.
These are
%
for the basename of the master file (without path and without extension),
!
for the full path to the directory where the master document resides,
#
for the basename of the currently active file (without path and without extension) and
@
for the line number.
So usually the following should work:
""C:/Program Files (x86)/SumatraPDF/SumatraPDF.exe" -reuse-instance "!/%.pdf" -forward-search "!/#.tex" @
This will fail when including from a subdirectory. A workaround is to add the subDirName to the path manually:
""C:/Program Files (x86)/SumatraPDF/SumatraPDF.exe" -reuse-instance "!/%.pdf" -forward-search "!/subDirName/#.tex" @
But then the subDirName should be identical in all projects, so this is more a workaround than a real solution.
Here is a screenshot of my Texmaker configuration:
I just had this same problem. I was able to solve it by going to my "main.tex" and selecting "Options->Define Current Document as 'Master Document'".
It seems the error was caused because when I selected a chapter/section in the "Structure" pane, or right-clicked and selected "Jump to pdf", it was looking for "current_file.pdf", which didn't exist, instead of "main.pdf".
It's possible that this won't actually serve as a fix for you, but hopefully leaving this as an answer will be useful to someone.
(I don't know if this will work with the "Use a 'build' subdirectory" option, though I imagine it should. I wanted to use that myself, but that feature I found, while perhaps not literally buggy, is too messy to make it worth it: having to manually first create the directory for every project, having to manually edit the command-line options for all pdfLaTeX, XeLaTeX, LuaLaTeX, LaTeXMK, etc.. None of these are big deals, but then again, neither was having a "build" subdirectory, so I just decided to not waste my time.)
Best Answer
Open in the menu »View«, there you can (un)check »Structure«, which makes the structure view (dis)appear. Maybe this can be connected to a shortcut, but I couldn't find out, how to do this.
No other customisation possible in the GUI regarding the structure view.