public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* Fenced divs for multiple columns
@ 2020-10-12 16:52 Philipp
       [not found] ` <df71c2b3-4bae-4ef7-b2fe-a647d284c3c5n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Philipp @ 2020-10-12 16:52 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 1357 bytes --]

Hi,

I just found out that the "fenced-divs-solution" for multicolumn layouts is 
limited to latex beamer and other slide-based outputs.
Would it be possible to support this for page-based output as well?

Of course, there is the LaTeX-specific workaround to define \Begin and \End 
instead of \begin and \end and then include the appropriate LaTeX-commands 
directly in the markdown file. This works well, but limits further 
processing to LaTeX.

The solution based on fenced divs would avoid LaTeX-commands within the 
markdown file and could be used to produce different kinds of output (at 
least theoretically, I must admit I have no idea how much effort it would 
be to support this).

So I wonder if there's a reason why fenced-div-columns are currently 
limited to slides (I guess there is) and if there's any chance that they 
will work for other types of output in future versions of pandoc (I hope 
there is ;-) ).

Regards,
Philipp


-- 
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/df71c2b3-4bae-4ef7-b2fe-a647d284c3c5n%40googlegroups.com.

[-- Attachment #1.2: Type: text/html, Size: 1801 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Fenced divs for multiple columns
       [not found] ` <df71c2b3-4bae-4ef7-b2fe-a647d284c3c5n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2020-10-12 17:11   ` William Lupton
       [not found]     ` <CAEe_xxhdm3q87vWuEzgSBZdZ5wkDewGNgndFRwocWN+fpNSMFQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: William Lupton @ 2020-10-12 17:11 UTC (permalink / raw)
  To: pandoc-discuss

[-- Attachment #1: Type: text/plain, Size: 2527 bytes --]

I've used fenced divs with CSS for HTML and (via wkhtmltopdf) PDF to
generate two columns. Does this help?

::: left :::
Contents of left-hand column.
:::

::: right :::
Contents of right-hand column.
:::

::: clear :::
:::

These are the CSS classes:

div.left {
    width: 49%;
    float: left;
    /* border: solid 1px; */
}

div.right {
    width: 49%;
    float: right;
    /* border: solid 1px; */
}

div.clear {
    clear: both;
}

On Mon, 12 Oct 2020 at 17:52, Philipp <philipp.kupferschmied-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:

> Hi,
>
> I just found out that the "fenced-divs-solution" for multicolumn layouts
> is limited to latex beamer and other slide-based outputs.
> Would it be possible to support this for page-based output as well?
>
> Of course, there is the LaTeX-specific workaround to define \Begin and
> \End instead of \begin and \end and then include the appropriate
> LaTeX-commands directly in the markdown file. This works well, but limits
> further processing to LaTeX.
>
> The solution based on fenced divs would avoid LaTeX-commands within the
> markdown file and could be used to produce different kinds of output (at
> least theoretically, I must admit I have no idea how much effort it would
> be to support this).
>
> So I wonder if there's a reason why fenced-div-columns are currently
> limited to slides (I guess there is) and if there's any chance that they
> will work for other types of output in future versions of pandoc (I hope
> there is ;-) ).
>
> Regards,
> Philipp
>
>
> --
> 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/df71c2b3-4bae-4ef7-b2fe-a647d284c3c5n%40googlegroups.com
> <https://groups.google.com/d/msgid/pandoc-discuss/df71c2b3-4bae-4ef7-b2fe-a647d284c3c5n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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/CAEe_xxhdm3q87vWuEzgSBZdZ5wkDewGNgndFRwocWN%2BfpNSMFQ%40mail.gmail.com.

