From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/26774 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: John MacFarlane Newsgroups: gmane.text.pandoc Subject: Re: Math blocks with specified environment [generic directives / attributes] Date: Tue, 10 Nov 2020 08:49:10 -0800 Message-ID: References: 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="32079"; mail-complaints-to="usenet@ciao.gmane.io" To: Gabriel =?utf-8?Q?N=C3=BCtzi?= , pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBCJZJHG45QDBBFEJVP6QKGQEJVSLX4A-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Tue Nov 10 17:49:29 2020 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-pf1-f184.google.com ([209.85.210.184]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1kcWpk-0008CP-QC for gtp-pandoc-discuss@m.gmane-mx.org; Tue, 10 Nov 2020 17:49:28 +0100 Original-Received: by mail-pf1-f184.google.com with SMTP id 23sf9805124pfp.21 for ; Tue, 10 Nov 2020 08:49:28 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1605026967; cv=pass; d=google.com; s=arc-20160816; b=iThKeiNlQlzZzT9XopPJ8tOziBEcF1JdLoqpWta7Zhb3C1dYmfQG7fmL+3rQvXMZDk xd/EY5V7IFQgD8rUNMLfYVhmgh/B+mGXpO8lFOunpZR0cJDu636T7diOTVaKGP52WBbl IjIUp1zFuCi9shBZ1plhgUcNCEVuiX+3W/dJtj1ycUxJVgK0khWXaf9UbfnekeFYjdQh 8dARr2lBenYpLVXGXZSyBuf05d8b/Y4fEABc0nRFFmuhHs4LY8oF4YsCdbqJtwzUlQRC 3mZ4UPmXRV7FFK7vBE6HLxT7E8qIfq0xoIgZ8UOpg/ryWJNUbwXb/y1wlSC3FgsCSHhC FF3g== 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:content-transfer-encoding :mime-version:message-id:date:references:in-reply-to:subject:to:from :sender:dkim-signature; bh=WJdgE1GnK1GSoAuyvblGU+AksOm2GlHUCkvk42z1+O0=; b=Gcxk4s0nOu+BJbgnriSXRaQuwFbtInow600+YSMCwk1zabJ0r41p6ZgidWyQOrHK6X CRy7BPeK6gGJyk3O60t5maXYA7q5RWtlMB2M48JvY41x/mOEx02olDS8xQJEn6Xsg4pP B/8qP2i/sohSIy9ro3qHPEg5XrgL4gEfTdUSeG0lma7d4VdGQ7KNSauHn1KAD8JYOfbt EZT2tFKUV+9ridKv5WAW4qMfDqWeowL33R0Ka0hQ5iyWy8wifI851wWL8Mm2sAP30wp9 j9EbOcc4Uji5p68r3CQtX098klvBBcSxol5Gi9SfsAfNczUewooJ/9Nm7jv4AyUbUwHB 8vsw== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20150623.gappssmtp.com header.s=20150623 header.b=enadVjjz; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::430 as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:from:to:subject:in-reply-to:references:date:message-id :mime-version:content-transfer-encoding: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=WJdgE1GnK1GSoAuyvblGU+AksOm2GlHUCkvk42z1+O0=; b=DV4fviOR9WX1g5qusj6243/PisP3sxgSlOoVvptu5kYTX5GwpQvwWFaG1ykp2P+RaC WGGfni16llNCm3rzadefKn25iaa8rUHcRfN2T6Ibnedu9KmA/OVOrIrtwKXlWFfLVZAs +yqTftsd7+QE40ST8BjqaMlf9DzXsWxxr/uPD87cn8I31vsbjC1ARkLjqZv8I3wQce3A quamQZCmgZk5DxoNgqfu+9geiE4AJSGrMWoUlDjLGQVW1mkebEXItrboEzpoWzBGRewK Kzrn7VO29yuanzgW/RkasKgUvr1kMpY3w4+t95mahZ+/x1FFfU+UsiQbasgLoW5z+/pq 0KQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:from:to:subject:in-reply-to:references :date:message-id:mime-version:content-transfer-encoding :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=WJdgE1GnK1GSoAuyvblGU+AksOm2GlHUCkvk42z1+O0=; b=Vgf39ko6fhgSIKegUS25t2hC38OiFsYgPAEkCgAHVlgQ0PgoacjqrZPD1rUcN2KEne RY1RAWvoggHo7u9YQ027/oIkekmIVbz5v6AywTyen3Rym/oUu1keZHKK/4UArQUg+KWG 25DTS6eyCqcUco2xbEZiWxy8iC3qdJiJOQ1SONJ1bqKNknCq/YuBPfFaxxYd2utyFlJk pKQ1Yiy3BC4Mq4ffUWqAie51CE+9aJsm0TNtoEmymSpuy/m1BaRlu1lL2jzSAu2pM5jz iQS/KH54B+G9t0ihUiG1rvqU8c0+i7YJUS6DU4O1RRmt842mc1Le284KqQ4BhSFJLiUF Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM531bufhv7PxUPJNNleNDDeG0/KskmUEU+YJoG8W9gEKJ93TSJ8j8 5QlnX2eFvCzt7qrlKn3FOpM= X-Google-Smtp-Source: ABdhPJwgVZ9zhIe59aNzB31TmFWI0V+RxDLiyEMtSwCpurkN3rraXCFCPlAU1Yobixz4h4n+w2XVww== X-Received: by 2002:a17:90b:3252:: with SMTP id jy18mr596477pjb.191.1605026967541; Tue, 10 Nov 2020 08:49:27 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a63:451d:: with SMTP id s29ls4397850pga.5.gmail; Tue, 10 Nov 2020 08:49:24 -0800 (PST) X-Received: by 2002:a63:7703:: with SMTP id s3mr18515014pgc.9.1605026963936; Tue, 10 Nov 2020 08:49:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605026963; cv=none; d=google.com; s=arc-20160816; b=ICFGS+qmNwGSoW2SpAsnr/62ckCClNjABXM/5S3gcNTGVZuBhVmLimWD00MRHdw9nT iS563HsTjV4Vl9oeYjzB0l0lNTtYwDkdaLbubN2FZqyXuFmzp7DQKhL4kfzlp73HJ4Zw g8IFVsimr6vSdTccMCMo6UhcRvlty7U7C3Qa9j9U+x/PKh4Qa2Jr6SHp05odscBqALic aPXt/v8lgaYcYp2rUlywH/sgJq5g4LRaf78/7RWGNy8VitCy6RvSZ4oN1+yFQJWFJRUR COaznLYij7/CDGEyZE7Te+4Jxid1AOhOA3DrjCRFb8kThZLr6QmURdMWRvEn+ebfn5WY ZibA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:to:from:dkim-signature; bh=XEz3n7R4urMBXLtT2U9dCnW4k2ZX8tN0DXORHc6FBmY=; b=llLFskqDWrWQAC4DgNIm0vRs0To8duZTH8WvFLvrGkXt5p32n4v2Mos8v7TLl4VQN2 CXizFurQ0gFFOzO+IvFPGGlK06VEd/oL98PTmrPCDJrbg8lxQUYpPIUP4c0JUYT4uWKg sYja9Cj/hjwAafEDAX8I7kim4bVxKzFFOgJJnNzYfDR1hRdMfdhT0UgIfnSpTIzc/8Z2 ZUjEutpYX5Zi45DZrairf5n1demATfUyuIdUUdA9zszLMAyYD+Pnb8F1plAFP8qjLJd+ G3ElFFhrZggw0ozDGlRr4SWX95RGn3t+PkVdWg0lHNnqIxFONv0Vorw7MjfmtpmeALRj a+jg== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20150623.gappssmtp.com header.s=20150623 header.b=enadVjjz; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::430 as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org Original-Received: from mail-pf1-x430.google.com (mail-pf1-x430.google.com. [2607:f8b0:4864:20::430]) by gmr-mx.google.com with ESMTPS id f14si474083pfe.3.2020.11.10.08.49.23 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 10 Nov 2020 08:49:23 -0800 (PST) Received-SPF: pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::430 as permitted sender) client-ip=2607:f8b0:4864:20::430; Original-Received: by mail-pf1-x430.google.com with SMTP id q10so11958771pfn.0 for ; Tue, 10 Nov 2020 08:49:23 -0800 (PST) X-Received: by 2002:aa7:8817:0:b029:18b:58ce:3c29 with SMTP id c23-20020aa788170000b029018b58ce3c29mr19393413pfo.54.1605026963078; Tue, 10 Nov 2020 08:49:23 -0800 (PST) Original-Received: from johnmacfarlane.net (li55-134.members.linode.com. [74.82.3.134]) by smtp.gmail.com with ESMTPSA id u24sm11132550pfm.51.2020.11.10.08.49.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 08:49:22 -0800 (PST) Original-Received: by johnmacfarlane.net (Postfix, from userid 1000) id 2B0FBA18A; Tue, 10 Nov 2020 11:49:11 -0500 (EST) In-Reply-To: X-Original-Sender: jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20150623.gappssmtp.com header.s=20150623 header.b=enadVjjz; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::430 as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@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:26774 Archived-At: You can use the raw_attribute extension (enabled by default) to put anything you like in a raw latex inline: `\begin{align} x^2 \end{align}`{=3Dlatex} Note: the line endings may not be preserved, but that shouldn't matter for latex in most cases. Gabriel N=C3=BCtzi writes: > *Hi all, > * > I am transfering to 2.11.0.4 in=20 > https://github.com/gabyx/TechnicalMarkdown and have some question > regarding *Latex Math Blocks*. > > *Target:* Latex and HTML output > * > **Question:* How to write clean math blocks with specified math=20 > environement which correctly merges with preceeding Paragraphs (in the=20 > AST). > I am thinking of a nice attribute solution or something... > > I basically want the output of: > > ```markdown > Paragraph, the next mathblock should merge into this paragraph > $$ > \begin{align} > x^2 > \end{align} > $$ > ``` > > but I dont want to use a Math(mathtype=3Ddisplay) because I want excatly= =20 > to control the math environement. The above does not work because=20 > `\begin{align}` > > *My approach**:* > ```markdown > Paragraph, the next mathblock should merge into this paragraph > ~~~math > \begin{align} > x^2 \\ > y^2 > \end{align} > ~~~ > ``` > > I used a filter to Transform=20 > the=20 > mathematical `CodeBlock`=C2=A0 into a `Para(RawInline(tex, ...))`. > Unfortunately I didn't think about the fact, that a new Para or other=20 > Block element introduces a hard break, and does not merge with a > `SoftBreak` into the preceeeding `Para`graph. Of course that can be=20 > handled somehow ridiculously in a filter by merging precceding=20 > paragraphs etc. -> cumbersome -> error prone... > > *Working solution with +raw_tex Extensions:* > ```markdown > Paragraph, the next mathblock should merge into this paragraph > \begin{align} > x^2 \\ > y^2 > \end{align} > ``` > > But is there a nicer solution? > Is there an *inline block* element which I can tag with an attribute=20 > which I can further process in a filter? > > Would something like that work with bracketed_spans ?: > ```markdown > Paragraph, this paragraph should not end here after this newline> > [ > x^2 \\ > y^2 > ]{math} > ``` > > Any help widely appreciated. > > *BR Gabriel* > > --=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/d9796bc9-ce29-c607-8a0f-79d0834f4286%40gmail.com. --=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/m2r1p1nomx.fsf%40MacBook-Pro.hsd1.ca.comcast.net.