From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Doyley, Marvin M." Subject: Re: New markup for revising manuscripts Date: Mon, 13 Mar 2017 22:56:02 +0000 Message-ID: <1D7D7716-1C40-4A91-B1F5-7195B58ECC50@ur.rochester.edu> References: <4F883241-1170-4E41-88AE-A13C99581597@ur.rochester.edu> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="Apple-Mail=_440B4C3E-9A7D-4491-87A5-13B1732EDF77"; protocol="application/pgp-signature"; micalg=pgp-sha512 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36033) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cnZ7h-00012y-UO for emacs-orgmode@gnu.org; Mon, 13 Mar 2017 19:11:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cnZ7d-0004l3-DO for emacs-orgmode@gnu.org; Mon, 13 Mar 2017 19:11:29 -0400 Received: from mail-sn1nam01on0092.outbound.protection.outlook.com ([104.47.32.92]:12928 helo=NAM01-SN1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cnZ7c-0004kD-Sx for emacs-orgmode@gnu.org; Mon, 13 Mar 2017 19:11:25 -0400 In-Reply-To: Content-Language: en-US List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: John Kitchin Cc: "emacs-orgmode@gnu.org" , "Doyley, Marvin M." , Kaushal Modi --Apple-Mail=_440B4C3E-9A7D-4491-87A5-13B1732EDF77 Content-Type: multipart/alternative; boundary="Apple-Mail=_A213C4D5-487E-4972-8912-B19D1C4931FE" --Apple-Mail=_A213C4D5-487E-4972-8912-B19D1C4931FE Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii 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 = wrote: >=20 > 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 = >=20 > The example there has an html export defined, but you could as easily = define a latex exporter. It has some limitations, like it might not = reliably work on multiple lines, and you would not want to "highlight" = across elements (or the latex will get ugly and probably not work). >=20 > I have been working on some ways to get persistent highlighting using = overlays for a similar purpose: = http://kitchingroup.cheme.cmu.edu/blog/2016/11/10/Persistent-highlighting-= in-Emacs/ = >=20 > so far I only can get reliable output to html. Latex seems possible, = again if you don't highlight across too many elements. It is a work in = progress here: = https://github.com/jkitchin/scimax/blob/master/ov-highlighter.el = >=20 > 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. >=20 > I can't say I am fully satisified by any of these solutions (that is = why there are so many of them ;) >=20 > John >=20 > ----------------------------------- > Professor John Kitchin > Doherty Hall A207F > Department of Chemical Engineering > Carnegie Mellon University > Pittsburgh, PA 15213 > 412-268-7803 > @johnkitchin > http://kitchingroup.cheme.cmu.edu = >=20 >=20 > On Fri, Mar 10, 2017 at 3:56 PM, Kaushal Modi > wrote: > I use this macro to highlight text in html/latex(pdf): >=20 > #+MACRO: COLOR @@html:$2@@@@latex:\textcolor{$1}{$2}@@ >=20 > This is from = https://github.com/fniessen/org-macros/blob/master/README.org = >=20 > Example use: > {{{COLOR(red, This information is important.)}}} >=20 > It doesn't though highlight the text in red in org-mode. >=20 > On Fri, Mar 10, 2017 at 3:49 PM Doyley, Marvin M. = > wrote: > Hi there, >=20 > When revising manuscripts, I usually highlight the changes (response = to reviewer) in red. I use typically do this as follows: > (1) #+latex_header: \newcommand{\response}[1]{\textcolor{red}{#1}} > (2) \response{changes) >=20 > Is there a more elegant way to do this ? It would be nice if I could = change the color of the select text in both org and the exported latex = file to red. Seeing the highlighted text in org would be a huge plus. >=20 > Thanks > M > -- > Kaushal Modi >=20 >=20 --Apple-Mail=_A213C4D5-487E-4972-8912-B19D1C4931FE Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii
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-feat= ures-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-hi= ghlighting-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.e= l

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

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=3D"color: = $1">$2</span>@@@@latex:\textcolor{$1}{$2}@@


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



= --Apple-Mail=_A213C4D5-487E-4972-8912-B19D1C4931FE-- --Apple-Mail=_440B4C3E-9A7D-4491-87A5-13B1732EDF77 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- iQEcBAEBCgAGBQJYxyOCAAoJELrZY3BfcCrMy4IIAM57KZGsRM99ibdcp9hpWUZq WjzQNPvApe19UmftcqmLshFMfL6zC28hOt0onNoz8giQ77MtmSEhiE9MSuSg56Z7 dxiVKV642TUuiDGPInffY7Tyyxtpni0/go153hbDv6qdGIEzy+0tS0UMaszE8DQc 549rZW4rz1ZNv3jNe/0OSWCj5ab+qJRu5dn5pxWC/ZptOHMQ1yrk/FOwtqhqVBlI VxyzgLhulvakCo4O9GZEUqgMnsIhKo78BZ6v3K1fZtrkXeK/dGXKipQ2Dttyk2Ii RclygVPkQqTpv7cClIXiT2YDQrKFj2Xbjk7A7Kl5KmJ4NCq83uP+atuQvYmO2IM= =sFCC -----END PGP SIGNATURE----- --Apple-Mail=_440B4C3E-9A7D-4491-87A5-13B1732EDF77--