.Kind (page): .Type (posts) / .Layout ()
Bundle: n/a (regular page)
ox-hugo Test Site

This is the test site for the ox-hugo package for Emacs/Org-mode.

It is updated automatically after each commit to the ox-hugo repo. It was last updated on May 27, 2022 19:44 UTC.

This page was created/modified in commit 1a6acb5 "fix!: Export Org Verse blocks in div tags instead of p tags" on 2022-05-10.

# Verse for indentation

tags: verse

### Description/Summary

Some text before indented text.  Text indented by 4 spaces Org removes indentation from the first line of the text block even in a Verse block. To get around that, the trick is to use the > character before the required indentation spaces only on the first non-blank line in a Verse block. Only that first > character is removed when translating to Markdown. More examples # More indentation than in the above example:

### Content

Some text before indented text.

Text indented by 4 spaces

Org removes indentation from the first line of the text block even in a Verse block. To get around that, the trick is to use the > character before the required indentation spaces only on the first non-blank line in a Verse block. Only that first > character is removed when translating to Markdown.

## More examples #

• More indentation than in the above example:

Text indented by 8 spaces

• Leading blank line followed by indented text:

Text indented by 4 spaces
• Indented text followed by a trailing blank line:

Text indented by 4 spaces

• Using tab characters for indentation; each tab character still constitutes for one &nbsp; in HTML.

Text indented by 4 tab characters

## Corner cases #

 0 1 2 3 4 5 6  #+begin_verse >Line 1 above was empty. So the first =>= seen on this line is removed. Line 3 had no =>= char. > ← See that this =>= on line 4 is retained even at the beginning of the line. Line 5 has this > charcter in-between and is retained. #+end_verse 

Only the first > character immediately following spaces and empty lines will be removed:

Line 1 above was empty. So the first > seen on this line is removed.
Line 3 had no > char.
> ← See that this > on line 4 is retained even at the beginning of the line.
Line 5 has this > charcter in-between and is retained.

If someone really wants to have > as the first non-blank character in the final output, they can use >> instead.. only for that first instance. The below Verse block is same as above except that the first > is retained in the final output.

 0 1 2 3 4 5 6  #+begin_verse >>Line 1 above was empty. So *only* the first =>= seen on this line is removed. Line 3 had no =>= char. > ← See that this =>= on line 4 is retained even at the beginning of the line. Line 5 has this > charcter in-between and is retained. #+end_verse 

>Line 1 above was empty. So **only** the first > seen on this line is removed.
Line 3 had no > char.
> ← See that this > on line 4 is retained even at the beginning of the line.
Line 5 has this > charcter in-between and is retained.

### Page (Debug)

Page VariableValue
Name "Verse for indentation"
Title "Verse for indentation"
ResourceType "page"
Kind "page"
Section "posts"
Draft false
Type "posts"
Layout ""
Data
 page.Data{} (type:page.Data)
NextPageUsing Org macros in lieu of Hugo shortcodes
PrevPageWhitespace trimming around special blocks
NextInSectionUsing Org macros in lieu of Hugo shortcodes
PrevInSectionWhitespace trimming around special blocks

### Page Params (Debug)

KeyTypeValue
draftbool false
iscjklanguagebool false
lastmodtime.Time 2022-05-10 14:48:57 -0400 -0400
tags[]string "verse"
titlestring "Verse for indentation"

### File Object (Debug)

FileInfo VariableValue
UniqueID "a78d092ba4eb47498789d91d741f862e"
BaseFileName "verse-for-indentation"
TranslationBaseName "verse-for-indentation"
Lang "en"
Section "posts"
LogicalName "verse-for-indentation.md"
Dir "posts/"
Ext "md"
Path "posts/verse-for-indentation.md"

This site is generated using the ox-hugo package for Emacs/Org-mode + hugo-bare-min-theme + Hugo 0.99.1 (commit d524067382e60ce2a2248c3133a1b3af206b6ef1) . This site is powered by Netlify.