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 23:26:30 +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=_3141890C-1725-4231-B91C-48F020720E68"; protocol="application/pgp-signature"; micalg=pgp-sha512 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33337) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cmqPI-0003IU-VD for emacs-orgmode@gnu.org; Sat, 11 Mar 2017 18:26:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cmqPF-0003En-P6 for emacs-orgmode@gnu.org; Sat, 11 Mar 2017 18:26:40 -0500 Received: from mail-sn1nam01on0118.outbound.protection.outlook.com ([104.47.32.118]:41443 helo=NAM01-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 1cmqPF-0003Cd-AW for emacs-orgmode@gnu.org; Sat, 11 Mar 2017 18:26:37 -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=_3141890C-1725-4231-B91C-48F020720E68 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Hi John, I like the idea of special block that definitely solve the multi-line = problem. But I would need to write an latex exporter for the block, how = challenging would that be ? I am still learning lisp :) Cheers, M > On Mar 11, 2017, at 1:22 PM, John Kitchin = wrote: >=20 > This is probably not feasible with links. that is also a challenge = with > Eric's markup approach. One way is to use visual wrapping so whole > paragraphs are actually one line. Another is to use some kind of = custom block. > It has been a while since I tried this: = https://urldefense.proofpoint.com/v2/url?u=3Dhttp-3A__kitchingroup.cheme.c= mu.edu_blog_2013_11_30_Custom-2Ddirectives_&d=3DDwIBAg&c=3Dkbmfwr1Yojg42sG= EpaQh5ofMHBeTl9EI2eaqQZhHbOU&r=3Ds3_3riAscdqtNAzgOuwYB9g0dZVGcp8BNCy_RylYd= xU&m=3DHR848Kl27487mBHnj6hZWqJ4zVzwnz8yn_CYsmstLLc&s=3DCgaellrR4m7Y4Quba00= w0ekyLA_np6lkrXxoWv4awZQ&e=3D >=20 > Multiline mostly works with criticmarks using multiline fontlock. The > nice thing about this is that it is still plain text markup, but = relies > on font-lock which can be slow, and or unreliable in my experience. >=20 > This was one reason I started looking at the overlay approach in > ov-highlighter. It nicely manages multiline comments, but is not part = of > org markup though. A downside is you have to store the overlays in the > document to get persistence, and it is easily breakable if others edit > the document without using the package. >=20 > Doyley, Marvin M. writes: >=20 >> Thanks John, >>=20 >> Works like a charm. Any idea how to write comments that spans = multiple lines ? >>=20 >> 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 >=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=3DHR848Kl27487mBHnj6hZWqJ4zVzwnz= 8yn_CYsmstLLc&s=3Dtzkgz4BW5dLySosHfzr7-xRCDyIG4RuaQbMrhZswNuw&e=3D --Apple-Mail=_3141890C-1725-4231-B91C-48F020720E68 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----- iQIcBAEBCgAGBQJYxIemAAoJEBwrWjMT8xXreJEQAIk1rkWLdNVAqIw9h3xKsQrx /Fanncgo1WT9eqNyP/vtdsEgk0ls4FOvTFaXhOP3Xs8tn6RYecu/wa68S9ExuZH9 qeUNcUVAU4wHY2vIIJ/MqssOkNyZ4C2JXQhyVLtsc4IL3qXYoxpq6yRmt4uvELqr yt1DY5D8qnh40tqErcOb4n0T18hYiUOQ8hsSjpn0rjkNbooeG9I2l6ZoUWeiLWR2 UjTAagSLCjJ6HyImEkijNtiUwIouV6qsj4hMSNHZYFKv26htySHu0vYMJa0cmmMC kvsRJee/IRGZNrsyqb3bfUhxrGaY0ssCyzPJjakY0gadHTkiheZLU5VJNEgKTcoL 2Vke7+yS+MJok0DQN8fK4S8IcvI+8ZV4OY2ZJAbJtDu4QL+nWTYy2UbT3LnHTA7u 9cqSoGzJCr/mFka0m2sAgPpe/CfmBs3tvyq8GPxmM8w3hhOej+DlBjTl/wlRLR41 V9w+IlQ4jP88JDng+OIKjDvs65lXtAaLs9NCIKtSqSCoFsck+3UKfJ+IAACMzcrQ zpNayUkDE6jJExyjVgyAnaSL0EAAtBv8yR1HhlSZSk6bkoLu3hjm7R6ZKuCffjMV ZpkkPS8uN5xi9vbbh/8iWHJnIqrqm8k0VDCVIpJHipTykO9ilsq5q43LAh1uIymD GSxJygPTw1ODLGuvgJxe =Dsl7 -----END PGP SIGNATURE----- --Apple-Mail=_3141890C-1725-4231-B91C-48F020720E68--