π

lazyblorg: Syntax-tests of the Currently Supported Org mode Syntax Elements from the Parser and HTMLizer

Show Sidebar

This is a test entry for testing all currently implemented Org mode syntax elements.

Please do learn about the supported Org mode elements on this wiki page.

You can find following files online in order to be able to compare the Org mode source with the generated files from the result:

Implicit Org mode Elements in This File

Drawers and Time-Stamps

Note: the time-stamps in the LOGBOOK and PROPERTIES drawers above are set to different days so that it is possible to check which time-stamp is used for what blog elements.

A copy of the header

CLOSED: [2014-01-30 Thu 13:01]
:LOGBOOK:
- State "DONE"       from "DONE"       [2014-02-01 Sat 15:03]
- State "DONE"       from ""           [2014-01-30 Thu 14:02]
:END:
:PROPERTIES:
:CREATED:  [2014-01-28 Tue 12:00]
:ID: 2014-01-27-full-syntax-test
:END:	  

Basic Text Formatting

This is bold and bold case. And this is teletype style.

And this is inline verbatim text also on the end of a line

Examples with line-breaks in between: This is a bold sentence which has a line break.

yqrashawn has implemented support for strike-through. Thank you very & very much. Even at the end of the line

Comment Lines Starting With Hashes

According to the org-mode manual, lines starting with the character '#' should be ignored.

## This is part of the output

URLs

Without brackets: http://heise.de

With brackets and no description: http://heise.de

With brackets and a description: heise

URLs with line breaks within: this is a very tough example of an url like this which is very long.

Multiple URLs in one line: http://heise.de http://heise.de heise

Links to IDs

You'll need a blog article PROPERTY drawer with an :ID: property set to a value like the following:

:PROPERTIES:
:CREATED:  [2014-01-28 Tue 12:00]
:ID: 2014-01-27-full-syntax-test
:END:	  

Now you are able to link to this article and lazyblorg creates a HTML link to the resulting article page:

simple links: 2014-01-27-full-syntax-test

with description: this is the description text

with formatted description: this is a formatted description text

Deprecated HTML-blocks

Previous to Org mode version 8, HTML blocks could be defined like:

This is without any title

Example HTML snippet
:

<b>This is with a title</b>
<ul>
  <li>example list item</li>
</ul>

HTML-blocks

This is without any title

Example HTML snippet
:

<b>This is with a title</b>
<ul>
  <li>example list item</li>
</ul>

Lower-case example. This is without any title

EXAMPLE-blocks

UPPER-case example without name
  indented line
     another indented line
This is *bold* and ~teletype~ with an URL https://github.com/novoid/lazyblorg and such.

  Last line.

This is a multi-line paragraph to demonstrate the behavior of line
break and so on. As you can see, the line breaks are now different
from Org mode source or not.	  
lower-case example without name	  

a name

UPPER-case example with name	  

Another name

lower-case example with name	  

COLON-blocks

This is how a colon-block looks like in Org mode:

