public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: "Amy de Buitléir" <amy-x92Y4IBCQKU6Cx7ujrKbww@public.gmane.org>
To: pandoc-discuss <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Subject: Re: Is there this option to convert to slide and document?
Date: Mon, 20 Mar 2023 12:13:23 -0700 (PDT)	[thread overview]
Message-ID: <0f00a9f9-fd1a-4534-8152-3e810f22da2fn@googlegroups.com> (raw)
In-Reply-To: <aa04e960-f938-40d0-9fd6-13a39cb2cb2an-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>


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

One idea that might help, would be to put any conditional output in a div 
or span, and assign it a special class, e.g. "pdf-only".

Then all you need is a pandoc filter that removes all divs or spans with 
that class. That would be a generic filter that I think a lot of people 
could find a use for, and it's just a few lines of code.

On Monday, 20 March 2023 at 16:49:41 UTC Julien Dutant wrote:

> If I understand well, the idea is to convert the following into two 
> different outputs, depending on whether the output format is revealjs/pptx 
> vs pdf?
>  
> ``` markdown
>  
> Text text !!important claim here!! text text text text text
> text text text text text text text text text text
> text text text text text
>  
> * Point 1 text text text text
> * Point 2 text text text text
>  
> ```
>  
> Would remain the same in pdf (or other document format) output, except 
> that the `!! ... !!` content would be highlighted, while in slide output 
> formats it would be converted to the following:
>  
> Would be converted to the following in slide ouputs:
>  
> ``` markdown
> important claim here
>  
> * Point 1 text text text text
> * Point 2 text text text text
>  
> ::: notes
> Text text important claim here text text text text text
> text text text text text text text text text text
> text text text text text
> :::
> ```
>  
> You'd have to write a Pandoc filter to do that ( 
> https://pandoc.org/lua-filters.html ). It would make your work easier to 
> use Span and Div markup rather than !! ... !!:
>  
> Text text [important claim here]{.imp} text text text text text
> text text text text text text text text text text
> text text text text text
>  
> For the document, there's only highlighting to be done, that's fairly 
> easy. For the slides, you need some restructuring of content, that's less 
> trivial (replace the paragraphs with their important bits, saving the 
> paragraphs along, and placing them at the end of the slide in a notes Div) 
> but it can be done.
>  
> What's not clear to me is whether many people would use it. It seems 
> pretty rigid: keep all the lists, remove all the paragraphs unless marked, 
> the slide text must be verbatim in the document text (instead of 
> summarizing it, for instance.
>  
> Best, 
>
> Julien
>
> On Monday, March 20, 2023 at 1:08:28 PM UTC Amy de Buitléir wrote:
>
>> Pandoc supports speaker's notes, if that's what you're looking for. See 
>> https://pandoc.org/MANUAL.html#speaker-notes
>>
>> On Sunday, 19 March 2023 at 13:19:57 UTC Aldo “Scias” wrote:
>>
>>> ¿Existe esta opción para convertir a diapositiva y documento?
>>>
>>> *Markdown with markup for relevant parts within a paragraph. !!Text!!*
>>> Markdown con marcado para partes relevantes dentro de un párrafo. 
>>> !!Texto!!
>>> [image: import.png]
>>>
>>> Slide with the important parts and the containing paragraph as speaker 
>>> notes.
>>> Diapositiva con las partes importantes y el párrafo contenedor como 
>>> notas del orador.[image: presentation.png]
>>> Text document with the document and the important parts without 
>>> modifications.
>>> Documento de texto con el documento y las partes importantes sin 
>>> modificaciones.
>>> [image: document.png]
>>> Benefit:
>>> One markdown for two documents.
>>> Another option is to create options to convert the entire document or 
>>> for the summary or important parts of the content.
>>>
>>> Beneficio:
>>> Un markdown para dos documentos.
>>> Otra opcion es crear opciones para convertir el documento entero o para 
>>> el resumen o partes importantes del contenido. 
>>>
>>>

-- 
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/0f00a9f9-fd1a-4534-8152-3e810f22da2fn%40googlegroups.com.

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

  parent reply	other threads:[~2023-03-20 19:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-19 13:19 Aldo “Scias”
     [not found] ` <a27d0499-0928-4b4f-8fe0-2952ae46e4b6n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2023-03-20 13:08   ` Amy de Buitléir
     [not found]     ` <ef076673-7359-4a2f-8025-86922c5a8ccen-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2023-03-20 16:49       ` Julien Dutant
     [not found]         ` <aa04e960-f938-40d0-9fd6-13a39cb2cb2an-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2023-03-20 19:13           ` Amy de Buitléir [this message]
     [not found]             ` <0f00a9f9-fd1a-4534-8152-3e810f22da2fn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2023-03-20 21:17               ` Julien Dutant

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0f00a9f9-fd1a-4534-8152-3e810f22da2fn@googlegroups.com \
    --to=amy-x92y4ibcqku6cx7ujrkbww@public.gmane.org \
    --cc=pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).