[-- Attachment #2: Type: text/html, Size: 3669 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Fenced divs for multiple columns
       [not found]     ` <CAEe_xxhdm3q87vWuEzgSBZdZ5wkDewGNgndFRwocWN+fpNSMFQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2020-10-12 19:22       ` Philipp
       [not found]         ` <2f3956a8-5685-45fd-937c-7d5778e9d4e7n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Philipp @ 2020-10-12 19:22 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 4140 bytes --]

Thank you for your reply. This is not exactly what I was looking for, but 
now that I read your reply I realize that I wasn't really aware of how 
fenced divs can be used in general because I was too focused on the way I 
used them so far.
What I meant is the following usage, which works fine for beamer slides:

::: {.columns}
:::: {.column}
Blah
::::
:::: {.column}
More blah
::::
:::

My hope was/is that this very same syntax with these .column(s) attributes 
could be used for two-column layouts in articles, books or other 
LaTeX-based output and even for Word- or ODT-files (I don't know if it 
would also make sense for HTML output, your CSS-based solution seems to be 
more flexible). Currently, what I have to do for my document is something 
like
---
header-includes:
- \usepackage{multicol}
- \newcommand{\hideFromPandoc}[1]{#1}
- \hideFromPandoc{
\let\Begin\begin
\let\End\end
}
---
...


\Begin{multicols}{2}
Some multicolumn text...
\End{multicols}

(Nothing I came up with myself, I found it somewhere on the web. I don't 
even understand why those \let commands are placed inside 
\hideFromPandoc...) It does work as intended, but if I would decide one day 
that I'd prefer ODT over PDF, I guess this wouldn't work. I try to avoid 
LaTeX commands within my markdown files where possible. So if something 
like your solution for HTML would be possible for LaTeX/PDF as well, this 
would also be an improvement over the solution I use currently.
William Lupton schrieb am Montag, 12. Oktober 2020 um 19:11:29 UTC+2:

> I've used fenced divs with CSS for HTML and (via wkhtmltopdf) PDF to 
> generate two columns. Does this help?
>
> ::: left :::
> Contents of left-hand column.
> :::
>
> ::: right :::
> Contents of right-hand column.
> :::
>
> ::: clear :::
> :::
>
> These are the CSS classes:
>
> div.left {
>     width: 49%;
>     float: left;
>     /* border: solid 1px; */
> }
>
> div.right {
>     width: 49%;
>     float: right;
>     /* border: solid 1px; */
> }
>
> div.clear {
>     clear: both;
> }
>
> On Mon, 12 Oct 2020 at 17:52, Philipp <philipp.ku...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>
>> Hi,
>>
>> I just found out that the "fenced-divs-solution" for multicolumn layouts 
>> is limited to latex beamer and other slide-based outputs.
>> Would it be possible to support this for page-based output as well?
>>
>> Of course, there is the LaTeX-specific workaround to define \Begin and 
>> \End instead of \begin and \end and then include the appropriate 
>> LaTeX-commands directly in the markdown file. This works well, but limits 
>> further processing to LaTeX.
>>
>> The solution based on fenced divs would avoid LaTeX-commands within the 
>> markdown file and could be used to produce different kinds of output (at 
>> least theoretically, I must admit I have no idea how much effort it would 
>> be to support this).
>>
>> So I wonder if there's a reason why fenced-div-columns are currently 
>> limited to slides (I guess there is) and if there's any chance that they 
>> will work for other types of output in future versions of pandoc (I hope 
>> there is ;-) ).
>>
>> Regards,
>> Philipp
>>
>>
>> -- 
>> 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/df71c2b3-4bae-4ef7-b2fe-a647d284c3c5n%40googlegroups.com 
>> <https://groups.google.com/d/msgid/pandoc-discuss/df71c2b3-4bae-4ef7-b2fe-a647d284c3c5n%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
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/2f3956a8-5685-45fd-937c-7d5778e9d4e7n%40googlegroups.com.

[-- Attachment #1.2: Type: text/html, Size: 5977 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Fenced divs for multiple columns
       [not found]         ` <2f3956a8-5685-45fd-937c-7d5778e9d4e7n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2020-10-13  8:20           ` William Lupton
  2020-10-19  5:19           ` John MacFarlane
  1 sibling, 0 replies; 6+ messages in thread
From: William Lupton @ 2020-10-13  8:20 UTC (permalink / raw)
  To: pandoc-discuss

[-- Attachment #1: Type: text/plain, Size: 5417 bytes --]

I think there's some hope for a standard interface. For example, with
'begin', 'left', 'right' and 'end' (conceptual) directives you could have:

   1. start
   2. left -- followed by left column content
   3. right -- followed by right column content
   4. end

and this would work with these mappings:

   1. beamer -> (.columns, .column, .column, nil}
   2. css -> (nil, left, right, clear)

Extensions to multi-column might be harder, at least for CSS.

On Mon, 12 Oct 2020 at 20:23, Philipp <philipp.kupferschmied-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:

> Thank you for your reply. This is not exactly what I was looking for, but
> now that I read your reply I realize that I wasn't really aware of how
> fenced divs can be used in general because I was too focused on the way I
> used them so far.
> What I meant is the following usage, which works fine for beamer slides:
>
> ::: {.columns}
> :::: {.column}
> Blah
> ::::
> :::: {.column}
> More blah
> ::::
> :::
>
> My hope was/is that this very same syntax with these .column(s) attributes
> could be used for two-column layouts in articles, books or other
> LaTeX-based output and even for Word- or ODT-files (I don't know if it
> would also make sense for HTML output, your CSS-based solution seems to be
> more flexible). Currently, what I have to do for my document is something
> like
> ---
> header-includes:
> - \usepackage{multicol}
> - \newcommand{\hideFromPandoc}[1]{#1}
> - \hideFromPandoc{
> \let\Begin\begin
> \let\End\end
> }
> ---
> ...
>
>
> \Begin{multicols}{2}
> Some multicolumn text...
> \End{multicols}
>
> (Nothing I came up with myself, I found it somewhere on the web. I don't
> even understand why those \let commands are placed inside
> \hideFromPandoc...) It does work as intended, but if I would decide one day
> that I'd prefer ODT over PDF, I guess this wouldn't work. I try to avoid
> LaTeX commands within my markdown files where possible. So if something
> like your solution for HTML would be possible for LaTeX/PDF as well, this
> would also be an improvement over the solution I use currently.
> William Lupton schrieb am Montag, 12. Oktober 2020 um 19:11:29 UTC+2:
>
>> I've used fenced divs with CSS for HTML and (via wkhtmltopdf) PDF to
>> generate two columns. Does this help?
>>
>> ::: left :::
>> Contents of left-hand column.
>> :::
>>
>> ::: right :::
>> Contents of right-hand column.
>> :::
>>
>> ::: clear :::
>> :::
>>
>> These are the CSS classes:
>>
>> div.left {
>>     width: 49%;
>>     float: left;
>>     /* border: solid 1px; */
>> }
>>
>> div.right {
>>     width: 49%;
>>     float: right;
>>     /* border: solid 1px; */
>> }
>>
>> div.clear {
>>     clear: both;
>> }
>>
>> On Mon, 12 Oct 2020 at 17:52, Philipp <philipp.ku...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>>
>>> Hi,
>>>
>>> I just found out that the "fenced-divs-solution" for multicolumn layouts
>>> is limited to latex beamer and other slide-based outputs.
>>> Would it be possible to support this for page-based output as well?
>>>
>>> Of course, there is the LaTeX-specific workaround to define \Begin and
>>> \End instead of \begin and \end and then include the appropriate
>>> LaTeX-commands directly in the markdown file. This works well, but limits
>>> further processing to LaTeX.
>>>
>>> The solution based on fenced divs would avoid LaTeX-commands within the
>>> markdown file and could be used to produce different kinds of output (at
>>> least theoretically, I must admit I have no idea how much effort it would
>>> be to support this).
>>>
>>> So I wonder if there's a reason why fenced-div-columns are currently
>>> limited to slides (I guess there is) and if there's any chance that they
>>> will work for other types of output in future versions of pandoc (I hope
>>> there is ;-) ).
>>>
>>> Regards,
>>> Philipp
>>>
>>>
>>> --
>>> 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/df71c2b3-4bae-4ef7-b2fe-a647d284c3c5n%40googlegroups.com
>>> <https://groups.google.com/d/msgid/pandoc-discuss/df71c2b3-4bae-4ef7-b2fe-a647d284c3c5n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>> --
> 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/2f3956a8-5685-45fd-937c-7d5778e9d4e7n%40googlegroups.com
> <https://groups.google.com/d/msgid/pandoc-discuss/2f3956a8-5685-45fd-937c-7d5778e9d4e7n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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/CAEe_xxjVXPvHzWuVDvMX4Y1rFTYE7e3kpQ4YRE4cQvCZv-C9rA%40mail.gmail.com.

[-- Attachment #2: Type: text/html, Size: 7451 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Fenced divs for multiple columns
       [not found]         ` <2f3956a8-5685-45fd-937c-7d5778e9d4e7n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  2020-10-13  8:20           ` William Lupton
@ 2020-10-19  5:19           ` John MacFarlane
       [not found]             ` <m2eelu6bdu.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
  1 sibling, 1 reply; 6+ messages in thread
From: John MacFarlane @ 2020-10-19  5:19 UTC (permalink / raw)
  To: Philipp, pandoc-discuss


I wouldn't mind letting the columns divs work in LaTeX, but
it's not entirely trivial.  Using multicols as you suggest
doesn't have the same semantics, as nothing forces which
content will appear in which column.  Perhaps adding an
explicit column break command would work, tough.

Philipp <philipp.kupferschmied-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:

> Thank you for your reply. This is not exactly what I was looking for, but 
> now that I read your reply I realize that I wasn't really aware of how 
> fenced divs can be used in general because I was too focused on the way I 
> used them so far.
> What I meant is the following usage, which works fine for beamer slides:
>
> ::: {.columns}
> :::: {.column}
> Blah
> ::::
> :::: {.column}
> More blah
> ::::
> :::
>
> My hope was/is that this very same syntax with these .column(s) attributes 
> could be used for two-column layouts in articles, books or other 
> LaTeX-based output and even for Word- or ODT-files (I don't know if it 
> would also make sense for HTML output, your CSS-based solution seems to be 
> more flexible). Currently, what I have to do for my document is something 
> like
> ---
> header-includes:
> - \usepackage{multicol}
> - \newcommand{\hideFromPandoc}[1]{#1}
> - \hideFromPandoc{
> \let\Begin\begin
> \let\End\end
> }
> ---
> ...
>
>
> \Begin{multicols}{2}
> Some multicolumn text...
> \End{multicols}
>
> (Nothing I came up with myself, I found it somewhere on the web. I don't 
> even understand why those \let commands are placed inside 
> \hideFromPandoc...) It does work as intended, but if I would decide one day 
> that I'd prefer ODT over PDF, I guess this wouldn't work. I try to avoid 
> LaTeX commands within my markdown files where possible. So if something 
> like your solution for HTML would be possible for LaTeX/PDF as well, this 
> would also be an improvement over the solution I use currently.
> William Lupton schrieb am Montag, 12. Oktober 2020 um 19:11:29 UTC+2:
>
>> I've used fenced divs with CSS for HTML and (via wkhtmltopdf) PDF to 
>> generate two columns. Does this help?
>>
>> ::: left :::
>> Contents of left-hand column.
>> :::
>>
>> ::: right :::
>> Contents of right-hand column.
>> :::
>>
>> ::: clear :::
>> :::
>>
>> These are the CSS classes:
>>
>> div.left {
>>     width: 49%;
>>     float: left;
>>     /* border: solid 1px; */
>> }
>>
>> div.right {
>>     width: 49%;
>>     float: right;
>>     /* border: solid 1px; */
>> }
>>
>> div.clear {
>>     clear: both;
>> }
>>
>> On Mon, 12 Oct 2020 at 17:52, Philipp <philipp.ku...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>>
>>> Hi,
>>>
>>> I just found out that the "fenced-divs-solution" for multicolumn layouts 
>>> is limited to latex beamer and other slide-based outputs.
>>> Would it be possible to support this for page-based output as well?
>>>
>>> Of course, there is the LaTeX-specific workaround to define \Begin and 
>>> \End instead of \begin and \end and then include the appropriate 
>>> LaTeX-commands directly in the markdown file. This works well, but limits 
>>> further processing to LaTeX.
>>>
>>> The solution based on fenced divs would avoid LaTeX-commands within the 
>>> markdown file and could be used to produce different kinds of output (at 
>>> least theoretically, I must admit I have no idea how much effort it would 
>>> be to support this).
>>>
>>> So I wonder if there's a reason why fenced-div-columns are currently 
>>> limited to slides (I guess there is) and if there's any chance that they 
>>> will work for other types of output in future versions of pandoc (I hope 
>>> there is ;-) ).
>>>
>>> Regards,
>>> Philipp
>>>
>>>
>>> -- 
>>> 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/df71c2b3-4bae-4ef7-b2fe-a647d284c3c5n%40googlegroups.com 
>>> <https://groups.google.com/d/msgid/pandoc-discuss/df71c2b3-4bae-4ef7-b2fe-a647d284c3c5n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>>
>
> -- 
> 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/2f3956a8-5685-45fd-937c-7d5778e9d4e7n%40googlegroups.com.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Fenced divs for multiple columns
       [not found]             ` <m2eelu6bdu.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
@ 2020-12-16 16:14               ` Philipp
  0 siblings, 0 replies; 6+ messages in thread
From: Philipp @ 2020-12-16 16:14 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 6040 bytes --]

Thanks for your reply and sorry for being so late with mine. I didn't think 
of the different semantics of multicols, and I consider this a strong 
argument against my suggestion, even when using column breaks (I think 
multicols is rarely used with explicit column breaks).
What about using a .columns container without the need for an inner .column 
(perhaps with the ability to specify the desired number of columns)?

Example:

::: {.columns}
Text for multiple columns here...
:::

This way, a user could restrict multicolumn layout to a certain area of 
text without having to deal with column breaks.

John MacFarlane schrieb am Montag, 19. Oktober 2020 um 07:19:43 UTC+2:

>
> I wouldn't mind letting the columns divs work in LaTeX, but
> it's not entirely trivial. Using multicols as you suggest
> doesn't have the same semantics, as nothing forces which
> content will appear in which column. Perhaps adding an
> explicit column break command would work, tough.
>
> Philipp <philipp.ku...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:
>
> > Thank you for your reply. This is not exactly what I was looking for, 
> but 
> > now that I read your reply I realize that I wasn't really aware of how 
> > fenced divs can be used in general because I was too focused on the way 
> I 
> > used them so far.
> > What I meant is the following usage, which works fine for beamer slides:
> >
> > ::: {.columns}
> > :::: {.column}
> > Blah
> > ::::
> > :::: {.column}
> > More blah
> > ::::
> > :::
> >
> > My hope was/is that this very same syntax with these .column(s) 
> attributes 
> > could be used for two-column layouts in articles, books or other 
> > LaTeX-based output and even for Word- or ODT-files (I don't know if it 
> > would also make sense for HTML output, your CSS-based solution seems to 
> be 
> > more flexible). Currently, what I have to do for my document is 
> something 
> > like
> > ---
> > header-includes:
> > - \usepackage{multicol}
> > - \newcommand{\hideFromPandoc}[1]{#1}
> > - \hideFromPandoc{
> > \let\Begin\begin
> > \let\End\end
> > }
> > ---
> > ...
> >
> >
> > \Begin{multicols}{2}
> > Some multicolumn text...
> > \End{multicols}
> >
> > (Nothing I came up with myself, I found it somewhere on the web. I don't 
> > even understand why those \let commands are placed inside 
> > \hideFromPandoc...) It does work as intended, but if I would decide one 
> day 
> > that I'd prefer ODT over PDF, I guess this wouldn't work. I try to avoid 
> > LaTeX commands within my markdown files where possible. So if something 
> > like your solution for HTML would be possible for LaTeX/PDF as well, 
> this 
> > would also be an improvement over the solution I use currently.
> > William Lupton schrieb am Montag, 12. Oktober 2020 um 19:11:29 UTC+2:
> >
> >> I've used fenced divs with CSS for HTML and (via wkhtmltopdf) PDF to 
> >> generate two columns. Does this help?
> >>
> >> ::: left :::
> >> Contents of left-hand column.
> >> :::
> >>
> >> ::: right :::
> >> Contents of right-hand column.
> >> :::
> >>
> >> ::: clear :::
> >> :::
> >>
> >> These are the CSS classes:
> >>
> >> div.left {
> >> width: 49%;
> >> float: left;
> >> /* border: solid 1px; */
> >> }
> >>
> >> div.right {
> >> width: 49%;
> >> float: right;
> >> /* border: solid 1px; */
> >> }
> >>
> >> div.clear {
> >> clear: both;
> >> }
> >>
> >> On Mon, 12 Oct 2020 at 17:52, Philipp <philipp.ku...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> >>
> >>> Hi,
> >>>
> >>> I just found out that the "fenced-divs-solution" for multicolumn 
> layouts 
> >>> is limited to latex beamer and other slide-based outputs.
> >>> Would it be possible to support this for page-based output as well?
> >>>
> >>> Of course, there is the LaTeX-specific workaround to define \Begin and 
> >>> \End instead of \begin and \end and then include the appropriate 
> >>> LaTeX-commands directly in the markdown file. This works well, but 
> limits 
> >>> further processing to LaTeX.
> >>>
> >>> The solution based on fenced divs would avoid LaTeX-commands within 
> the 
> >>> markdown file and could be used to produce different kinds of output 
> (at 
> >>> least theoretically, I must admit I have no idea how much effort it 
> would 
> >>> be to support this).
> >>>
> >>> So I wonder if there's a reason why fenced-div-columns are currently 
> >>> limited to slides (I guess there is) and if there's any chance that 
> they 
> >>> will work for other types of output in future versions of pandoc (I 
> hope 
> >>> there is ;-) ).
> >>>
> >>> Regards,
> >>> Philipp
> >>>
> >>>
> >>> -- 
> >>> 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/df71c2b3-4bae-4ef7-b2fe-a647d284c3c5n%40googlegroups.com 
> >>> <
> https://groups.google.com/d/msgid/pandoc-discuss/df71c2b3-4bae-4ef7-b2fe-a647d284c3c5n%40googlegroups.com?utm_medium=email&utm_source=footer
> >
> >>> .
> >>>
> >>
> >
> > -- 
> > 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/2f3956a8-5685-45fd-937c-7d5778e9d4e7n%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/d0c76092-ca8a-47f8-97ba-c94229da59c9n%40googlegroups.com.

[-- Attachment #1.2: Type: text/html, Size: 9173 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-12-16 16:14 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-12 16:52 Fenced divs for multiple columns Philipp
     [not found] ` <df71c2b3-4bae-4ef7-b2fe-a647d284c3c5n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2020-10-12 17:11   ` William Lupton
     [not found]     ` <CAEe_xxhdm3q87vWuEzgSBZdZ5wkDewGNgndFRwocWN+fpNSMFQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2020-10-12 19:22       ` Philipp
     [not found]         ` <2f3956a8-5685-45fd-937c-7d5778e9d4e7n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2020-10-13  8:20           ` William Lupton
2020-10-19  5:19           ` John MacFarlane
     [not found]             ` <m2eelu6bdu.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
2020-12-16 16:14               ` Philipp

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).