#+HUGO_BASE_DIR: ../ #+SEQ_TODO: TODO DRAFT DONE * Preparation :PROPERTIES: :EXPORT_FILE_NAME: prep :EXPORT_DATE: 2017-07-12T17:05:38-04:00 :END: 1. Be the root directory for this Hugo site (the directory containing =config.toml=). 2. Run #+BEGIN_EXAMPLE hugo server --port 1111 #+END_EXAMPLE 3. See the site served on "http://localhost:1111/". * Post 1 :PROPERTIES: :EXPORT_FILE_NAME: post-1 :EXPORT_DATE: 2017-07-12T17:31:56-04:00 :END: Export this *first* post only by bringing point here and doing =M-x org-hugo-export-subtree-to-md=. * Post 2 :PROPERTIES: :EXPORT_FILE_NAME: post-2 :EXPORT_DATE: 2017-07-12T17:05:38-04:00 :END: Export this *second* post only by bringing point here and doing =M-x org-hugo-export-subtree-to-md=. * Image :PROPERTIES: :EXPORT_TAGS: image :END: ** Image links :PROPERTIES: :EXPORT_FILE_NAME: image-links :EXPORT_DATE: 2017-07-15T07:49:44-04:00 :END: This is some text before the first heading of this post. *** Unclickable image (works!) [[/images/org-mode-unicorn-logo.png]] ----- +To be fixed+ (*Now fixed*): The sub-headings in a post get exported as /Heading 1/ instead of /Heading 2/. For example, this sub-section's heading is exported as: #+BEGIN_EXAMPLE # Unclickable image #+END_EXAMPLE instead of #+BEGIN_EXAMPLE ## Unclickable image #+END_EXAMPLE ----- *Solution*: Above is fixed by setting =HUGO_OFFSET_LEVEL= to 1. So the sub-heading title and the post title both get the /Heading 1/ tag and look the same size. *** Clickable link that opens the image (works!) [[/images/org-mode-unicorn-logo.png][Click here to see the unicorn]] *** Clickable image that opens the image (works!) Click below image to jump to the unicorn image. [[file:/images/org-mode-unicorn-logo.png][file:/images/org-mode-unicorn-logo.png]] - NOTE :: =file:= has to be used in both Link and Description components of the Org link. *** Image with =ATTR_HTML= [[https://github.com/kaushalmodi/ox-hugo/issues/17][Issue # 17]] #+ATTR_HTML: :class inset [[/images/org-mode-unicorn-logo.png]] [[https://github.com/kaushalmodi/ox-hugo/issues/17#issuecomment-313627728][Discussion]] **** COMMENT Below will not work! You cannot wrap markdown code inside HTML. As /rdwatters/ says [[https://discourse.gohugo.io/t/is-it-possible-to-insert-html-code-in-markdown-content/4867/4?u=kaushalmodi][here]], #+BEGIN_QUOTE HTML can be part of markdown because HTML-inside-markdown is part of the spec. That said, remember that the spec disallows markdown nested inside of HTML. So if you create a div, just make sure everything inside that div is valid HTML. #+END_QUOTE #+BEGIN_EXPORT md
#+END_EXPORT [[/images/org-mode-unicorn-logo.png]] #+BEGIN_EXPORT md
#+END_EXPORT *** Link to image outside of standard Hugo locations [[../src-images/copy-of-unicorn-logo.png]] ** Image captions :PROPERTIES: :EXPORT_DATE: 2017-07-19 :EXPORT_FILE_NAME: image-captions :END: Some text before image. #+CAPTION: A unicorn! [[/images/org-mode-unicorn-logo.png]] Some more text, after image. * Setting heading anchors :PROPERTIES: :EXPORT_FILE_NAME: setting-heading-anchors :EXPORT_DATE: 2017-07-12T17:05:39-04:00 :END: ** Heading 1 of the post :PROPERTIES: :CUSTOM_ID: cool-ref-1 :END: Something *** Heading 1.1 of the post :PROPERTIES: :CUSTOM_ID: cool-ref-1.1 :END: Something else ** Heading 2 of the post :PROPERTIES: :CUSTOM_ID: cool-ref-2 :END: Something 2 *** Heading 2.1 of the post :PROPERTIES: :CUSTOM_ID: cool-ref-2.1 :END: Something 2.1 * Post heading with crazy characters :PROPERTIES: :EXPORT_FILE_NAME: post-heading-slugs :EXPORT_DATE: 2017-07-12T13:46:33-04:00 :END: ** Releasing version 1.1 ** Foo ( Bar ) Baz ** (Foo)Bar.Baz&Zoo ** Hey! I have a link [[https://example.org][here]] (Awesome!) * Title in Front Matter ** Awesome title with "quoted text" :PROPERTIES: :EXPORT_FILE_NAME: post-title-quotes :EXPORT_DATE: 2017-07-24 :END: Testing a post with double quotes in the title. ** Under_scores_in_title :PROPERTIES: :EXPORT_FILE_NAME: under-scores-in-title :EXPORT_DATE: 2017-07-28 :END: Ensure that the underscores in =title= string of front matter do not get escaped.. =foo_bar= must not become =foo\_bar=. * Description meta-data with "quoted text" :PROPERTIES: :EXPORT_FILE_NAME: post-description-quotes :EXPORT_DESCRIPTION: Some description with "quoted text" :EXPORT_DATE: 2017-07-24 :END: Testing a post with double quotes in the description. * Excluded post :noexport: :PROPERTIES: :EXPORT_FILE_NAME: excluded-post :END: This post must not be exported as it is tagged =noexport=. * COMMENT Commented post :PROPERTIES: :EXPORT_FILE_NAME: commented-post :END: This post must not be exported as it is commented. * Test tags :abc:def: :PROPERTIES: :EXPORT_FILE_NAME: test-tags :EXPORT_DATE: 2017-07-12T13:48:01-04:00 :END: Testing tags set using Org tags in headings. * Section ** Articles :PROPERTIES: :EXPORT_HUGO_SECTION: articles :END: *** Article 1 :PROPERTIES: :EXPORT_FILE_NAME: article-1 :EXPORT_DATE: 2017-07-19T08:34:29-04:00 :END: First article. This will land in =content/articles/= as the parent of this subtree sets =EXPORT_HUGO_SECTION= to =articles=. Note that the theme needs to define at least the =single.html=, either in the =layouts/_default/= directory, or =layouts/articles/=, either in the Hugo base dir or the theme dir. *** Article 2 :PROPERTIES: :EXPORT_FILE_NAME: article-2 :EXPORT_DATE: 2017-07-19T08:34:22-04:00 :END: Second article. This will also land in =content/articles/= the same way. ** Emacs posts :emacs: :PROPERTIES: :EXPORT_HUGO_SECTION: posts :END: *** Emacs Post 1 :foo: :PROPERTIES: :EXPORT_FILE_NAME: emacs-post-1 :EXPORT_DATE: 2017-07-12T17:31:56-04:00 :END: Here is the first post on Emacs. *** Emacs Post 2 :bar: :PROPERTIES: :EXPORT_FILE_NAME: emacs-post-2 :EXPORT_DATE: 2017-07-12T17:31:56-04:00 :END: Here is the second post on Emacs. * Tables :table: ** Simple Table :PROPERTIES: :EXPORT_FILE_NAME: simple-table :EXPORT_DATE: 2017-07-12T19:25:56-04:00 :END: | h1 | h2 | | a | b | | c | d | ** Table with narrowest cols :PROPERTIES: :EXPORT_FILE_NAME: table-with-narrowest-columns :EXPORT_DATE: 2017-07-12T19:26:00-04:00 :END: | 1 | 2 | 3 | | a | b | e | | c | d | f | ** Table with top border :PROPERTIES: :EXPORT_FILE_NAME: table-top-border :EXPORT_DATE: 2017-07-12T19:26:04-04:00 :END: |---+---+---+---| | 1 | 2 | 3 | 4 | | a | b | e | g | | c | d | f | h | ** Table with bottom border :PROPERTIES: :EXPORT_FILE_NAME: table-bottom-border :EXPORT_DATE: 2017-07-12T19:26:06-04:00 :END: | 1 | 2 | 3 | 4 | | a | b | e | g | | c | d | f | h | |---+---+---+---| ** Table with top and bottom border :PROPERTIES: :EXPORT_FILE_NAME: table-top-and-bottom-border :EXPORT_DATE: 2017-07-12T19:26:10-04:00 :END: |---+---+---+---| | 1 | 2 | 3 | 4 | | a | b | e | g | | c | d | f | h | |---+---+---+---| ** Table with rule after first row :PROPERTIES: :EXPORT_FILE_NAME: table-only-rule-after-first-row :EXPORT_DATE: 2017-07-12T19:26:13-04:00 :END: | 1 | 2 | 3 | 4 | |---+---+---+---| | a | b | e | g | | c | d | f | h | ** Table with borders and rule after first :PROPERTIES: :EXPORT_FILE_NAME: table-with-borders-and-rule-after-first :EXPORT_DATE: 2017-07-12T19:26:16-04:00 :END: |---+---+---+---| | 1 | 2 | 3 | 4 | |---+---+---+---| | a | b | e | g | | c | d | f | h | |---+---+---+---| * Source blocks :src-block: ** Example text with code blocks :ARCHIVE: :PROPERTIES: :CUSTOM_ID: example-text-with-code-blocks :END: Here are few variables that you might like to change in the =local.mk=: - =prefix= :: Org installation directory #+BEGIN_SRC makefile prefix = /dir/where/you/want/to/install/org # Default: /usr/share #+END_SRC The =.el= files will go to =$(prefix)/emacs/site-lisp/org= by default. If you'd like to change that, you can tweak the =lispdir= variable. - =infodir= :: Org Info installation directory. I like to keep the Info file for development version of Org in a separate directory. #+BEGIN_SRC makefile infodir = $(prefix)/org/info # Default: $(prefix)/info #+END_SRC - =ORG_MAKE_DOC= :: Types of Org documentation you'd like to build by default. #+BEGIN_SRC makefile # Define below you only need info documentation, the default includes html and pdf ORG_MAKE_DOC = info pdf card # html #+END_SRC - =ORG_ADD_CONTRIB= :: Packages from the =contrib/= directory that you'd like to build along with Org. Below are the ones on my /must-have/ list. #+BEGIN_SRC makefile # Define if you want to include some (or all) files from contrib/lisp # just the filename please (no path prefix, no .el suffix), maybe with globbing # org-eldoc - Headline breadcrumb trail in minibuffer # ox-extra - Allow ignoring just the heading, but still export the body of those headings # org-mime - Convert org buffer to htmlized format for email ORG_ADD_CONTRIB = org-eldoc ox-extra org-mime #+END_SRC ** Code-fenced source blocks (default behavior) :PROPERTIES: :EXPORT_FILE_NAME: code-fenced-src-blocks-default :EXPORT_DATE: 2017-07-31 :END: The source blocks are code-fenced by default. #+INCLUDE: "./all-posts.org::#example-text-with-code-blocks" :only-contents t ** Code-fenced source blocks :PROPERTIES: :EXPORT_HUGO_CODE_FENCE: t :EXPORT_FILE_NAME: code-fenced-src-blocks :EXPORT_DATE: 2017-07-13T17:49:22-04:00 :END: Here the source blocks are explicitly set to be code-fenced by setting the =EXPORT_HUGO_CODE_FENCE= property to =t=. #+INCLUDE: "./all-posts.org::#example-text-with-code-blocks" :only-contents t ** Source blocks with =highlight= shortcode :PROPERTIES: :EXPORT_HUGO_CODE_FENCE: :EXPORT_FILE_NAME: highlight-shortcode-src-blocks :EXPORT_DATE: 2017-07-31 :END: Note that to disable the code fence option, the value portion of the property needs to be left *empty* instead of setting to =nil=! #+BEGIN_EXAMPLE :PROPERTIES: :EXPORT_HUGO_CODE_FENCE: :END: #+END_EXAMPLE #+INCLUDE: "./all-posts.org::#example-text-with-code-blocks" :only-contents t ** Source block with caption :noexport: :PROPERTIES: :EXPORT_FILE_NAME: source-block-caption :EXPORT_DATE: 2017-07-19 :END: #+CAPTION: Prefix value in =local.mk= #+BEGIN_SRC makefile prefix = /dir/where/you/want/to/install/org # Default: /usr/share #+END_SRC * Formatting :formatting: ** General :PROPERTIES: :EXPORT_DATE: 2017-07-31 :EXPORT_FILE_NAME: general-formatting :END: Below table shows the translation of Org markup to Markdown markup in the exported =.md= files. |--------------------+--------------------------------------------------------------------+-----------------------| | Org | Markdown | In Hugo rendered HTML | |--------------------+--------------------------------------------------------------------+-----------------------| | =*bold*= | =**bold**= | *bold* | | =/italics/= | =_italics_= | /italics/ | | ==monospace== | =`monospace`= | =monospace= | | =~key-binding~= | =key-binding= | ~key-binding~ | | | - if =org-hugo-use-code-for-kbd= is non-nil [default] | | | | - Requires *CSS* to render the == tag as something special. | | | =~key-binding~= | =`key-binding`= | | | | - if =org-hugo-use-code-for-kbd= is nil | | | =+strike-through+= | =~~strike-through~~= | +strike-through+ | | =_underline_= | =underline= | _underline_ | | | - Requires *CSS* to render this =underline= class as an underline. | | |--------------------+--------------------------------------------------------------------+-----------------------| ** Keyboard tag *** Use Org Code markup for =kbd= tag (default behavior) :PROPERTIES: :EXPORT_FILE_NAME: kbd-tag-default :EXPORT_DATE: 2017-07-31 :END: This is the default behavior. So =~C-h f~= will show up as =C-h f=. Example: - Few of Emacs help keybindings: ~C-h f~, ~C-h v~ *** Use Org Code markup for =kbd= tag :PROPERTIES: :EXPORT_HUGO_USE_CODE_FOR_KBD: t :EXPORT_FILE_NAME: kbd-tag-yes :EXPORT_DATE: 2017-07-31 :END: Here the Org code markup is explicitly specified to be used for == tag generation by setting =EXPORT_HUGO_USE_CODE_FOR_KBD= property to =t=. So =~C-h f~= will show up as =C-h f=. Example: - Few of Emacs help keybindings: ~C-h f~, ~C-h v~ *** Don't Use Org Code markup for =kbd= tag :PROPERTIES: :EXPORT_HUGO_USE_CODE_FOR_KBD: :EXPORT_FILE_NAME: kbd-tag-no :EXPORT_DATE: 2017-07-31 :END: Note that to disable the "use code for kbd" option, the value portion of the property needs to be left *empty* instead of setting to =nil=! #+BEGIN_EXAMPLE :PROPERTIES: :EXPORT_HUGO_USE_CODE_FOR_KBD: :END: #+END_EXAMPLE Here =~C-h f~= will show up as =`C-h f`= in Markdown and then =C-h f= in the final Hugo generated HTML. Example: - Few of Emacs help keybindings: ~C-h f~, ~C-h v~ * Example block :example: ** Simple :PROPERTIES: :EXPORT_DATE: 2017-07-19 :EXPORT_FILE_NAME: example-simple :END: #+BEGIN_EXAMPLE This is an example #+END_EXAMPLE * Menu in front matter :menu: ** Menu Meta Data in TOML Front Matter :PROPERTIES: :EXPORT_HUGO_MENU: :menu "something here" :weight 80 :parent posts :identifier foo1 :END: *** Overriding few menu properties :PROPERTIES: :EXPORT_FILE_NAME: menu-alist-meta-data-toml-override-partial :EXPORT_DATE: 2017-07-18 :EXPORT_HUGO_MENU_OVERRIDE: :weight 10 :identifier ov-partial :END: For this post, we should see just the menu /weight/ and /identifier/ properties get overridden. You need to set unique menu identifiers, else you get a Hugo error like this: #+BEGIN_EXAMPLE ERROR 2017/07/18 12:32:14 Two or more menu items have the same name/identifier in Menu "main": "menu-meta-data-in-yaml-front-matter". Rename or set an unique identifier. #+END_EXAMPLE *** Overriding menu properties completely :PROPERTIES: :EXPORT_FILE_NAME: menu-alist-meta-data-toml-override-full :EXPORT_DATE: 2017-07-18 :EXPORT_HUGO_MENU: :menu test :weight 50 :END: For this post, we see that no menu properties are inherited from the parent; only the menu properties set in his subtree are effective. *** Auto assign weights :PROPERTIES: :EXPORT_HUGO_MENU: :menu "auto weight" :END: **** Post with menu 1 :PROPERTIES: :EXPORT_FILE_NAME: post-with-menu-1 :EXPORT_DATE: 2017-07-20 :END: **** Post with menu 2 :PROPERTIES: :EXPORT_FILE_NAME: post-with-menu-2 :EXPORT_DATE: 2017-07-20 :END: **** Post with menu 3 :PROPERTIES: :EXPORT_FILE_NAME: post-with-menu-3 :EXPORT_DATE: 2017-07-20 :END: **** Post with menu 4 :PROPERTIES: :EXPORT_FILE_NAME: post-with-menu-4 :EXPORT_DATE: 2017-07-20 :END: **** Post with menu 5 :PROPERTIES: :EXPORT_FILE_NAME: post-with-menu-5 :EXPORT_DATE: 2017-07-20 :END: ** Menu Meta Data in YAML Front Matter :yaml: :PROPERTIES: :EXPORT_HUGO_FRONT_MATTER_FORMAT: yaml :END: *** White space in menu entry :PROPERTIES: :EXPORT_FILE_NAME: menu-meta-data-yaml2 :EXPORT_DATE: 2017-07-19 :EXPORT_HUGO_MENU: :menu "something here" :weight 25 :END: Testing the addition of /menu/ meta data to the YAML front matter. Here the front matter format is set to YAML using the =HUGO_FRONT_MATTER_FORMAT= key in property drawer. Here there is white space in menu entry keyword. *** White space in menu name :PROPERTIES: :EXPORT_FILE_NAME: menu-meta-data-yaml3 :EXPORT_DATE: 2017-07-19 :EXPORT_HUGO_MENU: :menu main :weight 25 :parent posts :name "Menu in YAML" :END: Testing the addition of /menu/ meta data to the YAML front matter. Here the front matter format is set to YAML using the =HUGO_FRONT_MATTER_FORMAT= key in property drawer. Here there is white space in menu name property. * Custom front matter :custom_fm: ** Custom front matter in one line :PROPERTIES: :EXPORT_FILE_NAME: custom-front-matter-one-line :EXPORT_DATE: 2017-07-24 :EXPORT_HUGO_CUSTOM_FRONT_MATTER: :foo bar :baz zoo :alpha 1 :beta "two words" :gamma 10 :END: ** Custom front matter in multiple lines :PROPERTIES: :EXPORT_FILE_NAME: custom-front-matter-multiple-lines :EXPORT_DATE: 2017-07-24 :EXPORT_HUGO_CUSTOM_FRONT_MATTER: :foo bar :EXPORT_HUGO_CUSTOM_FRONT_MATTER+: :baz zoo :EXPORT_HUGO_CUSTOM_FRONT_MATTER+: :alpha 1 :EXPORT_HUGO_CUSTOM_FRONT_MATTER+: :beta "two words" :EXPORT_HUGO_CUSTOM_FRONT_MATTER+: :gamma 10 :END: From [[http://orgmode.org/manual/Property-syntax.html][*(org) Property syntax*]]: #+BEGIN_QUOTE It is also possible to add to the values of inherited properties. The following results in the 'genres' property having the value "Classic Baroque" under the 'Goldberg Variations' subtree. #+END_QUOTE #+BEGIN_EXAMPLE ,* CD collection ,** Classic :PROPERTIES: :GENRES: Classic :END: ,*** Goldberg Variations :PROPERTIES: :Title: Goldberg Variations :Composer: J.S. Bach :Artist: Glen Gould :Publisher: Deutsche Grammophon :NDisks: 1 :GENRES+: Baroque :END: #+END_EXAMPLE * Post body :body: ** Summary Splitter :PROPERTIES: :EXPORT_FILE_NAME: summary-splitter :EXPORT_DATE: 2017-07-21 :END: Here is the summary. #+HUGO: more Here is text after the [[https://gohugo.io/content-management/summaries#user-defined-manual-summary-splitting][summary splitter]]. ** Dealing with underscores :PROPERTIES: :EXPORT_FILE_NAME: dealing-with-underscores :EXPORT_DATE: 2017-07-21 :END: This underscore should appear escaped in Markdown: _ This underscore is in a verbatim block, so it should not be escaped: =_= This underscore also shouldn't be escaped as it's in an emoji code: :raised_hands: And these ones should be eventually removed and _underline_ the text (/Requires CSS to do so./) -- *Org syntax*. ** Nested bold and italics :PROPERTIES: :EXPORT_DATE: 2017-07-22 :EXPORT_FILE_NAME: nested-bold-italics :END: - /This is italics, and *this is bold too*, and back to plain italics./ - *This is bold, and /this is italics too/, and back to plain bold.* ** Single and Double quotes :PROPERTIES: :EXPORT_FILE_NAME: single-double-quotes :EXPORT_DATE: 2017-07-22 :END: The strings in these two columns should look the exact same. | | Rendered Actual | Rendered Expection | |---+-----------------------------+-----------------------------| | 1 | 'This' | ‘This’ | | 2 | "This" | “This” | | 3 | "It's" | “It’s” | | 4 | 'It's' | ‘It’s’ | | 5 | "" | “” | | 6 | "". | “”. | #+TBLFM: $1=@#-1 *Note:* There is a rendering issue is Row 5 above. That seems to be a corner case, because notice that Row 6 looks fine just because there was a trailing period. /Will live with this issue for now./ ** /ndash/ `and` *mdash* :PROPERTIES: :EXPORT_FILE_NAME: ndash-and-mdash :EXPORT_DATE: 2017-07-22 :END: The strings in these two columns should look the exact same. | | Character | Rendered Actual | Rendered Expection | |---+-----------+-----------------+--------------------| | 1 | Hyphen | a - b | a - b | | 2 | Ndash | a -- b | a – b | | 3 | Mdash | a --- b | a — b | | 4 | Ellipsis | a ... b | a … b | #+TBLFM: $1=@#-1 *** Title sanitization This post has italics, monospace and bold in the title. This is to test that those markup characters *do not* end up in the =title= front matter of the post because HTML does not allow markup in the == section. So the title of this post should read as "ndash and mdash". * Footnotes Test :footnote: ** Footnotes 1 :PROPERTIES: :EXPORT_DATE: 2017-07-21 :EXPORT_FILE_NAME: footnotes-1 :END: This is some text[fn:1]. /Note to self: You *cannot* name an Org heading 'Footnotes'; that's reserved by Org to store all the footnotes./ ** Footnotes 2 :PROPERTIES: :EXPORT_DATE: 2017-07-21 :EXPORT_FILE_NAME: footnotes-2 :END: This is some text[fn:2]. ** Footnotes in a row :PROPERTIES: :EXPORT_FILE_NAME: footnotes-in-a-row :EXPORT_DATE: 2017-07-21 :END: This is some text[fn:1][fn:2]. ** Multiple references of same footnote :PROPERTIES: :EXPORT_FILE_NAME: multi-ref-same-footnote :EXPORT_DATE: 2017-07-21 :END: This is some text[fn:1]. This is some text[fn:1]. This is some text[fn:1]. * Tags as Categories ** Category A :@catA: *** Cat A post 1 :meow: :PROPERTIES: :EXPORT_DATE: 2017-07-24 :EXPORT_FILE_NAME: cat-a-post-1 :END: This post is in category =catA= and tagged =meow=. *** Cat A and cat B :@catB: :PROPERTIES: :EXPORT_FILE_NAME: cat-a-and-cat-b :EXPORT_DATE: 2017-07-24 :END: This gets both categories =catA= and =catB=. * Links :links: ** Within the same post *** Link to a heading CUSTOM_ID :PROPERTIES: :EXPORT_FILE_NAME: link-heading-custom-id :EXPORT_DATE: 2017-07-28 :END: *Obviously, all the =CUSTOM_ID='s set by the user in this file have to be unique.* **** Heading 1 :PROPERTIES: :CUSTOM_ID: link-heading-1 :END: - Link to [[#link-heading-2][Heading 2]] #+INCLUDE: "./all-posts.org::#lorem-ipsum" :only-contents t #+INCLUDE: "./all-posts.org::#lorem-ipsum" :only-contents t #+INCLUDE: "./all-posts.org::#lorem-ipsum" :only-contents t #+INCLUDE: "./all-posts.org::#lorem-ipsum" :only-contents t **** Heading 2 :PROPERTIES: :CUSTOM_ID: link-heading-2 :END: - Link to [[#link-heading-1][Heading 1]] * Equations :equations: ** Inline equations :PROPERTIES: :EXPORT_FILE_NAME: equation-latex-frag :EXPORT_DATE: 2017-07-31 :END: - Inline equations are wrapped between =\(= and =\)=. - =$= wrapping also works, but it is not preferred as it comes with restrictions like "there should be no whitespace between the equation and the =$= delimiters". So =$ a=b $= will not work (it will look like: $ a=b $), but =$a=b$= will work (it will look like: $a=b$). On the other hand, both =\(a=b\)= (it will look like: \(a=b\)) and =\( a=b \)= (it will look like: \( a=b \)) will work. - One-per-line equations are wrapped between =\[= and =\]= or =$$= delimiters. For example, below in Org: #+BEGIN_SRC text LaTeX formatted equation: \( E = -J \sum_{i=1}^N s_i s_{i+1} \) #+END_SRC will look like this in Hugo rendered HTML: LaTeX formatted equation: \( E = -J \sum_{i=1}^N s_i s_{i+1 }\) (Don't see this in Markdown, see what it looks after Hugo has processed it.) Here's another example, taken from [[http://orgmode.org/manual/LaTeX-fragments.html][(org) LaTeX fragments]]. Below in Org: #+BEGIN_EXAMPLE If $a^2=b$ and \( b=2 \), then the solution must be either $$ a=+\sqrt{2} $$ or \[ a=-\sqrt{2} \] #+END_EXAMPLE renders to: If $a^2=b$ and \( b=2 \), then the solution must be either $$ a=+\sqrt{2} $$ or \[ a=-\sqrt{2} \] (Note that the last two equations show up on their own lines.) * Lists :lists: ** List following a list :PROPERTIES: :EXPORT_FILE_NAME: list-following-a-list :EXPORT_DATE: 2017-07-31 :END: You need to force end of list when you have something like an unordered list immediately following an ordered list. /The easiest and cleanest way to do that is adding a comment between those lists./ -- [[https://stackoverflow.com/a/8964494/1219634][Reference]] That would be the implementing in the Org exporter backend. But in Org, two consecutive blank lines after a list ends the list. In the below example, the /foo*/ items would be in a different =<ul>= element than the /bar*/ items. *** Unordered list following an unordered list - foo1 - foo2 + bar1 + bar2 *** Unordered list following an ordered list 1. foo3 2. foo4 - bar3 - bar4 *** Ordered list following an unordered list - foo5 - foo6 1. bar5 2. bar6 *** Description list following an ordered list - foo1 - foo2 - bar1 :: description - bar2 :: description ** Nested lists :PROPERTIES: :EXPORT_FILE_NAME: nested-lists :EXPORT_DATE: 2017-07-31 :END: + foo1 + foo2 - bar1 - bar2 + baz1 + baz2 - zoo1 - zoo2 1. numbered1 2. numbered2 ** Force ordered list numbering :PROPERTIES: :EXPORT_DATE: 2017-08-01 :EXPORT_FILE_NAME: force-ordered-list-numbering :END: 1. This will be 1. 1. This will be 2. 1. [@10] This will be 10! 1. This will be 11. 1. [@17] This will be 17! 1. This will be 18. 1. [@123] This will be 123! 1. This will be 124. 1. This will be 1 again. 1. This will be 2. Another example: 1. This will be 1. 1. [@3] This will be 3! 1. [@7] This will be 7! 1. [@100] This will be 100! See [[http://orgmode.org/manual/Plain-lists.html][(org) Plain lists]] to read more about plain lists in Org. * Quotes :quotes: ** Consecutive quotes :PROPERTIES: :EXPORT_FILE_NAME: consecutive-quotes :EXPORT_DATE: 2017-08-01 :END: Some text. #+BEGIN_QUOTE Quote 1. This is a long quote that auto-fills into multiple lines in Org, but it will be a single paragraph in the exported format. #+END_QUOTE #+BEGIN_QUOTE Quote 2. This is a short quote. #+END_QUOTE #+BEGIN_QUOTE Quote 3. This is a multi-paragraph quote. This is the second paragraph. #+END_QUOTE Some other text. * Verse :verse: ** One verse :PROPERTIES: :EXPORT_DATE: 2017-08-01 :EXPORT_FILE_NAME: one-verse :END: To preserve the line breaks, indentation and blank lines in a region, but otherwise use normal formatting, you can use the /verse/ construct, which can also be used to format poetry -- [[http://orgmode.org/manual/Paragraphs.html][Reference]]. #+BEGIN_VERSE Great clouds overhead Tiny black birds rise and fall Snow covers Emacs -- AlexSchroeder #+END_VERSE ** Consecutive verses :PROPERTIES: :EXPORT_DATE: 2017-08-01 :EXPORT_FILE_NAME: consecutive-verses :END: #+BEGIN_VERSE Tyger Tyger, burning bright, In the forests of the night; What immortal hand or eye, Could frame thy fearful symmetry? In what distant deeps or skies. Burnt the fire of thine eyes? On what wings dare he aspire? What the hand, dare seize the fire? -- "The Tyger" /by/ William Blake #+END_VERSE #+BEGIN_VERSE Some parts can be *bold* Some can be =monospace= Some can be /italic/ too. #+END_VERSE #+BEGIN_VERSE What is this life if, full of care, We have no time to stand and stare. No time to stand beneath the boughs And stare as long as sheep or cows. No time to see, when woods we pass, Where squirrels hide their nuts in grass. -- "Leisure" /by/ William Henry Davis #+END_VERSE * TODO Pre-Draft State :PROPERTIES: :EXPORT_FILE_NAME: draft-state-todo :EXPORT_DATE: 2017-07-12T17:05:41-04:00 :END: If a post has the =TODO= keyword, the =draft= front matter variable should be set to =true=. Idea to to mark a post or blog idea as =TODO= that you yet have to start writing. * DRAFT Draft state :PROPERTIES: :EXPORT_FILE_NAME: draft-state-draft :EXPORT_DATE: 2017-07-12T13:46:16-04:00 :END: If a post has the =DRAFT= keyword too, the =draft= front matter variable should be set to =true=. Idea is to mark a post as =DRAFT= that you have already started writing, or are in the process at the moment, but it is not yet ready to be published * Lorem Ipsum :ARCHIVE:noexport: :PROPERTIES: :CUSTOM_ID: lorem-ipsum :END: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque et quam metus. Etiam in iaculis mi, sit amet pretium magna. Donec ut dui mi. Maecenas pharetra sapien nunc, ut mollis enim aliquam quis. Nam at ultricies metus. Nulla tempor augue in vestibulum tristique. Phasellus volutpat pharetra metus quis suscipit. Morbi maximus sem dolor, id accumsan ipsum commodo non. Fusce quam ligula, gravida ac dui venenatis, bibendum commodo lorem. Duis id elit turpis. Integer sed diam nibh. Donec tempus lacinia odio, a laoreet velit dictum id. Suspendisse efficitur euismod purus et porttitor. Aliquam sit amet tellus mauris. Mauris semper dignissim nibh, faucibus vestibulum purus varius quis. Suspendisse potenti. Cras at ligula sit amet nunc vehicula condimentum quis nec est. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Donec iaculis, neque sit amet maximus rhoncus, nisl tortor convallis ante, ut mollis purus augue ut justo. Praesent felis urna, volutpat sit amet posuere dictum, luctus quis nibh. Proin et tristique ipsum, in aliquam ante. Aenean eget ex mauris. Cras ut tempor quam. Curabitur eget nulla laoreet, bibendum neque porta, tempus nulla. Ut tellus nisi, semper eu ligula pretium, aliquam accumsan dolor. Nunc fermentum cursus arcu eu suscipit. Nam dolor tellus, efficitur sed condimentum at, fringilla eget nisi. Nulla luctus metus felis. Suspendisse potenti. Cras lacinia orci nec dui sodales commodo. Donec tellus arcu, congue porta ultrices non, pretium et sapien. Proin mattis risus dignissim feugiat tristique. Donec nibh lorem, facilisis id posuere ut, varius ac urna. Etiam ultrices dignissim mauris, quis venenatis ex semper ut. Curabitur id fermentum erat, rhoncus scelerisque est. Sed pulvinar, nulla sed sollicitudin scelerisque, ipsum erat sollicitudin dolor, ut commodo arcu justo vel libero. Curabitur turpis dolor, fermentum ut elit a, vehicula commodo nunc. Sed sit amet blandit nulla, quis sodales massa. Donec lobortis, urna vel volutpat ullamcorper, mauris est efficitur nulla, et suscipit velit dui at metus. Aliquam id sem sed metus tristique scelerisque nec vitae odio. Phasellus a pellentesque libero, vel convallis metus. Sed nec fringilla magna, non varius ex. Sed interdum eleifend ligula, quis porta enim ultrices a. Donec hendrerit diam ac elementum tincidunt. Pellentesque eget nisl rhoncus, malesuada justo nec, suscipit quam. Nam sodales mauris eu bibendum suscipit. Vivamus sodales dui lorem, scelerisque pellentesque diam fermentum sed. Etiam fermentum nisl id nisl blandit, sit amet semper erat ultricies. Nulla tincidunt nulla metus, eu imperdiet lorem malesuada sagittis. Maecenas accumsan risus sed ante eleifend, vitae pretium leo porta. Suspendisse vitae eros vitae dui ornare condimentum id sit amet mauris. Etiam tincidunt consequat risus, eu posuere mi. Donec ut nunc eu massa porttitor suscipit nec nec neque. Suspendisse vitae tincidunt justo, sed molestie velit. Nullam pellentesque convallis ante, vel posuere libero blandit in. # a comment forces paragraph break in Org * Footnotes [fn:2] Second footnote [fn:1] First footnote * COMMENT Local Variables :ARCHIVE: # Local Variables: # fill-column: 70 # eval: (auto-fill-mode 1) # End: