From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/27559 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Albert Krewinkel Newsgroups: gmane.text.pandoc Subject: Re: Markdown Fenced Div to LaTeX Environment Date: Sun, 24 Jan 2021 15:32:32 +0100 Message-ID: <87pn1uwglb.fsf@zeitkraut.de> References: <8ba84992-d792-4333-aae0-560147ef79d4n@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12603"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBCZJF7XJTILRBB4KW2AAMGQEMQQKHPY-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Sun Jan 24 15:32:42 2021 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-lj1-f191.google.com ([209.85.208.191]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1l3gRW-0003B1-4A for gtp-pandoc-discuss@m.gmane-mx.org; Sun, 24 Jan 2021 15:32:42 +0100 Original-Received: by mail-lj1-f191.google.com with SMTP id f30sf4127669ljo.10 for ; Sun, 24 Jan 2021 06:32:42 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1611498761; cv=pass; d=google.com; s=arc-20160816; b=junTbaANvwIGtR0jyt2EMf9CzwszLEqFe4P6yLmvbgBWkWYvwOYHraP0Lm+oliW/OO rSotibbdQbXv1w7fbXw4MqrGSujXU7pv+0JNmWKndCg5FdJU2hUBNUTmpX1ilBt9kJTu 1yCi52ARDH2CqlzzYZ2NTg1CYZC5PoRB7GB72l6D7lSzpneqo9m9w+9rOFAKoG85L6xD S7ongSmkqAipcCwJ8Of3hDlz1RPr3DE8BSE6Awp+DHfVwDjRWOknRhjeFKO6Pac2pIoM sA07+7DXbaJR+6yjmURDIHCMlG4e4ToY0elB0lH6DDd0mQLQB5+0va9i2H90nFPcaRbt bp6w== 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:mime-version:message-id :date:in-reply-to:subject:to:from:references:sender:dkim-signature; bh=ZX/zXTlt5SMS3EZbYl3jV5yHfk7vtwF0iOIEX/4vFyg=; b=Xe/hZg/LZxh6nocJCi4Ci2GNP1TrrLI0T452mSI1ltLblUi+UL1uSvDu2zDA59h+ew H85swLK8w/z8oK1HW3444qoITvFJeVG9qb6wjjMfkrICI9yctOuzPzoRVp1s9YK1eg0L 6Hjw8bwtLLa7mv6SV1/fQaR+Kds4aHXCvYbG4NHcP3WQhcTUkWKwAThB9wRsYt1APiGX Vdix4SlYTBAvidRFOSZQxR8jNZ7+Pi3DZxv25MZVscaiF50rmAMZ33yHcevAkIhUAtuQ V6yiP1e2LgUjm0CNRz89gL8l9/up9l58ow5Uf6G8UMAEUu3kmsbIpU/Sgy93SmQdJ9AE e45Q== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org designates 2001:67c:2050::465:201 as permitted sender) smtp.mailfrom=albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:references:from:to:subject:in-reply-to:date:message-id :mime-version: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=ZX/zXTlt5SMS3EZbYl3jV5yHfk7vtwF0iOIEX/4vFyg=; b=k1P+ykblGkrEEFUUwFhTq8xjcNRL+wpMLHEjOe/ovueXAyV2w2MutiAPuCRZ1BWNgX HRRGlSCiPC+0D0HBnQ3IPU/3//BJb6zpEPN306NWMTcascf2zFR1lH9jMlCKDP19ByHC QYPNGA52CcNrYeookIptes9b2fkllxkHvgvZ20FJ1jPE4G0h5bNhmO04QiTmlLyDaYel 3klVrumpiSqqOrPTv8k9qY6d7O4ZBI8GLcumAe7L00rBPdR+Mi8zmyFe3Qcb/jCCJ5FW ygpLSBm8xpmohr+941pZy1Ae9bnfACBnll1kjFX/0YcM8L1t7E1n9DVe/JzGlZXwgrwR HD+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:references:from:to:subject:in-reply-to :date:message-id:mime-version: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=ZX/zXTlt5SMS3EZbYl3jV5yHfk7vtwF0iOIEX/4vFyg=; b=cUHaz9o2goUK5aVNUxJwFjgNoRIDbOfDOfKCx/9A0qgeFcXIp4doBzugJCkdsGoJQ2 y9ADpBq6FDSNbYLEjQrMY7ZRYH49BQphJKsYlEVoNCIMT/TfLV72lMa90/Ku6NG3Y6WI dhu2DwzEcUTO1P5YKTBEjLUtnrXetsHWaoV8ORfBe969aHwLRj9oWjXE5cwGPyNyiLXn eq3UwpMqMY+mBhLcEmuBgwKbMdmNlegcDz51GKz+0cpiuHM0dkt3qTpYo5ssr40NpMcN CdsNbJh6s41DgJmjApCqz1Pl+gB/YkdHapPu2+tL+RBGdbgbuYLxOE0xUj4oCorT6z+2 u7pg== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM530xvvz40XVN7aVTbRgrqZ5QP/t5sfH+wsQ6ToQD/snXg898kJrZ S2yEUHspY5PqFjrCFI0PTxI= X-Google-Smtp-Source: ABdhPJyVikUlylNVP6hKIwvcAqyYRyml3dK52gCX1hKwiJKLoBozWVL/qn7vus57hdpJFeYjWhdVzw== X-Received: by 2002:a2e:914c:: with SMTP id q12mr20299ljg.102.1611498761613; Sun, 24 Jan 2021 06:32:41 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:ac2:4adc:: with SMTP id m28ls2784405lfp.0.gmail; Sun, 24 Jan 2021 06:32:38 -0800 (PST) X-Received: by 2002:ac2:592b:: with SMTP id v11mr260695lfi.512.1611498758849; Sun, 24 Jan 2021 06:32:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611498758; cv=none; d=google.com; s=arc-20160816; b=PIWX34SLgcRiAIOJk0bTpaOywsyHFQcXg5LOfo6EHTyVBb3/ztPOAw0HfCAu2y/IzJ s6XzLdAsaH6ePl1RlQY4SUH7fpBuLvH+O7zbIZAEYm7TWXYiC8nUDyaWLgLoEz1XiCHv YZKlsBriQ7pp0OQBmjqXZ51DeKSUZFHANCwgQ+5UMlf4EpvH+VbDKP19384N3Na1zWlb nRNPREqA+dMuSuYa1lwBkTIzybrVWdJTWEQ/TGoJfptLIuGhMmbiORioew97PwPIiAQG hmDfDPqEnR4YQnfvXbuUiSzVDNPQh/qKqiaVRRA3IMNowcH5Obskn9dGfWIa6h2yvE5H KOmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:message-id:date:in-reply-to:subject:to:from:references; bh=Ol9PdpJS10xy7avd13nBZ8quRERkVcALl745Nctobrc=; b=O0laXb4KfltxsoDmS/gPR9MQdz1vhURGIeEFg00907daINihSHQCE4sxt9bc549lzU DhRD8/RlRrkaYcQebauJr/JJGXJGSgej0JI0HWS5OjTW8b0SaYYRK4sYt61txewVHeLd vWw6msBZph8Mf6NYY9htq2HJMGReFa+GLXXvYC4FvsXALLgwKQ6lrUA6Gb7A8ycZaM0t 3kk5RbhNZwnviH2/amKDkyqFK+gcaWNH2yypIO8QMM3nuIsb09Hr66Wp+Ezdcq6AXC5g NghpJxlalZlXqBWHXwT+MBtJzpqLdF7Gh+xhtI6weygvORyIri4YGSV5/bePzEo2P9kA wxYA== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org designates 2001:67c:2050::465:201 as permitted sender) smtp.mailfrom=albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org Original-Received: from mout-p-201.mailbox.org (mout-p-201.mailbox.org. [2001:67c:2050::465:201]) by gmr-mx.google.com with ESMTPS id 15si62802lfk.13.2021.01.24.06.32.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Jan 2021 06:32:38 -0800 (PST) Received-SPF: pass (google.com: domain of albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org designates 2001:67c:2050::465:201 as permitted sender) client-ip=2001:67c:2050::465:201; Original-Received: from smtp2.mailbox.org (smtp2.mailbox.org [IPv6:2001:67c:2050:105:465:1:2:0]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4DNwSk0vqmzQk8j for ; Sun, 24 Jan 2021 15:32:38 +0100 (CET) X-Virus-Scanned: amavisd-new at heinlein-support.de Original-Received: from smtp2.mailbox.org ([80.241.60.241]) by gerste.heinlein-support.de (gerste.heinlein-support.de [91.198.250.173]) (amavisd-new, port 10030) with ESMTP id F89VeqtNmbS0 for ; Sun, 24 Jan 2021 15:32:34 +0100 (CET) In-reply-to: <8ba84992-d792-4333-aae0-560147ef79d4n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> X-Rspamd-Score: -8.59 / 15.00 / 15.00 X-Rspamd-Queue-Id: D8FAA17D5 X-Rspamd-UID: 401788 X-Original-Sender: albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org designates 2001:67c:2050::465:201 as permitted sender) smtp.mailfrom=albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org 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:27559 Archived-At: Hi, you'll need a Lua filter for this, which is what R Markdown, and thereby Bookdown, is using as well: https://github.com/rstudio/rmarkdown/blob/master/inst/rmarkdown/lua/latex-div.lua Cheers, Albert Chris Diaz writes: > Hello, > > I'm looking for advice on how to produce HTML and LaTeX from Markdown using > fenced divs (or something else) to apply custom styles to specific portions > 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 -- Albert Krewinkel GPG: 8eed e3e2 e8c5 6f18 81fe e836 388d c0b2 1f63 1124