Markup formats
Written on 002019-07-28T19:48Z by baltakatei
Wikitext
Since I use emacs
as my editor I thought I'd see if there was a set
of emacs tools designed to facilitate editing wikitext (what you edit
when you click the "edit source" tab on the top of any Wikipedia
article).
One tool I wish that existed is the ability to automatically format default in-line references into a format more visible for human eyes. Here is an example from the wikitext for the Kyoto Animation arson attack article:
<ref>{{Cite web|url=https://www3.nhk.or.jp/nhkworld/en/news/20190727_02/|title=Nearly 6 million dollars donated after Kyoto blaze {{!}} NHK WORLD-JAPAN News|website=NHK WORLD|language=en|access-date=2019-07-27}}</ref>
I want a tool that can convert that text into this:
<ref>{{Cite web
|url = https://www3.nhk.or.jp/nhkworld/en/news/20190727_02/
|title = Nearly 6 million dollars donated after Kyoto blaze {{!}} NHK WORLD-JAPAN News
|website = NHK WORLD
|language = en
|access-date = 2019-07-27
}}</ref>
I have been reading up on how the Emacs Lisp language works so I can write my own custom function to perform this formatting automatically on a region of text I select in emacs (I prefer to edit article source in emacs since I really like the keyboard shortcuts). I'm currently learning the basics.
LaTeX
I also had some curiosity about possibly using emacs
for composing
documents using the LaTeX markdup language. I imagine that would be
useful for producing documents for explaining mathematical concepts in
general.
This blog post located at dated
2010-05-13, and titled Emacs as the Ultimate LaTeX Editor seems
promising. It recommends the use of the AUCTeX
package available in
the debian repository (wikipedia page). It had a
followup post which explained how LaTeX equation
previous could be seen within the emacs GUI editor.
Markdown
I also decided I'd try and write this page using
Markdown and the M-x markdown-preview
function
(which converts the markdown markup into an HTML file which it has my
browser open).
I figured out I can use the markdown
package to convert markdown
files into HTML via:
$ markdown mytestfile.md > mytestfile.html
It looks better than raw text files, in any case. Maybe one day I'll
get fancy and use texinfo
or something from which I can
auto-generate a static HTML website. For now, though, I'll focus on
getting stuff written.
:: :: :: ::