emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* New markup for revising manuscripts
@ 2017-03-10 20:33 Doyley, Marvin M.
  2017-03-10 20:56 ` Eric Abrahamsen
  2017-03-10 20:56 ` Kaushal Modi
  0 siblings, 2 replies; 19+ messages in thread
From: Doyley, Marvin M. @ 2017-03-10 20:33 UTC (permalink / raw)
  To: emacs-orgmode@gnu.org

[-- Attachment #1: Type: text/plain, Size: 459 bytes --]

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

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

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: New markup for revising manuscripts
  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
  1 sibling, 0 replies; 19+ messages in thread
From: Eric Abrahamsen @ 2017-03-10 20:56 UTC (permalink / raw)
  To: emacs-orgmode

"Doyley, Marvin M." <m.doyley@rochester.edu> writes:

> 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.

Depending on how you actually enter these revisions in Org, you could
probably make org-annotate do this. The link is on the text to change,
the annotation is the revised text, and then set
org-annotate-latex-export-function to a custom function that might look
like:

(defun org-annotate-export-latex-response (path desc)
  (format "%s\\response{%s}" (or desc "") path))

Maybe give that a shot?

Eric

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: New markup for revising manuscripts
  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
  1 sibling, 1 reply; 19+ messages in thread
From: Kaushal Modi @ 2017-03-10 20:56 UTC (permalink / raw)
  To: Doyley, Marvin M., emacs-orgmode@gnu.org

[-- Attachment #1: Type: text/plain, Size: 915 bytes --]

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

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

[-- Attachment #2: Type: text/html, Size: 1674 bytes --]

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: New markup for revising manuscripts
  2017-03-10 20:56 ` Kaushal Modi
@ 2017-03-10 21:47   ` John Kitchin
  2017-03-11 11:35     ` Doyley, Marvin M.
                       ` (3 more replies)
  0 siblings, 4 replies; 19+ messages in thread
From: John Kitchin @ 2017-03-10 21:47 UTC (permalink / raw)
  To: Kaushal Modi; +Cc: emacs-orgmode@gnu.org, Doyley, Marvin M.

[-- Attachment #1: Type: text/plain, Size: 2406 bytes --]

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

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/

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

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
@johnkitchin
http://kitchingroup.cheme.cmu.edu


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="color: $1">$2</span>@@@@latex:\
> textcolor{$1}{$2}@@
>
> This is from https://github.com/fniessen/org-macros/blob/master/README.org
>
> 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
>

[-- Attachment #2: Type: text/html, Size: 4559 bytes --]

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: New markup for revising manuscripts
       [not found] <63b8c6bce92349fe95acb0c37536e965@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
@ 2017-03-11 10:59 ` Eric S Fraga
  0 siblings, 0 replies; 19+ messages in thread
From: Eric S Fraga @ 2017-03-11 10:59 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 2229 bytes --]

On Friday, 10 Mar 2017 at 20:33, Doyley, Marvin M. 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 ?

I don't know about elegant but my approach is to subvert the +...+
emphasis markers.  These usually indicate strike-through, something I
never use.  Instead, I have +some text+ be highlighted and exported to
LaTeX and HTML as such.

To achieve this, I customise a number org variables.  It took me some
time to find how I actually did this as it's been part of my org setup
for years, so much so that I almost thought it was default behaviour!
In any case, the following is an elided extract from my customised
variables:

#+begin_src emacs-lisp
  (custom-set-variables
   '(org-emphasis-alist
     (quote
      (("*" bold)
       ("/" italic)
       ("_" underline)
       ("=" org-verbatim verbatim)
       ("~" org-code verbatim)
       ("+" highlight))))
   '(org-html-text-markup-alist
     (quote
      ((bold . "<b>%s</b>")
       (code . "<code>%s</code>")
       (italic . "<i>%s</i>")
       (strike-through . "<span style=\"background-color: #ffff80;\">%s</span>")
       (underline . "<span class=\"underline\">%s</span>")
       (verbatim . "<code>%s</code>"))))
   '(org-latex-text-markup-alist
     (quote
      ((bold . "\\textbf{%s}")
       (code . protectedtexttt)
       (italic . "\\emph{%s}")
       (strike-through . "\\hl{%s}")
       (underline . "\\uline{%s}")
       (verbatim . protectedtexttt)))))
#+end_src 

There are basically copies of the defaults with the strike-through
element changed.

Now I can write +highlighted text+ which appears as you wish in both
HTML and LaTeX exports as well as on the screen (customise the highlight
face to get what you want on screen).  For LaTeX, you also have to

  (add-to-list 'org-latex-packages-alist '("" "soul"))

which provides the \hl{} LaTeX command.

HTH,
eric

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 26.0.50.1, Org release_9.0.4-242-g2c27b8

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 194 bytes --]

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: New markup for revising manuscripts
  2017-03-10 21:47   ` John Kitchin
@ 2017-03-11 11:35     ` Doyley, Marvin M.
  2017-03-11 12:49     ` Doyley, Marvin M.
                       ` (2 subsequent siblings)
  3 siblings, 0 replies; 19+ messages in thread
From: Doyley, Marvin M. @ 2017-03-11 11:35 UTC (permalink / raw)
  To: John Kitchin; +Cc: emacs-orgmode@gnu.org, Doyley, Marvin M., Kaushal Modi


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

Hi John,

Thanks for the info on making colored links, this will definitely help (i.e., show the changes in org). The only snag is how do I export the colored link automatically as \textcolor{red}{comments} during org export ?

Cheers,
M
> 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: 7782 bytes --]

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

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: New markup for revising manuscripts
  2017-03-10 21:47   ` John Kitchin
  2017-03-11 11:35     ` Doyley, Marvin M.
@ 2017-03-11 12:49     ` Doyley, Marvin M.
  2017-03-11 12:55       ` John Kitchin
  2017-03-13 22:56     ` Doyley, Marvin M.
       [not found]     ` <6ac43f7bdf5a4070807af1dfee9be4ea@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
  3 siblings, 1 reply; 19+ messages in thread
From: Doyley, Marvin M. @ 2017-03-11 12:49 UTC (permalink / raw)
  To: John Kitchin; +Cc: emacs-orgmode@gnu.org, Doyley, Marvin M., Kaushal Modi


[-- 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 --]

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: New markup for revising manuscripts
  2017-03-11 12:49     ` Doyley, Marvin M.
@ 2017-03-11 12:55       ` John Kitchin
  2017-03-11 14:08         ` Doyley, Marvin M.
  0 siblings, 1 reply; 19+ messages in thread
From: John Kitchin @ 2017-03-11 12:55 UTC (permalink / raw)
  To: Doyley, Marvin M.; +Cc: emacs-orgmode@gnu.org, Kaushal Modi

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 <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
>>
>>


--
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

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: New markup for revising manuscripts
@ 2017-03-11 13:41 John Kitchin
  0 siblings, 0 replies; 19+ messages in thread
From: John Kitchin @ 2017-03-11 13:41 UTC (permalink / raw)
  To: Eric S Fraga, emacs-orgmode@gnu org

I like this a lot!

On March 11, 2017, at 8:39 AM, Eric S Fraga <e.fraga@ucl.ac.uk> wrote:

On Friday, 10 Mar 2017 at 20:33, Doyley, Marvin M. 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 ?

I don't know about elegant but my approach is to subvert the +...+
emphasis markers.  These usually indicate strike-through, something I
never use.  Instead, I have +some text+ be highlighted and exported to
LaTeX and HTML as such.

To achieve this, I customise a number org variables.  It took me some
time to find how I actually did this as it's been part of my org setup
for years, so much so that I almost thought it was default behaviour!
In any case, the following is an elided extract from my customised
variables:

#+begin_src emacs-lisp
  (custom-set-variables
   '(org-emphasis-alist
     (quote
      (("*" bold)
       ("/" italic)
       ("_" underline)
       ("=" org-verbatim verbatim)
       ("~" org-code verbatim)
       ("+" highlight))))
   '(org-html-text-markup-alist
     (quote
      ((bold . "<b>%s</b>")
       (code . "<code>%s</code>")
       (italic . "<i>%s</i>")
       (strike-through . "<span style=\"background-color: #ffff80;\">%s</span>")
       (underline . "<span class=\"underline\">%s</span>")
       (verbatim . "<code>%s</code>"))))
   '(org-latex-text-markup-alist
     (quote
      ((bold . "\\textbf{%s}")
       (code . protectedtexttt)
       (italic . "\\emph{%s}")
       (strike-through . "\\hl{%s}")
       (underline . "\\uline{%s}")
       (verbatim . protectedtexttt)))))
#+end_src 

There are basically copies of the defaults with the strike-through
element changed.

Now I can write +highlighted text+ which appears as you wish in both
HTML and LaTeX exports as well as on the screen (customise the highlight
face to get what you want on screen).  For LaTeX, you also have to

  (add-to-list 'org-latex-packages-alist '("" "soul"))

which provides the \hl{} LaTeX command.

HTH,
eric

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 26.0.50.1, Org release_9.0.4-242-g2c27b8

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: New markup for revising manuscripts
  2017-03-11 12:55       ` John Kitchin
@ 2017-03-11 14:08         ` Doyley, Marvin M.
  2017-03-11 18:22           ` John Kitchin
       [not found]           ` <037b006014244b1d874f76eea80b0f3a@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
  0 siblings, 2 replies; 19+ messages in thread
From: Doyley, Marvin M. @ 2017-03-11 14:08 UTC (permalink / raw)
  To: John Kitchin; +Cc: emacs-orgmode@gnu.org, Doyley, Marvin M., Kaushal Modi

[-- Attachment #1: Type: text/plain, Size: 7689 bytes --]

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 <jkitchin@andrew.cmu.edu> 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 <jkitchin@andrew.cmu.edu> 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 <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://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. <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
>>> 
>>> 
> 
> 
> --
> 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 #2: Message signed with OpenPGP using GPGMail --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: New markup for revising manuscripts
       [not found] <46e4a91c14b34c5682a51f7b9cd5f7bd@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
@ 2017-03-11 16:30 ` Eric S Fraga
  0 siblings, 0 replies; 19+ messages in thread
From: Eric S Fraga @ 2017-03-11 16:30 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 353 bytes --]

On Saturday, 11 Mar 2017 at 13:41, John Kitchin wrote:
> I like this a lot!

Thanks.  I use this all the time.  I did try org-annotate but it was too
clumsy for my needs.

Of course, the day will come when I suddenly need to use strike-through
desperately! :-)

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 26.0.50.1, Org release_9.0.4-242-g2c27b8

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 194 bytes --]

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: New markup for revising manuscripts
  2017-03-11 14:08         ` Doyley, Marvin M.
@ 2017-03-11 18:22           ` John Kitchin
  2017-03-11 23:26             ` Doyley, Marvin M.
       [not found]             ` <25102de79a684cbea8543fdd8cc40188@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
       [not found]           ` <037b006014244b1d874f76eea80b0f3a@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
  1 sibling, 2 replies; 19+ messages in thread
From: John Kitchin @ 2017-03-11 18:22 UTC (permalink / raw)
  To: Doyley, Marvin M.; +Cc: emacs-orgmode@gnu.org, Kaushal Modi

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: http://kitchingroup.cheme.cmu.edu/blog/2013/11/30/Custom-directives/

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.

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.

Doyley, Marvin M. writes:

> 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 <jkitchin@andrew.cmu.edu> 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 <jkitchin@andrew.cmu.edu> 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 <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://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. <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
>>>>
>>>>
>>
>>
>> --
>> 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=


--
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

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: New markup for revising manuscripts
  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>
  1 sibling, 1 reply; 19+ messages in thread
From: Doyley, Marvin M. @ 2017-03-11 23:26 UTC (permalink / raw)
  To: John Kitchin; +Cc: emacs-orgmode@gnu.org, Doyley, Marvin M., Kaushal Modi

[-- Attachment #1: Type: text/plain, Size: 9847 bytes --]

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 <jkitchin@andrew.cmu.edu> wrote:
> 
> 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=http-3A__kitchingroup.cheme.cmu.edu_blog_2013_11_30_Custom-2Ddirectives_&d=DwIBAg&c=kbmfwr1Yojg42sGEpaQh5ofMHBeTl9EI2eaqQZhHbOU&r=s3_3riAscdqtNAzgOuwYB9g0dZVGcp8BNCy_RylYdxU&m=HR848Kl27487mBHnj6hZWqJ4zVzwnz8yn_CYsmstLLc&s=CgaellrR4m7Y4Quba00w0ekyLA_np6lkrXxoWv4awZQ&e=
> 
> 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.
> 
> 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.
> 
> Doyley, Marvin M. writes:
> 
>> 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 <jkitchin@andrew.cmu.edu> 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 <jkitchin@andrew.cmu.edu> 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 <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://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. <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
>>>>> 
>>>>> 
>>> 
>>> 
>>> --
>>> 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=
> 
> 
> --
> 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=HR848Kl27487mBHnj6hZWqJ4zVzwnz8yn_CYsmstLLc&s=tzkgz4BW5dLySosHfzr7-xRCDyIG4RuaQbMrhZswNuw&e=


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

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: New markup for revising manuscripts
       [not found]           ` <037b006014244b1d874f76eea80b0f3a@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
@ 2017-03-12 13:54             ` Eric S Fraga
  0 siblings, 0 replies; 19+ messages in thread
From: Eric S Fraga @ 2017-03-12 13:54 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1004 bytes --]

On Saturday, 11 Mar 2017 at 18:22, John Kitchin wrote:
> 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.

Yes, multiline highlighting is a challenge.

I finally (a few years ago now) bit the bullet and moved from my old
skool 72 char filled/wrapped lines (I started programming in F66 on
punch cards back in the stone age ;-)) to single line paragraphs with
visual-line-mode and org-indent.  Highlighting (and other markers) now
work as I would like although obviously limited to a single paragraph.

The only negative is the presentation of wide tables where I have to
switch back to non-visual line mode and then back again when I move away
from the table but I have a keybinding to toggle this so not too
painful...  More positively, revision control is cleaner as there is no
reformatting of paragraphs.

-- 
Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D)

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 194 bytes --]

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: New markup for revising manuscripts
       [not found]             ` <25102de79a684cbea8543fdd8cc40188@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
@ 2017-03-12 14:12               ` Eric S Fraga
  0 siblings, 0 replies; 19+ messages in thread
