[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [BUG] beamer export
From: |
Leo Butler |
Subject: |
Re: [BUG] beamer export |
Date: |
Tue, 20 Feb 2024 20:41:46 +0000 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
On Mon, Feb 19 2024, Ihor Radchenko <yantar92@posteo.net> wrote:
> Leo Butler <Leo.Butler@umanitoba.ca> writes:
>
>>> What about not adding BEAMER_FRAME, but instead adding org-lint checker
>>> that will detect when frame text contains the problematic \end{orgframe}?
>>
>> Ok, thanks for your feedback. I have modified the patch along the lines
>> you suggested. It is attached.
>
> Thanks!
> It looks like you left over some parts from the previous patch version.
>
>> (org-beamer--format-frame): Introduce the new property, :BEAMER_FRAME.
>
> ... like this.
>
>> (org-beamer--frame-environments): New variable and function. The
>> variable holds a list of names of frame environments found while
>> formatting frames. The function generates the LaTeX code to define
>> each new frame environment.
>> (org-beamer-template): Add a call to `org-beamer--frame-environments'
>> to insert the environment definitions into the beamer document.
>
> And since we only have a single alternative environment in this version
> of the patch, `org-beamer--frame-environments' does not appear to be
> necessary.
>
>> +(defcustom org-beamer-frame-environment "orgframe"
>> + "Name of the beamer frame environment."
>> + :group 'org-export-beamer
>> + :type '(string :tag "Beamer frame"))
>
> It would be nice to provide a mode detailed explanation about the
> purpose of this custom option.
>
>> +(defun org-lint-beamer-frame (ast)
>> + "Check for occurrences of begin or end frame."
>> + (org-with-point-at ast
>> + (goto-char (point-min))
>> + (let (result)
>> + (while (re-search-forward
>> + (concat "\\\\\\(begin\\|end\\){" org-beamer-frame-environment
>> "}") nil t)
>> + (push (list (match-beginning 0) "Beamer frame name may cause error
>> when exporting.") result))
>> + result)))
>
> ... and to link this org-lint warning to the
> `org-beamer-frame-environment' docstring.
Thanks for your comments.
I think the attached patch addresses each of your points. It's not clear
to me what you mean by "link(ing) this org-lint warning to the
`org-beamer-frame-environment' docstring", but I have expanded the
warning include mention of this variable.
Leo
0001-lisp-ox-beamer.el-customize-the-beamer-frame-environ.patch
Description: 0001-lisp-ox-beamer.el-customize-the-beamer-frame-environ.patch