From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/32733 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: John MacFarlane Newsgroups: gmane.text.pandoc Subject: Re: Cleaner Table Formatting when converting from Markdown to Latex? Date: Wed, 31 May 2023 21:43:08 -0700 Message-ID: <92BA4BD2-C13C-4B5E-80BB-A8C7D3782FAC@gmail.com> References: <532e15c3-6027-45bd-b0ba-7393632f2dc9n@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.3\)) Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10472"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBDW7ZIEHTIIBBYGD4CRQMGQEDAJHLXQ-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Thu Jun 01 06:43:17 2023 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-qt1-f192.google.com ([209.85.160.192]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1q4a9c-0002Yi-5I for gtp-pandoc-discuss@m.gmane-mx.org; Thu, 01 Jun 2023 06:43:16 +0200 Original-Received: by mail-qt1-f192.google.com with SMTP id d75a77b69052e-3f6c5963db7sf3294051cf.2 for ; Wed, 31 May 2023 21:43:16 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1685594595; cv=pass; d=google.com; s=arc-20160816; b=ERf6SxsGCreBssD8cGuCzce0ehoDw27EUeyfmSrZe9vmISfhmywvJtfW++yvKuhS9j XlEz9fNfAOrq6FzjpOyKxMX2PSMd7LAOcdSw9ckd46GAcpMrJJLmvL38Z9OHC+3HjRFL xMOXIJiROvkET/WhZtcsvk1sVt4V8X0rdRp5hap2BPrH0/2/2KJ0BBuL6/xgdHkjGhHg 6wrf+NRzxsoBNcokLINrnAMJVHvU0TRMnJSIe2W7p5hYDD1dN8CIxbVkPrhwwfVvxhhx ME9WPl+eFESVjBZ0HLKNaMpf3DRe4mQTIGeYaLGR3KlAuBw5AQS6rUSYtumHA0NfujIh MuVw== 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:message-id:in-reply-to:to :references:date:subject:mime-version:from:sender:dkim-signature :dkim-signature; bh=TKmgJVeUKqji072f1KnYg4tc9Zc4Li0r+lOzh+co1Hw=; b=SPzfbgsvPqxVfbVOvrHyZOi0TKTZLLV9nJdxMXjPim7jkPzMNs/xqsA+SbNBUl3uAK k8wPJItmzayUq/P75cRVv2LlazVJysEIK2Plio8VrhxkwADCGScKMLID4OdjGs4xaGwh OZe2gh8UCzzqEfm3Q7JaGGmDDaNJ1sJyiKHzsxsFdQwru+6UEXdAUfJMqLa/Dqs80EWP 3n2ULtr3Y16Sgke/ZtE3QS10/OZUhTen+Up1IST9HzVC3ToCA8iLVucmZJvwTcvlp0qt 0E0A16Bjl7pYlWcyPInjAgzA24MEXr6j6sisE3mr5VFk9gpquYxIILSiKcDhLKKsCa8O odwA== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=K3oJ4W9C; spf=pass (google.com: domain of fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::632 as permitted sender) smtp.mailfrom=fiddlosopher-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=20221208; t=1685594595; x=1688186595; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:message-id :in-reply-to:to:references:date:subject:mime-version:from:sender :from:to:cc:subject:date:message-id:reply-to; bh=TKmgJVeUKqji072f1KnYg4tc9Zc4Li0r+lOzh+co1Hw=; b=j8JdvUKBx3L+GDWgFS9TkmGjXCUyak99LvM4ojEGgbB4zO6FW1YeYpRLeEalhpJGmZ Pyfn4f16EBgFTPYrOPliHWJ/sF/ywR/01EtEw7vGKYHWkQcZBsg5lxpvkUrxwvq/4Ld4 Dp5wg9BBBjyxD2+Gz9dDzXRlzrceZ833ajL4bFh4j9mNlzGZyN2BLpE2t3qxTE5Ztfz+ nlLiBeq7V6IN46iiYl8FlHWcb2Wf8DxZU/67Bu8wa7a+GVy4527ACZRlNivqROSafQnP 53nVPzHolrLlWWi8LTl7EpxWTNggXMoKbaktYMgo0fjF6isc1691GZcA6C47g/TecA4D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685594595; x=1688186595; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:message-id :in-reply-to:to:references:date:subject:mime-version:from:from:to:cc :subject:date:message-id:reply-to; bh=TKmgJVeUKqji072f1KnYg4tc9Zc4Li0r+lOzh+co1Hw=; b=gUyTPGs391fb9aGTnn7uDy/IeM4/bSEm393x0yNHDJk3mf8by+R4toDGF5EeM1QR7U 1gWmq2DdLu3CgEOb5y04a2nmt9jRvrHjabKO+nkFVqJDlPA4S8hFG8XCjAYdZ7C4Id8Y QPg4+SxFcnmmDOPvSL4TWRoPzf4ZjyK8ro4sqKehiXZCvQNZFiTes1tsqCyV3/xqpbMS C+MFXV8E3c1QwEs88YUbyItoKLR5fEVrtr+EqaNIEYc8v4N+Gf8Bjl0uB+VCdua0bGuk pgNM4R9rdJU1buGgIX5NEbzY/j0sVx+W/t8B9f0bviFrwjnu8kX99S6XeGJt6GO6Af7C oAtg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685594595; x=1688186595; 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-authentication-results:x-original-sender:message-id :in-reply-to:to:references:date:subject:mime-version:from :x-beenthere:x-gm-message-state:sender:from:to:cc:subject:date :message-id:reply-to; bh=TKmgJVeUKqji072f1KnYg4tc9Zc4Li0r+lOzh+co1Hw=; b=SZD0rXZXejtd2w5rElKFndDh/mA/i2wiYAxVrhyCNBRpnZ3FjP7eAvNL1oYJ9WlGgx bRRGyQ1EjJq3cJ8zfK28Adq4CXo3eZNmCTQs+hb58FQxqgsuUDOtpvgwwHcsX0qGqmnb /EyvlknyLdeD6tHPcXIuZQyH68zKFJwowNGgvJEXzrsRp3U1HPjee/rhdslguuU3RYk4 KkH3bXbxm9ffhPfBTaoDKDW/LB3qho2enHFE5kbWN1/QYl3ajkc+Q+mfEG89HEUPh6Eo pF3ggc Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AC+VfDzHidsEmi7cDDD2gS8KRYNsfkoZepXvtgBASVRhsfr1oh/41qH6 NlXmr2Hdx+IjslT5Iq5ywC8= X-Google-Smtp-Source: ACHHUZ5BOmh0p3EbQtjc72w9rpfydvwCS/w7WxnjLRlcqY4asNZTxRWn1n0PoFrmyEYtu073FDw7kg== X-Received: by 2002:ac8:7c54:0:b0:3f8:4d7:4758 with SMTP id o20-20020ac87c54000000b003f804d74758mr8756694qtv.58.1685594595126; Wed, 31 May 2023 21:43:15 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:ac8:550a:0:b0:3f6:a07c:d352 with SMTP id j10-20020ac8550a000000b003f6a07cd352ls365587qtq.1.-pod-prod-03-us; Wed, 31 May 2023 21:43:11 -0700 (PDT) X-Received: by 2002:a1f:3f83:0:b0:457:38b6:d1cf with SMTP id m125-20020a1f3f83000000b0045738b6d1cfmr272754vka.3.1685594591639; Wed, 31 May 2023 21:43:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685594591; cv=none; d=google.com; s=arc-20160816; b=FhK580zyis9sAwlrbo7ZB4otS6ImTA+vzuOW1wY99jHkaUAMEYi4spdGDs0vP2fCWt JnnPnQXMDH2NrPkBykJ5Wa6zlEr8m8tMZ4/cWZIg/mpWi5C3KQ6LHKmU0KXsocoB29Uq /R+Ks3LunPsXcSgMBXimXEmDYw8QoYeHkaziAvDZvtV/AMzVQxUNfKmtUEU8G8jh3Too 3tQ4wqrdPCcng/N3NIkgF4O06lKt+lQWOv3S0ArpyRsucboKLSmuVmSu2/i9igc8fQNI FvUW4risjsW+4TsckpehB+WK9MeTQDu6NYu/sggO6nJpLfWDHxNg1ppUT7Ys4pPQs+cX nWHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:in-reply-to:to:references:date:subject:mime-version :content-transfer-encoding:from:dkim-signature; bh=nmY6ahA3vDIqPylChI6/htMDPxxnvM2t0NLoEbY8eMk=; b=Snpbxb7vXBHc+yyRecP3skAB6V00WQXU1c/t5+HX3zWqGwxpo3puUcp8Q7Up5y3tRT /XngXVlahHiTTzyEHrWZfkP6dpjHILXyx1I4+aSlPd667GqQ/jkIORlBgH7vu0foJ6TC igYYB70AxV2JmM7qCSQUmyc6zgONteYVXfkAkITV+6i5lmcmrqy8Hgjy1JlDC3ktVJSn H1+zcsd6B4wKw4TxLWF7MfY2xkbjoDK7lXd/IOU7dywKyLKEmAfTnm5FOgJU6Cnld8Eu qUqzX6I2OoETE5MiqXrEUiSjXpbwkNxvyEOJtcnZ1I7UVe5KW0V8RdlH+6pcZSa3nDJ8 Xtww== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=K3oJ4W9C; spf=pass (google.com: domain of fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::632 as permitted sender) smtp.mailfrom=fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Original-Received: from mail-pl1-x632.google.com (mail-pl1-x632.google.com. [2607:f8b0:4864:20::632]) by gmr-mx.google.com with ESMTPS id 204-20020a1f17d5000000b00450e301dcc7si1962630vkx.3.2023.05.31.21.43.11 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 31 May 2023 21:43:11 -0700 (PDT) Received-SPF: pass (google.com: domain of fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::632 as permitted sender) client-ip=2607:f8b0:4864:20::632; Original-Received: by mail-pl1-x632.google.com with SMTP id d9443c01a7336-1b04949e5baso3705515ad.0 for ; Wed, 31 May 2023 21:43:11 -0700 (PDT) X-Received: by 2002:a17:902:ea93:b0:1b1:78ba:f350 with SMTP id x19-20020a170902ea9300b001b178baf350mr3738194plb.46.1685594590360; Wed, 31 May 2023 21:43:10 -0700 (PDT) Original-Received: from smtpclient.apple ([2601:644:4701:23f0:a03f:b9e3:e209:ea92]) by smtp.gmail.com with ESMTPSA id u9-20020a170902e5c900b001b0034557afsm2294736plf.15.2023.05.31.21.43.09 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 31 May 2023 21:43:09 -0700 (PDT) In-Reply-To: <532e15c3-6027-45bd-b0ba-7393632f2dc9n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> X-Mailer: Apple Mail (2.3696.120.41.1.3) X-Original-Sender: fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=K3oJ4W9C; spf=pass (google.com: domain of fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::632 as permitted sender) smtp.mailfrom=fiddlosopher-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:32733 Archived-At: You are getting relative widths specified because the table is wide. (Previously we didn't do this and people complained that their tables extended beyond the edge of the margin or even the page.) If the table is not wide, you get a simple table: \begin{longtable}[]{@{}lllll@{}} \toprule\noalign{} & Mon & Tue & Wed & Thu \\ \midrule\noalign{} \endhead \bottomrule\noalign{} \endlastfoot Week 1 & Example & Example & Example & Example \\ Week 2 & Example & Example & Example & Example \\ Week 3 & Example & Example & Example & Example \\ Week 4 & Example & Example & Example & Example \\ \end{longtable} > On May 31, 2023, at 12:08 PM, 'RM' via pandoc-discuss wrote: > > Sometimes pandoc adds a load of undesired guff into the latex tables. > > Is there a way to signal to pandoc that I want it to "cleanly" convert the markdown tables to latex instead of adding all sorts of bizarre formatting? > > Example: > > Consider the following markdown table: > > | | Mon | Tue | Wed | Thu | Fri | Sat | Sun | Notes | > |--------|---------|---------|---------|---------|---------|---------|---------|---------| > | Week 1 | Example | Example | Example | Example | Example | Example | Example | Example | > | Week 2 | Example | Example | Example | Example | Example | Example | Example | Example | > | Week 3 | Example | Example | Example | Example | Example | Example | Example | Example | > | Week 4 | Example | Example | Example | Example | Example | Example | Example | Example | > > > Version 2.16 sensibly converts the markdown table to: > > \begin{longtable}[]{@{}lllllllll@{}} > \toprule > & Mon & Tue & Wed & Thu & Fri & Sat & Sun & Notes \\ > \midrule > \endhead > Week 1 & Example & Example & Example & Example & Example & Example & > Example & Example \\ > Week 2 & Example & Example & Example & Example & Example & Example & > Example & Example \\ > Week 3 & Example & Example & Example & Example & Example & Example & > Example & Example \\ > Week 4 & Example & Example & Example & Example & Example & Example & > Example & Example \\ > \bottomrule > \end{longtable} > > > > > While the latest version (3.1.2) converts it to this mess: > > \begin{longtable}[]{@{} > >{\raggedright\arraybackslash}p{(\columnwidth - 16\tabcolsep) * \real{0.1000}} > >{\raggedright\arraybackslash}p{(\columnwidth - 16\tabcolsep) * \real{0.1125}} > >{\raggedright\arraybackslash}p{(\columnwidth - 16\tabcolsep) * \real{0.1125}} > >{\raggedright\arraybackslash}p{(\columnwidth - 16\tabcolsep) * \real{0.1125}} > >{\raggedright\arraybackslash}p{(\columnwidth - 16\tabcolsep) * \real{0.1125}} > >{\raggedright\arraybackslash}p{(\columnwidth - 16\tabcolsep) * \real{0.1125}} > >{\raggedright\arraybackslash}p{(\columnwidth - 16\tabcolsep) * \real{0.1125}} > >{\raggedright\arraybackslash}p{(\columnwidth - 16\tabcolsep) * \real{0.1125}} > >{\raggedright\arraybackslash}p{(\columnwidth - 16\tabcolsep) * \real{0.1125}}@{}} > \toprule\noalign{} > \begin{minipage}[b]{\linewidth}\raggedright > \end{minipage} & \begin{minipage}[b]{\linewidth}\raggedright > Mon > \end{minipage} & \begin{minipage}[b]{\linewidth}\raggedright > Tue > \end{minipage} & \begin{minipage}[b]{\linewidth}\raggedright > Wed > \end{minipage} & \begin{minipage}[b]{\linewidth}\raggedright > Thu > \end{minipage} & \begin{minipage}[b]{\linewidth}\raggedright > Fri > \end{minipage} & \begin{minipage}[b]{\linewidth}\raggedright > Sat > \end{minipage} & \begin{minipage}[b]{\linewidth}\raggedright > Sun > \end{minipage} & \begin{minipage}[b]{\linewidth}\raggedright > Notes > \end{minipage} \\ > \midrule\noalign{} > \endhead > \bottomrule\noalign{} > \endlastfoot > Week 1 & Example & Example & Example & Example & Example & Example & > Example & Example \\ > Week 2 & Example & Example & Example & Example & Example & Example & > Example & Example \\ > Week 3 & Example & Example & Example & Example & Example & Example & > Example & Example \\ > Week 4 & Example & Example & Example & Example & Example & Example & > Example & Example \\ > \end{longtable} > > (And this isn't simply an issue with later versions. I've noticed 2.16 adds the guff to some tables, too. Though whatever algo it's using to make that choice differs between versions. ) > > > I'd like all of my tables to be converted to the "clean" format. Is there an argument I can use to make that happen? > > > > > > > > > > > > > > > > > > > -- > 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/532e15c3-6027-45bd-b0ba-7393632f2dc9n%40googlegroups.com.