From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id QO9UCMlGdmT/5AAASxT56A (envelope-from ) for ; Tue, 30 May 2023 20:56:09 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id yI4UCMlGdmSTAAAAauVa8A (envelope-from ) for ; Tue, 30 May 2023 20:56:09 +0200 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 8C1082D67 for ; Tue, 30 May 2023 20:56:07 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q44Ut-0005AA-Iq; Tue, 30 May 2023 14:55:07 -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 1q44Ur-00059q-F7 for emacs-orgmode@gnu.org; Tue, 30 May 2023 14:55:05 -0400 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q44Ul-0008B0-Kr for emacs-orgmode@gnu.org; Tue, 30 May 2023 14:55:05 -0400 Received: by mail-wr1-x42f.google.com with SMTP id ffacd0b85a97d-30ad99fa586so4672687f8f.2 for ; Tue, 30 May 2023 11:54:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=andrew.cmu.edu; s=google-2021; t=1685472893; x=1688064893; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=QrtxAkt2bAwyCRPTkFpCAtMFYii2rfEdUPvbPzGqi0A=; b=HUaS3iJIgYKx2UMftYHupsBJQboS/JkfT3gQ+U+FQpcXysVKu//tCPHGvqXidLjPco Znct0nROAPcwG5suk8+pfKMTlaBiA541iR4Xp9DytfKtBDIIPpDm2Q3mzIKA5NoxqE2Y kqnhq5eELBE6WaplM4NbOSEKEAAbYsMm7/MLhzFPmGFvm/O4itX1ltxvkmpvgEi8KzMS S2a7rukHIxpIa/B7kad9fsbAImnij8oaH6iTcxOGcSK7eJsa2Cin2cC3n/DvMlxzxasE I9KET02+bvw6UBmmQAtO6XxxrcX0Zj2/eem+G4J1OuOLLZzs5+TXpWpGv2fIy2e5Ts4f kAJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685472893; x=1688064893; h=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=QrtxAkt2bAwyCRPTkFpCAtMFYii2rfEdUPvbPzGqi0A=; b=MPmvUckbYS24nG67wgczzgIh3nsLCHBuBRFw5nGHQ8uCGCJ2jUOunLzx7VTr2YUszu KWXQnLACak2mhru4LSsLvbJl0TgQP2pFjzbdAhYZ9MNV/ZIPpuedYDk/K8XVx5TSqYe5 8brVmBAA0T5in2PY8BeltuANzcQuvvLRmtTW1x6NPkj9xkc2opOr0N7YSSOcAYuo/g6g OOrOSxR5Yhz7GpTnzwk28OwbqYpQ+Or7w3KowK2JnDTkEXhp6bkDtJi7soBzaPXmNR0Y maf1ie2kg+kqY0tQAX7ZwRJrk9/SHRFEB6vAPzWTnfQ6C3UCX5GXx0IrT8/vNLkJ6MzE QN2Q== X-Gm-Message-State: AC+VfDzSDbQt4qGQMM1llxLHLviJSN7clUiTAAHoxwFaddBnFhmGdJ7y HNUL5v+LpbpDpenLlFfa4iFYp1GL/vvNpsAMMG/Z4BC0xKbLl2sD X-Google-Smtp-Source: ACHHUZ7tXo9dkkh4phZdYq+5azJyHHYvX27ZHWKovVsaEX0+4he9WLAfs0DLu+q6jOXyT6jLMrQHqc6Ow3XOF9+Tzbo= X-Received: by 2002:a5d:678f:0:b0:307:34d4:7ec8 with SMTP id v15-20020a5d678f000000b0030734d47ec8mr2311082wru.34.1685472893058; Tue, 30 May 2023 11:54:53 -0700 (PDT) MIME-Version: 1.0 References: <87v8ga417g.fsf@mat.ucm.es> In-Reply-To: <87v8ga417g.fsf@mat.ucm.es> From: John Kitchin Date: Tue, 30 May 2023 14:54:42 -0400 Message-ID: Subject: Re: org-ref-helm-insert-ref-link and latex src blocks To: emacs-orgmode@gnu.org Content-Type: multipart/alternative; boundary="00000000000011cd0505fcedbda3" Received-SPF: pass client-ip=2a00:1450:4864:20::42f; envelope-from=jkitchin@andrew.cmu.edu; helo=mail-wr1-x42f.google.com X-Spam_score_int: 0 X-Spam_score: 0.0 X-Spam_bar: / X-Spam_report: (0.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01, T_SPF_TEMPERROR=0.01, URI_DOTEDU=2 autolearn=no 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-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1685472969; a=rsa-sha256; cv=none; b=oKhkPuXADAzra9DYohHi7aoiuHuclbQi9nAyGPFhosTG/dTllsb7huK57hKqICNH4BHk5F l1matd6o+9Qy439cbsSXmxkdzySERIQcz5bN1g3B5JBTbvo4T5AFm/vdQuGEXTeNGmMikG nrxR53lk8+yMUxbUQ5xofn4EF/iH2g+XfDRI3BoZJ2zB4VsH2AFH4yQnCTe0SA05bD7bTi mZSvMD4arTPd3Hvhokrj1h+osq5t7qtMdy5oVuzOkn75656s8N+zzG8x+YZTYpeFZ4ECfW Uq61M36T+Z+T7yHnPzxEQWr485pJCj74wuxg6J92l/RoUzMoQp7l8YjUGCb+Aw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=andrew.cmu.edu header.s=google-2021 header.b=HUaS3iJI; dmarc=pass (policy=none) header.from=andrew.cmu.edu; 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=1685472969; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to: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=QrtxAkt2bAwyCRPTkFpCAtMFYii2rfEdUPvbPzGqi0A=; b=nZt+bEmspE3Va/nbdtpuiLY7Nmou2Vw1/jF+2lcGvqEpx44TIOiV5rpdA09xWOrmG70oQU BOjDqwBj7j5ijWQlyhm1mZJq/yEAXNWk/Bggr0PpwSE90YXCWps4GIths2FsXVsHAcfzuE 3fIRRHDyFczM1v/38BdC53KW3Ue61fWIJzjb+ZLFmkKH5CIf8wy6TOmYYIix081rbsrClB T58HCwW4cK/ynUDqLmJjuhB/8gQxbMrpG89D6bX8RCJevRkMQga/xtILioFwfrUgek/8ZU ZLlI901EqbKn953UvgkZJbDCmd4Pkl//9Si3mKLBM2ShAlkrpr7ee+RaHFcMIA== X-Migadu-Spam-Score: -6.36 X-Spam-Score: -6.36 X-Migadu-Queue-Id: 8C1082D67 X-Migadu-Scanner: scn0.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=andrew.cmu.edu header.s=google-2021 header.b=HUaS3iJI; dmarc=pass (policy=none) header.from=andrew.cmu.edu; 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" X-TUID: JhHHC5TF7eNv --00000000000011cd0505fcedbda3 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I think you can't use an org-link in a latex src block. You should probably use \eqref{eq:test:2} (probably typed manually). org-ref is not currently clever enough to do that automatically when you inserting in a latex src block. On Tue, May 30, 2023 at 5:29=E2=80=AFAM Uwe Brauer wrote: > Hi > > Please look at the following lines > eqref:eq:test:1 has been inserted with org-ref-helm-insert-ref-link > it is correctly exported to latex. > > > \begin{equation} > \label{eq:test:1} > \int > \end{equation} > eqref:eq:test:1 > > > However the same reference in a latex src block is not correctly supporte= d > > > #+begin_src latex :results latex replace :exports results :eval t > \begin{equation} > \label{eq:test:2} > > \end{equation} > eqref:eq:test:2 > #+end_src > > > There is some logic to it, however when I use org-edit-special > to deal with the reference reftex-reference does do work, but gives the > error > > ,---- > | Debugger entered--Lisp error: (error "RefTeX works only in buffers > visiting a file") > | signal(error ("RefTeX works only in buffers visiting a file")) > | error("RefTeX works only in buffers visiting a file") > | reftex-access-scan-info(nil) > | reftex-reference() > | funcall-interactively(reftex-reference) > | call-interactively(reftex-reference nil nil) > | command-execute(reftex-reference) > | > `---- > > Any idea what to do? > > Thanks and regards > > Uwe Brauer > > > > > > > -- > Warning: Content may be disturbing to some audiences > I strongly condemn Putin's war of aggression against the Ukraine. > I support to deliver weapons to Ukraine's military. > I support the NATO membership of the Ukraine. > I support the EU membership of the Ukraine. > > https://addons.thunderbird.net/en-US/thunderbird/addon/gmail-conversation= -view/ > > > --=20 John ----------------------------------- Professor John Kitchin (he/his) Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 https://kitchingroup.cheme.cmu.edu https://pointbreezepubs.gumroad.com/ pycse bookstore --00000000000011cd0505fcedbda3 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I think you can't use an org-link in = a latex src block. You should probably use \eqref{eq:test:2} (probably type= d manually). org-ref is not currently clever enough to do that automaticall= y when you inserting in a latex src block.

