public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* Beamer in pandoc
@ 2021-11-02 16:56 fdq0...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
       [not found] ` <35d6a2e0-7a32-40d9-a3bf-7fd945885d95n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: fdq0...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org @ 2021-11-02 16:56 UTC (permalink / raw)
  To: pandoc-discuss


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

Dear all,

I am very new to using a beamer in Pandoc, please forgive me if I am asking 
something stupid.

I have the following questions:

1. how do I have the block, example block, and alert block like I do in 
latex? like in this 
<https://tex.stackexchange.com/questions/174257/blocks-in-beamer> question?
2. how do I write on the same slide given I have put a block upfront?
3. how do I have an incremental numeric list?
3. is there any detailed documentation for writing beamer in markdown?

Thank you very much!

-- 
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/35d6a2e0-7a32-40d9-a3bf-7fd945885d95n%40googlegroups.com.

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

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

* Re: Beamer in pandoc
       [not found] ` <35d6a2e0-7a32-40d9-a3bf-7fd945885d95n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2021-11-02 18:33   ` Albert Krewinkel
       [not found]     ` <1EB7E01B-4F90-4E41-AFBB-19C1935D6038-9EawChwDxG8hFhg+JK9F0w@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Albert Krewinkel @ 2021-11-02 18:33 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

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

Partial answer: https://twitter.com/pandoc_tips/status/1399608398136573954

Am 2. November 2021 17:56:36 MEZ schrieb "fdq0...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" <fdq09eca-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>:
>Dear all,
>
>I am very new to using a beamer in Pandoc, please forgive me if I am asking 
>something stupid.
>
>I have the following questions:
>
>1. how do I have the block, example block, and alert block like I do in 
>latex? like in this 
><https://tex.stackexchange.com/questions/174257/blocks-in-beamer> question?
>2. how do I write on the same slide given I have put a block upfront?
>3. how do I have an incremental numeric list?
>3. is there any detailed documentation for writing beamer in markdown?
>
>Thank you very much!
>
>-- 
>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/35d6a2e0-7a32-40d9-a3bf-7fd945885d95n%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/1EB7E01B-4F90-4E41-AFBB-19C1935D6038%40zeitkraut.de.

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

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

* Load additional meta-data from YAML file via YAML Block directive?
       [not found]     ` <1EB7E01B-4F90-4E41-AFBB-19C1935D6038-9EawChwDxG8hFhg+JK9F0w@public.gmane.org>
@ 2021-11-03  0:26       ` Martin Hepp
       [not found]         ` <87056507-2301-49C2-A061-C87ABF35F3C9-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  2021-11-04 17:54       ` Martin Hepp
  1 sibling, 1 reply; 7+ messages in thread
From: Martin Hepp @ 2021-11-03  0:26 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

Dear all:

I am trying to build a cleanly organized environment for deriving slides, reports, papers, lecture notes etc. centered on Pandoc.

In order to avoid redundancy and hence ease maintenance etc., it would be good to put different groups of meta-data into different places:

a) _user_ meta-data (like the default path for the BIB file, the author name, ...)

Example: my-meta-data.yaml
---
author: Martin Hepp
bibliography: my_references.json
...

b) output format-dependent meta-data defaults (one file for e.g. Beamer slides, one for Eisvogel reports, one for LNCS papers, ...)

Example: eisvogel-defaults.yaml
---
toc-own-page: true
...

c) output format-dependent meta-data for specific renderings (e.g. logos for multiple institutes or if a research project requires specific colors or texts)

Example: eisvogel-project1.yaml
---
titlepage-text-color: "000000"
titlepage-rule-color: "00A19B"
titlepage-rule-height: 15
titlepage-background: "background-project1.pdf"
logo: "templates/static/logo1.pdf"
logo-width: 10cm
...

d) document-specific meta-data in the YAML header block of the actual document 
Example: my-report.md
---
title: Pandoc is simply great
...

