From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/27562 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Bastien DUMONT Newsgroups: gmane.text.pandoc Subject: Re: Markdown Fenced Div to LaTeX Environment Date: Sun, 24 Jan 2021 18:35:48 +0100 Message-ID: References: <8ba84992-d792-4333-aae0-560147ef79d4n@googlegroups.com> <87pn1uwglb.fsf@zeitkraut.de> 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="676"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBDCINCES2QJRB6PAW2AAMGQESDNPXVA-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Sun Jan 24 18:38:04 2021 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-lf1-f58.google.com ([209.85.167.58]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1l3jKu-000Abn-43 for gtp-pandoc-discuss@m.gmane-mx.org; Sun, 24 Jan 2021 18:38:04 +0100 Original-Received: by mail-lf1-f58.google.com with SMTP id j15sf2354106lfe.2 for ; Sun, 24 Jan 2021 09:38:04 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1611509883; cv=pass; d=google.com; s=arc-20160816; b=m813d5QyR8aRgdHvmGMx3MrvFAy/yJX1SASkjDJAMAuU9C+vp9Yg8ioTHT2Vki67Sj 8o+F3ZqGwTdVExaQA0Z9U/TNcVYmAfOoxVKMmq0FLMeWe9QE5kepIYk2sGWc2svlvudV /QUB5J2QPxdVekxYp2wjYdmFsBgHhSuqM7zRRYqf8ghg7+kfkDdhk91Ha98eKkF7oO3K AaLuK3lrOO6lD9fpXxJ3gHGbqz4gBO1MZDfxcbRMYWVZNt8ddngkF/cyomSzqBncEkQg /UTlVHvoa/LG9GjNG/5byVRkemjbg8gnU9xZfaDEzgFU3LvlCEJ2W4HLVfvz1qYb6uF/ oLzQ== 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=M4IgifdzIdrOf9jGgSPoDA0tlaqUxTJN025oB6wMMpo=; b=sBZTOAg4IqzD3udJv1mkrMaV2PxAYZYEeTi03cbWr1IDZqm4ONLJoYgcqAQzq9zKxf wfxw56BbFX4QaFQwT1hOh/t0boJtciwbNLOJ/hLC19J209v0mE+LOmqRXRcG+R0zcilV bnC3SeL2OUQIVN0q0ZBf+bmx59k6D9c7qHllv5f3SjqgixlPUB2aDXuVhpoITgEMARTA mDGGIQLzNr5vJcbYUN6eArKLEa3bHPiYJx6YG0jk9LZ2411+QbRJnvgrXZ5zTAOj9uSn pS7/kHWT2xqK+Yravyv3b9HmRh6h/mpG7ao6FDUqUztNRISx+Wc9lCFJnz6hhkWcoGBL O+nA== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@posteo.net header.s=2017 header.b=rExgSJbE; spf=pass (google.com: domain of bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org designates 185.67.36.65 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=20161025; h=sender:date:from:to:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :x-original-sender:x-original-authentication-results:reply-to :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=M4IgifdzIdrOf9jGgSPoDA0tlaqUxTJN025oB6wMMpo=; b=GQc0QdKGNEB3HOmBHI5w7W0v0ICNtWjnwmXwKb8TM+9y6XtqLvBDJK0GAKXuEfFZPK wh0u3E4jccXDv3f+I+nVDlA6FFp57QmiS6+/h90A3L0hRP00ScfW10+oDgkcr52IfE3r g+FfXqc4US/yQunOvo0bQ1RQpKlA1RRnZh1lWw6ZCs2rc0FMRCEIxyWWkdFlehehBnFh nMwBzNgP3/I1upu9bOX5u53TMEml2lfsXQdMqHJx0mVaVuwQ+MDBC1R9sfnEwiXAZiM1 nZBgfgCBhNmeUq7aoIkAEEgHZ7oME+Q5c+KXbY9xGBwbbU3aAvnpX7OsXbN885tzNdPl 1uBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:date:from:to:subject:message-id :references:mime-version:content-disposition :content-transfer-encoding:in-reply-to:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:x-spam-checked-in-group:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=M4IgifdzIdrOf9jGgSPoDA0tlaqUxTJN025oB6wMMpo=; b=ZXXmLu25MR0D7Ga285jlmwpMALw6pgsH644+llr73WXAYhudjik2p7SJH1ModtDxuI 9SvYcOlpTIMNthrBeoMuid7BpPr1bPpBc6xwnQh7ReaM/T5V7gjm0NDcXRpwPWpX6vDH ma5WjQNX/wgOYGKxkgG434T8jwYSO1/o3caiIzT9EwgcYCkxoAQ3iW/D8uhHuD0M30Ou 5XDELFDLsAZOcxYqt9lvx9Fke2TUibnM2mjnqTMtAC0NV4LsxXmOZQMCO93Sttnyg6Wo WulxuqFq7dmolf0e4Whbu5MTiReLuMMWqEnmALwXUE8+ Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM531hJMaEqcAVyp2aRbghHHqyNZX+RNTE5akXOqOJO/4dXmjPK155 u8r9lV3tM73kWix19xjCNmQ= X-Google-Smtp-Source: ABdhPJxnuScd8ARb/dt9AEkQW8X3VhAHIuzq2wGFDWsbDXZPdWnjshSbAruhR8/joq7qlYf6bZHcvw== X-Received: by 2002:a05:651c:295:: with SMTP id b21mr145ljo.308.1611509883623; Sun, 24 Jan 2021 09:38:03 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a2e:810b:: with SMTP id d11ls1973897ljg.11.gmail; Sun, 24 Jan 2021 09:38:01 -0800 (PST) X-Received: by 2002:a2e:87cb:: with SMTP id v11mr236688ljj.218.1611509881232; Sun, 24 Jan 2021 09:38:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611509881; cv=none; d=google.com; s=arc-20160816; b=LtJc7E25d7Hu8yMkA7G+sen4eYb2DIuYFfebrkggx1luUEiVE8+u/CgIHvmgsvJxGY iaaSrNgzMsyDjVEQH/tpj+RgbT8MKLh9Zwq6oJL0R/otJ+ssC7M3IFTR/YarByTaSNAz Usuy1elyF5YM2/OwPvrLGxBst7+VuvPiAt3fHxyXrAAS1sG8ddRslqwSNVMtWLc0vrxF XeMynsyCz07SVuYnowYzZ8BWI4hthCk7Zc0hUSIaHr53yY1ad8tmdlhEgU/O5VcI1GK/ XG+fDPqrHqHhR6+lo2W/Z/NgJluXsolfZSc4VkXoNgkNJa3tLKLNGPYrC3UTGFsZq1ix qSFQ== 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=cuxHwRtFTKXDDmK/iLlxGdmq6k4l1/9xtNjZepHFvL0=; b=umZHxIH1CNt7sINpLTOlbU8Jnvatt2n0ITpkEDl2zPJlOqIWOIIxGZRDx+l02vnJT+ LHuLTEyQJgDxn8GMKqd2ZtENuLdTKVQ4ojuxOOj1cqO6jZQ5yxX3EoKbWi2kLB6ZW4kG GYWUtBd/kCHEm8+xqNzZr945B73VTtAf67zvrJ7uTvz5jGUSM9e+HkOJagXUDxGc4YM9 RC59v4D/EEFXg/RMYNhh4KKCOHF2nVrldq36QfiPmxuW6hpQtTgaBTTKTSMUr8jvUytV 5D2Lc6LFwJjh7gJnxjBFEduSnKjLDjGPTcv6VIB3AvFgA8pd3UUf+0IfqX0JXiQYDk+e 4FYg== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@posteo.net header.s=2017 header.b=rExgSJbE; spf=pass (google.com: domain of bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org designates 185.67.36.65 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 mout01.posteo.de (mout01.posteo.de. [185.67.36.65]) by gmr-mx.google.com with ESMTPS id u24si568072lfo.1.2021.01.24.09.38.01 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 24 Jan 2021 09:38:01 -0800 (PST) Received-SPF: pass (google.com: domain of bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org designates 185.67.36.65 as permitted sender) client-ip=185.67.36.65; Original-Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id 5E930160060 for ; Sun, 24 Jan 2021 18:38:00 +0100 (CET) Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4DP0Zb5Bw6z9rxd for ; Sun, 24 Jan 2021 18:37:59 +0100 (CET) Content-Disposition: inline In-Reply-To: <87pn1uwglb.fsf-9EawChwDxG8hFhg+JK9F0w@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=rExgSJbE; spf=pass (google.com: domain of bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org designates 185.67.36.65 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:27562 Archived-At: Hi, Having an analogous requirement, I turned to PP (http://christophe.delord.f= ree.fr/pp/). It seems to me that PP macro files can be more easy to write a= nd manage than lua filters if your processing doesn't involve much programm= ing. Also, you can easily define macros with more than one argument: for in= stance, a call to a macro like !century(4)(th) can handle separately the nu= mber format (roman or numeral) and of "th" (normal ou superscript). Cheers, Bastien Le Sunday 24 January 2021 =C3=A0 03:32:32PM, Albert Krewinkel a =C3=A9crit = : > Hi, >=20 > you'll need a Lua filter for this, which is what R Markdown, and thereby > Bookdown, is using as well: >=20 > https://github.com/rstudio/rmarkdown/blob/master/inst/rmarkdown/lua/latex= -div.lua >=20 > Cheers, > Albert >=20 > Chris Diaz writes: >=20 > > Hello, > > > > I'm looking for advice on how to produce HTML and LaTeX from Markdown u= sing > > fenced divs (or something else) to apply custom styles to specific port= ions > > of the document. > > > > For example, I'm hoping to write something like this: > > > > ::: solution > > Solution text here. > > ::: > > > > in order to produce this when HTML is the output (already works): > > > >
> > Solution text here. > >
> > > > and this when LaTeX/PDF is the output: > > > > \begin{solution} > > Solution text here. > > \end{solution} > > > > This idea comes from Bookdown's > > Custom Blocks > > feature, but I'm wondering if there's a way to do this with Pandoc, or = if > > this would require a Lua filter. > > > > Thanks, > > Chris >=20 >=20 > -- > Albert Krewinkel > GPG: 8eed e3e2 e8c5 6f18 81fe e836 388d c0b2 1f63 1124 >=20 > --=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 pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit https://groups.google.com/d/msgi= d/pandoc-discuss/87pn1uwglb.fsf%40zeitkraut.de. --=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/YA2v9NAvdF/J/WWQ%40localhost.