This repository has been archived on 2020-12-27. You can view files and clone it, but cannot push or open issues or pull requests.
conlang-layer/README.org

101 lines
4.1 KiB
Org Mode
Raw Normal View History

2019-09-16 13:48:00 +00:00
[[file:https://cdn.rawgit.com/syl20bnr/spacemacs/442d025779da2f62fc86c2082703697714db6514/assets/spacemacs-badge.svg]]
2019-09-16 13:45:25 +00:00
2019-07-21 14:48:11 +00:00
#+TITLE: Conlanging layer
2019-09-16 13:45:25 +00:00
#+author: Lucien “Pundrak” Cartier-Tilet
2019-07-21 14:48:11 +00:00
2019-07-21 15:27:53 +00:00
[[img/conlang_flag.png]]
2019-07-21 14:48:11 +00:00
* Table of Contents :TOC_4_gh:noexport:
- [[#description][Description]]
2019-07-21 15:27:53 +00:00
- [[#features][Features]]
2019-09-16 13:45:25 +00:00
- [[#graphviz-trees][Graphviz trees]]
2019-07-21 14:48:11 +00:00
- [[#install][Install]]
- [[#key-bindings][Key bindings]]
* Description
2019-07-21 15:24:46 +00:00
This layer adds support for conlanging.
2019-07-21 14:48:11 +00:00
2019-07-21 15:27:53 +00:00
** Features
2019-09-16 13:45:25 +00:00
- Generate graphviz trees based on Elisp trees
- Replace some text by its runic equivalent (supports the Mattér and
Eittlandic languages)
- Adds phonetics to Ňyqy text
- Provides custom shortcuts
** Graphviz trees
The ~conlanging~ layer provides one public function called
~conlanging/tree-to-dot~. It accepts as its sole argument a list of strings
or lists, such as the following:
#+NAME: vowels-example
#+BEGIN_SRC emacs-lisp :noweb yes
(setq-local vowels
'("[vowel]"
("[back]"
("[tense]"
("[high]" ("ü"))
("{high}" ("ö")))
("{tense}"
("[high]" ("u"))
("{high}" ("o"))))
("{back}"
("[tense]"
("[high]" ("y"))
("{high}" ("ë")))
("{tense}"
("[high]" ("i"))
("{high}" ("e"))))))
#+END_SRC
When passed in the above mentioned function, and the result itself is passed
through graphviz, we get the following result:
#+NAME: tree-vowels
#+BEGIN_SRC emacs-lisp :exports results :noweb yes :cache yes
<<vowels-example>>
(conlanging/tree-to-dot vowels)
#+END_SRC
2019-09-16 13:46:41 +00:00
#+BEGIN_SRC dot :file img/vowels-example.png :var input=tree-vowels :exports results
2019-09-16 13:45:25 +00:00
$input
#+END_SRC
#+NAME: arbre:vow
#+ATTR_HTML: :alt Exemple darbre de voyelles
2019-09-16 13:46:41 +00:00
#+RESULTS:
2019-09-16 13:45:25 +00:00
[[file:img/vowels-example.png]]
This example tree is only a binary tree, but a single node can have up to ten
2019-09-16 13:51:14 +00:00
children. See some examples in the [[https://labs.phundrak.fr/phundrak/langue-phundrak-fr/blob/master/nyqy.org][Ňyqy source file]].
2019-07-21 14:48:11 +00:00
2019-09-16 15:39:09 +00:00
It is planned to merge [[https://labs.phundrak.fr/phundrak/distinctive-features-chooser][this project]] into this layer in order to facilitate
the creation of trees based on distinctive features.
2019-07-21 14:48:11 +00:00
* Install
2019-07-21 15:24:46 +00:00
To install this layer, either clone this project in your =~/.emacs.d/private/=
folder, or symlink it from there to your actual clone location. Then, add
=conlanging= in your dotspacemacs file in the
=dotspacemacs-configuration-layers= list:
#+begin_src emacs-lisp
(setq-default dotspacemacs-configuration-layers '(conlanging))
#+end_src
You can then reload your configuration file with ~SPC f e R~, or restart Emacs
with ~SPC q r~ or ~SPC q R~.
2019-07-21 14:48:11 +00:00
* Key bindings
2019-09-16 13:45:25 +00:00
| Key Binding | Description |
|---------------+-------------------------------------------------------------------------|
| ~SPC l e l~ | (org-mode only) Translate Einnlandish transliteration into native latin |
| ~SPC l e r~ | (org-mode only) Translate Einnlandish transliteration into runes |
| ~SPC l m L~ | (org-mode only) Translate Mattér transliteration into LaTeX runes |
| ~SPC l m l~ | (org-mode only) Translate Mattér transliteration into native latin |
| ~SPC l m r~ | (org-mode only) Translate Mattér transliteration into runes |
| ~SPC o l e o~ | Open Eittlandic file |
| ~SPC o l h o~ | Open Hjelp file |
| ~SPC o l m o~ | Open Mattér file |
| ~SPC o l n o~ | Open Ňyqy file |
| ~SPC o l o~ | Open the conlanging directory |
| ~SPC o l t o~ | Open Tãso file |