< Actual content goes here>


Now, the details from c) (like the logo path, colors, and the footer texts) should be referenced in the document d), not repeated, like so:


Example: my-report.md
---
title: Pandoc is simply great
include-metadata-from: eisvogel-project1.yaml
...

I am using --metadata-file to load the various defaults in their order of priority. But the settings from c) should be ideally set by referencing c) in the actual document d).


My question: Is that possible with Pandoc's included batteries?

Currently, I see only two options:

1. Add the file-name of c) to the list of input files, like

$ pandoc my-report.md eisvogel-project1.yaml -o my-report.pdf --metadata-file=my-meta-data.yaml --metadata-file=eisvogel-defaults.yaml

2. Use https://github.com/DCsunset/pandoc-include, which allows including YAML files in the YAML header block, like so

---
title: Title
---

!include-header header.yaml

# Section

Body

See https://github.com/DCsunset/pandoc-include#header-include

But I hesitate to add a hard dependency to #2.

Thanks for your help!

Best wishes
Martin




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

* Re: Load additional meta-data from YAML file via YAML Block directive?
       [not found]         ` <87056507-2301-49C2-A061-C87ABF35F3C9-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2021-11-03 16:14           ` John MacFarlane
       [not found]             ` <m2r1bxqkqn.fsf-d8241O7hbXoP5tpWdHSM3tPlBySK3R6THiGdP5j34PU@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: John MacFarlane @ 2021-11-03 16:14 UTC (permalink / raw)
  To: Martin Hepp, pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw


Another possibility is to use --defaults with a defaults file
that specifies the input file and all necessary parameters,
including metadata.

Martin Hepp <mfhepp-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:

> Dear all:
>
> I am trying to build a cleanly organized environment for deriving slides, reports, papers, lecture notes etc. centered on Pandoc.
>
> In order to avoid redundancy and hence ease maintenance etc., it would be good to put different groups of meta-data into different places:
>
> a) _user_ meta-data (like the default path for the BIB file, the author name, ...)
>
> Example: my-meta-data.yaml
> ---
> author: Martin Hepp
> bibliography: my_references.json
> ...
>
> b) output format-dependent meta-data defaults (one file for e.g. Beamer slides, one for Eisvogel reports, one for LNCS papers, ...)
>
> Example: eisvogel-defaults.yaml
> ---
> toc-own-page: true
> ...
>
> c) output format-dependent meta-data for specific renderings (e.g. logos for multiple institutes or if a research project requires specific colors or texts)
>
> Example: eisvogel-project1.yaml
> ---
> titlepage-text-color: "000000"
> titlepage-rule-color: "00A19B"
> titlepage-rule-height: 15
> titlepage-background: "background-project1.pdf"
> logo: "templates/static/logo1.pdf"
> logo-width: 10cm
> ...
>
> d) document-specific meta-data in the YAML header block of the actual document 
> Example: my-report.md
> ---
> title: Pandoc is simply great
> ...
>
> < Actual content goes here>
>
>
> Now, the details from c) (like the logo path, colors, and the footer texts) should be referenced in the document d), not repeated, like so:
>
>
> Example: my-report.md
> ---
> title: Pandoc is simply great
> include-metadata-from: eisvogel-project1.yaml
> ...
>
> I am using --metadata-file to load the various defaults in their order of priority. But the settings from c) should be ideally set by referencing c) in the actual document d).
>
>
> My question: Is that possible with Pandoc's included batteries?
>
> Currently, I see only two options:
>
> 1. Add the file-name of c) to the list of input files, like
>
> $ pandoc my-report.md eisvogel-project1.yaml -o my-report.pdf --metadata-file=my-meta-data.yaml --metadata-file=eisvogel-defaults.yaml
>
> 2. Use https://github.com/DCsunset/pandoc-include, which allows including YAML files in the YAML header block, like so
>
> ---
> title: Title
> ---
>
> !include-header header.yaml
>
> # Section
>
> Body
>
> See https://github.com/DCsunset/pandoc-include#header-include
>
> But I hesitate to add a hard dependency to #2.
>
> Thanks for your help!
>
> Best wishes
> Martin
>
>
>
> -- 
> 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/87056507-2301-49C2-A061-C87ABF35F3C9%40gmail.com.


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

* Re: Load additional meta-data from YAML file via YAML Block directive?
       [not found]             ` <m2r1bxqkqn.fsf-d8241O7hbXoP5tpWdHSM3tPlBySK3R6THiGdP5j34PU@public.gmane.org>
