emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] New markup for revising manuscripts


From: Doyley, Marvin M.
Subject: Re: [O] New markup for revising manuscripts
Date: Sat, 11 Mar 2017 14:08:14 +0000

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 <address@hidden> wrote:
> 
> it looks like you forgot to include format in the (eq ..) sexp.
> 
> (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:
> 
>> 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 <address@hidden> wrote:
>>> 
>>> You can .... wait for it... make a colored link ;): 
>>> https://urldefense.proofpoint.com/v2/url?u=http-3A__kitchingroup.cheme.cmu.edu_blog_2016_11_04_New-2Dlink-2Dfeatures-2Din-2Dorg-2D9_-23org1bc1061&d=DwIBAg&c=kbmfwr1Yojg42sGEpaQh5ofMHBeTl9EI2eaqQZhHbOU&r=s3_3riAscdqtNAzgOuwYB9g0dZVGcp8BNCy_RylYdxU&m=K82CvGdcCIiUxLK-NulYuwGBzRdPZnZ9zByz2od0v9s&s=SVZmNbDCL0B9rvGIDHrFia_f1-mL_I_EmCUR_vcWkxg&e=
>>>   
>>> <https://urldefense.proofpoint.com/v2/url?u=http-3A__kitchingroup.cheme.cmu.edu_blog_2016_11_04_New-2Dlink-2Dfeatures-2Din-2Dorg-2D9_-23org1bc1061&d=DwMFaQ&c=kbmfwr1Yojg42sGEpaQh5ofMHBeTl9EI2eaqQZhHbOU&r=s3_3riAscdqtNAzgOuwYB9g0dZVGcp8BNCy_RylYdxU&m=9mMx6WEAeP-9u7CL3pjKmlORa7XXy-8WSBSwibTQWuo&s=4DUIBEXq8WNk6qHHyXFoIwWG4FlD2NlDgz8AfT2VUS0&e=>
>>> 
>>> 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: 
>>> https://urldefense.proofpoint.com/v2/url?u=http-3A__kitchingroup.cheme.cmu.edu_blog_2016_11_10_Persistent-2Dhighlighting-2Din-2DEmacs_&d=DwIBAg&c=kbmfwr1Yojg42sGEpaQh5ofMHBeTl9EI2eaqQZhHbOU&r=s3_3riAscdqtNAzgOuwYB9g0dZVGcp8BNCy_RylYdxU&m=K82CvGdcCIiUxLK-NulYuwGBzRdPZnZ9zByz2od0v9s&s=11D132bMNfLVhS6-xXWo1p7tZ8EBpeZMgUvYmtcCD9I&e=
>>>   
>>> <https://urldefense.proofpoint.com/v2/url?u=http-3A__kitchingroup.cheme.cmu.edu_blog_2016_11_10_Persistent-2Dhighlighting-2Din-2DEmacs_&d=DwMFaQ&c=kbmfwr1Yojg42sGEpaQh5ofMHBeTl9EI2eaqQZhHbOU&r=s3_3riAscdqtNAzgOuwYB9g0dZVGcp8BNCy_RylYdxU&m=9mMx6WEAeP-9u7CL3pjKmlORa7XXy-8WSBSwibTQWuo&s=I0JDZ741rHEtzWzAF3lhW65rzNn4vdq4tiUyD10_7l0&e=>
>>> 
>>> 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=https-3A__github.com_jkitchin_scimax_blob_master_ov-2Dhighlighter.el&d=DwIBAg&c=kbmfwr1Yojg42sGEpaQh5ofMHBeTl9EI2eaqQZhHbOU&r=s3_3riAscdqtNAzgOuwYB9g0dZVGcp8BNCy_RylYdxU&m=K82CvGdcCIiUxLK-NulYuwGBzRdPZnZ9zByz2od0v9s&s=Cz0LeGE0ds46QIsBHJLgKVddn1pKWKlxsO1WpKqk8g4&e=
>>>   
>>> <https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_jkitchin_scimax_blob_master_ov-2Dhighlighter.el&d=DwMFaQ&c=kbmfwr1Yojg42sGEpaQh5ofMHBeTl9EI2eaqQZhHbOU&r=s3_3riAscdqtNAzgOuwYB9g0dZVGcp8BNCy_RylYdxU&m=9mMx6WEAeP-9u7CL3pjKmlORa7XXy-8WSBSwibTQWuo&s=2LS5YZIgyAvGS3fmo8rEgaDS2Tbu3UL10uqdUgH-LXc&e=>
>>> 
>>> Towards the bottom of 
>>> https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_jkitchin_scimax_blob_master_cm-2Dmods.el&d=DwIBAg&c=kbmfwr1Yojg42sGEpaQh5ofMHBeTl9EI2eaqQZhHbOU&r=s3_3riAscdqtNAzgOuwYB9g0dZVGcp8BNCy_RylYdxU&m=K82CvGdcCIiUxLK-NulYuwGBzRdPZnZ9zByz2od0v9s&s=gIkKQ99iatYU867xq50LnefeG4ehMUlgunqp1tD_H08&e=
>>>   
>>> <https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_jkitchin_scimax_blob_master_cm-2Dmods.el&d=DwMFaQ&c=kbmfwr1Yojg42sGEpaQh5ofMHBeTl9EI2eaqQZhHbOU&r=s3_3riAscdqtNAzgOuwYB9g0dZVGcp8BNCy_RylYdxU&m=9mMx6WEAeP-9u7CL3pjKmlORa7XXy-8WSBSwibTQWuo&s=hg-nJ1pgNjsD6TM3dFMEX7IADrW9iwU8e3nvulj1lFc&e=>
>>>  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
>>> https://urldefense.proofpoint.com/v2/url?u=http-3A__kitchingroup.cheme.cmu.edu&d=DwIBAg&c=kbmfwr1Yojg42sGEpaQh5ofMHBeTl9EI2eaqQZhHbOU&r=s3_3riAscdqtNAzgOuwYB9g0dZVGcp8BNCy_RylYdxU&m=K82CvGdcCIiUxLK-NulYuwGBzRdPZnZ9zByz2od0v9s&s=DASaHx5l-WylD2cRXx2j78TSLgKgWa6fpWAJhDW0Pj4&e=
>>>   
>>> <https://urldefense.proofpoint.com/v2/url?u=http-3A__kitchingroup.cheme.cmu.edu&d=DwMFaQ&c=kbmfwr1Yojg42sGEpaQh5ofMHBeTl9EI2eaqQZhHbOU&r=s3_3riAscdqtNAzgOuwYB9g0dZVGcp8BNCy_RylYdxU&m=9mMx6WEAeP-9u7CL3pjKmlORa7XXy-8WSBSwibTQWuo&s=9l9_vjFtxnWTTnFYN-Uy0mhhk-B5fKQeudqix5QWjqA&e=>
>>> 
>>> 
>>> On Fri, Mar 10, 2017 at 3:56 PM, Kaushal Modi <address@hidden 
>>> <mailto:address@hidden>> wrote:
>>> I use this macro to highlight text in html/latex(pdf):
>>> 
>>> #+MACRO: COLOR @@html:<span style="color: 
>>> $1">$2</span>@@@@latex:\textcolor{$1}{$2}@@
>>> 
>>> This is from 
>>> https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_fniessen_org-2Dmacros_blob_master_README.org&d=DwIBAg&c=kbmfwr1Yojg42sGEpaQh5ofMHBeTl9EI2eaqQZhHbOU&r=s3_3riAscdqtNAzgOuwYB9g0dZVGcp8BNCy_RylYdxU&m=K82CvGdcCIiUxLK-NulYuwGBzRdPZnZ9zByz2od0v9s&s=nbREPuAqFdouIJ4LBeqzYA7oUI7vapuVV8ybX5__iHc&e=
>>>   
>>> <https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_fniessen_org-2Dmacros_blob_master_README.org&d=DwMFaQ&c=kbmfwr1Yojg42sGEpaQh5ofMHBeTl9EI2eaqQZhHbOU&r=s3_3riAscdqtNAzgOuwYB9g0dZVGcp8BNCy_RylYdxU&m=9mMx6WEAeP-9u7CL3pjKmlORa7XXy-8WSBSwibTQWuo&s=XDOhI8-iVimfEcDs18oR3i-Yyuic8xnEQRrHQ7lRlqI&e=>
>>> 
>>> 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. <address@hidden 
>>> <mailto:address@hidden>> 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
>>> 
>>> 
> 
> 
> --
> 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=http-3A__kitchingroup.cheme.cmu.edu&d=DwIBAg&c=kbmfwr1Yojg42sGEpaQh5ofMHBeTl9EI2eaqQZhHbOU&r=s3_3riAscdqtNAzgOuwYB9g0dZVGcp8BNCy_RylYdxU&m=K82CvGdcCIiUxLK-NulYuwGBzRdPZnZ9zByz2od0v9s&s=DASaHx5l-WylD2cRXx2j78TSLgKgWa6fpWAJhDW0Pj4&e=

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail


reply via email to

[Prev in Thread] Current Thread [Next in Thread]