emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Re [Patch] Pre-/postpend arbitrary LaTeX code to a section
@ 2022-09-19  8:59 Pedro Andres Aranda Gutierrez
  2022-09-20 13:19 ` Ihor Radchenko
  0 siblings, 1 reply; 5+ messages in thread
From: Pedro Andres Aranda Gutierrez @ 2022-09-19  8:59 UTC (permalink / raw)
  To: Org Mode List, maciaschain

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

HI Juan Manuel,

Looks cool and would be a +1 from my side, since I need that too...

Can it be extended to add properties to a
#BEGIN_example
#END_example
snippet?

I already suggested that some time ago...

/PA
-- 
Fragen sind nicht da um beantwortet zu werden,
Fragen sind da um gestellt zu werden
Georg Kreisler

Headaches with a Juju log:
unit-basic-16: 09:17:36 WARNING juju.worker.uniter.operation we should run
a leader-deposed hook here, but we can't yet

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

^ permalink raw reply	[flat|nested] 5+ messages in thread
* Re: Re: [Patch] Pre-/postpend arbitrary LaTeX code to a section
@ 2022-09-22  6:31 Pedro Andres Aranda Gutierrez
  0 siblings, 0 replies; 5+ messages in thread
From: Pedro Andres Aranda Gutierrez @ 2022-09-22  6:31 UTC (permalink / raw)
  To: Org Mode List

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

Ihor writes;

> More concretely, I mean something like
>
> * Section
>   :PROPERTIES:
>   :attr_latex: :prepend "section" \setcounter{secnumdepth}{0}
>   :attr_latex+: :prepend "section"
\addtocontents{toc}{\protect\setcounter{tocdepth}{0}\ignorespaces}
>   :attr_latex+: :append "section" \setcounter{secnumdepth}{2}
>   :attr_latex+: :append "section"
\addtocontents{toc}{\protect\setcounter{tocdepth}{2}\ignorespaces}
>   :END:

Could do if it where for the 'little' detail that a section is not an
environment in Latex
The ORG document structure mimics the LaTEX document structure. To control
headers, we need the \At... commands Juan Manuel suggests IMv(^n)HO [n>10]

My 10^-10 cents, /PA
-- 
Fragen sind nicht da um beantwortet zu werden,
Fragen sind da um gestellt zu werden
Georg Kreisler

Headaches with a Juju log:
unit-basic-16: 09:17:36 WARNING juju.worker.uniter.operation we should run
a leader-deposed hook here, but we can't yet

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

^ permalink raw reply	[flat|nested] 5+ messages in thread
* Re: Re: [Patch] Pre-/postpend arbitrary LaTeX code to a section
@ 2022-09-23  5:40 Pedro Andres Aranda Gutierrez
  0 siblings, 0 replies; 5+ messages in thread
From: Pedro Andres Aranda Gutierrez @ 2022-09-23  5:40 UTC (permalink / raw)
  To: Org Mode List; +Cc: Ihor Radchenko

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

Ihor writes:
> * headline
> :PROPERTIES:
> :ATTR_BACKEND: :export_template "\begin{myenv}\n%s\n\end{myenv}"
> :ATTR_BACKEND+: "The %%s instances are replaced by the exported element"
> :ATTR_BACKEND+: (concat "arbitrary sexp, the exported element is bound
to: " *this*)
> :ATTR_BACKEND+: babel_block_name(exported=*this*)
> :ATTR_BACKEND+: "the property lines are concatenated with \" \" (space),"
> :ATTR_BACKEND+: "just like the usual approach in
`org-export-read-attribute'"
> :END:
>
> #+ATTR_BACKEND: :export_template "can also work on non-headings"
> Paragraph.

That looks nice :-) If ypu could you do something like:

#+ATTR_BACKEND: :export_template  "\begin{myenv}[myopts]\n%s\n\end{myenv}"
#+ATTR_BACKEND+: :export_template raw_text(exported="this")
#+BEGIN_example
...
#+END_example

I would be able to do what I asked for some time ago :-)

Thanks for the patience, /PA
--
Fragen sind nicht da um beantwortet zu werden,
Fragen sind da um gestellt zu werden
Georg Kreisler

Headaches with a Juju log:
unit-basic-16: 09:17:36 WARNING juju.worker.uniter.operation we should run
a leader-deposed hook here, but we can't yet

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

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

end of thread, other threads:[~2022-09-23  5:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-19  8:59 Re [Patch] Pre-/postpend arbitrary LaTeX code to a section Pedro Andres Aranda Gutierrez
2022-09-20 13:19 ` Ihor Radchenko
2022-09-20 19:35   ` Juan Manuel Macías
  -- strict thread matches above, loose matches on Subject: below --
2022-09-22  6:31 Pedro Andres Aranda Gutierrez
2022-09-23  5:40 Pedro Andres Aranda Gutierrez

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).