: This is an example colon-block as shown in Org mode
:
: It can consist of multiple lines.
: This is *bold* and ~teletype~ with an URL https://github.com/novoid/lazyblorg and such.
: explicit URL [[http://Karl-Voit.at]]
:
: However, the current parser needs at least one empty line following a colon block.	  

This is what lazyblorg does with it:

 This is an example colon-block as shown in Org mode

 It can consist of multiple lines.
 This is *bold* and ~teletype~ with an URL https://github.com/novoid/lazyblorg and such.
 explicit URL [[http://Karl-Voit.at]] and
 a non-existent internal id reference [[id:ignoreme-not-existing]]
 also with some description [[id:ignoreme-not-existing][this is a description]]

 However, the current parser needs at least one empty line following a colon block.	  

QUOTE-blocks

UPPER-case quote without name indented line another indented line This is bold and teletype with an URL https://github.com/novoid/lazyblorg and such.
Last line.
This is a multi-line paragraph to demonstrate the behavior of line break and so on. As you can see, the line breaks are now different from Org mode source or not.
lower-case quote without name
UPPER-case quote with name
lower-case quote with name

VERSE-blocks

UPPER-case verse without name
  indented line
     another indented line
This is bold and teletype with an URL https://github.com/novoid/lazyblorg and such.

  Last line.

This is a multi-line paragraph to demonstrate the behavior of line
break and so on. As you can see, the line breaks are now different
from Org mode source or not.	  
lower-case verse without name	  

a name

UPPER-case verse with name	  

Another name

lower-case verse with name	  

SRC-blocks

UPPER-case src without name
  indented line
     another indented line
This is *bold* and ~teletype~ with an URL https://github.com/novoid/lazyblorg and such.

  Last line.

This is a multi-line paragraph to demonstrate the behavior of line
break and so on. As you can see, the line breaks are now different
from Org mode source or not.	  
lower-case src without name	  

a name

UPPER-case src with name	  

Another name

lower-case src with name	  

test = 42;
print "Hello Python world!"
if test == 42:
    print "yes, it is 42"
else:
    print "there is something phishy around here."	  

LaTeX-blocks

This is a mixed case LaTeX block without a name. Indented line.

Another paragraph.

Mathematical expression: $42 * 7 = \frac{c}{45x}$

This is the caption
This is the first column This is the second This is the third
foo bar baz
1 2 3
This is verbatim.
   Second line.

   Third line.

This is verse. Second line.

Third line.

This is qote. Second line.

Third line.

$$\begin{aligned} \label{eq:my-eqn-array} x^2_\text{eff} = \frac{\text{result}}{42*23/7}\end{aligned}$$

This is an UPPER case LaTeX block without a name.

This is a lower case LaTeX block without a name.

noexport-tags in headings

not ignored because it got no :noexport: tag set

This is somewhat tricky because it contains a tag surrounded by colons.

not ignored because it got no :NOEXPORT: tag set

This is somewhat tricky because it contains a tag surrounded by colons.

Hidden blog entries

If you tag an lazyblorg-blog-entry with "hidden" (TAG_FOR_HIDDEN), the blog article will be generated. However, there will be no link in the Atom feeds, no link from the entry page, and no link on the navigation pages.

Horizontal Rule

Horizontal rules end up only in a wider vertical space.

Between this and the previous paragraph, there is no horizontal rule.

Between this and the previous paragraph, there was an horizontal rule.

Lists

Simple lists:

Ordered lists with multi-line items:

  1. first line
  2. second line
    1. another list in a list with very long lines that are too long for one line; in fact, this list item spans over a couple of lines - more than even two of them
    2. don't get confused
      1. even more lists
      2. bah!
  3. back to first list

Mixed lists:

  1. first line
  2. second line
    • another list in a list
    • don't get confused
      1. even more lists
      2. bah!
  3. back to first list

Tables

A basic table:

Season Sports
Winter Skiing
Summer Bathing
Season Light
Winter low
Summer much
Header1 a wide column is here Something else
foo bar This is a really, really, really, extra wide column as well to show how wide tables are done 23
Hänsel und Gretel 42.77
65.77

Complex table:

What Amount Sum Notes
My Roses 42.23 12 506.76 best roses evar
internal link test 10 2 20 Umlaut test: öÄß

Customized Link Images

Because lazyblorg is using multiple clever ways of including image files, I will one more link you to the corresponding wiki page that explains everything in detail.

These are some beautiful photographs I want to include here:

A completely different description here

And now we do test images with captions and attributes. Here is an image with a caption and attributes for alt, title (ignored), align, and width:

Stars in a Tree
Some beautiful stars in a tree

If you define multiple caption lines, only the last one is used in the result:

An alternative description image
This is the only caption for this image.

Of course, you can use multiple ATTR_HTML lines to define multiple parameters in multiple lines. Following example consists of three lines. First: alt. Second: title (still ignored). Third: align and width.

Notice when there is a CAPTION, the description of the Org mode link gets ignored. I do think that if you invest effort to define an extra line for it, it should replace the Org mode description. Usually, you're not going to use both.

This is going to be the alt parameter of the img tag
This is going to be the caption

This is a real-world example: An Org mode link with its description (used for caption) with attributes for alt, align, and width:

This is going to be the alt parameter of the img tag
This is the caption of the image

If you want to justify the images, you can do it with :align left like in the following example:

left-justified stars
Test for left-justified image with 300px width

Same example but with :align center:

center-justified stars
Test for center-justified image with 300px width

And of course, there is the :align right example as well:

right-justified stars
Test for right-justified image with 300px width

Following example is a really smart one. Above file names were 2017-03-11T18.29.21 Sterne im Baum -- mytag publicvoit.jpg. This time, I am using 2017-03-11T18.29.21.jpg which matches the very same time-stamp of the other image file. The rest of it differs: missing Sterne im Baum -- mytag. In case an image file (containing a time-stamp) is not found, lazyblorg tries to locate the same time-stamp within a different file-name. If the result is unique, it is used instead of the other filename. You get a warning in the log output.

Unfortunately, I had to disable this on 2021-11-21 because somehow the time-stamp was not unique any more. The file is re-used for many purposes which may cause the index to contain it more than once.

 #+CAPTION: Test with image file whose name only matches the ISO timestamp (partial comparison)
 #+ATTR_HTML: :align center :width 300
 [[tsfile:2017-03-11T18.29.21.jpg]]	  

Small images are really sexy when the text is floating around. Try the :align float-right attribute:

Image float right

This is an example text. This is an example text. This is an example text. This is an example text. This is an example text. This is an example text. This is an example text. This is an example text. This is an example text. This is an example text. This is an example text. This is an example text. This is an example text. This is an example text. This is an example text. This is an example text. This is an example text. This is an example text. This is an example text. This is an example text. This is an example text. This is an example text. This is an example text.

And here is an example with float-left attribute:

Image float left

This is an example text. This is an example text. This is an example text. This is an example text. This is an example text. This is an example text. This is an example text. This is an example text. This is an example text. This is an example text. This is an example text. This is an example text. This is an example text. This is an example text. This is an example text. This is an example text. This is an example text. This is an example text. This is an example text. This is an example text. This is an example text. This is an example text. This is an example text.

Linked image versions

With https://github.com/novoid/lazyblorg/issues/17 lazyblorg added support for linked images and defining its width.

 #+ATTR_HTML: :linked-image-width [none|original|<integer>]	  

The none option causes no linked-image being generated. original links an image that has the same dimensions than the original one. Any <integer> defines the new width of the linked image.

An alternative description image
Test image without linking a larger version because I chose attribute value "none".

Original of 2017-03-11T18.29.21 Sterne im Baum -- mytag publicvoit.jpg has 800x600 pixel.

Original of 2019-07-29T19.57.10 This is my Life -- sign specialL cliparts publicvoit.jpg has 1000x750 pixel.

This is an alternative text.
Let's link the full size original image here. Width should be 1000 pixel. (click for a larger version)

Original of 2019-07-26T11.44.35 Shinjuku - Skyline -- specialP publicvoit.jpg has 1000x1333 pixel. The following commands integrates the image with a height of 200 into the blog article. However, the linked larger version gets scaled to a height of 750 pixel and exif tags gets removed as well.

alternative-text for the image
With this image, lazyblorg is going to scale it to 750 pixel width. (click for a larger version)

URLs in image descriptions

Image link descriptions can contain URLs. Those URLs get used as a href link for the whole image.

 [[tsfile:2017-03-11T18.29.21 Sterne im Baum -- mytag publicvoit.jpg][https://karl-voit.at]]	  

For obvious reasons, this must not be used with :linked-image-width other than none.

An alternative description image
Test image with URL description.

The following snippet would result in an error if it was not just a comment: "image with URL as description ("https://karl-voit.at"; which will result in a href link) used an linked-image-width parameter value which is not none ("345") which would also result in a href link. Please do remove one of them."

 #+CAPTION: Test image with URL description.
 #+ATTR_HTML: :alt An alternative description image :title This is my title! :align right :width 300
 #+ATTR_HTML: :linked-image-width 345
 [[tsfile:2017-03-11T18.29.21 Sterne im Baum -- mytag publicvoit.jpg][https://karl-voit.at]]	  

Related articles that link to this one:

Comment via email (persistent) or via Disqus (ephemeral) comments below: