org-mode からMarkdownにエクスポート、そのままはてなブログに (Org 9.1.6)

Table of Contents

  1. はじめに
  2. 見出し (これは見出し1)
    1. 見出し2
      1. 見出し3
  3. リスト
  4. 文字の装飾、水平線
  5. 特殊文字、上付き文字、下付き文字
  6. 段落、改行、引用
  7. 例示、ソースコード
  8. 表 (列グループ化)
  9. 画像
  10. ハイパーリンク
  11. 内部リンク
  12. 脚注
  13. 日付と時刻
  14. スケジュール、締め切り
    1. タスクA
  15. ドロワー
  16. タグ
    1. Meeting with the French group:work:
      1. Summary by Frank:boss:notes:
  17. リスト
    1. タスク1
    2. タスク2
  18. リスト(優先順位)
    1. タスク1(優先度:高)
    2. タスク2
    3. タスク3(優先度:低)
  19. リスト (タスクの進捗率表示)
    1. Organize Party [33%]
      1. Call people [1/2]
      2. Buy food
      3. Talk to neighbor
  20. リスト (チェックボックス)
    1. Organize party [2/4]

はじめに

ほぼ自分用に Emacs Org文書を org-md-export-to-markdownMarkdown化したものを 、そのままはてなブログに載せた。

一部文章を https://orgmode.org/manual/ から引用させていただいた。

orgの EXAMPLE ブロックの問題で、org側コードは全て行頭に 「'」 を加えている。 ( EXAMPLE ブロック問題の部分についての、 るびきちさんの記事 http://emacs.rubikitch.com/org-src/)

  • Org version: 9.1.6
  • 最終投稿日時: 2018/02/11

見出し (これは見出し1)

' ** 見出し2
' これは見出し2
' *** 見出し3
' これは見出し3
' **** 見出し4
' これは見出し4
' **** 見出し5
' これは見出し5

見出し2

これは見出し2

見出し3

これは見出し3

  1. 見出し4

    これは見出し4

    1. 見出し5

      これは見出し5

リスト

'    My favorite scenes are (in this order)
'    1. The attack of the Rohirrim
'    2. Eowyn's fight with the witch king
'       + this was already my favorite scene in the book
'       + I really like Miranda Otto.
'    3. Peter Jackson being shot by Legolas
'       - on DVD only
'       He makes a really funny face when it happens.
'    But in the end, no individual scenes matter but the film as a whole.
'    Important actors in this film are:
'    - Elijah Wood :: He plays Frodo
'    - Sean Astin :: He plays Sam, Frodo's friend.  I still remember
'      him very well from his role as Mikey Walsh in The Goonies.

My favorite scenes are (in this order)

  1. The attack of the Rohirrim
  2. Eowyn's fight with the witch king
    • this was already my favorite scene in the book
    • I really like Miranda Otto.
  3. Peter Jackson being shot by Legolas

    • on DVD only

    He makes a really funny face when it happens.

But in the end, no individual scenes matter but the film as a whole. Important actors in this film are:

  • Elijah Wood: He plays Frodo
  • Sean Astin: He plays Sam, Frodo's friend. I still remember him very well from his role as Mikey Walsh in The Goonies.

文字の装飾、水平線

' - *これは太字。bold*
' - /これはイタリック。italic/
' - _これは下線。underlined_

ここに水平線(最低5文字以上の "-")
-----

' - =これは *入力どおりの出力* 。 /verbatim/=
' - ~これはコード。 code~
' - +これは取り消し線。 strike-through+
  • これは太字。bold
  • これはイタリック。italic
  • これは下線。underlined

ここに水平線(最低5文字以上の "-")


  • これは *入力どおりの出力* 。 /verbatim/
  • これはコード。 code
  • これは取り消し線。 strike-through

特殊文字、上付き文字、下付き文字

' \alpha, \beta , \Gamma , \pi など
'  
' The radius of the sun is R_sun = 6.96 x 10^8 m.  On the other hand, the
' radius of Alpha Centauri is R_{Alpha Centauri} = 1.28 x R_{sun}.

