From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/24419 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: BPJ Newsgroups: gmane.text.pandoc Subject: Re: Number tables like figures when converting from LaTeX? Date: Tue, 11 Feb 2020 13:01:02 +0100 Message-ID: References: Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000c3b74c059e4b9c17" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="52023"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBCWMVYEK54FRBCVPRLZAKGQEEHCM2OI-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Tue Feb 11 13:01:18 2020 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-qt1-f184.google.com ([209.85.160.184]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1j1UE8-000DPK-RB for gtp-pandoc-discuss@m.gmane-mx.org; Tue, 11 Feb 2020 13:01:16 +0100 Original-Received: by mail-qt1-f184.google.com with SMTP id b5sf6422280qtt.10 for ; Tue, 11 Feb 2020 04:01:16 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1581422476; cv=pass; d=google.com; s=arc-20160816; b=Vuh7jIVE+Axzs9L53saTqlcSvWZD1m6LAr7MDM7f0n146qKI31J7Fy0MNRpNq1rKWV +ZqCVHuX7WPL2NY6tTn2DVuxCJlbHuxg04H70ZpSD3VDTN6GKuxti7oRG2ouBeS7xupG E2U5frYeGJ8uJdY798y6PeIzclU4rd2DNKd/EZBTsx82OM/nVTWSVry7Mq1uli+JLd0G j6KHuYOxjyW5dz+3PAQJ+akwB4VF7ElowXozftxP0xeiYUS5TWE66q8mvfaR7ETe/m4S /+mAiTA650z3nIyCwC1qAI1c8x/RhLdRjdNYnn9mcpWxs7dt/AUg0OK2IObeX3VQ6cVQ lafQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:to:subject:message-id:date :from:in-reply-to:references:mime-version:sender:dkim-signature :dkim-signature; bh=04RUW10ZN6vyl/iinp54LEZ441CZyF4SSsYpRDdOl/M=; b=Dc2RyhYubJonysi1jw8RvFuqLyoZJeZeu8XKLZGT4t6FHT84WfLHA4h0Ym+VtRwWTK 88Pxgp/JL6rjJf5Najy7kPJziWTGy3MlCayi/MKi4hAA/W36F8J7lvGH+NGVgqwGvRJM VB8TDGG7u5sa0fvnTtxKNgyObkjJnz1w+/yuvVgveyIHYLfEqvVyI9MwGUFaLD0isdPY nALuloPI3ecR7YRdzr2S1wk3I4ip2a2ED/RtgD8e2GdPvfLfZiUyfjPd3XTPohMx7Hfc SIQyIOt0OFh9NV1NGUFw8ZAn5y/CT6Pp9YdbRh8/PSXJK+MIzukIH4y19m4qDvgf9+5b 3g6g== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=qKkwVBvq; spf=pass (google.com: domain of melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::235 as permitted sender) smtp.mailfrom=melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:mime-version:references:in-reply-to:from:date:message-id :subject:to:x-original-sender:x-original-authentication-results :reply-to:precedence:mailing-list:list-id:list-post:list-help :list-archive:list-subscribe:list-unsubscribe; bh=04RUW10ZN6vyl/iinp54LEZ441CZyF4SSsYpRDdOl/M=; b=sx0BS6IMNnQXr3Tutoberzn01+v1afwKScTSKaLSoZp/Ia/BkISbjJ9CE2tYN0+H35 YETiIXZ9OZW3IC72BmRGPEsphJWqqjtWLq/lm/G6LJKd1VqF6a2r9oOUMacDQJJCKZ8C 0QLk2x2mW/fMHbr2knJZMKfrP79ahNTwABLbxIHN3OIfH0Pb6F3AN8EnwHsBHYhNlktF pVHJ3fmR3NCGdUrMOi2YlHfPKGOfwS03VuvdlnUb/K1SRvyeKA+J6vRG+IXYYISYREjJ bXqdNNAeaRKSnoy6qGpMANEjK7G2tVbuPf4L3T4l3QJ+H16bTX2sxHOwqcW6VrPyUkjp ipQA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :x-original-sender:x-original-authentication-results:reply-to :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=04RUW10ZN6vyl/iinp54LEZ441CZyF4SSsYpRDdOl/M=; b=fK8hv6mClZleuqkjg3CgJK7TNNz++vHVnEOaDhIIyWVct9N4Hq9gLxlid5VJo19gsh 0MpDh6pUlbofmmcXe0ZZaiggIudPS8KxH0tsRNvG+F7FWLPHFhaIG6bPmZCsl5T4UMz8 M4+vtCQAutup0dyMSrBeuv7rSwwQDUMmnMY7fpE6ygp1IieylU7uZviXKCqlbuxANjEi wyk8W+cjTMDfhFrHc70GjNtpFJEOD/QzOXrkapWFD4eYtgFZRsjMOOsEWOUc0Mx8UNWZ bnBm692Zes6ryJ9G6qg3gCn2JFLm4JwMfbPxpkDo2kEoSIu7b6703rOSHiW76xzz7MD0 EQfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:mime-version:references:in-reply-to:from :date:message-id:subject:to:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:x-spam-checked-in-group:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=04RUW10ZN6vyl/iinp54LEZ441CZyF4SSsYpRDdOl/M=; b=kCfGo1R/iuX8d0NOzcGApEJJHGXeNHRd09Cnx2AQT7b2yFkZ4c8QlULXwOCVEX0v8k GEpkWKxtFoh6zxWPvduxdcfHp77NL4opDaB8mhpthZrv3Uw8DesdeGR5edo7yKRm8fLi jru2wWc8B6kBjXAAOBb0dkk5BOY2QLpTIqdmPxJ5+sdCdXGvoXd7en7YqKzNoPSVUlPm C9tqYN/DYDNvrBYSIqEF2I86HghhyHbYxLE6/B4SZ9fKc9ImlHkSNfzJfeKNiuDQx6Ew PEkh7DCQCDhGmjHNWj0EnL1PkobpoR/DsLpKJ8rpwRg5t4SznJb5UzOKr7srw+lvpJ4X tLnQ== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: APjAAAVEtNbGTSl5sp3Z+aSgE68ixYOvCuSi684dH88gYQdSBn7uMdXr gl4UNnc9fvpoInzIY8IqIWI= X-Google-Smtp-Source: APXvYqz/6A3pVnDDLjjLiJ8eWQbA6gmUAegCmuKsSjj+0xHaabTGdsau7r1gMV8jzDgWfxlzRtRhKw== X-Received: by 2002:a37:a4cc:: with SMTP id n195mr5837198qke.197.1581422475960; Tue, 11 Feb 2020 04:01:15 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:ad4:4e70:: with SMTP id ec16ls2551627qvb.7.gmail; Tue, 11 Feb 2020 04:01:13 -0800 (PST) X-Received: by 2002:a0c:ea50:: with SMTP id u16mr14767933qvp.110.1581422473805; Tue, 11 Feb 2020 04:01:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581422473; cv=none; d=google.com; s=arc-20160816; b=bq9oiricMFZqKm06JAdF/XWSKQybke4TK76Aez21omjTryBGFljcr8Kpc2qIb2ZBtL I541H0Jh0ID/nefR1g7yXoiROjuH8EIQ4sdE8sspRFQwgVPkI9qp2QjdvAekWCiEgO96 qtcif3eRsVBnfWN7zM/RlAg+YEN6YIcFjb7GWvxmy0emPtdNHQCjYZM7/SENKwn1uGK0 kGIvlcy15aKsYunmhPenhvEPeSRZ+5eR3NfPmtRqN1NjryBmtQUzD4HG17vE9D64fM45 ePcpBe8pG0tULWJdYG2fazuZ+16k5aExtZVgxEaWS4zBGxzaEDGvGbznUIufcRffHpES VWzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=+w6vAdHBJL4jeH+N6SkkrzCtuJxdIoMFcoQN80PZ6LE=; b=aRWbffTcNXs896lwrNmAzpjt6LPrb4vtK2MazcwOZj7qONsOhZxgzaMu8S+PsMuvtp wbopHNiqkLkG9iuie9bwWsdMxJGru7CnAfq8TnWwWKSlx78I1FXSLdaGgm6ZCkkKi2xb +SvQh8rluKuom3+Njqv2BSKHf3AJ24xoqhQRSxX5U+/1JHpl5zcQQsicxKnYVK4/cg/q I3FV4dJ2qPBuBumTz4VGc+sYpVA+r4Or2K2DLq5dpy3OcdeOL9KpGUny+zQYHjpIWFam E0FL1/tBzopRSygmFp7T7o2603zrNIFmjR1YN9K48HuFu55+ShjvNHOg4ndVfgL1P8Qy heLw== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=qKkwVBvq; spf=pass (google.com: domain of melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::235 as permitted sender) smtp.mailfrom=melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Original-Received: from mail-oi1-x235.google.com (mail-oi1-x235.google.com. [2607:f8b0:4864:20::235]) by gmr-mx.google.com with ESMTPS id 76si131012qki.1.2020.02.11.04.01.13 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 11 Feb 2020 04:01:13 -0800 (PST) Received-SPF: pass (google.com: domain of melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::235 as permitted sender) client-ip=2607:f8b0:4864:20::235; Original-Received: by mail-oi1-x235.google.com with SMTP id a22so12479266oid.13 for ; Tue, 11 Feb 2020 04:01:13 -0800 (PST) X-Received: by 2002:aca:a816:: with SMTP id r22mr2676886oie.1.1581422473359; Tue, 11 Feb 2020 04:01:13 -0800 (PST) In-Reply-To: X-Original-Sender: melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=qKkwVBvq; spf=pass (google.com: domain of melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::235 as permitted sender) smtp.mailfrom=melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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:24419 Archived-At: --000000000000c3b74c059e4b9c17 Content-Type: text/plain; charset="UTF-8" Sorry I got confused, you meant tables. In the same vein Pandoc could wrap tables in a div with the label as id. That's probably a big change though. Den tis 11 feb. 2020 12:57BPJ skrev: > Maybe Pandoc should make the label an id on the image element so that > filters or writers can do something intelligent with them, orhave an > option/extension to do so? I'm afraid that it would take a change to the > LaTeX reader to implement this, so no quick fix. > > > Den tis 11 feb. 2020 07:00John Salamon skrev: > >> Hello, >> >> I am trying to convert from LaTeX to both HTML and docx, both of which >> result in the same thing happening. It seems that while figure references >> are automatically numbered, tables aren't. (I'm using pandoc 2.8) >> >> With the input below as an example: >> >> This reference to Table \ref{tbl:label} doesn't work. >> \begin{table} >> \caption{This caption has no number.}\label{tbl:label} >> \begin{tabular}{ l c r } >> 1 & 2 & 3 \\ >> 4 & 5 & 6 \\ >> 7 & 8 & 9 \\ >> \end{tabular} >> \end{table} >> >> This reference to Figure \ref{fig:label} works fine. >> \begin{figure} >> \includegraphics[width=\textwidth]{example-image-a} >> \caption{A numbered caption, if I use >> pandoc-crossref.}\label{fig:label} >> \end{figure} >> >> >> The table reference just becomes a hyperlink displaying the label like: >> [tbl:label], whereas the figure reference is numbered. >> If I use the pandoc-crossref filter, the figure captions are numbered >> while table captions aren't. >> Is there some option I'm missing that will make the table references >> behave the same as the figures? >> >> Best, >> John >> >> -- >> 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 >> email 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/cff01bf0-8c91-4f8c-a76d-7d070047513a%40googlegroups.com >> >> . >> > -- 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 email 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/CADAJKhDEBLxkTCuBZ4zaSmicS1CVhhWQNJnzP-HW6vG1mXtK6g%40mail.gmail.com. --000000000000c3b74c059e4b9c17 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Sorry I got confused, you meant tables. In the same vein = Pandoc could wrap tables in a div with the label as id. That's probably= a big change though.