From: Eric S Fraga @ 2017-03-12 14:12 UTC (permalink / raw)
  To: emacs-orgmode


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

On Saturday, 11 Mar 2017 at 23:26, Doyley, Marvin M. wrote:
> 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 :)

You could use the mdframed LaTeX package, as in the attached
example.  Of course, this does not highlight the paragraphs in the org
file but only in the output.

Org will export any #+begin_XXX ... #+end_XXX to \begin{XXX}...\end{XXX}
in LaTeX export.

-- 
Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D)

[-- Attachment #1.2: t.pdf --]
[-- Type: application/pdf, Size: 33901 bytes --]

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.3: t.tex --]
[-- Type: text/x-tex, Size: 1162 bytes --]

% Created 2017-03-12 Sun 14:09
% Intended LaTeX compiler: pdflatex
\documentclass{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{graphicx}
\usepackage{grffile}
\usepackage{longtable}
\usepackage{wrapfig}
\usepackage{rotating}
\usepackage[normalem]{ulem}
\usepackage{amsmath}
\usepackage{textcomp}
\usepackage{amssymb}
\usepackage{capt-of}
\usepackage{hyperref}
\usepackage{xcolor}
\usepackage{tikz}
\usepackage{soul}
\usepackage{listings}
\usepackage[version=3]{mhchem}
\usepackage{doi}
\usepackage{amsmath}
\usepackage[british, english]{babel}
\usepackage[backgroundcolor=yellow!20!white]{mdframed}
\author{Eric S Fraga}
\date{\today}
\title{}
\hypersetup{
 pdfauthor={Eric S Fraga},
 pdftitle={},
 pdfkeywords={},
 pdfsubject={},
 pdfcreator={Emacs 26.0.50.1 (Org mode 9.0.4)}, 
 pdflang={English}}
\begin{document}

\section{highlighting text}
\label{sec:org4ba738a}
This is \hl{some text} that should be highlighted.

\begin{mdframed}
Here are two paragraphs that should be highlighted.

This is the second of them.
\end{mdframed}

And we continue with normal text.
\end{document}

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.4: t.org --]
[-- Type: text/x-org, Size: 307 bytes --]

