From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/32369 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Bastien DUMONT Newsgroups: gmane.text.pandoc Subject: Re: Layout Hooks in a JSON => PDF Pipeline Date: Tue, 21 Mar 2023 13:31:07 +0000 Message-ID: References: <9b05df21-d6cc-4312-963b-d706b24e4f38n@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29352"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBDCINCES2QJRBHXD42QAMGQEFUUDB2A-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Tue Mar 21 14:31:15 2023 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-lf1-f60.google.com ([209.85.167.60]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pec55-0007Pv-Bc for gtp-pandoc-discuss@m.gmane-mx.org; Tue, 21 Mar 2023 14:31:15 +0100 Original-Received: by mail-lf1-f60.google.com with SMTP id i16-20020ac25b50000000b004b565e69540sf5528230lfp.12 for ; Tue, 21 Mar 2023 06:31:15 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1679405474; cv=pass; d=google.com; s=arc-20160816; b=Rvi646aWzLRqDcrx7a7L4+OElejGEY0jO+a8BX5Nljx9s9WsXyULzQxtNfJ0esgS8P UFRHdJRC08riMsrzzJ3E19YlR2XOd/AziGA2NtrnUocE99ziL4koDeVdk81An3/9atTN P7QAdtIM76ozVMWRSPlznEBULjrwOlKZxoHvHuIKh+LbzpPVENDmDXdjiT8XpW7T7wuH gpPD8nybYbl/gicWbeS0lZ3bJVChTF9MREFpVVCJZzPqZEtd56vLiernAp0s5m5BbUi6 WyoDnC0lYu0MCAeaB19pXirTJWTCRSWMVs5aWFzggFA66x9rMS+/NqBZNu0vkckRQ576 YfXA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:to:from:date:sender:dkim-signature; bh=kq5x0f96g6e8X9Hmaz5qvVjqyyAS1jFvsKQMkdf5PHU=; b=JvbdVd351r6HmZiWN2ju05JEDprJAzL6a8hDVMr27Hpt8tKbG9DrmKZzw1XSWNsnHP kvnJCF2d7rsF5uolf9HVYConIvR2HPN5ugBixZDgcBwqJsfeE5ls56a3TLKhcnOnFWV1 Altuv8JlD49+VICk0uut5kCbCYSnbCigD5zpHE0wWQKth5Yy667aFWR6krTctgDADNn3 5IgTABQWpDttUVypCzMEicNh1N6D5b9PJ/MfFr9fCwWKks+ytXV1iVvaBero/2eRZNWQ +J5hBJ7F9Cq3hPtx1vet7SMG4ETmANY5HwZYOby9C8AhhSoLurBnsIPUMNSuGRblXz90 4ylQ== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@posteo.net header.s=2017 header.b=oeARzxS2; spf=pass (google.com: domain of bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org designates 185.67.36.66 as permitted sender) smtp.mailfrom=bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=posteo.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; t=1679405474; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:to:from:date:sender:from:to:cc :subject:date:message-id:reply-to; bh=kq5x0f96g6e8X9Hmaz5qvVjqyyAS1jFvsKQMkdf5PHU=; b=lE/LfiRQSu1ToVNVV5zPrQ1f4HNDVFgqlAXwSqVpmrgE6sQ9LSX6pqpH+eFNRz/VzQ gt9k05BtKyXb6Rd2QBoTrO9K2b6F1x5Bsyua0Q/sV5/WtGWHfBbt44dQs+Zuvi6hU5CS BPxKyDGs27OSd4Vnm9Ir1owUWkdML1dTbyswXxBSMu2SXlEDae80kGeMZhxbUSnqDh0Y q7AwnHQTVl5de/vxYOrveYd3lmb4qewVu2NIleSpIgSnVDu2KcHgTXL1I8NtzRlfCr6A wQ/BhcAfkEz/r0G3of2ln3ehQlNOlHw X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679405474; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:to:from:date:x-gm-message-state :sender:from:to:cc:subject:date:message-id:reply-to; bh=kq5x0f96g6e8X9Hmaz5qvVjqyyAS1jFvsKQMkdf5PHU=; b=oRiFw4/2/9Pq6ncjVymGxNgtqfHAPVyN88rD15jogDTzHlEEYdrcyRPWj0iNdt86wq J+txS0Se2miiFr4tIEP3DJNdorTdunELBpzfBo7yZ4oSUPJbMOKYnA7FbQ4PUK9jzHvK ZQBuWQk57MVvUf52YOao/uL5bl45A3dp8hXz2yGc9L9HAC7xVggdnulEvzOaWpoq/p+Q NXl7ffu12f2g2YxrX3JxIb6WBF81P6pUmCxE/4o6npyrB2jiEwXUZF767O2Lc8mo Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AO0yUKVYNiCkQuwSjmeqNXW5T/V8fgM5zXSwT6X2Wu1PN4aY/i5ns8Q4 0XNz+w5YPtqpr/I0llKFKHM= X-Google-Smtp-Source: AK7set+ZM+lu/8dh9OZQIVn8GRNxCCBXYP79lhndYQK2TPOtFa9wiM4BQgqR9NY7qQolfLSjbj5RNw== X-Received: by 2002:a2e:95cc:0:b0:298:b32c:e4f9 with SMTP id y12-20020a2e95cc000000b00298b32ce4f9mr870535ljh.3.1679405474578; Tue, 21 Mar 2023 06:31:14 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6512:39c6:b0:4e8:c8b4:347a with SMTP id k6-20020a05651239c600b004e8c8b4347als111012lfu.1.-pod-prod-gmail; Tue, 21 Mar 2023 06:31:09 -0700 (PDT) X-Received: by 2002:a05:6512:49c:b0:4e9:c792:c95b with SMTP id v28-20020a056512049c00b004e9c792c95bmr905946lfq.42.1679405469193; Tue, 21 Mar 2023 06:31:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679405469; cv=none; d=google.com; s=arc-20160816; b=W0d/JEv3rVO994Z+BOaUzgMB8inR0bcOqHiARYU+jcgsVnL4kt4jTBI+FEyZ7XKx4f 8v2J/V5Mb7eWiGHdgxYfx+JXbUACWrAGp+cdbGN4aMQj/RActbBVOVMiGulqIjMS51yM 9XyEZY/iEOukGkro+Dv04HAexXzYcTaEnQR/zvCyCwjiIwYU2i++6ngyvVthMaQSibyX XXZ0rc1tEd/qyNgtPEvWswuqCqN8Z7bF25yjT6E51EwqLxjulW4ZqKdh7cP1cwk5iVYd p7n4npNwmlTkHj44X1BJS0EbW2nUBKju95sB6/QTobu/ILU+vdA2ho/OLr8eUYOSMbZt 2HGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:to:from:date :dkim-signature; bh=tg09PHt70pBdWwI2Y/6H18yiFGlVJepWpi76Ru8pwXg=; b=cVJovhIoQVtxmatrzYXF0zL4embhG/u3NBRNvkrbofGC3GZ2lFHREveJlAOFU19eUb wMT4McQjITrCXRGVJd5h5zTjLlOmQvXdbtp2lM2K1h18S1CdcuG9+rJzwJy0UH5uN7Oi tUVLx62EZeWssX7MljTmw+RJyzqV7HeA6gYN8HsaXscvNOQn/wupfUbmUWQOgpPg3LhD 7/91W1hngMRhklL0Z5hNvtaQzPPD7G7tRoSklnz8JMcrDsnYypAJAiccWR39ziX4YHBZ 2yK+0ldFf2ZEmVV8xGx+pANkBN5hONw3RFXMlEbOQm91/VOoWjvTAWzaY6mgn7V3TJ6R 9arw== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@posteo.net header.s=2017 header.b=oeARzxS2; spf=pass (google.com: domain of bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org designates 185.67.36.66 as permitted sender) smtp.mailfrom=bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=posteo.net Original-Received: from mout02.posteo.de (mout02.posteo.de. [185.67.36.66]) by gmr-mx.google.com with ESMTPS id b9-20020a056512304900b004dbafe55d43si243084lfb.13.2023.03.21.06.31.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Mar 2023 06:31:09 -0700 (PDT) Received-SPF: pass (google.com: domain of bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org designates 185.67.36.66 as permitted sender) client-ip=185.67.36.66; Original-Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 9900D240223 for ; Tue, 21 Mar 2023 14:31:08 +0100 (CET) Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Pgsv00LZlz9rxN for ; Tue, 21 Mar 2023 14:31:07 +0100 (CET) Content-Disposition: inline In-Reply-To: <9b05df21-d6cc-4312-963b-d706b24e4f38n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> X-Original-Sender: bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@posteo.net header.s=2017 header.b=oeARzxS2; spf=pass (google.com: domain of bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org designates 185.67.36.66 as permitted sender) smtp.mailfrom=bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=posteo.net Precedence: list Mailing-list: list pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org; contact pandoc-discuss+owners-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org List-ID: X-Google-Group-Id: 1007024079513 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Xref: news.gmane.io gmane.text.pandoc:32369 Archived-At: Your custom reader can store the required information in divs, spans or att= ributes (for the elements that support it). Then, when writing to LaTeX, yo= u can use a custom filter to convert this information to LaTeX code. A word of caution: in your figure, the LaTeX engine comes after Pandoc (Pan= doc outputs a TeX file taking account of the custom template; then this TeX= file is processed by the LaTeX engine).=20 Le Tuesday 21 March 2023 =C3=A0 05:31:48AM, Matan Bendix Shenhav a =C3=A9cr= it : > I'm looking to implement a web app which allows users to write articles w= hich > automatically get typeset into newspapers. I will be consuming JSON data = and > want to output PDFs, and want to understand how to provide limited contro= l of > element positioning (especially of images) through some sort of layout ho= oks. >=20 > Articles will be written in a simple linear rich-text format, but some li= mited > settings would allow users to control elements of positioning, in particu= lar > whether images would appear inline inside a column or blown up to full pa= ge > width. >=20 > Editing is highly contained to keep things simple. Users select a collect= ion of > articles and pick their preferred order, and the application can decide t= he > details of how to position them. The output is a section of the newspaper= , N > pages long, as a PDF. >=20 > The web editor will output the content in some sort of JSON format (proba= bly > extending [1]this API), but if necessary I can easily convert this into H= TML > (and indeed, I will have to anyway for the use to view the content in the > editor). >=20 > If I understand correctly, the Pandoc pipeline should be something like t= his: >=20 > Screenshot from 2023-03-21 13-25-28.png >=20 > My main question is about provide element-level hooks to allow to input J= SON to > influence output layout. As a simple example, let's say the user adds som= e > images into the markup. Some images should be inline, while others should= be > full page width or even full page. >=20 > How do I implement such hooks in this sort of Pandoc pipeline? >=20 > Thank you for your time! > =C2=A0=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 >=20 > -- > 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 [2]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit [3]https://groups.google.com/d/m= sgid/ > pandoc-discuss/9b05df21-d6cc-4312-963b-d706b24e4f38n%40googlegroups.com. >=20 > References: >=20 > [1] https://editorjs.io/base-concepts/#what-is-clean-data > [2] mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > [3] https://groups.google.com/d/msgid/pandoc-discuss/9b05df21-d6cc-4312-9= 63b-d706b24e4f38n%40googlegroups.com?utm_medium=3Demail&utm_source=3Dfooter --=20 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 e= mail 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/ZBmxm/na%2BwA129AO%40localhost.