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 14:08:14 +0000 Message-ID: References: <4F883241-1170-4E41-88AE-A13C99581597@ur.rochester.edu> <9AA2ED58-08EB-4EF4-BA42-71E5CA6C4ABF@ur.rochester.edu> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="Apple-Mail=_CB79B269-639A-4077-809C-3CC467FD84EC"; protocol="application/pgp-signature"; micalg=pgp-sha512 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39304) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cmhh0-0002qV-GQ for emacs-orgmode@gnu.org; Sat, 11 Mar 2017 09:08:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cmhgx-0005aC-9e for emacs-orgmode@gnu.org; Sat, 11 Mar 2017 09:08:22 -0500 Received: from mail-sn1nam02on0090.outbound.protection.outlook.com ([104.47.36.90]:25300 helo=NAM02-SN1-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 1cmhgw-0005ZG-DO for emacs-orgmode@gnu.org; Sat, 11 Mar 2017 09:08:19 -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=_CB79B269-639A-4077-809C-3CC467FD84EC Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Thanks John, Works like a charm. Any idea how to write comments that spans multiple = lines ? cheers, M > On Mar 11, 2017, at 7:55 AM, John Kitchin = wrote: >=20 > it looks like you forgot to include format in the (eq ..) sexp. >=20 > (org-link-set-parameters > "response" > :export (lambda (keyword desc format) > (cond > ((eq 'latex format) > (format "\\textcolor{red}{%s}" keyword)))) > :face '(:foreground "red")) > Doyley, Marvin M. writes: >=20 >> Hi John, >>=20 >> 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 ? >>=20 >> Cheers, >> M >>=20 >> PS. Enclose is the code that I wrote based on your blog >>=20 >>=20 >> (org-link-set-parameters >> "response" >> :export (lambda (keyword desc format) >> (cond >> ((eq 'latex) >> (format "\\textcolor{red}{%s}" keyword)))) >> :face '(:foreground "red")) >>=20 >>=20 >>> On Mar 10, 2017, at 4:47 PM, John Kitchin = wrote: >>>=20 >>> You can .... wait for it... make a colored link ;): = https://urldefense.proofpoint.com/v2/url?u=3Dhttp-3A__kitchingroup.cheme.c= mu.edu_blog_2016_11_04_New-2Dlink-2Dfeatures-2Din-2Dorg-2D9_-23org1bc1061&= d=3DDwIBAg&c=3Dkbmfwr1Yojg42sGEpaQh5ofMHBeTl9EI2eaqQZhHbOU&r=3Ds3_3riAscdq= tNAzgOuwYB9g0dZVGcp8BNCy_RylYdxU&m=3DK82CvGdcCIiUxLK-NulYuwGBzRdPZnZ9zByz2= od0v9s&s=3DSVZmNbDCL0B9rvGIDHrFia_f1-mL_I_EmCUR_vcWkxg&e=3D = >>>=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: = https://urldefense.proofpoint.com/v2/url?u=3Dhttp-3A__kitchingroup.cheme.c= mu.edu_blog_2016_11_10_Persistent-2Dhighlighting-2Din-2DEmacs_&d=3DDwIBAg&= c=3Dkbmfwr1Yojg42sGEpaQh5ofMHBeTl9EI2eaqQZhHbOU&r=3Ds3_3riAscdqtNAzgOuwYB9= g0dZVGcp8BNCy_RylYdxU&m=3DK82CvGdcCIiUxLK-NulYuwGBzRdPZnZ9zByz2od0v9s&s=3D= 11D132bMNfLVhS6-xXWo1p7tZ8EBpeZMgUvYmtcCD9I&e=3D = >>>=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://urldefense.proofpoint.com/v2/url?u=3Dhttps-3A__github.com_jkitchin= _scimax_blob_master_ov-2Dhighlighter.el&d=3DDwIBAg&c=3Dkbmfwr1Yojg42sGEpaQ= h5ofMHBeTl9EI2eaqQZhHbOU&r=3Ds3_3riAscdqtNAzgOuwYB9g0dZVGcp8BNCy_RylYdxU&m= =3DK82CvGdcCIiUxLK-NulYuwGBzRdPZnZ9zByz2od0v9s&s=3DCz0LeGE0ds46QIsBHJLgKVd= dn1pKWKlxsO1WpKqk8g4&e=3D = >>>=20 >>> Towards the bottom of = https://urldefense.proofpoint.com/v2/url?u=3Dhttps-3A__github.com_jkitchin= _scimax_blob_master_cm-2Dmods.el&d=3DDwIBAg&c=3Dkbmfwr1Yojg42sGEpaQh5ofMHB= eTl9EI2eaqQZhHbOU&r=3Ds3_3riAscdqtNAzgOuwYB9g0dZVGcp8BNCy_RylYdxU&m=3DK82C= vGdcCIiUxLK-NulYuwGBzRdPZnZ9zByz2od0v9s&s=3DgIkKQ99iatYU867xq50LnefeG4ehMU= lgunqp1tD_H08&e=3D = 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 >>> = https://urldefense.proofpoint.com/v2/url?u=3Dhttp-3A__kitchingroup.cheme.c= mu.edu&d=3DDwIBAg&c=3Dkbmfwr1Yojg42sGEpaQh5ofMHBeTl9EI2eaqQZhHbOU&r=3Ds3_3= riAscdqtNAzgOuwYB9g0dZVGcp8BNCy_RylYdxU&m=3DK82CvGdcCIiUxLK-NulYuwGBzRdPZn= Z9zByz2od0v9s&s=3DDASaHx5l-WylD2cRXx2j78TSLgKgWa6fpWAJhDW0Pj4&e=3D = >>>=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://urldefense.proofpoint.com/v2/url?u=3Dhttps-3A__github.com_fniessen= _org-2Dmacros_blob_master_README.org&d=3DDwIBAg&c=3Dkbmfwr1Yojg42sGEpaQh5o= fMHBeTl9EI2eaqQZhHbOU&r=3Ds3_3riAscdqtNAzgOuwYB9g0dZVGcp8BNCy_RylYdxU&m=3D= K82CvGdcCIiUxLK-NulYuwGBzRdPZnZ9zByz2od0v9s&s=3DnbREPuAqFdouIJ4LBeqzYA7oUI= 7vapuVV8ybX5__iHc&e=3D = >>>=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 >=20 >=20 > -- > Professor John Kitchin > Doherty Hall A207F > Department of Chemical Engineering > Carnegie Mellon University > Pittsburgh, PA 15213 > 412-268-7803 > @johnkitchin > = https://urldefense.proofpoint.com/v2/url?u=3Dhttp-3A__kitchingroup.cheme.c= mu.edu&d=3DDwIBAg&c=3Dkbmfwr1Yojg42sGEpaQh5ofMHBeTl9EI2eaqQZhHbOU&r=3Ds3_3= riAscdqtNAzgOuwYB9g0dZVGcp8BNCy_RylYdxU&m=3DK82CvGdcCIiUxLK-NulYuwGBzRdPZn= Z9zByz2od0v9s&s=3DDASaHx5l-WylD2cRXx2j78TSLgKgWa6fpWAJhDW0Pj4&e=3D --Apple-Mail=_CB79B269-639A-4077-809C-3CC467FD84EC 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----- iQIcBAEBCgAGBQJYxATOAAoJEBwrWjMT8xXrXasQAMVYsWeMdwUL5ALmo6mwWTmC nfJ1ZixUFHr8qnuw5mqfGzzWTjMQMXHGXTfhSkKNRQJkTqKkVT19Tx/6P1I6M+AX cvHFOCvD6F0JK/Npqr0qVHO4uukBOcxRg+BsYrrHJHTSuJiIwBECUxKESd3505yr 9nI1nWGm+CZ0HZwKqvkNQ5wZA3h96/+6TJNkq2AnOFQMGQdLJ9ngVxVqeel1ohzm GxJ53Cg/kWQlIp+DS5CPPUf2TBQR56b6a0WBi36UMe+AD+7a9LrfoxsunZJJq20s iBoR8ArkIGCZw3gvxvzuSWg09hB7jKSrd7IStc/EAHgF/qCLR0KeXCluOhX+JMXA nkB7TqanYg8jnC1cDAuwda9AqPrbcXhlF06/SGyerutI/U79l0K8qO7lXoOs6w2r MHA/2UX6ECOYAwPxYxaRNKZlrzcPQ4g3rVLJ72Pn3NbCMpyUUiwB3kyLER2fBe3f yBAXD8CjFUV/dUO0ATbe30Sj8FJEx/FFFshIYi9pYjFaBSmEFbAMorH2nbVTyPzb p5FN8y29vMq2rbbrU4XL+KNhWAzfebiYfpd3AGkgAtL6vZAvmABpRYezb7Fvvr/G a4fAqVIaPhy+3gEAEMhojk9qW3oXGhHOBJFfQyv/lG3p6ePCfDt4l15SWK0KNq7F 4Y2zYBs6STPul5Qbm24d =pXZs -----END PGP SIGNATURE----- --Apple-Mail=_CB79B269-639A-4077-809C-3CC467FD84EC--