conig / revise

R package for writing revise and resubmits

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Highlight changed text in context

tarensanders opened this issue · comments

Just chucking this up as something to look at in the future, while I'm thinking about it.

It would be good to be able to indicate what was changed in the manuscript, while also being able to show the context of the change. E.g., by showing a full paragraph, but highlighting the sections that were changed. It could look something like

<span id = "rev1_com2">
This is some old text.
This is also old text.
<span class = "changed"> 
Look I made that change you wanted.
</span>
Here is the rest of the paragraph.
</span>

And have it render in the revision letter as:

This is some old text. This is also old text. Look I made that change you wanted. Here is the rest of the paragraph.

I think for just highlighing specfic text it's easiest to do this in the revision letter rather than modifying the manuscript.

e.g.,

get_revision("rev1_com2") |> gsub("(Look I.* change you wanted)", "**\\1**", x = _ )

But down the line, maybe post singularity when I have time, if you had tags set up in a previous version, and also in a new version, you could diff them in the output.