conig / revise

R package for writing revise and resubmits

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Reviewer comment anchor links

pdparker opened this issue · comments

I am wondering if we auto add and populate link anchors for the reviewerComment add-in?

That project's private so can't follow the link, but would this just be a cross-reference system for reviewer comment numbers? Very keen for that!

\newcounter{rComment}
\newcommand{\rcomm}[1]{\refstepcounter{rComment}\label{#1}\ref{#1}}


\RC{\underline{Comment \rcomm{c1}.}
\vspace{-0.1cm}

Test

  }


Some answer


\RC{\underline{Comment \rcomm{c2}.}
\vspace{-0.1cm}

Test

  }


See previous response to Comment \ref{c1}

The above code would work for crossreferncing but won't provide clickable links

image

This is nice. Could also integrate \hypertarget to use with \hyperlink in the hyperref package for clickable links? I have tried to get this to work but can't for some reason.

I'm battling too with hyperlink. I think rmarkdown uses hyperlink for other things based on my quick reading so there could be a conflict. I'll keep looking for solutions, but the above would be doable if we can't come up with anything interactive.

With the our own output style I've been able to hide a lot more of the latex. We now have a new reviewer comment command

\reviewer{label}{

Reviewer text

  }

Label must be filled in. I've updated the addin so it will automatically include a unique label following the scheme 'c#'.

E.g.

\reviewer{c2}{
Your paper is rubbish.
  }

You can now make a cross-references with the \ref{label} command.

e.g.

In our previous comment \ref{c1} we pointed out that we don't GAF.

Haven't worked out how to make these clickable yet.

This is nice. Could also integrate \hypertarget to use with \hyperlink in the hyperref package for clickable links? I have tried to get this to work but can't for some reason.

The issues with internal links seem to come from setting the class of the document to draft. Removing the class line from the YAML fixes the hyperref issues for me. Links still do not appear in color but do work.

I could change the links to coloured with this in the header:

\hypersetup{
    colorlinks = true,
    urlcolor=black,
    linkcolor=cyan,
}

image

But it also changes the original labels to coloured which is a pain.

image

I have added two new commands to simplify crossreferencing
\comment and \Comment (the latter just capitalises the first letter).

You just put in the tag after it. E.g.

Refer back to our response to \comment{psychometrics}.

At the moment crossrefencing breaks if you reset the counters.

In relation to target color, you could just use an empty \hypertarget like \hypertarget{c1}{}

I had trouble amending my existing counter system so have rewritten. This appears to be working fine now when draft is turned off. Let me know if any issues.

links will be automatically generated with these tags:

\comment{tag}
\Comment{tag}