#+options: toc:nil
#+latex_header: \usepackage[backgroundcolor=yellow!20!white]{mdframed}
* highlighting text
This is +some text+ that should be highlighted.

#+begin_mdframed
Here are two paragraphs that should be highlighted.

This is the second of them.
#+end_mdframed

And we continue with normal text.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 194 bytes --]

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: New markup for revising manuscripts
  2017-03-11 23:26             ` Doyley, Marvin M.
@ 2017-03-12 18:16               ` John Kitchin
  0 siblings, 0 replies; 19+ messages in thread
From: John Kitchin @ 2017-03-12 18:16 UTC (permalink / raw)
  To: Doyley, Marvin M.; +Cc: emacs-orgmode@gnu.org, Kaushal Modi

probably no lisp required. See the post I referenced. It is all done in
the org-file there.

Doyley, Marvin M. writes:

> 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 <jkitchin@andrew.cmu.edu> wrote:
>>
>> 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=http-3A__kitchingroup.cheme.cmu.edu_blog_2013_11_30_Custom-2Ddirectives_&d=DwIBAg&c=kbmfwr1Yojg42sGEpaQh5ofMHBeTl9EI2eaqQZhHbOU&r=s3_3riAscdqtNAzgOuwYB9g0dZVGcp8BNCy_RylYdxU&m=HR848Kl27487mBHnj6hZWqJ4zVzwnz8yn_CYsmstLLc&s=CgaellrR4m7Y4Quba00w0ekyLA_np6lkrXxoWv4awZQ&e=
>>
>> 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.
>>
>> 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.
>>
>> Doyley, Marvin M. writes:
>>
>>> 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 <jkitchin@andrew.cmu.edu> 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 <jkitchin@andrew.cmu.edu> 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 <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://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. <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
>>>>>>
>>>>>>
>>>>
>>>>
>>>> --
>>>> 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=
>>
>>
>> --
>> 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=HR848Kl27487mBHnj6hZWqJ4zVzwnz8yn_CYsmstLLc&s=tzkgz4BW5dLySosHfzr7-xRCDyIG4RuaQbMrhZswNuw&e=


