kaushalmodi / ox-hugo

A carefully crafted Org exporter back-end for Hugo
https://ox-hugo.scripter.co
GNU General Public License v3.0
867 stars 130 forks source link

Hope to support \newline in Latex #658

Closed LuciusChen closed 2 years ago

LuciusChen commented 2 years ago

Actual Behavior

image

Expected Behavior

image

Hope to support \newline in Latex

kaushalmodi commented 2 years ago
kaushalmodi commented 2 years ago

If the purpose is to just have a syntax to force a newline in the export, ox-hugo supports the \\ characters at the end of line. See https://orgmode.org/manual/Paragraphs.html.

So this:

abc \\
def

will export to

abc <br />
def

I hope that helps. As of now, I am not seeing a good reason to support special LaTeX syntax for newline when Org mode already has built-in support.

Let me know if the \\ works for you.

LuciusChen commented 2 years ago

Thanks for the reply, I knew about \\, but in org-roam-ui it only supports \newline.😂

kaushalmodi commented 2 years ago

Can you open a request on org-roam-ui to support the standard Org syntax \\ for newlines? As you might have realized, \newline is not support by ox-html or ox-md. And so ox-hugo has very little reason to support that.

Alternatively, you can use one of the filter hooks ( https://orgmode.org/manual/Advanced-Export-Configuration.html ) to add support for this in your Emacs config.

LuciusChen commented 2 years ago

Thanks, I'll take a look at this and then go to org-roam-ui and make a request.