emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Doyley, Marvin M." <m.doyley@rochester.edu>
To: John Kitchin <jkitchin@andrew.cmu.edu>
Cc: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>,
	"Doyley, Marvin M." <m.doyley@rochester.edu>,
	Kaushal Modi <kaushal.modi@gmail.com>
Subject: Re: New markup for revising manuscripts
Date: Sat, 11 Mar 2017 12:49:23 +0000	[thread overview]
Message-ID: <9AA2ED58-08EB-4EF4-BA42-71E5CA6C4ABF@ur.rochester.edu> (raw)
In-Reply-To: <CAJ51ETpg0BRyqHNW7S_cjSM8n1-TTDVXWLp7GdPu0uATuhiUsQ@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 5069 bytes --]

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-features-in-org-9/#org1bc1061 <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: http://kitchingroup.cheme.cmu.edu/blog/2016/11/10/Persistent-highlighting-in-Emacs/ <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://github.com/jkitchin/scimax/blob/master/ov-highlighter.el <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://github.com/jkitchin/scimax/blob/master/cm-mods.el <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
> http://kitchingroup.cheme.cmu.edu <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 <kaushal.modi@gmail.com <mailto:kaushal.modi@gmail.com>> 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://github.com/fniessen/org-macros/blob/master/README.org <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. <m.doyley@rochester.edu <mailto: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
> 
> 


[-- Attachment #1.2: Type: text/html, Size: 8558 bytes --]

[-- Attachment #2: Message signed with OpenPGP using GPGMail --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

  parent reply	other threads:[~2017-03-11 12:49 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-10 20:33 New markup for revising manuscripts Doyley, Marvin M.
2017-03-10 20:56 ` Eric Abrahamsen
2017-03-10 20:56 ` Kaushal Modi
2017-03-10 21:47   ` John Kitchin
2017-03-11 11:35     ` Doyley, Marvin M.
2017-03-11 12:49     ` Doyley, Marvin M. [this message]
2017-03-11 12:55       ` John Kitchin
2017-03-11 14:08         ` Doyley, Marvin M.
2017-03-11 18:22           ` John Kitchin
2017-03-11 23:26             ` Doyley, Marvin M.
2017-03-12 18:16               ` John Kitchin
     [not found]             ` <25102de79a684cbea8543fdd8cc40188@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
2017-03-12 14:12               ` Eric S Fraga
     [not found]           ` <037b006014244b1d874f76eea80b0f3a@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
2017-03-12 13:54             ` Eric S Fraga
2017-03-13 22:56     ` Doyley, Marvin M.
     [not found]     ` <6ac43f7bdf5a4070807af1dfee9be4ea@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
2017-03-14  7:25       ` Eric S Fraga
     [not found] <63b8c6bce92349fe95acb0c37536e965@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
2017-03-11 10:59 ` Eric S Fraga
  -- strict thread matches above, loose matches on Subject: below --
2017-03-11 13:41 John Kitchin
     [not found] <46e4a91c14b34c5682a51f7b9cd5f7bd@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
2017-03-11 16:30 ` Eric S Fraga
2017-03-13 17:25 Doyley, Marvin M.

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9AA2ED58-08EB-4EF4-BA42-71E5CA6C4ABF@ur.rochester.edu \
    --to=m.doyley@rochester.edu \
    --cc=emacs-orgmode@gnu.org \
    --cc=jkitchin@andrew.cmu.edu \
    --cc=kaushal.modi@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).