Thank you Bastien. I tried but yes, you were right, it can leave large empty columns... not great. I think I will stick to a single column layout :-p Le vendredi 26 mars 2021 à 17:39:04 UTC, Bastien Dumont a écrit : > \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 à 09:53:43AM, Loïc Houpert a écrit : > > Thank you Julien and Bastien. I tried Bastien's solution : adding > > ``` > > \renewenvironment{figure}{\begin{figure*}}{\end{figure*}} > > ``` > > > > in a file include_header.tex that I am loading in pandoc with the option: > > --include-in-header=" include_header .tex" \ > > > > and it works perfectly fine :-) > > > > > > Now I tried to do the same with the table > > \renewenvironment{table}{\begin{table*}}{\end{table*}} > > > > But it doesn't change anything. > > > > Currently, in my "include_header.tex" file, I also have these lines of > code to > > fix the problem of table layout in twocolumns layout pdf: > > > > \usepackage{supertabular} > > \newcommand\tcap{} > > \renewenvironment{longtable}{\begin{center}\bottomcaption{\tcap}\begin{ > > supertabular}}{\end{supertabular}\end{center}} > > \renewcommand{\endhead}{} > > > > > > Is there an easy way to adapt it so my table are also full-width? > > > > Thank you, > > > > Loïc > > Le vendredi 26 mars 2021 à 16:07:43 UTC, Bastien Dumont a écrit : > > > > Sorry for not having been clear enough: there is no difference between > (1) > > and (2). Both interrupt the text stream on the middle of p. 2, balance > the > > text between the columns, insert a blank space, then restart a new > > two-columns stream. (3) with the "-M classoption=twocolumn" option would > > result in something similar to the output of the following document, > which > > doesn't produce such interruption in the text stream: > > > > \documentclass[twocolumn]{article} > > \usepackage{lipsum} > > \renewenvironment{figure}{\begin{figure*}}{\end{figure*}} > > > > \begin{document} > > > > \lipsum[1-6] > > > > \begin{figure} > > \begin{quote} > > \lipsum[8] > > \end{quote} > > \end{figure} > > > > \lipsum[1-6] > > > > \end{document} > > > > I don't know if there is a way to place full-width figures in the middle > 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 > happen > > 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) > > > > Best, > > > > Bastien > > > > Le Friday 26 March 2021 à 08:14:19AM, Julien Dutant a écrit : > > > Thanks Bastien, > > > > > > Just to clarify: by "LaTeX always places on top of the page full-width > > figures > > > in a multicolumn environment" you mean that the figure is floated and > > placed on > > > top of a page, right? (as in the sample tex you give). Using neither > the > > filter > > > (i.e. removing the \end{multicols} and \begin{multicols}{2} that > surround > > the > > > figure) nor the \renenvironment crashes (floats not allowed in > > multicols). But > > > otherwise I don't see any difference in output between (1) filter > alone, > > (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ïc'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 doc 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 > figures > > > in a multicolumn environment. It means that the stream will be broken > > 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 document > > > (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 à 06:34:51AM, Julien Dutant a écrit : > > > > 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-columns}, > > > 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 = 'column-span' } ) > > > > end > > > > ``` > > > > > > > > Best, > > > > J > > > > > > > > On Friday, March 26, 2021 at 12:33:15 PM UTC houpe...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > wrote: > > > > > > > > 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=markdown+tex_math_single_backslash+tex_math_dollars+raw_tex \ > > > > --to=latex \ > > > > --output=build/article-print-doublecols.pdf \ > > > > --pdf-engine=xelatex \ > > > > --include-in-header="layout/supertabular.tex" \ > > > > --filter="layout/twocolumns_table_fix.py" \ > > > > -M classoption=twocolumn > > > > -M geometry="left=3cm,right=3cm,top=2cm,bottom=2cm" > > > > > > > > > > > > Is there an "easy" way to do that so the figures in my pdf will be > full > > > > width while all the rest of the document stay in a twocolumns layout > ? > > > > (e,g. by adding a specific argument to this command ?) > > > > > > > > I didn't find an easy solution to this problem.... > > > > > > > > Thank you, > > > > > > > > Loïc > > > > > > > > > > > > > > > > > > > > -- > > > > 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-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > > > To view this discussion on the web visit > https://groups.google.com/d/ > > > msgid/ > > > > pandoc-discuss/1b33b1a0-c0f2-4ffe-aaf1-a9190b5c1a59n% > 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-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. > > > > > > -- > > 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-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > To view this discussion on the web visit > https://groups.google.com/d/msgid/ > > pandoc-discuss/f5994909-e83c-445b-903b-61b0b5b9295an%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/5b7c8110-dbf9-4ee8-9c59-d10e255600a4n%40googlegroups.com.