@ 2021-11-04 15:49               ` mfhepp
  0 siblings, 0 replies; 7+ messages in thread
From: mfhepp @ 2021-11-04 15:49 UTC (permalink / raw)
  To: pandoc-discuss


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

Thanks! 

Ideally, however, I would be able to define the set of design meta-data in 
the actual YAML header of the document and not in the make script or the 
pandoc CLI parameters.

I think the most straightforward way would be a LUA filter like 
`include-meta` that does something similar to `pandoc-include`.

In the YAML header of the document:

```
title: The title
include-meta: acme-design-settings.yaml
```

LUA filter for `include-meta`:

```
# pseudo-code
if meta.include-meta is not nil:
     for each filename in meta.include-meta:
        additional_meta = parse(filename)
         for each entry in additional_meta:
             if meta[entry.key] is nil:
                meta[entry.key] = entry.value
                  # recursion not shown in here, needed for nested YAML
             else:
                if len(meta[entry.key]) == 1:
                    meta[entry.key] = list(meta[entry.key])
                    if len(entry.key) == 1:
                       entry.key = list(entry.key)
                    meta[entry.key].extend(entry.key)

On Wednesday, November 3, 2021 at 5:15:42 PM UTC+1 John MacFarlane wrote:

>
> Another possibility is to use --defaults with a defaults file
> that specifies the input file and all necessary parameters,
> including metadata.
>
> Martin Hepp <mfh...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:
>
> > Dear all:
> >
> > I am trying to build a cleanly organized environment for deriving 
> slides, reports, papers, lecture notes etc. centered on Pandoc.
> >
> > In order to avoid redundancy and hence ease maintenance etc., it would 
> be good to put different groups of meta-data into different places:
> >
> > a) _user_ meta-data (like the default path for the BIB file, the author 
> name, ...)
> >
> > Example: my-meta-data.yaml
> > ---
> > author: Martin Hepp
> > bibliography: my_references.json
> > ...
> >
> > b) output format-dependent meta-data defaults (one file for e.g. Beamer 
> slides, one for Eisvogel reports, one for LNCS papers, ...)
> >
> > Example: eisvogel-defaults.yaml
> > ---
> > toc-own-page: true
> > ...
> >
> > c) output format-dependent meta-data for specific renderings (e.g. logos 
> for multiple institutes or if a research project requires specific colors 
> or texts)
> >
> > Example: eisvogel-project1.yaml
> > ---
> > titlepage-text-color: "000000"
> > titlepage-rule-color: "00A19B"
> > titlepage-rule-height: 15
> > titlepage-background: "background-project1.pdf"
> > logo: "templates/static/logo1.pdf"
> > logo-width: 10cm
> > ...
> >
> > d) document-specific meta-data in the YAML header block of the actual 
> document 
> > Example: my-report.md
> > ---
> > title: Pandoc is simply great
> > ...
> >
> > < Actual content goes here>
> >
> >
> > Now, the details from c) (like the logo path, colors, and the footer 
> texts) should be referenced in the document d), not repeated, like so:
> >
> >
> > Example: my-report.md
> > ---
> > title: Pandoc is simply great
> > include-metadata-from: eisvogel-project1.yaml
> > ...
> >
> > I am using --metadata-file to load the various defaults in their order 
> of priority. But the settings from c) should be ideally set by referencing 
> c) in the actual document d).
> >
> >
> > My question: Is that possible with Pandoc's included batteries?
> >
> > Currently, I see only two options:
> >
> > 1. Add the file-name of c) to the list of input files, like
> >
> > $ pandoc my-report.md eisvogel-project1.yaml -o my-report.pdf 
> --metadata-file=my-meta-data.yaml --metadata-file=eisvogel-defaults.yaml
> >
> > 2. Use https://github.com/DCsunset/pandoc-include, which allows 
> including YAML files in the YAML header block, like so
> >
> > ---
> > title: Title
> > ---
> >
> > !include-header header.yaml
> >
> > # Section
> >
> > Body
> >
> > See https://github.com/DCsunset/pandoc-include#header-include
> >
> > But I hesitate to add a hard dependency to #2.
> >
> > Thanks for your help!
> >
> > Best wishes
> > Martin
> >
> >
> >
> > -- 
> > 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/87056507-2301-49C2-A061-C87ABF35F3C9%40gmail.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/26d7de22-e65d-4596-8223-22e2666e9e93n%40googlegroups.com.

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

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

