org-extra-emphasis

Homepage: https://github.com/kjambunathan/org-extra-emphasis

Author: Jambunathan K

Updated:

Summary

Extra Emphasis markers for Org

Commentary

Overview
========

This library provides two additional markers `!!' and `!@' over
and above those in `org-emphasis-alist'.'

- Text enclosed in `!!' is highlighted in yellow, and exported likewise
- Text enclosed in `!@' is displayed in red, and exported likewise

Following backends are supported: HTML and ODT. For export of extra
emphasis markers to the ODT side, you need
[[https://github.com/kjambunathan/org-mode-ox-odt][Enhanced ODT]]
exporter with version >= 9.5.3.467 (dtd. June 14, 2022 IST).  This
is the first version of the exporter that defines the user option
`org-odt-extra-styles'.

Example
=======

Setup
=====

Add the following to your `user-init-file' and restart Emacs.

   (requrie 'org-extra-emphasis)

Test Run
========

1. Create an `org' file, say `org-export-emphasis.org' and fill it
   with following content or you can download the file from
   https://raw.githubusercontent.com/kjambunathan/org-extra-emphasis/main/org-extra-emphasis.org

	  ;; #+TITLE: Test file for ==org-extra-emphasis== library

	  ;; * Demo of extra emphasis markers ==!!== and ==!@==

	  ;; !!Ea consectetur laboris adipiscing et ipsum labore esse qui minim
	  ;; pariatur et sunt sunt nostrud anim laborum culpa.!!

	  ;; !@Minim reprehenderit excepteur elit, dolore elit, veniam, eu.
	  ;; Ullamco dolore elit, cupidatat sed labore ea aute.!@

	  ;; Pariatur !!et lorem cupidatat !@minim irure!@ proident, ad.!!  Eiusmod
	  ;; sunt et lorem labore ex aliqua aute esse.

	  ;; Ut mollit !@duis velit est est magna in quis ipsum.  !!Aliqua aliqua
	  ;; non laboris exercitation cupidatat aliqua incididunt.!!  Qui voluptate
	  ;; irure aute occaecat laborum cillum est.!@  Quis magna dolor ullamco
	  ;; magna do consectetur est laborum enim ut.

	  ;; * !!Demo of extra emphasis markers in a styled paragraph!!

	  ;; #+ATTR_ODT: :target "extra_styles"
	  ;; #+begin_src nxml
	  ;; 
	  ;;   
	  ;;     
	  ;;   
	  ;;   
	  ;; 
	  ;; #+end_src

	  ;; #+ATTR_ODT: :style "Warn"
	  ;; Proident, duis dolore consectetur sed nisi ea pariatur.  Esse
	  ;; proident, cillum duis qui ullamco sint cillum magna.  !!Eiusmod
	  ;; veniam, !@sint officia!@ non consectetur laboris cillum.!!  Cillum
	  ;; mollit consequat eu dolore ullamco qui reprehenderit anim cillum
	  ;; in consectetur consequat sunt dolore aliquip voluptate
	  ;; consectetur anim ea.  Voluptate nisi est incididunt aliquip
	  ;; excepteur aliqua id do enim ut non consequat.

2. Note that portions of text marked with `!!' and `!@' are fontified as described above.

3. Export the file to HTML with `C-c C-e h O'.

   Note that the text enclosed in the above emphasis markers are
   colorized in HTML file.

4. Export the file to ODT with `C-c C-e o O'.

   Note that the text enclosed in the above emphasis markers are
   colorized in ODT file.

The HTML, ODT, PDF generated in steps (3) and (4) above are
available at https://github.com/kjambunathan/org-extra-emphasis and
the screenshots can be seen in https://github.com/kjambunathan/org-extra-emphasis/tree/main/screenshots


Default Settings
================

16 Emphasis Markers
===================

This library defines the following 16 emphasis markers,

|----+----+----+----|
| !! | !@ | !% | !& |
|----+----+----+----|
| @! | @@ | @% | @& |
|----+----+----+----|
| %! | %@ | %% | %& |
|----+----+----+----|
| &! | &@ | &% | && |
|----+----+----+----|

The above markers are all pairings of the following four characters:
    ! @ % &

It is hoped that these set of emphasis markers don't pose issues
while exporting.

17 Extra Emphasis Faces
=======================

This library defines 17 faces:

- one base face `org-extra-emphasis'
- 16 more faces `org-extra-emphasis-01',`org-extra-emphasis-02',
 ..., `org-extra-emphasis-16'.

The later 16 faces derive from `org-extra-emphasis' face.  Of
these, only the first two faces `org-extra-emphasis-01' and
`org-extra-emphasis-02' are explicitly configured.  If you are
using more than 2 emphasis markers, you may want to configure the
other 14 faces.

`org-extra-emphasis-alist' already associated 16 emphasis markers
with 16 different faces.

Customization
=============

Configuring your own Emphasis Markers
=====================================

16 numbers of emphasis markers should suffice in practice.
However, if none of the above emphasis markers resonate with you,
you can customize `org-extra-emphasis-alist', and plug in your own
markers.  When choosing your own marker, ensure that you exercise
some care.  For example, if you choose `#' as a marker you are
likely to get malformed `html' and `odt' files.

Configuring Extra Emphasis Faces
===============================

You can use `M-x customize-group RET org-extra-emphasis-faces RET'
to configure the extra emphasis faces.

Disabling the Extra Emphasis
=============================

You can use `M-x org-extra-emphasis-mode' to toggle this feature.

Adding additional export backends
=================================

To add additional backends, modify `org-extra-emphasis-formatter'
and `org-extra-emphasis-build-backend-regexp'.

Dependencies