[Top][All Lists]

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

Re: [O] New markup for revising manuscripts

From: John Kitchin
Subject: Re: [O] New markup for revising manuscripts
Date: Sat, 11 Mar 2017 08:41:18 -0500

I like this a lot!

On March 11, 2017, at 8:39 AM, Eric S Fraga <address@hidden> 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

#+begin_src emacs-lisp
      (("*" bold)
       ("/" italic)
       ("_" underline)
       ("=" org-verbatim verbatim)
       ("~" org-code verbatim)
       ("+" highlight))))
      ((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>"))))
      ((bold . "\\textbf{%s}")
       (code . protectedtexttt)
       (italic . "\\emph{%s}")
       (strike-through . "\\hl{%s}")
       (underline . "\\uline{%s}")
       (verbatim . protectedtexttt)))))

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.


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

reply via email to

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