Den tis 11 feb. 2020 12:57= BPJ <melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> skre= v:
Maybe Pandoc s= hould make the label an id on the image element so that filters or writers = can do something intelligent with them, orhave an option/extension to do so?=C2=A0 I'm afraid that i= t would take a change to the LaTeX reader to implement this, so no quick fi= x.


Den tis 11 feb. 2020 07:00John Salamon <s= alamonj9-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> skrev:
<= div dir=3D"ltr">
Hello,

I am trying to convert= from LaTeX to both HTML and docx, both of which result in the same thing h= appening. It seems that while figure references are automatically numbered,= tables aren't. (I'm using pandoc 2.8)

Wi= th the input below as an example:

This reference to Table \ref{tbl:label} doesn't work.
\begin{tab= le}
=C2=A0 =C2=A0 =C2=A0 =C2=A0 \caption{This caption has no number.}\la= bel{tbl:label}
=C2=A0 =C2=A0 =C2=A0 =C2=A0 \begin{tabular}{ l c r }
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 1 & 2 & 3 \\
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 4 & 5 & 6 \\
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 7 & 8 & 9 \\
=C2=A0 =C2=A0 =C2=A0 =C2=A0 \end{tabular}\end{table}

This reference to Figure \ref{fig:label} works fine.\begin{figure}
=C2=A0 =C2=A0 =C2=A0 =C2=A0 \includegraphics[width=3D\te= xtwidth]{example-image-a}
=C2=A0 =C2=A0 =C2=A0 =C2=A0 \caption{A numbere= d caption, if I use pandoc-crossref.}\label{fig:label}
\end{figure}
<= br>

The table reference just b= ecomes a hyperlink displaying the label like: [tbl:label], whereas the figu= re reference is numbered.
If I use the pandoc-crossref filter, th= e figure captions are numbered while table captions aren't.
I= s there some option I'm missing that will make the table references beh= ave the same as the figures?

Best,
J= ohn

--
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 pandoc-discuss+unsubscribe@goo= glegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/cf= f01bf0-8c91-4f8c-a76d-7d070047513a%40googlegroups.com.

--
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/CADAJKhDEBLxkTCuBZ4zaSmicS1CVhhWQNJnzP-HW= 6vG1mXtK6g%40mail.gmail.com.
--000000000000c3b74c059e4b9c17--