| 1 |
#+RESULTS: |
| 2 |
: some results without a block |
| 3 |
|
| 4 |
#+CAPTION: block caption |
| 5 |
#+BEGIN_SRC bash :results raw |
| 6 |
echo "a bash source block" |
| 7 |
|
| 8 |
function hello { |
| 9 |
echo Hello World! |
| 10 |
} |
| 11 |
|
| 12 |
hello |
| 13 |
#+END_SRC |
| 14 |
|
| 15 |
#+BEGIN_SRC |
| 16 |
|
| 17 |
a source block with leading newline, trailing newline characters |
| 18 |
and a line started |
| 19 |
with leading space |
| 20 |
and line leading tab. |
| 21 |
|
| 22 |
#+END_SRC |
| 23 |
|
| 24 |
#+BEGIN_SRC |
| 25 |
a source block without a language |
| 26 |
#+END_SRC |
| 27 |
|
| 28 |
|
| 29 |
#+BEGIN_SRC bash |
| 30 |
echo a source block with results |
| 31 |
#+END_SRC |
| 32 |
|
| 33 |
#+RESULTS: |
| 34 |
: a source block with results |
| 35 |
|
| 36 |
#+BEGIN_SRC bash :exports none |
| 37 |
echo a source block with results that is not exported |
| 38 |
#+END_SRC |
| 39 |
|
| 40 |
#+RESULTS: |
| 41 |
: a source block with results that is not exported |
| 42 |
|
| 43 |
#+BEGIN_SRC bash :exports results |
| 44 |
echo a source block that only exports results |
| 45 |
#+END_SRC |
| 46 |
|
| 47 |
#+RESULTS: |
| 48 |
: a source block that only exports results |
| 49 |
|
| 50 |
#+BEGIN_SRC bash :cmdline -foo -bar :exports results |
| 51 |
# the code block is not rendered |
| 52 |
echo but the result block is |
| 53 |
#+END_SRC |
| 54 |
|
| 55 |
#+RESULTS: |
| 56 |
: but the result block is |
| 57 |
|
| 58 |
#+BEGIN_EXAMPLE foo bar baz |
| 59 |
an example block with |
| 60 |
multiple lines including |
| 61 |
|
| 62 |
|
| 63 |
empty lines! |
| 64 |
|
| 65 |
it also has multiple parameters |
| 66 |
|
| 67 |
src, example & export blocks treat their content as raw text |
| 68 |
/inline/ *markup* is ignored |
| 69 |
and whitespace is honored and not removed |
| 70 |
|
| 71 |
content of example blocks is still html escaped - see <script>alert("escaped")</script> |
| 72 |
#+END_EXAMPLE |
| 73 |
|
| 74 |
: examples like this |
| 75 |
: are also supported |
| 76 |
: |
| 77 |
: note that /inline/ *markup* ignored |
| 78 |
|
| 79 |
#+BEGIN_QUOTE |
| 80 |
Mongodb is *webscale*. (source: [[http://www.mongodb-is-web-scale.com/][mongodb-is-web-scale]]) |
| 81 |
|
| 82 |
blocks like the quote block parse their content and can contain |
| 83 |
- lists |
| 84 |
- inline /markup/ |
| 85 |
- tables |
| 86 |
| foo | |
| 87 |
| bar | |
| 88 |
| baz | |
| 89 |
- paragraphs |
| 90 |
- ... |
| 91 |
|
| 92 |
whitespace is honored and not removed (but is not displayed because that's how html works by default) |
| 93 |
it can be made visible using css (e.g. =white-space: pre=). |
| 94 |
#+END_QUOTE |
| 95 |
|
| 96 |
#+BEGIN_SRC org |
| 97 |
,#+BEGIN_SRC bash |
| 98 |
echo src (with language org) and example blocks support escaping using commata |
| 99 |
,#+END_SRC |
| 100 |
|
| 101 |
,,* I am not a real headline - commata escape characters aren't renderered |
| 102 |
|
| 103 |
#+END_SRC |
| 104 |
|
| 105 |
#+BEGIN_EXAMPLE |
| 106 |
,#+BEGIN_SRC bash |
| 107 |
echo src (with language org) and example blocks support escaping using commata |
| 108 |
,#+END_SRC |
| 109 |
|
| 110 |
,,* I am not a real headline - commata escape characters aren't renderered |
| 111 |
#+END_EXAMPLE |
| 112 |
|
| 113 |
#+BEGIN_EXPORT html |
| 114 |
<script> |
| 115 |
console.log("Hello World!") |
| 116 |
</script> |
| 117 |
#+END_EXPORT |
| 118 |
|
| 119 |
#+BEGIN_EXPORT something-other-than-html |
| 120 |
I won't be rendered as html |
| 121 |
#+END_EXPORT |
| 122 |
|
| 123 |
|
| 124 |
- list item 1 |
| 125 |
blocks can contain unindented lines that would normally end a list item |
| 126 |
#+BEGIN_EXAMPLE |
| 127 |
this line is not indented - if it was outside of a block the list item would end |
| 128 |
#+END_EXAMPLE |
| 129 |
#+BEGIN_QUOTE |
| 130 |
this line is not indented - if it was outside of a block the list item would end |
| 131 |
#+END_QUOTE |
| 132 |
now we're outside the block again and the following unindented line will be outside of the list item |
| 133 |
this unindented line is outside of the list item |
| 134 |
- list item 2 |
| 135 |
#+BEGIN_SRC |
| 136 |
#+BEGIN_EXAMPLE |
| 137 |
#+END_SRC |
| 138 |
#+END_EXAMPLE |
| 139 |
|
| 140 |
#+BEGIN_QUOTE |
| 141 |
#+BEGIN_EXAMPLE |
| 142 |
,#+END_QUOTE |
| 143 |
#+END_EXAMPLE |
| 144 |
#+END_QUOTE |
| 145 |
|
| 146 |
- verse blocks |
| 147 |
- emacs / ox-hugo rendering |
| 148 |
#+BEGIN_EXPORT html |
| 149 |
<p class="verse"> |
| 150 |
Great clouds overhead<br /> |
| 151 |
Tiny black birds rise and fall<br /> |
| 152 |
Snow covers Emacs<br /> |
| 153 |
<br /> |
| 154 |
---AlexSchroeder<br /> |
| 155 |
</p> |
| 156 |
#+END_EXPORT |
| 157 |
- go-org rendering |
| 158 |
#+BEGIN_SRC html |
| 159 |
<style> |
| 160 |
.verse-block p { white-space: pre; } |
| 161 |
.verse-block p + p { margin: 0; } |
| 162 |
</style> |
| 163 |
#+END_SRC |
| 164 |
|
| 165 |
#+BEGIN_EXPORT html |
| 166 |
<style> |
| 167 |
.verse-block p { white-space: pre; } |
| 168 |
.verse-block p + p { margin: 0; } |
| 169 |
</style> |
| 170 |
#+END_EXPORT |
| 171 |
|
| 172 |
#+BEGIN_VERSE |
| 173 |
Great clouds overhead |
| 174 |
Tiny black birds rise and fall |
| 175 |
Snow covers Emacs |
| 176 |
|
| 177 |
---AlexSchroeder |
| 178 |
#+END_VERSE |
| 179 |
|
| 180 |
#+BEGIN_SRC raku :results output :noweb strip-export :exports both |
| 181 |
<<defn>>describe <a b c>; |
| 182 |
#+END_SRC |