α, β , Γ , π など

The radius of the sun is Rsun = 6.96 x 108 m. On the other hand, the radius of Alpha Centauri is RAlpha Centauri = 1.28 x Rsun.

段落、改行、引用

' 改行は最低1つ以上の空行を入れること。
'  
' 行末に =\\= を入れることで、強制的に改行される。\\
' VERSE ブロックで囲まれた部分は、インデントや空白、改行がそのまま表示される。
'  
' #+BEGIN_VERSE
' ###BEGIN  -  VERSE
' このブロックはEasyTemplate 機能で、 *<s → [TAB]* で呼びだせる。
'  
'      ###END  -  VERSE
' #+END_VERSE
'  
' 引用ブロックは *<q → [TAB]* で呼び出す。
'  
' #+BEGIN_QUOTE
' Everything should be made as simple as possible,
' but not any simpler -- Albert Einstein
' #+END_QUOTE
'  
' センタリングは *<c → [TAB]* 。
'  
' #+BEGIN_CENTER
' Everything should be made as simple as possible,\\
' but not any simpler
' #+END_CENTER

改行は最低1つ以上の空行を入れること。

行末に \\ を入れることで、強制的に改行される。
VERSE ブロックで囲まれた部分は、インデントや空白、改行がそのまま表示される。

###BEGIN VERSE
このブロックはEasyTemplate 機能で、 **<s → [TAB]** で呼びだせる。

     ###END VERSE

引用ブロックは <q → [TAB] で呼び出す。

Everything should be made as simple as possible, but not any simpler – Albert Einstein

センタリングは <c → [TAB]

Everything should be made as simple as possible, but not any simpler

例示、ソースコード

' 例示の方法1: EXAMPLEブロック(EasyTemplate ... *<e* )
'  
' #+BEGIN_EXAMPLE
' Here is an example
' #+END_EXAMPLE
'  
' 例示の方法2: 行頭にコロン ":" と空白
'   : Here is an example
'  
' ソースコードのEasyTemplate は *<s* 。
' - -n :: 行番号の追加
' - -r :: ラベル (ref:XX の部分) を表示しない
'  
' 以下、https://orgmode.org/manual/Literal-examples.html#Literal-examples より引用。
'  
' #+BEGIN_SRC emacs-lisp -n -r
' (save-excursion                                                                  (sc)
'    (goto-char (point-min)))                                                      (jump)
' #+END_SRC
' In line [[(sc)]] we remember the current position.  [[(jump)][Line (jump)]]
' jumps to point-min.

例示の方法1: EXAMPLEブロック(EasyTemplate … <e )

Here is an example

例示の方法2: 行頭にコロン ":" と空白

Here is an example

ソースコードのEasyTemplate は <s

  • -n: 行番号の追加
  • -r: ラベル (ref:XX の部分) を表示しない

    1 (save-excursion 2 (goto-char (point-min)))

In line sc we remember the current position. Line jump jumps to point-min.

' | Name  | Phone | Age |
' |-------+-------+-----|
' | Peter |  1234 |  17 |
' | Anna  |  4321 |  25 |
Name Phone Age
Peter 1234 17
Anna 4321 25

表 (列グループ化)

' | N | N^2 | N^3 | N^4 | ~sqrt(n)~ | ~sqrt[4](N)~ |
' |---+-----+-----+-----+-----------+--------------|
' | / |   < |     |   > |         < |            > |
' | 1 |   1 |   1 |   1 |         1 |            1 |
' | 2 |   4 |   8 |  16 |    1.4142 |       1.1892 |
' | 3 |   9 |  27 |  81 |    1.7321 |       1.3161 |
' |---+-----+-----+-----+-----------+--------------|
N N2 N3 N4 `sqrt(n)` `sqrt[4](N)`
1 1 1 1 1 1
2 4 8 16 1.4142 1.1892
3 9 27 81 1.7321 1.3161