--
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

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: New markup for revising manuscripts
@ 2017-03-13 17:25 Doyley, Marvin M.
  0 siblings, 0 replies; 19+ messages in thread
From: Doyley, Marvin M. @ 2017-03-13 17:25 UTC (permalink / raw)
  To: Eric S Fraga; +Cc: emacs-orgmode@gnu.org, John Kitchin


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

Hi Eric,

I really appreciate this. I will try it out too.

Cheers,
M
On Friday, 10 Mar 2017 at 20:33, Doyley, Marvin M. 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 ?

I don't know about elegant but my approach is to subvert the +...+
emphasis markers.  These usually indicate strike-through, something I
never use.  Instead, I have +some text+ be highlighted and exported to
LaTeX and HTML as such.

To achieve this, I customise a number org variables.  It took me some
time to find how I actually did this as it's been part of my org setup
for years, so much so that I almost thought it was default behaviour!
In any case, the following is an elided extract from my customised
variables:

#+begin_src emacs-lisp
  (custom-set-variables
   '(org-emphasis-alist
     (quote
      (("*" bold)
       ("/" italic)
       ("_" underline)
       ("=" org-verbatim verbatim)
       ("~" org-code verbatim)
       ("+" highlight))))
   '(org-html-text-markup-alist
     (quote
      ((bold . "<b>%s</b>")
       (code . "<code>%s</code>")
       (italic . "<i>%s</i>")
       (strike-through . "<span style=\"background-color: #ffff80;\">%s</span>")
       (underline . "<span class=\"underline\">%s</span>")
       (verbatim . "<code>%s</code>"))))
   '(org-latex-text-markup-alist
     (quote
      ((bold . "\\textbf{%s}")
       (code . protectedtexttt)
       (italic . "\\emph{%s}")
       (strike-through . "\\hl{%s}")
       (underline . "\\uline{%s}")
       (verbatim . protectedtexttt)))))
