emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Org inside LaTeX (a poor man's approach with LuaTeX)


From: Juan Manuel Macías
Subject: Org inside LaTeX (a poor man's approach with LuaTeX)
Date: Sat, 25 Jun 2022 03:10:20 +0000

Hi all,

I know some old school LaTeX users who are interested in giving Org a
try, but seem to have a hard time getting out of their LaTeX comfort
zone. So I thought maybe it wouldn't be a bad idea to invite them to try
some Org doses without leaving LaTeX. I got the idea from the LaTeX
markdown package... With one drastic difference: the markdown package
includes a complete LaTeX markdown parser. Mine is just a poor man hack
that runs emacs --batch through Lua.

For example, you can put things like this in a LaTeX document:

\begin{luacode*}

org = [[

* Section

/Lorem ipsum dolor/

*Lorem ipsum dolor*

#+caption: Lorem ipsum dolor
#+ATTR_LaTeX: :booktabs t
|-------------+-------------+-------------|
| lorem       | ipsum       | dolor       |
|-------------+-------------+-------------|
| lorem ipsum | lorem ipsum | lorem ipsum |
| lorem ipsum | lorem ipsum | lorem ipsum |
| lorem ipsum | lorem ipsum | lorem ipsum |
| lorem ipsum | lorem ipsum | lorem ipsum |
|-------------+-------------+-------------|
| lorem ipsum | lorem ipsum | lorem ipsum |
|-------------+-------------+-------------|

]]

org_output()

\end{luacode*}

Unfortunately I've only gotten it to work this way explicitly. If I try
to define a macro or environment to make it simpler, it returns errors
everywhere.

If anyone wants to try it, I am attaching to this email a 'test.tex'
document that contains everything you need. You just have to compile it
with lualatex.

Best regards and happy weekend,

Juan Manuel

Attachment: test.tex
Description: TeX document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]