branch: elpa/adoc-mode
commit c9a4715d2fe82f72aeef57255de27403787484d3
Author: Michael Schlösser <[email protected]>
Commit: Bozhidar Batsov <[email protected]>
Add section about face customization to README.adoc
The README.adoc now contains a small section about face customization. This
helps users to tailor the mode to individual preferences and needs.
---
README.adoc | 36 ++++++++++++++++++++++++++++++++++++
1 file changed, 36 insertions(+)
diff --git a/README.adoc b/README.adoc
index b85689d0b1..b4e3f8725d 100644
--- a/README.adoc
+++ b/README.adoc
@@ -83,6 +83,8 @@ or if you're into use-package
== Configuration
+=== General
+
* According to an old AsciiDoc manual, `.txt` is the standard file extension of
AsciiDoc files. Add the following to your initialization file to open all
`.txt` files with adoc-mode as major mode automatically: `(add-to-list
@@ -95,6 +97,40 @@ or if you're into use-package
`buffer-face-mode` is for you: `(add-hook 'adoc-mode-hook (lambda()
(buffer-face-mode t)))`
+=== Customization
+
+It is possible to customize the way `adoc-mode` renders different text
+elements (faces) like section titles, text or punctuation styles. For
+example, if you would like a level 1 section title to have a different
+text color or height you can achieve this by using standard Emacs
+functionality.
+
+First of all, list all available faces by running
+
+kbd:[M-x] `list-faces-display`
+
+and searching for lines with the `adoc-` prefix.
+
+Alternatively, you can get information about the face under point by calling
+
+kbd:[M-x] `describe-face`
+
+One possible solution to change the look of a face is to use the
+built-in `use-package` feature `:custom-face`.
+
+Example
+
+[source,emacs-lisp]
+----
+(use-package adoc-mode
+ :ensure t
+ :custom-face
+ (adoc-title-0-face ((t (:height 1.0 :weight bold)))))
+----
+
+Of course, this is only one way to do it. Emacs has a few ways to
+customize faces. Simply, pick the one you prefer.
+
=== Coming features
The next features I plan to implement