emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] New markup for revising manuscripts


From: Doyley, Marvin M.
Subject: Re: [O] New markup for revising manuscripts
Date: Mon, 13 Mar 2017 17:25:44 +0000

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: signature.asc
Description: Message signed with OpenPGP using GPGMail


reply via email to

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