From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/28023 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Bastien DUMONT Newsgroups: gmane.text.pandoc Subject: Re: full width figures in twocolumn layout ? (markdown -> pdf) Date: Fri, 26 Mar 2021 18:38:47 +0100 Message-ID: References: <7fc54189-9347-4c3c-8dc9-252aa701bf14n@googlegroups.com> <1b33b1a0-c0f2-4ffe-aaf1-a9190b5c1a59n@googlegroups.com> <2918620f-f3f3-471b-994e-74a85c9d1b29n@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15952"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBDCINCES2QJRBNNY7CBAMGQE4LLXAKY-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Fri Mar 26 18:39:03 2021 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-lj1-f184.google.com ([209.85.208.184]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1lPqQJ-00042f-EJ for gtp-pandoc-discuss@m.gmane-mx.org; Fri, 26 Mar 2021 18:39:03 +0100 Original-Received: by mail-lj1-f184.google.com with SMTP id e29sf5022509ljp.10 for ; Fri, 26 Mar 2021 10:39:03 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1616780343; cv=pass; d=google.com; s=arc-20160816; b=tK6XJLSMadna7MYRNqqPh1OfyM8/IyEu00uX5iAJGs32XQdZeC8q1BUBErGwgxbbgD stgJUKFH0c3CW3kyJH4yFs3H0i2/c+9nGxB125MGjw+aa9PRpqhDCjTxmNYB3PA9QCct Hv0pfHvHS1hrh2wecOqOzw7yaawKXU1/8JQVTTpDpoVjlGOaBjklgbXkVmiUZgsge44c H5GL6wM/ZsHvVSpR+5FEWfD22L3JSX3g/n9pocs0PX+PvK2yADW3fxDaxjpFP4t5OXX4 EX1SpHTFovfGmqPjtNRIcH6EzEdqRY+6iYloyyimThjftMkFLRHkxp89E0pJDzZZHF7m tOvA== 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:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:to:from:date:sender:dkim-signature; bh=SWL7RCnSnj5k3avZWts9Yb4iGXsBjR4nF1L9wm9oOR8=; b=U6xv19ggDudhNdeKIOYppVb1+d/CS5QmHEfmaWcel+SmBywP+1ySLw2yk2LQvC041u p3u/z7kCXqliVbL08HGoUA9RLqcrj7VNNsHDP1b5M842S6BeTYqbGFIyu09LP4eHd7XQ 64t+qoBWEZjy38r6nFi67nYssbN6d2VvDMwTzKy7ILkbUaSibYnvnY4RB+l0ojGYz9js NorYiAqm1Zxyy7Xeqz+87t12xrE+ZuF8EyphH1ti+SDHruq9x89E0ZHnYm2Ay/Y22xrX axz+1XtN3YUUuna4ZqBXLCAUppqWkG7RUa+T2nO3OWyTM1vX1IsCMARa/HB1N4u3CQy9 oM1A== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@posteo.net header.s=2017 header.b=lB8yr4s4; spf=pass (google.com: domain of bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org designates 185.67.36.65 as permitted sender) smtp.mailfrom=bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=posteo.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:date:from:to:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-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=SWL7RCnSnj5k3avZWts9Yb4iGXsBjR4nF1L9wm9oOR8=; b=qmWOOx7ZbeeORRG1XosB2Z04S4MOmrMidd4JEZXlRy3FsNzey3X9J3FzZSEJ6cWwMY FmqnI+IijKSyZwMTpWN+NJaQ+g9hLa5xQ8wy4kc12LZeHmOOwv4l6fxfk6gW209hY4iO elzzR14k+7aNg0YNpGGBDjQ2C+Dlw2JIyIy3ZD+ZbKDcR17lURaF24nAHR3ylymp+Ml7 dqJJNGZgmEaZ9FQTMHaV8jcowymfO6Owy7d1r9R2Ct3/hofzF36c0/QHteET+ZBsIAAd egSqNTNmFNzsCv/Rum+MmAL/oPocnj1vQJKIRQyPb7lxwI8DWVYDoA/CtZZKxf+9kg6L GaMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:date:from:to:subject:message-id :references:mime-version:content-disposition :content-transfer-encoding:in-reply-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=SWL7RCnSnj5k3avZWts9Yb4iGXsBjR4nF1L9wm9oOR8=; b=OZItbM9TdjneqEW82I1HhEwTsakDlO3S+VUn1CaEBoMEso1R0BnNh2lXdi30kuCMfC 5K9kEKn7+BcJNT/GMz1QVK+1r45ptAHbqcHU/cWM77pmnISuL3wxsScJqAHiLszkhvq8 fsevJXEhcgGTKmDPRWIoMQUO1J3bJ94G1BQSv0F7O6nAj7B4/TNEpg2bIFN8a0TtqM3f QuCWzVRG0LAK0eKqEJUJMM4L83cABpQ76STrNEFxQUoGnXaVxvyf+f5jc9FMHe7x8k1H nZKvBQiN6petxZ0AcFyppmbUIkpV7/q8rEqqF18Pc6MV Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM532045xElXKiflPFsRXfreoN2s4QdDOQiPufbOP1qckkMmmRrUYC vnuJMQJXbgK+alyB9rUscCE= X-Google-Smtp-Source: ABdhPJx6OZ56AVTHDlCMC4SbRzdCRW8cl2w1BzcgiZQ+R8Imyit58sn9l8Ml5qdiM3sBwS0c/WIi6Q== X-Received: by 2002:ac2:5103:: with SMTP id q3mr8918539lfb.26.1616780342994; Fri, 26 Mar 2021 10:39:02 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a2e:8915:: with SMTP id d21ls2182537lji.1.gmail; Fri, 26 Mar 2021 10:39:00 -0700 (PDT) X-Received: by 2002:a05:651c:1ad:: with SMTP id c13mr9225763ljn.73.1616780340298; Fri, 26 Mar 2021 10:39:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616780340; cv=none; d=google.com; s=arc-20160816; b=pv1D++j1OFXiYfd9rpw78XFdKM0OsRHZYAI3FDEvjUvqjsqVvFJ+9BI+HuV5hlrgAU DsoclMQdTux314zYF559snx5U2aZha1sSHuApzO+6utZdvadm6ubf3+wiMKY2+HLZ2/h Sd+ZV0bF5Tcdj3nBOyD91W9tVCbxzvSDCUsJ9XWZSyy0Rd0p6K5m6w80nfAboZ7G7sce Vqx/7BtjTZeVpv+uz7wwXi2vx4mEB+sfLoAf89cjtXACLIu7mrjG9Ba/9YcK1pz7PQdZ gc+fZdjmPD1sSTgJ0CirBLGFYtM2gZe/pO44CHCBFwi7+unnoo6Q3OaeJsajxNMd42cX 0E8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:to:from:date :dkim-signature; bh=2tG9/xeBxUiRtXcV2eE26wkeelUHfXx8YtDQEybJu2M=; b=ro5m/M4nUWq2ViYHmV820Un1Ctk5Tr+h/8uRMVxLJf4TsLR2F3Tv7C4tvJ0Lpd37NU y+/r2L/HaiCFvwQ1zsgIvUTpwPSSV/b5M43TjqnSuLpPOttyQRrJjvVMjeZJ8wY2dDqm hx718eqcXwaPpHXTvoPgfm+p8o6lWgJed/UiEmjg6zrgcffL8HN+T9piFQBC+5BpqEFf d6MUyfCQ83uv2kGiYkplX3GITokqtO/fjTUQ49f+Snh4cjMgGtiK1CRIIb2zhPRYrKRZ 5PWN+y4Ztc0rqfD/bJ7tdiQhnB0P3XV4UDppnbXDLfwF5gDGW3x3FGzQteP/62hlvt0i /QVA== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@posteo.net header.s=2017 header.b=lB8yr4s4; spf=pass (google.com: domain of bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org designates 185.67.36.65 as permitted sender) smtp.mailfrom=bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=posteo.net Original-Received: from mout01.posteo.de (mout01.posteo.de. [185.67.36.65]) by gmr-mx.google.com with ESMTPS id n13si480572lfi.5.2021.03.26.10.39.00 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 26 Mar 2021 10:39:00 -0700 (PDT) Received-SPF: pass (google.com: domain of bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org designates 185.67.36.65 as permitted sender) client-ip=185.67.36.65; Original-Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id 5620916005F for ; Fri, 26 Mar 2021 18:38:59 +0100 (CET) Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4F6TjV54Qwz6tmB for ; Fri, 26 Mar 2021 18:38:54 +0100 (CET) Content-Disposition: inline In-Reply-To: X-Original-Sender: bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@posteo.net header.s=2017 header.b=lB8yr4s4; spf=pass (google.com: domain of bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org designates 185.67.36.65 as permitted sender) smtp.mailfrom=bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=posteo.net 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:28023 Archived-At: \usepackage{supertabular} \newcommand\tcap{} \renewenvironment{longtable}{% \begin{onecolumn} \begin{center} \bottomcaption{\tcap} \begin{supertabular}% }{% \end{supertabular} \end{center} \end{onecolumn} \twocolumn{}% Otherwise it will not revert to two-columns layout. } \renewcommand{\endhead}{} However your text will resume at the page that begins after the end of your= table, possibly leaving a huge blank space in-between. Le Friday 26 March 2021 =C3=A0 09:53:43AM, Lo=C3=AFc Houpert a =C3=A9crit : > Thank you Julien and Bastien. I tried Bastien's solution : adding > ``` > \renewenvironment{figure}{\begin{figure*}}{\end{figure*}} > ``` >=20 > in a file include_header.tex that I am loading in pandoc with the option: > --include-in-header=3D" include_header .tex" \ >=20 > and it works perfectly fine :-) >=20 >=20 > Now I tried to do the same with the table > \renewenvironment{table}{\begin{table*}}{\end{table*}} >=20 > But it doesn't change anything. >=20 > Currently, in my "include_header.tex" file, I also have these lines of co= de to > fix the problem of table layout in twocolumns layout pdf: >=20 > \usepackage{supertabular} > \newcommand\tcap{} > \renewenvironment{longtable}{\begin{center}\bottomcaption{\tcap}\begin{ > supertabular}}{\end{supertabular}\end{center}} > \renewcommand{\endhead}{} >=20 >=20 > Is there an easy way to adapt it so my table are also full-width? >=20 > Thank you, >=20 > Lo=C3=AFc > Le vendredi 26 mars 2021 =C3=A0 16:07:43 UTC, Bastien Dumont a =C3=A9crit= =C2=A0: >=20 > Sorry for not having been clear enough: there is no difference betwee= n (1) > and (2). Both interrupt the text stream on the middle of p. 2, balanc= e the > text between the columns, insert a blank space, then restart a new > two-columns stream. (3) with the "-M classoption=3Dtwocolumn" option = would > result in something similar to the output of the following document, = which > doesn't produce such interruption in the text stream: >=20 > \documentclass[twocolumn]{article} > \usepackage{lipsum} > \renewenvironment{figure}{\begin{figure*}}{\end{figure*}} >=20 > \begin{document} >=20 > \lipsum[1-6] >=20 > \begin{figure} > \begin{quote} > \lipsum[8] > \end{quote} > \end{figure} >=20 > \lipsum[1-6] >=20 > \end{document} >=20 > I don't know if there is a way to place full-width figures in the mid= dle of > a page in a multicolumn document (that is, make the "h" option work).= In > such cases, LaTeX defaults to top, the "p" option works if specified,= and > you can make the "b" option work with \usepackage{nidanfloat}. If I h= appen > to find anything useful, I will let you know on your repository. > (See here a recent synthesis on the topic: https://www.texfaq.org/ > FAQ-2colfloat) >=20 > Best, >=20 > Bastien >=20 > Le Friday 26 March 2021 =C3=A0 08:14:19AM, Julien Dutant a =C3=A9crit= : > > Thanks Bastien, > > > > Just to clarify: by "LaTeX always places on top of the page full-wi= dth > figures > > in a multicolumn environment" you mean that the figure is floated a= nd > placed on > > top of a page, right? (as in the sample tex you give). Using neithe= r the > filter > > (i.e. removing the \end{multicols} and \begin{multicols}{2} that su= rround > the > > figure) nor the \renenvironment crashes (floats not allowed in > multicols). But > > otherwise I don't see any difference in output between (1) filter a= lone, > (2) > > filter + renewenvironnment, (3) renewenvironment alone, except that= the > float > > may end up in a different page depending on details. I can see that= using > the > > renewenvironment alone may be simpler for Lo=C3=AFc's purposes than= loading > the > > filter and wrapping the whole doc in ::: columns div. But perhaps a= more > > general solution would be: > > > > - to have a filter that handles float placement in LaTeX (per doc, = per > figure > > basis). > > - to make sure the columns filter handles column markup when the do= c is > in > > two-columns mode, without the need for a wrapping div. > > - possibly, to add float placement options in the columns filter? > > > > I'll post the last two issues on the columns repo. > > > > All best, > > > > Julien > > > > On Friday, March 26, 2021 at 2:49:48 PM UTC Bastien Dumont wrote: > > > > Hi, > > > > Thank you for sharing your filter, which is really great. I noticed= one > > problem though: LaTeX always places on top of the page full-width f= igures > > in a multicolumn environment. It means that the stream will be brok= en > after > > the figure, as this document will show: > > > > \documentclass{article} > > \usepackage{multicol} > > \usepackage{lipsum} > > > > \begin{document} > > > > \begin{multicols}{2} > > \lipsum[1-7] > > \end{multicols} > > > > \begin{figure} > > \begin{quote} > > \lipsum[8] > > \end{quote} > > \end{figure} > > > > \begin{multicols}{2} > > \lipsum[1-7] > > \end{multicols} > > > > \end{document} > > > > If you only want to make all figures span the entire width in a > two-column > > layout, you can simply add this in the metadata block of your docum= ent > > (without changing anything in the command-line): > > > > header-includes: | > > \renewenvironment{figure}{\begin{figure*}}{\end{figure*}} > > > > However, the limitation regarding the figures' placement will still > apply. > > > > Hoping that it helps, > > > > Bastien > > > > Le Friday 26 March 2021 =C3=A0 06:34:51AM, Julien Dutant a =C3=A9cr= it : > > > Hi, > > > > > > The columns filter might help: https://github.com/jdutant/columns= . It > > will > > > typeset as full width anything wrap within a ::: columns-span DIV= . It > > doesn't > > > have an option to automatically do that for every figure / table, > though > > you > > > could write a small lua filter to add that. Notes: > > > > > > - the column-span DIVs will only be processed if they are in a ::= : > > columns DIV. > > > Solution: put the entire document in such a DIV (or ::: {.two-col= umns}, > > to be > > > on the safe side) > > > - the filter will add "\usepackage{multicols}" to your header. > > > > > > A small Lua filter to put tables in fulll width would like: > > > > > > ```lua > > > function Table (elem) > > > return pandoc.Div( elem, {class =3D 'column-span' } ) > > > end > > > ``` > > > > > > Best, > > > J > > > > > > On Friday, March 26, 2021 at 12:33:15 PM UTC houpe...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org w= rote: > > > > > > Hi all, > > > I didn't find a way to easily display my figure in full width in = a > > > two-column layout document. > > > > > > I have a markdown document that I convert to pdf with the command > below: > > > > > > pandoc article.md \ > > > --citeproc \ > > > --from=3Dmarkdown+tex_math_single_backslash+tex_math_dollars+raw_= tex \ > > > --to=3Dlatex \ > > > --output=3Dbuild/article-print-doublecols.pdf \ > > > --pdf-engine=3Dxelatex \ > > > --include-in-header=3D"layout/supertabular.tex" \ > > > --filter=3D"layout/twocolumns_table_fix.py" \ > > > -M classoption=3Dtwocolumn > > > -M geometry=3D"left=3D3cm,right=3D3cm,top=3D2cm,bottom=3D2cm" > > > > > > > > > Is there an "easy" way to do that so the figures in my pdf will b= e full > > > width while all the rest of the document stay in a twocolumns lay= out ? > > > (e,g. by adding a specific argument to this command ?) > > > > > > I didn't find an easy solution to this problem.... > > > > > > Thank you, > > > > > > Lo=C3=AFc > > > > > > > > > > > > > > > -- > > > You received this message because you are subscribed to the Googl= e > Groups > > > "pandoc-discuss" group. > > > To unsubscribe from this group and stop receiving emails from it,= send > an > > email > > > to pandoc-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > > To view this discussion on the web visit https://groups.google.co= m/d/ > > msgid/ > > > pandoc-discuss/1b33b1a0-c0f2-4ffe-aaf1-a9190b5c1a59n%40googlegrou= ps.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, s= end an > email > > to pandoc-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > To view this discussion on the web visit https://groups.google.com/= d/ > msgid/ > > pandoc-discuss/2918620f-f3f3-471b-994e-74a85c9d1b29n%40googlegroups= .com. >=20 >=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= email > to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit https://groups.google.com/d/msgi= d/ > pandoc-discuss/f5994909-e83c-445b-903b-61b0b5b9295an%40googlegroups.com. --=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/YF4cJ3Z0voBg2yUd%40localhost.