emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [BUG] beamer export


From: Ihor Radchenko
Subject: Re: [BUG] beamer export
Date: Mon, 19 Feb 2024 09:42:08 +0000

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.

-- 
Ihor Radchenko // yantar92,
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>



reply via email to

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