I am trying to configure latexmk in TeXworks 0.4.5 accompanied by TeX Live 2013.
I followed the instructions on the TeXworks site, as noted in the picture below:

My code is very simple as follows:
\documentclass[a4paper,twoside]{report}
\begin{document}
This is my first latex test.
\newpage
how are you.
\newpage
This is a new line.
\newpage
This is another line.
\end{document}
But I cannot compile it. The error message is:
Latexmk: Stopping because executing following code from command line
$pdflatex=q/pdflatex -synctex=1 %O %S
gave an error:
Can't find string terminator "/" anywhere before EOF at (eval 8) line 1.
C:\texlive\2013\bin\win32\runscript.tlu:650: command failed with exit code 2:
perl.exe c:/texlive/2013/texmf-dist/scripts/latexmk/latexmk.pl -e "$pdflatex=q/pdflatex -synctex=1 %O %S" -pdf test.tex
I also followed the steps in configure latexmk in Texworks 0.2.3. However it also failed in the end.
After that, I switched to TeXstudio which is configured beforehand:
latexmk -pdf -silent -pdflatex="pdflatex -synctex=1 %%O %%S" %
Although this works in TeXstudio, it does not compile my code in real-time mode, which behaves as the normal pdfLaTeX command.
- What reference should I refer to for latexmk?
- Is latexmk not compatible with TeXworks (TeX Live 2013)?
/in one of the lines:$pdflatex=q/pdflatex $synctexoption %O %S/. Can you try adding that? (Error seems to be about/chars, so looks like a place to start.) – Joseph Wright May 27 '14 at 12:16