From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Doyley, Marvin M." Subject: Re: New markup for revising manuscripts Date: Sat, 11 Mar 2017 12:49:23 +0000 Message-ID: <9AA2ED58-08EB-4EF4-BA42-71E5CA6C4ABF@ur.rochester.edu> References: <4F883241-1170-4E41-88AE-A13C99581597@ur.rochester.edu> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="Apple-Mail=_329A4787-3C71-4063-8964-28596C4B5899"; protocol="application/pgp-signature"; micalg=pgp-sha512 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:52131) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cmgSi-00046d-2Y for emacs-orgmode@gnu.org; Sat, 11 Mar 2017 07:49:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cmgSe-00045D-Ll for emacs-orgmode@gnu.org; Sat, 11 Mar 2017 07:49:32 -0500 Received: from mail-dm3nam03on0115.outbound.protection.outlook.com ([104.47.41.115]:31533 helo=NAM03-DM3-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cmgSe-00044n-5m for emacs-orgmode@gnu.org; Sat, 11 Mar 2017 07:49:28 -0500 In-Reply-To: Content-Language: en-US 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: John Kitchin Cc: "emacs-orgmode@gnu.org" , "Doyley, Marvin M." , Kaushal Modi --Apple-Mail=_329A4787-3C71-4063-8964-28596C4B5899 Content-Type: multipart/alternative; boundary="Apple-Mail=_81169A9B-20B9-4EEC-872B-ECD2E9405F73" --Apple-Mail=_81169A9B-20B9-4EEC-872B-ECD2E9405F73 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Hi John, I make a colored link [[response: comments]], that makes the text = following the response keyword red. The only snag is that when I export = to latex I get [[response:comment]] rather than = \textcolor{red}{comment}. Any thoughts on what I am doing wrong ? Cheers, M PS. Enclose is the code that I wrote based on your blog (org-link-set-parameters "response" :export (lambda (keyword desc format) (cond ((eq 'latex) (format "\\textcolor{red}{%s}" keyword)))) :face '(:foreground "red")) > On Mar 10, 2017, at 4:47 PM, John Kitchin = wrote: >=20 > 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 = >=20 > 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). >=20 > 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/ = >=20 > 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 = >=20 > 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. >=20 > I can't say I am fully satisified by any of these solutions (that is = why there are so many of them ;) >=20 > John >=20 > ----------------------------------- > 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 = >=20 >=20 > On Fri, Mar 10, 2017 at 3:56 PM, Kaushal Modi > wrote: > I use this macro to highlight text in html/latex(pdf): >=20 > #+MACRO: COLOR @@html:$2@@@@latex:\textcolor{$1}{$2}@@ >=20 > This is from = https://github.com/fniessen/org-macros/blob/master/README.org = >=20 > Example use: > {{{COLOR(red, This information is important.)}}} >=20 > It doesn't though highlight the text in red in org-mode. >=20 > On Fri, Mar 10, 2017 at 3:49 PM Doyley, Marvin M. = > wrote: > Hi there, >=20 > 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) >=20 > 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. >=20 > Thanks > M > -- > Kaushal Modi >=20 >=20 --Apple-Mail=_81169A9B-20B9-4EEC-872B-ECD2E9405F73 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii Hi John,

I = make a colored link [[response: comments]], that makes the text = following the response keyword red. The only snag is that when I export = to latex I get [[response:comment]] rather than = \textcolor{red}{comment}. Any thoughts on what I am doing wrong = ?

Cheers,
M

PS.  Enclose is the code that I = wrote based on your blog


(org-link-set-parameters
 "response"
 :export (lambda = (keyword desc format)
        =    (cond
        =     ((eq 'latex)
      =        (format "\\textcolor{red}{%s}" keyword))))
 :face '(:foreground "red"))


On = Mar 10, 2017, at 4:47 PM, John Kitchin <jkitchin@andrew.cmu.edu> wrote:

You can .... wait for it... make = a colored link ;): http://kitchingroup.cheme.cmu.edu/blog/2016/11/04/New-link-feat= ures-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-hi= ghlighting-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.e= l

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

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

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


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. <m.doyley@rochester.edu> 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



= --Apple-Mail=_81169A9B-20B9-4EEC-872B-ECD2E9405F73-- --Apple-Mail=_329A4787-3C71-4063-8964-28596C4B5899 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- iQIcBAEBCgAGBQJYw/JSAAoJEBwrWjMT8xXrJRoQAMFT1hcSYOrGvVOOjmB6DiqQ rvfFRbIemy7wB3QDLzFWcR7hIQ1tiZ2gY8qY26eIbjK3tgX3ME1iA3MciYbl3PXb GVxJeJvr+o6qmufyvaEyIfcqv74jmJqe2jLKbShLojtVML57FE9dAD4oZ61a3shf /TC3ZHCvOpN2DzVFDm4shb/ftZcgOaH9aX36hXJxotLIM9i9/UHKfOFhT1+CQUyG 9GORfogz+AXIaKHhLQjyToAlWHCuY0HfXCmSYDnXAsi/EsUpo/9E3NFxGibuuR3X KgjzscbD9s5xXuHMudxAZoY3KMKfxLqgowbmdstwr7DpKpg+pWS4T3J4SlxzcHg3 OOyBfliNn3E21zxyEODqUqo7i1po44iuMlSUuEXzSCUiPtH16iLtkQMvrc26XuDP kEH7xyM6htlPdNR9I3fNHp3NlHwlONptgt9+XMGeFd/b+bIDQmhixJjFlTTvTu6o noHrsi8S8dtUWIKOpzNG2scGxCac48omyjgrQmBX4CdIfe2E0pxX0XSP+UZlviSa tLD01siE+8gaBvW4o2Gvs5H8bW4pCi/LxU0pOA4ecEMaBCKkmZoR2LFynQTzGnBE GOVi+5gFRfg0cYgboYlpAZ981cLmWLCUo5LFNAe1uM7rRDo7VB9VoEYFRtTgvAxZ h0WOX0odCpSdTO0ugOnl =zCJq -----END PGP SIGNATURE----- --Apple-Mail=_329A4787-3C71-4063-8964-28596C4B5899--