From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id wF//DVqfj2albQEA62LTzQ:P1 (envelope-from ) for ; Thu, 11 Jul 2024 09:01:14 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id wF//DVqfj2albQEA62LTzQ (envelope-from ) for ; Thu, 11 Jul 2024 11:01:14 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=I7mrEWxq; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1720688474; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=/3s8S+Vu25wbLCjfa0JyJNlNuK0u4C/0RJITkbukzTE=; b=p5p+77u2zSXcmF1IvjDR6XGt5gMYdwOY/w2/le4P1MmZJthKs7FqGvtwOiNamXi7swgqPa 8ZDj1F5HIPGt8Yxfgz6y8Z41jmN4fZo0Hwwi1BM1JMV7u/GN/BqXmUZ1YKB3VVVD5oRmdD 5bbDCOpTPzEKVvgikFQo7vo61GXe1BsKqpqyTqqz+MHYoG0z++Xz83FG4+IPwRvqFZJYJq IZxxtuixoEkHAzrMm55RNOR464jhS29dfKWdL5NDOokUQyTh0ZFSdcIaBxeG/VQqtbnEwN QLW0MBVr+emr5K3a58XJuIfhazMfFW1HXIpVn49uEYHlPD8yf+ckD+OzaIcMiQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1720688474; a=rsa-sha256; cv=none; b=PttfTHdvDx66PUqO+0+JfztBu2nlFTIaYBhMHp786tMStXj7O69DfU8bRFvGfGlXg8LBYj BwHBLSTK7r5L+T89rw611ZeR+SkKVISp2DQhgce2OdhNb+yIyf4H5OGYxIduPcge+36haT CNYNQ9OPUOSGV11RW46zGtmzwXhpK28pxtCfu+mDaEmNNOjuF9V9kF+2i1w6xX7DieV2er b2PH9eAYI7oBRmhS2TkU4lboKUb/fZnjrNZq1K29jO74izNGMldrwUiQiQ7M0g93ytfBuN LjafrgzEdYl96tD5bmZP260PT6PYoTSkWgMHAUhTT+fQhxgQ6/Khnu7aRjsQKw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=I7mrEWxq; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id E6FC3342A5 for ; Thu, 11 Jul 2024 11:01:13 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sRpex-0006a7-4y; Thu, 11 Jul 2024 05:00:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sRpeu-0006ZW-1u for emacs-orgmode@gnu.org; Thu, 11 Jul 2024 05:00:12 -0400 Received: from mail-oa1-x33.google.com ([2001:4860:4864:20::33]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sRper-0000hO-KG for emacs-orgmode@gnu.org; Thu, 11 Jul 2024 05:00:11 -0400 Received: by mail-oa1-x33.google.com with SMTP id 586e51a60fabf-25e0da7145fso346946fac.3 for ; Thu, 11 Jul 2024 02:00:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1720688408; x=1721293208; darn=gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=/3s8S+Vu25wbLCjfa0JyJNlNuK0u4C/0RJITkbukzTE=; b=I7mrEWxqhpcufv09EHjUJjjAxPW90ET92A3J84uTh3A16tVmRo6MTKnYuMI6LYz/Kb IeiA/16MLy61XXj8jYLdICWlxOeoxRsVwpQdPE/PvSBidgsPKJVf4KELB/0lR4KxenUQ fewzwBSgoaOCUKBItwLr3YbjBKxZ1d92xMKwdrxo0BLaM5rlbIQFP6qrH7p7pGhaByPb VoSglNiCnWxnEDnvZFwdwvQ9mqRKpJvRHUjB9PAu5sJR+uB3rZXnFB5zCF2nCRtRriv2 pLH8igkDm5O9vLyvMDuEoL5wddO1JoK8m/IUP6My5kSVF03DcFq7m1ItTL8EaHFvFESb eMKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720688408; x=1721293208; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=/3s8S+Vu25wbLCjfa0JyJNlNuK0u4C/0RJITkbukzTE=; b=Ww1a512Lv7IrYdO0etSXHQ+vF0mTaCktBKkt1JwKvnokZd5gQkqul+aVkgKLRB61+9 QOlv3Ir8myMxspu8rxrGeMueOrFEkoI0YuS01tIHtfIBi3CB2KIthmnUJmHGM08vm6/M NtrnXm2XbX4hHdvN+rwSTBqz/xY80NmejcBGF2yUy6OpOqi8GqN8gmVMr3abOUDwSgUh xhW7MaiQEKiqObX07RutuTQT0ar0rv8maytwFp4MyI+3tQbh7dEsxTzuz7yrcEZkO8U/ 7GIGa5IgF5Ur2cOD2dAdpANx9eElA++I/8yu8GAnzkuYqHRpJGH02tma4DlWsicrDybW jrEA== X-Gm-Message-State: AOJu0YyihIn8lUgBAk3DFjXA+JtB2PvZ/hKJN3LXHohxCNMBhpkdVUZw Zi1yDzkVG/Vf7supFE8SJfNzDadY/AxyuxQtx8xMfO+4TZKrt5iKAWLsWhI8iyLGnu2FN87lEVp HtSnSRlfRG4PexUQbGHCPD67FpLKUR4jn X-Google-Smtp-Source: AGHT+IEcSz4qFNTRlQ1G83TXw5h5+7x+CcDF1Xemz2O14zcV711axy1qseIfL/07g3hTiU/v7E+++v1tDrBS2Gu4kAg= X-Received: by 2002:a05:6870:a349:b0:25d:905:dcc4 with SMTP id 586e51a60fabf-25eaec14409mr7108835fac.47.1720688408129; Thu, 11 Jul 2024 02:00:08 -0700 (PDT) MIME-Version: 1.0 References: <87jzhu724w.fsf@gmail.com> <87r0c01fjf.fsf@gmail.com> In-Reply-To: <87r0c01fjf.fsf@gmail.com> From: mahmood sheikh Date: Thu, 11 Jul 2024 11:59:56 +0300 Message-ID: Subject: Re: figures not exported properly by ox-latex To: Karthik Chikmagalur Cc: emacs-orgmode@gnu.org Content-Type: multipart/alternative; boundary="00000000000055fa08061cf4fd4d" Received-SPF: pass client-ip=2001:4860:4864:20::33; envelope-from=mahmod.m2015@gmail.com; helo=mail-oa1-x33.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Queue-Id: E6FC3342A5 X-Migadu-Scanner: mx12.migadu.com X-Migadu-Spam-Score: -9.74 X-Spam-Score: -9.74 X-TUID: MAgMxGoUVoZp --00000000000055fa08061cf4fd4d Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable this is an example of what i mean: #+begin_src org #+name: fig-switching-circuit-kmap-1 #+caption: karnaugh table of \(p\) \begin{tikzpicture} \karnaughmap[function=3D, defaultmap=3D8, omitzeros=3Dfalse, omitidx, variables=3Dxyz]{01101001} \end{tikzpicture} #+end_src i vaguely recall org mode automatically turning captioned tikzpicture's into figures by wrapping them in a figure environment. currently, this is what i get when i export to latex: #+begin_src latex \begin{tikzpicture} \karnaughmap[function=3D, defaultmap=3D8, omitzeros=3Dfalse, omitidx, variables=3Dxyz]{01101001} \caption{\label{fig-switching-circuit-kmap-1}karnaugh table of \(p\)} \end{tikzpicture} a tikzpicture environment doesnt expect a \caption and therefore this gives an error. to avoid this the environment has to be wrapped manually by the user by a \begin{figure} environment, but i think this may be redundant because anything that takes a #+caption is expected to be a figure. also, ox-html doesnt handle those anymore, it used to handle #+caption: and insert it into the generated html output, it simply ignores that now. example: #+begin_src org #+name: fig-switching-circuit-1 #+caption: implementation of \(p\) [[attachment:circuit.svg]] #+end_src ox-html generates the following html: #+begin_src html
#+end_src its not a different problem, its basically that after the new overhaul figures are being handled differently than i recall, but i cant say for sure. although the report above about the exported circuit.svg img does make sense even if it wasnt handled the way i'd expect before the overhaul. thanks On Thu, Jul 11, 2024 at 11:47=E2=80=AFAM Karthik Chikmagalur < karthikchikmagalur@gmail.com> wrote: > > it might've been fixed for figures as its been a while, but shouldnt > > latex environments with #+caption: and #+name: above them be exported > > as figures? because currently the user has to write \begin{figure} and > > \end{figure} explicitly which would work > > This is not the case. The LaTeX output I posted in my previous response > was the exported output from your example Org source. I did not add the > \begin{figure} and \end{figure} tags manually. > > Karthik > --00000000000055fa08061cf4fd4d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
this is an example of what i mean:
#+= begin_src org
=C2=A0 #+name: fig-switching-circuit-kmap-1
=C2=A0 #+ca= ption: karnaugh table of \(p\)
=C2=A0 \begin{tikzpicture}
=C2=A0 =C2= =A0=C2=A0\karnaughmap[function=3D, defaultmap=3D8, omitzeros=3Dfalse, omiti= dx, variables=3Dxyz]{01101001}
=C2=A0 \end{tikzpicture}
#+end_src
= i vaguely recall org mode automatically turning captioned tikzpicture's= =C2=A0into=C2=A0figures by wrapping them in a figure environment. currently= , this is what i get when i export to latex:
#+begin_src latex
=C2=A0= \begin{tikzpicture}
=C2=A0 =C2=A0=C2=A0\karnaughmap[function=3D, defa= ultmap=3D8, omitzeros=3Dfalse, omitidx, variables=3Dxyz]{01101001}
=C2= =A0 =C2=A0 \caption{\label{fig-switching-circuit-kmap-1}karnaugh table of \= (p\)}
=C2=A0 \end{tikzpicture}
a tikzpicture environment doesnt=C2=A0= expect a \caption and therefore this gives an error. to avoid this the envi= ronment has to be wrapped manually by the user by a \begin{figure} environm= ent, but i think this may be redundant because anything that takes a #+capt= ion is expected to be a figure.
also, ox-html doesnt=C2=A0handle those = anymore, it used to handle #+caption: and insert it into the generated html= output, it simply ignores that now. example:
#+begin_src org
=C2=A0 #+name: fig-switching= -circuit-1
=C2=A0 #+caption: implementation of \(p\)
=C2=A0 [[attachm= ent:circuit.svg]]
#+end_src
ox-html generates the following ht= ml:
#+begin_src html
=C2=A0 <img src=3D"/circuit.svg" /&= gt;<br />
#+end_src
its not a different problem, its basicall= y that after the new overhaul figures are being handled differently than i = recall, but i cant=C2=A0say for sure. although the report above about the e= xported circuit.svg img does make sense even if it wasnt handled the way i&= #39;d expect before the overhaul.
thanks

On Thu, Jul 11, 202= 4 at 11:47=E2=80=AFAM Karthik Chikmagalur <karthikchikmagalur@gmail.com> wrote:
> it might've been fi= xed for figures as its been a while, but shouldnt
> latex environments with #+caption: and #+name: above them be exported<= br> > as figures? because currently the user has to write \begin{figure} and=
> \end{figure} explicitly which would work

This is not the case.=C2=A0 The LaTeX output I posted in my previous respon= se
was the exported output from your example Org source.=C2=A0 I did not add t= he
\begin{figure} and \end{figure} tags manually.

Karthik
--00000000000055fa08061cf4fd4d--