2017-08-09 10 views
3

.orgファイル内の太字、斜体、取り消し線などのテキスト修飾子を非常に簡単に指定することができます(see link)。htmlエクスポートのテキストの色をorg-modeから変更する

同様に、エクスポートされたhtmlファイルでテキストが適切に着色されるように、.orgファイルのちょうど小さなセクションにテキストカラーを指定する方法はありますか?ハイライトされた音符を素早く取り込むと、これは非常に便利だと思います。

期待される動作:

#+MACRO: color @@html:<font color="$1">$2</font>@@ 

* This is a test 

This is a sample sentence in normal text color. 

{{{color(red,This is a sample sentence in red text color.)}}} 

{{{color(green,This is a sample sentence in green text color.)}}} 

2番目の引数はコンマ(そしておそらく他のいくつかの文字を含めることはできませんという制限で:あなたはmacroを使用することができます

This is a sample sentence in normal text color. 
 
<font color="red"> 
 
This is a sample sentence in red text color. 
 
</font> 
 
<font color="green"> 
 
This is a sample sentence in green text color. 
 
</font>

答えて

3

)。

+0

すばらしいトリック!また、[org-reveal](https://github.com/yjwen/org-reveal)でも動作します。 –

+0

私が見つけたマクロの素晴らしいリスト(色、明るさ、...)は、ここにあります:https://github.com/fniessen/org-macros/blob/master/README.org –

関連する問題