From: Matan Bendix Shenhav <m.shenhav-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: pandoc-discuss <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Subject: Layout Hooks in a JSON => PDF Pipeline
Date: Tue, 21 Mar 2023 05:31:48 -0700 (PDT) [thread overview]
Message-ID: <9b05df21-d6cc-4312-963b-d706b24e4f38n@googlegroups.com> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 2028 bytes --]
I'm looking to implement a web app which allows users to write articles
which automatically get typeset into newspapers. I will be consuming JSON
data and want to output PDFs, and want to understand how to provide limited
control of element positioning (especially of images) through some sort of
layout hooks.
Articles will be written in a simple linear rich-text format, but some
limited settings would allow users to control elements of positioning, in
particular whether images would appear inline inside a column or blown up
to full page width.
Editing is highly contained to keep things simple. Users select a
collection of articles and pick their preferred order, and the application
can decide the details of how to position them. The output is a section of
the newspaper, N pages long, as a PDF.
The web editor will output the content in some sort of JSON format
(probably extending this API
<https://editorjs.io/base-concepts/#what-is-clean-data>), but if necessary
I can easily convert this into HTML (and indeed, I will have to anyway for
the use to view the content in the editor).
If I understand correctly, the Pandoc pipeline should be something like
this:
[image: Screenshot from 2023-03-21 13-25-28.png]
My main question is about provide element-level hooks to allow to input
JSON to influence output layout. As a simple example, let's say the user
adds some images into the markup. Some images should be inline, while
others should be full page width or even full page.
How do I implement such hooks in this sort of Pandoc pipeline?
Thank you for your time!
--
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/9b05df21-d6cc-4312-963b-d706b24e4f38n%40googlegroups.com.
[-- Attachment #1.2: Type: text/html, Size: 2660 bytes --]
[-- Attachment #2: Screenshot from 2023-03-21 13-25-28.png --]
[-- Type: image/png, Size: 56881 bytes --]
next reply other threads:[~2023-03-21 12:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-21 12:31 Matan Bendix Shenhav [this message]
[not found] ` <9b05df21-d6cc-4312-963b-d706b24e4f38n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2023-03-21 13:31 ` Bastien DUMONT
2023-03-21 16:12 ` Matan Bendix Shenhav
[not found] ` <f2109e96-b0b2-42da-b19a-0312a41f5952n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2023-03-21 16:26 ` Bastien DUMONT
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=9b05df21-d6cc-4312-963b-d706b24e4f38n@googlegroups.com \
--to=m.shenhav-re5jqeeqqe8avxtiumwx3w@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).