On Tue, May 30, 2023 at 5:29=E2= =80=AFAM Uwe Brauer <oub@mat.ucm.es> wrote:
Hi<= br>
Please look at the following lines
eqref:eq:test:1 has been inserted with org-ref-helm-insert-ref-link
it is correctly exported to latex.


\begin{equation}
\label{eq:test:1}
\int
\end{equation}
eqref:eq:test:1


However the same reference in a latex src block is not correctly supported<= br>

#+begin_src latex :results latex replace :exports results :eval t
\begin{equation}
\label{eq:test:2}

\end{equation}
eqref:eq:test:2
#+end_src


There is some logic to it, however when I use org-edit-special
to deal with the reference=C2=A0 reftex-reference does do work, but gives t= he error

,----
| Debugger entered--Lisp error: (error "RefTeX works only in buffers v= isiting a file")
|=C2=A0 =C2=A0signal(error ("RefTeX works only in buffers visiting a f= ile"))
|=C2=A0 =C2=A0error("RefTeX works only in buffers visiting a file"= ;)
|=C2=A0 =C2=A0reftex-access-scan-info(nil)
|=C2=A0 =C2=A0reftex-reference()
|=C2=A0 =C2=A0funcall-interactively(reftex-reference)
|=C2=A0 =C2=A0call-interactively(reftex-reference nil nil)
|=C2=A0 =C2=A0command-execute(reftex-reference)
|
`----

Any idea what to do?

Thanks and regards

Uwe Brauer






--
Warning: Content may be disturbing to some audiences
I strongly condemn Putin's war of aggression against the Ukraine.
I support to deliver weapons to Ukraine's military.
I support the NATO membership of the Ukraine.
I support the EU membership of the Ukraine.
https://addons.thunde= rbird.net/en-US/thunderbird/addon/gmail-conversation-view/




--
John

-----------------------------------
Professor= John Kitchin (he/his)
Doherty Hall A207F
Department of Chemical Engi= neering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-78= 03
htt= ps://kitchingroup.cheme.cmu.edu
https://pointbreezepubs.gumroad.com/=C2= =A0pycse bookstore
--00000000000011cd0505fcedbda3--