From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/32961 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alberto Simoes Newsgroups: gmane.text.pandoc Subject: Re: Internal link to a RawBlock created via filter Date: Sat, 15 Jul 2023 14:13:31 -0700 (PDT) Message-ID: References: Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_1362_1957326670.1689455611210" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11215"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBCPPPLF75UIRB7EXZSSQMGQENJ7ZWII-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Sat Jul 15 23:13:38 2023 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-oo1-f56.google.com ([209.85.161.56]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1qKma8-0002hH-BA for gtp-pandoc-discuss@m.gmane-mx.org; Sat, 15 Jul 2023 23:13:36 +0200 Original-Received: by mail-oo1-f56.google.com with SMTP id 006d021491bc7-5668c477b8dsf3813210eaf.0 for ; Sat, 15 Jul 2023 14:13:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20221208; t=1689455614; x=1692047614; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:x-original-sender :mime-version:subject:references:in-reply-to:message-id:to:from:date :sender:from:to:cc:subject:date:message-id:reply-to; bh=jSE7i57XjFjtcuNA/yyIrHbjcYMxvZbx4b+ITWC74e8=; b=j+9Cb9KliMtoTBjlsLtPlzSaXVq+laCw+Q1u8czQwzjvQFU/d2eWp4nu1+duw59NBV KsDamJTvLO64WU5qgBQWEuqzpdG0Ek+Ey8swZAmlePffAfA7KNd+4/tpDALALC39WNak +Dk4XrAaF3v9AoRdayIEY8Kv8SqEqydqVRiS/6433bmJ8J5J5GGksIaUeRn+bmSeuoNR Ur0VS/hQr1hngBbLgXh7tjQtmgKh6zDGP3hIJq/akL9glsNytLNR0NsHeoIXwNW3m6cg 8B9ZfOXqk1rlpXKGkvHI/PAWe2q/mEecKwH6AnUDaJ+43XF0Oyvxxyx1tlRoYa7XfpAl 6hWQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1689455614; x=1692047614; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:x-original-sender :mime-version:subject:references:in-reply-to:message-id:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=jSE7i57XjFjtcuNA/yyIrHbjcYMxvZbx4b+ITWC74e8=; b=n2YGlMviyFwU/sf5FDTKHgzVOBS0EApdjt3+HEc4q4begsHoEnMoOSzRFoeko/np1p 67NKzgZ4kxy3eZmawtns322YxNjNHetmlqa0ZQmtwbBCwbKt04F+TNSZi5TgNx5bZIHt G3IPQ3s8FtVGPw7rF5CCJ0Ugyyp87JvJOhDrQef0zdt45U5WWnoH5PqXwQGK347fy3da NhIo0hrV8LI6Qqy5aPrW2UToTy73pMM8w7BPLXwpPGmQrvW4cO2pYUEO10o/e4EKp49o Wv/rraN7OaA62mnCJQdAw1+Gu0k4wR/0u57UIGTrP2EtCWOEZ+xoeBElE389X0xErpfj T9mg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689455614; x=1692047614; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence:reply-to :x-original-sender:mime-version:subject:references:in-reply-to :message-id:to:from:date:x-beenthere:x-gm-message-state:sender:from :to:cc:subject:date:message-id:reply-to; bh=jSE7i57XjFjtcuNA/yyIrHbjcYMxvZbx4b+ITWC74e8=; b=Jx6aqVvz7eSDfHR+ZFanjN7LYEsPXu5CYCKerZJPIWLJep/qStH+xShnjHIZ3rGAOC RMdQrrnwwqN9+yMpV0vSRJQ6owwMdPo3CzpAARKjsUbVasS39PiX3jfl05PbUb7L/g3c NG4HrCOiuwD+EzdyPweivv+ay6TwmUbfp6IbHz9CnMHXOlBQMH5HgXqh+q2W5DxVTZXx u2Bq98QZV5r4G4xhCax9hq1m/SLG368F80kKxXfQPipDHvP/zpwoaXt7LjHwhsg79yXr lsjBwjeYEBzgLOY3QJKxW0JSvgzJ15udNK+R8stNHnESB4F8kd Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: ABy/qLadsqdW/Ql4BpLlTGg/BmF+e61F7sPXsVfMGfFUgAxHHLmyBqT6 BYea+ipqIhScWPMbYQOK0gU= X-Google-Smtp-Source: APBJJlH+zxke+B/cFKgKkVsykVFnrKibSA27rHdZl2AiZbkLKLfy1pdvQc4bH3nEJslR8JSWrWV6Ag== X-Received: by 2002:a4a:2a56:0:b0:566:f5bb:7d40 with SMTP id x22-20020a4a2a56000000b00566f5bb7d40mr1403438oox.6.1689455614753; Sat, 15 Jul 2023 14:13:34 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a4a:4f53:0:b0:565:9c61:ce9b with SMTP id c80-20020a4a4f53000000b005659c61ce9bls3501575oob.1.-pod-prod-08-us; Sat, 15 Jul 2023 14:13:31 -0700 (PDT) X-Received: by 2002:a05:6808:1887:b0:3a3:89aa:21c1 with SMTP id bi7-20020a056808188700b003a389aa21c1mr11211592oib.6.1689455611790; Sat, 15 Jul 2023 14:13:31 -0700 (PDT) In-Reply-To: X-Original-Sender: hashashin-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org Precedence: list Mailing-list: list pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org; contact pandoc-discuss+owners-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org List-ID: X-Google-Group-Id: 1007024079513 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Xref: news.gmane.io gmane.text.pandoc:32961 Archived-At: ------=_Part_1362_1957326670.1689455611210 Content-Type: multipart/alternative; boundary="----=_Part_1363_157984319.1689455611210" ------=_Part_1363_157984319.1689455611210 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Saturday, July 15, 2023 at 9:40:08=E2=80=AFPM UTC+1 Alberto Sim=C3=B5es = wrote: On Sat, Jul 15, 2023 at 9:24=E2=80=AFPM Alberto Simoes wrote: Hello I am using a filter based on the tikz example in the python pandocfilters= =20 documentation. I am generating one id=3D"foo" and a \label{foo} in the html and latex=20 output, respectively, for an internal link target. Nevertheless, when I use a link to that block, with [Look here](#foo) the= =20 link is generated to the first page, and not to the raw block that has the= =20 label defined. I suppose that Pandoc is creating an internal index of references before=20 generating the latex/html code (??) and is not aware that my RawBlock has a= =20 link target. The generated LaTeX looks good to me... -------- \begin{figure}[h] \centering ... \caption{Vibra=C3=A7=C3=A3o simples} \label{fig1} \end{figure} A corda \emph{A} deslocada para o ponto \emph{B} regressa =C3=A0 base \emph{A}. A vibra=C3=A7=C3=A3o simples p=C3=B3de pois representar-se em fac= e da \protect\hyperlink{fig1}{fig.~1} pela f=C3=B3rmula \(AB + BA\). ---------- hyperlink only links to hyperref hypertarget blocks. So, I needed to write \begin{figure}[h] \centering \hypertarget{fig1}{...} \caption{Vibra=C3=A7=C3=A3o simples} \label{fig1} \end{figure} =20 in fact, the label might be suppressed after the caption, but I decided to= =20 keep it there, as it might get handy. Thanks and sorry for asking and answering :-) Alberto --=20 You received this message because you are subscribed to the Google Groups "= pandoc-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an e= mail to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/= pandoc-discuss/b6640415-3c29-4530-b520-10e4029ac344n%40googlegroups.com. ------=_Part_1363_157984319.1689455611210 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

On Saturday, July 15, 2023 at 9:40:08=E2= =80=AFPM UTC+1 Alberto Sim=C3=B5es wrote:
On Sat, Jul 15, 2023 a= t 9:24=E2=80=AFPM Alberto Simoes=C2=A0 wrote:
Hello

I am using a filte= r based on the tikz example in the python pandocfilters documentation.
I am generating one id=3D"foo" and a \label{foo} in the html and late= x output, respectively, for an internal link target.

=
Nevertheless, when I use a link to that block, with [Look here](#foo)= =C2=A0 the link is generated to the first page, and not to the raw block th= at has the label defined.

I suppose that Pandoc = is creating an internal index of references before generating the latex/htm= l code (??) and is not aware that my RawBlock has a link target.


The g= enerated LaTeX looks good to me...

--------
\begin{figure}[h]
\centering
...
\caption{V= ibra=C3=A7=C3=A3o simples}
\label{fig1}
\end{figure}
<= div>
A corda \emph{A} deslocada para o ponto \emph{B} regre= ssa =C3=A0 base
\emph{A}. A vibra=C3=A7=C3=A3o simples p=C3=B3de pois = representar-se em face da
\protect\hyperlink{fig1}{fig.~1} pela f=C3= =B3rmula \(AB + BA\).
----------


hyperlink only links to hyperref hypertarge= t blocks.
So, I needed to write

=
\begin{figure}[h]
\centering
\hypertarget{fig1}{...}
\caption{Vibra=C3=A7=C3=A3o simples}
\label{fig1}
\end{figure}=
=C2=A0
in fact, the label might be suppressed af= ter the caption, but I decided to keep it there, as it might get handy.

Thanks and sorry for asking and answering :-)
=
Alberto

--
You received this message because you are subscribed to the Google Groups &= quot;pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to pand= oc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d= /msgid/pandoc-discuss/b6640415-3c29-4530-b520-10e4029ac344n%40googlegroups.= com.
------=_Part_1363_157984319.1689455611210-- ------=_Part_1362_1957326670.1689455611210--