From: mahmood sheikh <mahmod.m2015@gmail.com>
To: Ihor Radchenko <yantar92@posteo.net>
Cc: Timothy <orgmode@tec.tecosaur.net>,
Karthik Chikmagalur <karthikchikmagalur@gmail.com>,
emacs-orgmode@gnu.org
Subject: Re: figures not exported properly by ox-latex
Date: Fri, 5 Jul 2024 12:20:51 +0300 [thread overview]
Message-ID: <CAOj1L_fQH1_kXODwAntjSxeJ-5-gKsqoOXMA-bFM3WVXbtw=yw@mail.gmail.com> (raw)
In-Reply-To: <87y1c3xf55.fsf@localhost>
[-- Attachment #1.1: Type: text/plain, Size: 860 bytes --]
hi,
i made a slight change to wrap the exported latex environments in a figure
environment so that the captions and labels get placed properly, this patch
i created on teco's branch.
i dont expect it to get accepted as it may be a naive fix and i may be
missing something, but it may point out to someone else where the issue is.
thanks!
On Fri, Feb 2, 2024 at 1:43 PM Ihor Radchenko <yantar92@posteo.net> wrote:
> mahmood sheikh <mahmod.m2015@gmail.com> writes:
>
> > im on tecosaur's dev branch (version 9.7-pre)
> > i have the following in an org file:
> >...
>
> CCing Timothy and Karhik.
>
> --
> 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>
>
[-- Attachment #1.2: Type: text/html, Size: 1515 bytes --]
[-- Attachment #2: latex_env_captions.patch --]
[-- Type: text/x-patch, Size: 534 bytes --]
diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el
index 46a3cae..11c3fc5 100644
--- a/lisp/ox-latex.el
+++ b/lisp/ox-latex.el
@@ -3005,7 +3005,10 @@ CONTENTS is nil. INFO is a plist holding contextual information."
;; the section instead). Also insert caption if `latex-environment'
;; is not a math environment.
(with-temp-buffer
+ (insert "\\begin{figure}\n")
(insert value)
+ (goto-char (point-max))
+ (insert "\\end{figure}")
(if caption-above-p
(progn
(goto-char (point-min))
next prev parent reply other threads:[~2024-07-05 9:22 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-02 11:39 figures not exported properly by ox-latex mahmood sheikh
2024-02-02 11:46 ` Ihor Radchenko
2024-07-05 9:20 ` mahmood sheikh [this message]
2024-07-09 20:15 ` Karthik Chikmagalur
2024-07-11 8:39 ` mahmood sheikh
2024-07-11 8:46 ` Ihor Radchenko
2024-07-11 8:47 ` Karthik Chikmagalur
2024-07-11 8:59 ` mahmood sheikh
2024-07-11 12:47 ` mahmood sheikh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAOj1L_fQH1_kXODwAntjSxeJ-5-gKsqoOXMA-bFM3WVXbtw=yw@mail.gmail.com' \
--to=mahmod.m2015@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=karthikchikmagalur@gmail.com \
--cc=orgmode@tec.tecosaur.net \
--cc=yantar92@posteo.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).