[-- 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 --]
Pedro Andres Aranda Gutierrez <paaguti@gmail.com> writes: > Can it be extended to add properties to a > #BEGIN_example > #END_example > snippet? Didn't we conclude that wrapping blocks during LaTeX export should be done via special blocks? (This question has been raised multiple times, I am unsure if you are referring to the same discussion I have in mind). -- Ihor Radchenko, Org mode contributor, Learn more about Org mode at https://orgmode.org/. Support Org development at https://liberapay.com/org-mode, or support my work at https://liberapay.com/yantar92
Ihor Radchenko writes: >> Can it be extended to add properties to a >> #BEGIN_example >> #END_example >> snippet? > > Didn't we conclude that wrapping blocks during LaTeX export should be > done via special blocks? (This question has been raised multiple times, > I am unsure if you are referring to the same discussion I have in mind). Special blocks is usually the best solution for these cases. But (without wishing to add more fuel to old discussions) I think it would be nice to have as attr_latex a series of positions similar to the hooks in the etoolbox LaTeX package: \AtBeginEnvironment \AtEndEnvironment \BeforeBeginEnvironment \AfterEndEnvironment Something like :pre :post :precontent :postcontent. In the case of blocks, I think this would simplify the documents a lot if what you are looking for makes sense only in LaTeX export (special blocks are exported to everything). And in the case of floating objects such as tables or figures, it would be really useful, since here you cannot resort to the use of special blocks (*inside* those environments, I mean), and the workarounds that are usually provided are still a bit tricky. Best regards, Juan Manuel -- -- ------------------------------------------------------ Juan Manuel Macías https://juanmanuelmacias.com https://lunotipia.juanmanuelmacias.com https://gnutas.juanmanuelmacias.com
[-- 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 --]
[-- 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 --]