emacs-orgmode
[Top][All Lists]
Advanced

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

Re: Playing down the text in org-mode


From: Juan Manuel Macías
Subject: Re: Playing down the text in org-mode
Date: Thu, 13 Jan 2022 19:19:36 +0000

John Kitchin writes:

> It depends on what you mean. I can't think of a standard markup for
> de-emphasis. You could imply it with color perhaps, e.g. some shade of
> grey, or size  by making it smaller. At least for LaTex/HTML, both of
> those can be done. You would either need to use something like a
> macro, or a link for something like that I think.

The problem is that the concept of nested emphasis only works in LaTeX.
I agree that a macro would be a good solution, putting the argument in
'normal' text. An approximation could be:

#+begin_src emacs-lisp
  (defun macro-no-emph (arg)
    (let* ((backend org-export-current-backend))
      (cond ((eq org-export-current-backend 'latex)
             (concat "@@latex:{\\normalfont @@" arg "@@latex:}@@"))
            ((eq org-export-current-backend 'html)
             (concat "@@html:<span style=\"font-style:normal;\">@@" arg 
"@@html:</span>@@"))
            ((eq org-export-current-backend 'odt)
             ;; a character style `normal' must be definded for odt
             (concat "@@odt:<text:span text:style-name=\"normal\">@@" arg 
"@@odt:</text:span>@@")))))

  (setq org-export-global-macros
        '(("noemph" . "(eval (mi-macro-emph $1))")))
#+end_src

/foo {{{noemph(bar)}}} baz/



reply via email to

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