From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?Q?Cl=c3=a9ment_Pit--Claudel?= Subject: Re: Feature request: "Figure #:" in labels of listings Date: Mon, 22 Aug 2016 16:48:52 -0400 Message-ID: <2824f983-5494-371f-a969-bd1ea40b6810@gmail.com> References: <092e6a31-51b1-8bb8-d8bc-3e1da66764da@gmail.com> <87bn0uujfg.fsf@saiph.selenimh> <8737lwwnup.fsf@saiph.selenimh> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="v1PAgseLfxsMrWWrHBhgpIcBsQpXKHppT" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:53704) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bbw9X-0005NI-Nd for emacs-orgmode@gnu.org; Mon, 22 Aug 2016 16:49:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bbw9U-0005XQ-KN for emacs-orgmode@gnu.org; Mon, 22 Aug 2016 16:49:03 -0400 Received: from mout.kundenserver.de ([212.227.126.133]:50872) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bbw9U-0005XH-9c for emacs-orgmode@gnu.org; Mon, 22 Aug 2016 16:49:00 -0400 Received: from [18.189.127.88] ([18.189.127.88]) by mrelayeu.kundenserver.de (mreue003) with ESMTPSA (Nemesis) id 0M944P-1bRjOx3klh-00CTbT for ; Mon, 22 Aug 2016 22:48:59 +0200 In-Reply-To: <8737lwwnup.fsf@saiph.selenimh> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --v1PAgseLfxsMrWWrHBhgpIcBsQpXKHppT Content-Type: multipart/mixed; boundary="7HpRBWGHSFO8B2D7tsmP5cHbCPtUl2sap" From: =?UTF-8?Q?Cl=c3=a9ment_Pit--Claudel?= To: emacs-orgmode@gnu.org Message-ID: <2824f983-5494-371f-a969-bd1ea40b6810@gmail.com> Subject: Re: Feature request: "Figure #:" in labels of listings References: <092e6a31-51b1-8bb8-d8bc-3e1da66764da@gmail.com> <87bn0uujfg.fsf@saiph.selenimh> <8737lwwnup.fsf@saiph.selenimh> In-Reply-To: <8737lwwnup.fsf@saiph.selenimh> --7HpRBWGHSFO8B2D7tsmP5cHbCPtUl2sap Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2016-08-22 16:27, Nicolas Goaziou wrote: > Done. Thank you. Works great; thanks! One small difficulty is that html export uses two separate counters for f= igures and listings, while LaTeX export calls both figures, and uses a si= ngle counter. This makes it tricky to reference figures in a way that wor= ks with both HTML and LaTeX: for HTML one needs to write "Figure [[fig:a]= ] shows x, Listing [[lst:b]] shows y" (which exports into "Figure 1 shows= x, Listing 1 shows y", while for LaTeX one needs to write "Figure [[fig:= a]] shows x, Figure [[lst:a]] shows y" (which exports into "Figure 1 show= s x, Figure 2 shows y"). I don't know of an easy way to achieve this. Potential solutions: * Using a single counter in HTML, and calling listings "Figure"s, as in L= aTeX * Using two counters in LaTeX as well, though this will require changes t= o existing Org documents, which is not ideal. * Introducing an org-mode equivalent of \autoref that would insert (and h= yperlink, which would be nice) "Figure", "Listing", "Section", =E2=80=A6 = as appropriate based on the link's target. Cl=C3=A9ment. --7HpRBWGHSFO8B2D7tsmP5cHbCPtUl2sap-- --v1PAgseLfxsMrWWrHBhgpIcBsQpXKHppT Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJXu2U0AAoJEPqg+cTm90wjIT0QAK4rZGj3qpCE6SIcQZTIE1xO mfiyMty16o6DOuTcHkHZDiMjpm+aLsXNkeVlok+1q9J22H6EMxGJWVQkrV9Nt5Id 9deELFIANIcmRuPi61MaDSkV+UzATVOdV0iO2bIhtCVfnZqjvVzHbP5e340xq2m9 oBKv+tjdjqFi/f/EAzRHYTDM8kh7SWS6uUxAmbCcMZ+mm+dkHZhSm+CUi75VvxGo QJ0NlahQCQQJaMoQ3yQujhEOf/Fvpv1WWpmAH77ImApe5HS9WVsDCAKm2ac5aElH AnBnj80GpjKGnu2kSgU6RxK/nikrJ+EswGffTC2DL7XfQuOPyIop7ZolpFz4APNC omYWBHe2RARHu13+zv7qehbDa3LF5Rsta7NZXDGtJc+1B0hYJIZkMR+KjhL6Rj/E AdJSGTmG7GC6J1GNxcg3YHkUrjXTPlVkvpjOQ1uwgkIHJQ+97K4DY+1/5B4bjBIm G8NlGVysFNlRy7xDoD4beWmEmQLMPDyhezStN+Uj1015bwzu93kx2xRgG1a5qzob 1ymHFF8X9joNNA1d+bxT8JFOgwkry8BrLT6s2EJExSWk8ZvjeiKITEYX79CohLhN sYTz/2GccvYRtk+M89jY0OYy2cxUcYCacu0bYMtQTy2YEM0trcVPOPWCxfWwsltN cyf7t798qzMFlIvOtCSX =yLiL -----END PGP SIGNATURE----- --v1PAgseLfxsMrWWrHBhgpIcBsQpXKHppT--