画像

' main.jpg in orgmode.org
' #+ATTR_HTML: :width 300
'[[file:https://orgmode.org/img/main.jpg]]
'  
' main.jpg in orgmode.org in my local img
' #+ATTR_HTML: :width 300
'[[file:./img/main.jpg]]

main.jpg in orgmode.org

img

main.jpg in orgmode.org in my local img

img

ハイパーリンク

' [[https://www.google.co.jp]]
'
' [[https://www.google.co.jp][Googleトップページへのリンク]]

https://www.google.co.jp

Googleトップページへのリンク

内部リンク

' #+NAME: table_4-2
' | Name  | Phone | Age |
' |-------+-------+-----|
' | Peter |  1234 |  17 |
' | Anna  |  4321 |  25 |
'  
' - アイテム1
' - <<item_4-2>> アイテム2
'  
' 表へのリンク → [[table_4-2]]
'  
' [[table_4-2][表へのリンク]]
'  
' アイテム2へのリンク → [[item_4-2]]
Name Phone Age
Peter 1234 17
Anna 4321 25
  • アイテム1
  • アイテム2

表へのリンク → 3

表へのリンク

アイテム2へのリンク → 2

脚注

' The Org homepage[fn:1] now looks a lot better than it used to.
' ...
' [fn:1] The link is: http://orgmode.org

The Org homepage1 now looks a lot better than it used to. …

日付と時刻

' - <2018-01-31 水 22:00>
' - <2018-01-31 水 22:00-23:00>
' - <2018-01-31 水>--<2018-02-05 月>
' - <2018-01-31 水 +1w> (毎週水曜日)
' - [2018-01-31 水] (Agenda に表示されない inactive timestamp)
  • <2018-01-31 水 22:00>
  • <2018-01-31 水 22:00>–<2018-01-31 水 23:00>
  • <2018-01-31 水>–<2018-02-05 月>
  • <2018-01-31 水 +1w> (毎週水曜日)
  • [2018-01-31 水] (Agenda に表示されない inactive timestamp)

スケジュール、締め切り

' ** タスクA
'    DEADLINE: <2018-02-05 月> SCHEDULED: <2018-01-31 水>

タスクA

ドロワー

' Still outside the drawer
' :LOGBOOK:
' This is inside the drawer.
' :END:
' After the drawer.

Still outside the drawer

After the drawer.

タグ

' ** Meeting with the French group                     :work:
' *** Summary by Frank                       :boss:notes:
' **** TODO Prepare slides for him                   :action:

Meeting with the French group :work:

Summary by Frank :boss:notes:

  1. TODO Prepare slides for him :action:

TODO リスト

' ** TODO タスク1
' ** DONE タスク2

TODO タスク1

DONE タスク2

TODO リスト(優先順位)

' ** TODO [#A] タスク1(優先度:高)
' ** TODO [#B] タスク2
' ** TODO [#C] タスク3(優先度:低)

TODO タスク1(優先度:高)

TODO タスク2

TODO タスク3(優先度:低)

TODO リスト (タスクの進捗率表示)

' ** Organize Party [33%]
' *** TODO Call people [1/2]
' **** TODO Peter
' **** DONE Sarah
' *** TODO Buy food
' *** DONE Talk to neighbor

Organize Party [33%]

TODO Call people [1/2]

  1. TODO Peter

  2. DONE Sarah

TODO Buy food

DONE Talk to neighbor

TODO リスト (チェックボックス)

' * TODO Organize party [2/4]
'   - [-] call people [1/3]
'     - [ ] Peter
'     - [X] Sarah
'     - [ ] Sam
'   - [X] order food
'   - [ ] think about what music to play
'   - [X] talk to the neighbors

TODO Organize party [2/4]

  • [-] call people [1/3]
    • [ ] Peter
    • [X] Sarah
    • [ ] Sam
  • [X] order food
  • [ ] think about what music to play
  • [X] talk to the neighbors

Footnotes

1 The link is: http://orgmode.org