* Re: Load additional meta-data from YAML file via YAML Block directive?
       [not found]     ` <1EB7E01B-4F90-4E41-AFBB-19C1935D6038-9EawChwDxG8hFhg+JK9F0w@public.gmane.org>
  2021-11-03  0:26       ` Load additional meta-data from YAML file via YAML Block directive? Martin Hepp
@ 2021-11-04 17:54       ` Martin Hepp
       [not found]         ` <A948BA78-4BA9-4D58-9850-E59C25C2F5E7-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  1 sibling, 1 reply; 7+ messages in thread
From: Martin Hepp @ 2021-11-04 17:54 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

(for some reasons, my original post appears as a reply to an unrelated post in the pandoc-discuss Google group ;-()), so apologies for reposting this.

Dear John,


Thanks! 

Ideally, however, one would be able to define the set of design meta-data in the actual YAML header of the document and not in a make script or the pandoc CLI parameters.

I think the most straightforward way would be a LUA filter like `include-meta` that does something similar to `pandoc-include`.

That would nicely complement the two other include filters:

    https://github.com/pandoc/lua-filters/tree/master/include-files
    https://github.com/pandoc/lua-filters/tree/master/include-code-files

So for instance, one would use `include-meta` in the YAML header of the document, like so:

```
title: The title
include-meta: acme-design-settings.yaml
```

And the LUA filter for `include-meta` would follow this algorithm (sketchy):

```
# pseudo-code
meta = document.meta
if meta.include-meta is not nil:
    for each filename in meta.include-meta:
       additional_meta = load_and_parse(filename)
        for each entry in additional_meta:
            if meta[entry.key] is nil:
               meta[entry.key] = entry.value
                 # recursion not shown in here, needed for nested YAML
            else:
               if len(meta[entry.key]) == 1:
                   meta[entry.key] = list(meta[entry.key])
                   if len(entry.key) == 1:
                      entry.key = list(entry.key)
                   meta[entry.key].extend(entry.key)
```

The pseudocode is sketchy in that the recursive addition of nested meta-data is not shown.

I have never used LUA before; if time permits, I will try to implement this. If anybody fluent is willing to work on this, I will be glad to contribute.

Best wishes
Martin



> From: John MacFarlane <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org>
> Subject: Re: Load additional meta-data from YAML file via YAML Block directive?
> Date: 3. November 2021 at 17:14:56 CET
> To: Martin Hepp <mfhepp-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>, pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
> 
> 
> Another possibility is to use --defaults with a defaults file
> that specifies the input file and all necessary parameters,
> including metadata.
> 
> Martin Hepp <mfhepp-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:

------
Dear all:

I am trying to build a cleanly organized environment for deriving slides, reports, papers, lecture notes etc. centered on Pandoc.

