From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Kitchin Subject: Re: New markup for revising manuscripts Date: Fri, 10 Mar 2017 16:47:53 -0500 Message-ID: References: <4F883241-1170-4E41-88AE-A13C99581597@ur.rochester.edu> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a114ceb8658900d054a675022 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:44225) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cmSOE-0007Gd-4H for emacs-orgmode@gnu.org; Fri, 10 Mar 2017 16:47:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cmSOC-00043Z-NV for emacs-orgmode@gnu.org; Fri, 10 Mar 2017 16:47:58 -0500 Received: from mail-wr0-x233.google.com ([2a00:1450:400c:c0c::233]:36816) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cmSOC-000431-DR for emacs-orgmode@gnu.org; Fri, 10 Mar 2017 16:47:56 -0500 Received: by mail-wr0-x233.google.com with SMTP id u108so72497323wrb.3 for ; Fri, 10 Mar 2017 13:47:54 -0800 (PST) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Kaushal Modi Cc: "emacs-orgmode@gnu.org" , "Doyley, Marvin M." --001a114ceb8658900d054a675022 Content-Type: text/plain; charset=UTF-8 You can .... wait for it... make a colored link ;): http://kitchingroup.cheme.cmu.edu/blog/2016/11/04/New-link-features-in-org-9/#org1bc1061 The example there has an html export defined, but you could as easily define a latex exporter. It has some limitations, like it might not reliably work on multiple lines, and you would not want to "highlight" across elements (or the latex will get ugly and probably not work). I have been working on some ways to get persistent highlighting using overlays for a similar purpose: http://kitchingroup.cheme.cmu.edu/blog/2016/11/10/Persistent-highlighting-in-Emacs/ so far I only can get reliable output to html. Latex seems possible, again if you don't highlight across too many elements. It is a work in progress here: https://github.com/jkitchin/scimax/blob/master/ov-highlighter.el Towards the bottom of https://github.com/jkitchin/scimax/blob/master/cm-mods.el I was working on some ways to use the criticmarkup in conjunction with git diffs to automatically make these kinds of diffs. I can't say I am fully satisified by any of these solutions (that is why there are so many of them ;) John ----------------------------------- Professor John Kitchin Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 @johnkitchin http://kitchingroup.cheme.cmu.edu On Fri, Mar 10, 2017 at 3:56 PM, Kaushal Modi wrote: > I use this macro to highlight text in html/latex(pdf): > > #+MACRO: COLOR @@html:$2@@@@latex:\ > textcolor{$1}{$2}@@ > > This is from https://github.com/fniessen/org-macros/blob/master/README.org > > Example use: > {{{COLOR(red, This information is important.)}}} > > It doesn't though highlight the text in red in org-mode. > > On Fri, Mar 10, 2017 at 3:49 PM Doyley, Marvin M. > wrote: > >> Hi there, >> >> When revising manuscripts, I usually highlight the changes (response to >> reviewer) in red. I use typically do this as follows: >> (1) #+latex_header: \newcommand{\response}[1]{\textcolor{red}{#1}} >> (2) \response{changes) >> >> Is there a more elegant way to do this ? It would be nice if I could >> change the color of the select text in both org and the exported latex file >> to red. Seeing the highlighted text in org would be a huge plus. >> >> Thanks >> M >> > -- > > Kaushal Modi > --001a114ceb8658900d054a675022 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
You can .... wait for it... make a colored link ;):=C2=A0<= a href=3D"http://kitchingroup.cheme.cmu.edu/blog/2016/11/04/New-link-featur= es-in-org-9/#org1bc1061">http://kitchingroup.cheme.cmu.edu/blog/2016/11/04/= New-link-features-in-org-9/#org1bc1061

The example t= here has an html export defined, but you could as easily define a latex exp= orter. It has some limitations, like it might not reliably work on multiple= lines, and you would not want to "highlight" across elements (or= the latex will get ugly and probably not work).

I= have been working on some ways to get persistent highlighting using overla= ys for a similar purpose:=C2=A0http://kitchingroup.che= me.cmu.edu/blog/2016/11/10/Persistent-highlighting-in-Emacs/
=
so far I only can get reliable output to html. Latex seems p= ossible, again if you don't highlight across too many elements. It is a= work in progress here:=C2=A0https://github.com/jkitchin/scimax/blob/mast= er/ov-highlighter.el

Towards the bottom of=C2= =A0ht= tps://github.com/jkitchin/scimax/blob/master/cm-mods.el I was working o= n some ways to use the criticmarkup =C2=A0in conjunction with git diffs to = automatically make these kinds of diffs.=C2=A0

I c= an't say I am fully satisified by any of these solutions (that is why t= here are so many of them ;)

John

-------------------= ----------------
Professor John Kitchin=C2=A0
Doherty Hall A207F
D= epartment of Chemical Engineering
Carnegie Mellon University
Pittsbur= gh, PA 15213
412-268-7803

On Fri, Mar 10, 2017 at 3:56 PM, Kaushal Mod= i <kaushal.modi@gmail.com> wrote:
I use this macro to highlight text in html/l= atex(pdf):

#+MACRO: COLOR @@html:<span style=3D&= quot;color: $1">$2</span>@@@@latex:\textcolor{$1}{$2}@@<= /div>


=
Example use:
{{{COLOR(red, This information is importa= nt.)}}}

It doesn't though highlight = the text in red in org-mode.

On Fri, Mar 10, 2017 a= t 3:49 PM Doyley, Marvin M. <m.doyley@rochester.edu> wrote:
Hi there,

When revising manuscripts, I usually highlight the changes (response to rev= iewer) in red. I use typically do this as follows:
(1) #+latex_header: \newcommand{\response}[1]{\textcolor{red}{#1}}
(2) \response{changes)

Is there a more elegant way to do this ?=C2=A0 It would be nice if I could = change the color of the select text in both org and the exported latex file= to red. Seeing the highlighted text in org would be a huge plus.

Thanks
M
--
Kaushal Modi


--001a114ceb8658900d054a675022--