#+end_src

There are basically copies of the defaults with the strike-through
element changed.

Now I can write +highlighted text+ which appears as you wish in both
HTML and LaTeX exports as well as on the screen (customise the highlight
face to get what you want on screen).  For LaTeX, you also have to

  (add-to-list 'org-latex-packages-alist '("" "soul"))


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

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

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: New markup for revising manuscripts
  2017-03-10 21:47   ` John Kitchin
  2017-03-11 11:35     ` Doyley, Marvin M.
  2017-03-11 12:49     ` Doyley, Marvin M.
@ 2017-03-13 22:56     ` Doyley, Marvin M.
       [not found]     ` <6ac43f7bdf5a4070807af1dfee9be4ea@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
  3 siblings, 0 replies; 19+ messages in thread
From: Doyley, Marvin M. @ 2017-03-13 22:56 UTC (permalink / raw)
  To: John Kitchin; +Cc: emacs-orgmode@gnu.org, Doyley, Marvin M., Kaushal Modi


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

Hi John and Eric,

I decided to adopt your approaches, thanks for the suggestions.  So I can use either the response: or ++ to highlight changes in our manuscripts.

Cheers,
M

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


#+begin_src emacs-lisp
(setq org-emphasis-alist
      (cons '("+" '(:foreground "red"))
            (delete* "+" org-emphasis-alist :key 'car :test 'equal)))

(custom-set-variables
  '(org-latex-text-markup-alist '((bold . "\\textbf{%s}")
					 (code . verb)
					 (italic . "\\emph{%s}")
					 (strike-through . "\\textcolor{red}{%s}")
					 (underline . "\\uline{%s}")
					 (verbatim . protectedtexttt))))

#+end_src


> 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: 9699 bytes --]

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

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: New markup for revising manuscripts
       [not found]     ` <6ac43f7bdf5a4070807af1dfee9be4ea@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
@ 2017-03-14  7:25       ` Eric S Fraga
  0 siblings, 0 replies; 19+ messages in thread
From: Eric S Fraga @ 2017-03-14  7:25 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 353 bytes --]

On Monday, 13 Mar 2017 at 22:56, Doyley, Marvin M. wrote:
> Hi John and Eric,
>
> I decided to adopt your approaches, thanks for the suggestions.  So I
> can use either the response: or ++ to highlight changes in our
> manuscripts.

Let us know how you get on and which works better in practice.

-- 
Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D)

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 194 bytes --]

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2017-03-14  7:40 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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.
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.

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).