In order to avoid redundancy and hence ease maintenance etc., it would be good to put different groups of meta-data into different places:

a) _user_ meta-data (like the default path for the BIB file, the author name, ...)

Example: my-meta-data.yaml
---
author: Martin Hepp
bibliography: my_references.json
...

b) output format-dependent meta-data defaults (one file for e.g. Beamer slides, one for Eisvogel reports, one for LNCS papers, ...)

Example: eisvogel-defaults.yaml
---
toc-own-page: true
...

c) output format-dependent meta-data for specific renderings (e.g. logos for multiple institutes or if a research project requires specific colors or texts)

Example: eisvogel-project1.yaml
---
titlepage-text-color: "000000"
titlepage-rule-color: "00A19B"
titlepage-rule-height: 15
titlepage-background: "background-project1.pdf"
logo: "templates/static/logo1.pdf"
logo-width: 10cm
...

d) document-specific meta-data in the YAML header block of the actual document 
Example: my-report.md
---
title: Pandoc is simply great
...

< Actual content goes here>


Now, the details from c) (like the logo path, colors, and the footer texts) should be referenced in the document d), not repeated, like so:


Example: my-report.md
---
title: Pandoc is simply great
include-metadata-from: eisvogel-project1.yaml
...

I am using --metadata-file to load the various defaults in their order of priority. But the settings from c) should be ideally set by referencing c) in the actual document d).


My question: Is that possible with Pandoc's included batteries?

Currently, I see only two options:

1. Add the file-name of c) to the list of input files, like

$ pandoc my-report.md eisvogel-project1.yaml -o my-report.pdf --metadata-file=my-meta-data.yaml --metadata-file=eisvogel-defaults.yaml

2. Use https://github.com/DCsunset/pandoc-include, which allows including YAML files in the YAML header block, like so

---
title: Title
---

!include-header header.yaml

# Section

Body

See https://github.com/DCsunset/pandoc-include#header-include

But I hesitate to add a hard dependency to #2.

Thanks for your help!

Best wishes
Martin




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

* Re: Load additional meta-data from YAML file via YAML Block directive?
       [not found]         ` <A948BA78-4BA9-4D58-9850-E59C25C2F5E7-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2021-11-04 19:32           ` Martin Hepp
  0 siblings, 0 replies; 7+ messages in thread
From: Martin Hepp @ 2021-11-04 19:32 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

FYI: Maybe a discussion via the lua-filter repository on Github is a better place for advancing this; hence, I created an issue there

    https://github.com/pandoc/lua-filters/issues/196

and started working on a more detailed sketch at

    https://github.com/mfhepp/lua-filters/tree/master/include-meta

Best wishes
Martin

-----------------------------------
martin hepp  http://www.heppnetz.de
mfhepp-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org












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

end of thread, other threads:[~2021-11-04 19:32 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-02 16:56 Beamer in pandoc fdq0...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
     [not found] ` <35d6a2e0-7a32-40d9-a3bf-7fd945885d95n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2021-11-02 18:33   ` Albert Krewinkel
     [not found]     ` <1EB7E01B-4F90-4E41-AFBB-19C1935D6038-9EawChwDxG8hFhg+JK9F0w@public.gmane.org>
2021-11-03  0:26       ` Load additional meta-data from YAML file via YAML Block directive? Martin Hepp
     [not found]         ` <87056507-2301-49C2-A061-C87ABF35F3C9-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2021-11-03 16:14           ` John MacFarlane
     [not found]             ` <m2r1bxqkqn.fsf-d8241O7hbXoP5tpWdHSM3tPlBySK3R6THiGdP5j34PU@public.gmane.org>
2021-11-04 15:49               ` mfhepp
2021-11-04 17:54       ` Martin Hepp
     [not found]         ` <A948BA78-4BA9-4D58-9850-E59C25C2F5E7-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2021-11-04 19:32           ` Martin Hepp

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).