all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* How create a hook before export ONLY to text
@ 2020-08-03 14:42 pineiden
  2020-08-04 12:18 ` Russell Adams
  0 siblings, 1 reply; 3+ messages in thread
From: pineiden @ 2020-08-03 14:42 UTC (permalink / raw)
  To: Emacs-orgmode@gnu.org

[-- Attachment #1: Type: text/plain, Size: 924 bytes --]

Hi friends.

First time here, I have a couple of years working with org and i love it.
Now I have a problem.
I discovered the plantuml language to create nice charts, also I have minted configured to transform in latex to pdf.
But minted doesn't have the lexer so throws error.
I think, if there are a simple solution to do that.
A hook, maybe this:

org-export-before-parsing-hook

To parse or use 'sed' i don't know yet. To change the "#+BEGIN_SRC plantuml" to "#+BEGIN_SRC text" or similar.

So, what i need to know or do?
I know a little of lisp, i understand i have to:

- condition export to latex (only, because html is fine)
- if use plantuml change, if not not
- in latex has to create \begin{minted}[text] and not
\begin{minted}[plantuml]

Or, there are a general form to drop the minted on languages that not has lexer? Using emacs-org

Best regards!!

Sent with [ProtonMail](https://protonmail.com) Secure Email.

[-- Attachment #2: Type: text/html, Size: 1326 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread
* Re: How create a hook before export ONLY to text
@ 2020-08-07 20:07 pineiden
  0 siblings, 0 replies; 3+ messages in thread
From: pineiden @ 2020-08-07 20:07 UTC (permalink / raw)
  To: emacs-orgmode@gnu.org

[-- Attachment #1: Type: text/plain, Size: 1063 bytes --]

Hi.

I have some example

Here the in org, the source code:

#+NAME: secuencia_1
#+ATTR_LATEX: :width 0.6
#+BEGIN_SRC plantuml :file ./img/secuencia_1.png
actor Usuario
Usuario -> Computador : iniciar programa
Computador -> Usuario : pedir nombre
Usuario -> Computador : entregar nombre
Computador -> Usuario : saludar
#+END_SRC

Now, with minted, the latex:

\begin{minted}[frame=lines,fontsize=\scriptsize,xleftmargin=\parindent,linenos,frame=single]{plantuml}
actor Usuario
Usuario -> Computador : iniciar programa
Computador -> Usuario : pedir nombre
Usuario -> Computador : entregar nombre
Computador -> Usuario : saludar
\end{minted}

So, minted doesn't know plantuml and throws the error.

I need some like that:

\begin{code}[frame=lines,fontsize=\scriptsize,xleftmargin=\parindent,linenos,frame=single]{plantuml}
actor Usuario
Usuario -> Computador : iniciar programa
Computador -> Usuario : pedir nombre
Usuario -> Computador : entregar nombre
Computador -> Usuario : saludar
\end{code}

br!

Sent with [ProtonMail](https://protonmail.com) Secure Email.

[-- Attachment #2: Type: text/html, Size: 1894 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-08-07 20:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-08-03 14:42 How create a hook before export ONLY to text pineiden
2020-08-04 12:18 ` Russell Adams
  -- strict thread matches above, loose matches on Subject: below --
2020-08-07 20:07 pineiden

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.