From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/23074 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: John MacFarlane Newsgroups: gmane.text.pandoc Subject: Re: Fenced div main class as string and more attributes later Date: Wed, 03 Jul 2019 03:00:41 -0700 Message-ID: <87muhvmo8m.fsf@johnmacfarlane.net> References: <7ed7a801-1691-4285-9ad5-56945a90558a@googlegroups.com> <8e050d22-4d80-45c9-b5c8-74dbb263da11@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: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="58530"; mail-complaints-to="usenet@blaine.gmane.org" To: BP Jonsson , pandoc-discuss Original-X-From: pandoc-discuss+bncBCJZJHG45QDBBV7Z6HUAKGQE3Z6F44Y-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Wed Jul 03 12:00:58 2019 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane.org Original-Received: from mail-qk1-f190.google.com ([209.85.222.190]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1hic4O-000F0u-Oy for gtp-pandoc-discuss@m.gmane.org; Wed, 03 Jul 2019 12:00:57 +0200 Original-Received: by mail-qk1-f190.google.com with SMTP id t124sf1610910qkh.3 for ; Wed, 03 Jul 2019 03:00:56 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1562148055; cv=pass; d=google.com; s=arc-20160816; b=mmJ93I/kAIwFmVdlcSVkBopkD+GIstf1c9iY0a6LKtvuwyh4wMbcNxF5CPWy+00MXJ Enl2Y7kEV6c2oIHrmFX24Z1JlSDb9HoAIxz2YiETNXKwgcV7K6eHYAVDgweeatEhFRGy opYOmi76Mt/qI9TmHWLQ1TLJwAkc+/vT1IKpsfbNetx/68980T+LM9xvKikGWawrAD/+ 3GBSOFxxvqMMXf6dvhqJlyl3ehYnAAbL7CfNkkhfFxDIYqyc5avuEHJMw3qEuxKAYzxB DGZeOvFPRQ2kwm2R3BjPPfudnSmBbxJYmRq+IuAqMneK9dLmjD2Oh6W2vDl8/9XZjnkV FCyw== 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=i2/KKey9WQCIlL9vR5cgGaHQc71SNctZnAAWW9wjm6I=; b=pFxj4lnQLXoKK5ikJjqMu+GkWSGOfC01fT0D21Lr3qz6oBoARpL5vZNhEKwS4AX016 6bqmew5hE3iRYUHNsCttPFbq15i1/256Ak2zwYmAEtfnl3EqQrg/naCYJUIJRGBwQaGw nKVYklmKJq6scbPRTa5n72WvShkpYBAdUSExCFL6wjCW4aenj6tDkT+7ohOy7Ao+L1z+ DUPgC+CXNYwKq76MhLYQizvJhmMEpoWT4nEINhrWhUi7a1+Vv9dZTN5q9es0wRpqaBZr vFO/8ko8kBUjZ31/PFYGBH/tnkXcBuKyANrqkBMqRJ54zxBMde5smvAjAwamxhButv5z COKQ== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20150623.gappssmtp.com header.s=20150623 header.b=w2QhhN26; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::62e 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=i2/KKey9WQCIlL9vR5cgGaHQc71SNctZnAAWW9wjm6I=; b=l+GzmDxDO3lvOpU7ckgyK1LHp77dBgvNKQ2SEHzwEFpRskRpOvSWjeyj9sHgMRZmTn rTsbYgGNhidc8UXia78V+hQTD70GDP8QdVsxZ+k/N4/NWEz8o1Cb6pr7ywu4ElZr4Frp 8AQ4fOTSz2D2yKDko9dt7hoY0E3x2gaUWM61w5mdRAZtZOgKODulO4SxS6CPZN6OdORF XytonCJK3pMngNtTdN+tMhDcWKkhBVIawkitOjGpjlFOvwlJAE8El5kDz0P71Rwj9jEU +YsWnvfGFL2WNkwzFmpAp1kE4t4nEvIzwuzOjDwEXw/XxIh3Z73b+T7boojEhjiQaLfF uJcw== 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=i2/KKey9WQCIlL9vR5cgGaHQc71SNctZnAAWW9wjm6I=; b=LUKHjSTCPZK5pSPVBAtUPzK/nCGKKuZ3CbvgJM+CjxbRFJ3KY2eNrUcgCPQbvnxeuc jeQHt7k9rAwsTm9e68HGUE8AhlQRNzrO/YAcEVP4itMvIQO0KFyj1lxwYD/VK8HZKxfu CSIos0eAOz3CMpQfAOJSa5pjW2fBNUDHQbOxvSYobS3kd3icL99KKj21AmyrrFafCIip 4nMa6RkCkg6CtIpheR36Ppqoga95AsPRIS+y4JWPoHChpMCVXXszKHWSdC4nB3oSybKy YbTBulGkUoSIniV9s5q9e6PIcr64iVaGw8jaTC2scy+4REluZ6BSMa11QZEc5jTyZo2G Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: APjAAAUnGXnbUztV2EhLEo0NuU+0AShOmlwxwjn7byntXSFmBI1sZOzC aUb8nruJgw+T8vhxwrqfpAE= X-Google-Smtp-Source: APXvYqz8AD4UL9MkETFEvzdQpMfZZ4lc54p+P7cNlY6F9vViAYJ+qp5zNBrlO0P8EkCCHYODVx383g== X-Received: by 2002:a37:517:: with SMTP id 23mr7076865qkf.496.1562148055584; Wed, 03 Jul 2019 03:00:55 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:ae9:e510:: with SMTP id w16ls652700qkf.14.gmail; Wed, 03 Jul 2019 03:00:55 -0700 (PDT) X-Received: by 2002:a05:620a:5b0:: with SMTP id q16mr29726315qkq.212.1562148055005; Wed, 03 Jul 2019 03:00:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562148055; cv=none; d=google.com; s=arc-20160816; b=ptyx98/pu9NSQvma5ghQtn2w7ovYz/pGKId7rlkPTzEKRksj1qew7y0fXA0jTWks36 M24hazB6VbmNDJnLxNsOB9r741UEXYmrnHnqeqR3UoJe7hvtf9ieOYZVp5JFg4m2SIZp 41XBiKS5Mqc3JhcTQPK7llkW+tW6rD7lM1APAWY2soruerWpC0Z894JJH7ufA0EEIbH7 2xbO82CcNT0/6fVh4Z6KFd6ID/zeRkeDCUxLRGWmZwgwvbq+j+ioyUv7aZDRMlhNRRIZ wggjnxr9G/CLdflQe5kaZAUg1DCYAu7pfgkGrMYnOUb1nXdKGBnBJq6NKc9/ebEmtQJY ljow== 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=isso08t28HcO/J9vttkz2VWjcsOkRYuMt8QnmjZGra0=; b=FDZ/VU+v6AsxFYfxW9yYGFYCaTiSbHozsx02YXQkAFaNdXUK68/0tQNU84zz3uyXuo OAlTx3F3zir8mwbgQhzKGIyg/4V9vOm0YDxcBRiKvqZrU6bkz7lWdijCxI8TwXbGvHFQ e4i4Ayj6KuAGeGkeE7bMxxvzQjEEun6p91MdlsjlGDPzdThl5CVsmKMuq7zJdAfcztH6 lijU4xIj4CWFOTqdoePQJglW9a6atJmspJQEwkPrF7/eq1oN4YvFOMWyttXlOEGtoYv3 SSKvbuYCtKOeNyzYNxVZlZy3aReKXJvtt49E1jVvdSKbXheEiX4k1T2NWHLXfCkyWe+Q W0vg== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20150623.gappssmtp.com header.s=20150623 header.b=w2QhhN26; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::62e as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org Original-Received: from mail-pl1-x62e.google.com (mail-pl1-x62e.google.com. [2607:f8b0:4864:20::62e]) by gmr-mx.google.com with ESMTPS id g41si107001qte.4.2019.07.03.03.00.54 for (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Wed, 03 Jul 2019 03:00:54 -0700 (PDT) Received-SPF: pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::62e as permitted sender) client-ip=2607:f8b0:4864:20::62e; Original-Received: by mail-pl1-x62e.google.com with SMTP id i2so970528plt.1 for ; Wed, 03 Jul 2019 03:00:54 -0700 (PDT) X-Received: by 2002:a17:902:d695:: with SMTP id v21mr38602969ply.342.1562148053735; Wed, 03 Jul 2019 03:00:53 -0700 (PDT) Original-Received: from johnmacfarlane.net (li55-134.members.linode.com. [74.82.3.134]) by smtp.gmail.com with ESMTPSA id g13sm1880545pfi.93.2019.07.03.03.00.52 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 03 Jul 2019 03:00:53 -0700 (PDT) Original-Received: by johnmacfarlane.net (Postfix, from userid 1000) id CCB7BA231; Wed, 3 Jul 2019 06:00:41 -0400 (EDT) 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=w2QhhN26; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::62e 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.org gmane.text.pandoc:23074 Archived-At: The proposed change wouldn't require a different internal representation. It is just a question of markdown syntax. If we made the change, the bare word, if present, would be included as the first class in the attributes. One reservation I have is that if we did extend attributes to every block type, allowing them to be specified on the line before, then we wouldn't want to have bare words, since this would create too much ambiguity: it needs to be obvious when you're specifying attributes. If the generic block attributes format required {}s, but you could add a bare word on the same line for code blocks and divs, that would be an inconsistency in the syntax that people might find confusing. BP Jonsson writes: > TL;DR: such a change would entail much work for dubious benefits and most > importantly would break backward compatibility. > > The problem as I see it is that the possibility of specifying classes *in > two different ways simultaneously* --- one undotted class outside the > braces and any number of dotted classes inside the braces is inconsistent > and thus confusing to most users. People already tend to think that the > lone class undotted class without braces is not just a normal class, whic= h > it is except that the highlighting mechanism picks up the *first* class, > whether undotted and without braces or dotted and inside braces, as the > language name. It might be argued that things could be changed so that a > language name always has to be specified as a/the undotted class outside > the braces, but this is hard to do for several reasons: one is that in > Pandoc's abstract representation of the document this class is not stored > specially; it is just the first in the list of classes, and if it was > "bare" it is *incidentally* the only class. The developers are very > unwilling to change the internal representation (I'm not stating this as > critique but merely as a fact), if I understand correctly because any > change to the internal representation would mean that numerous changes > would need to be made in many places in the code. To users a change would > mean that old documents which rely on the current behavior where the > language class is just the first class however specified would not work > anymore. These two concerns meet when it comes to filters since filters a= nd > the various filter libraries, including but not limited to the official L= ua > filter mechanism and its associated libraries, rely on the current intern= al > representation. > > Den s=C3=B6n 30 juni 2019 19:55Chao Xu skrev: > >> If it is more intuitive, then it is less confusing. >> When I wrote it for the first time, Theorem {#id} did not work, and that >> was fairly confusing to me... >> >> Also, this update can be helpful towards adding an attribute to all >> markdown elements. >> https://github.com/jgm/pandoc/issues/684 >> >> Best, >> Chao Xu >> >> >> On Fri, Jun 28, 2019 at 1:55 AM mb21 wrote: >> >>> I agree that the proposed variant looks nicer. However, it adds yet >>> another way to do the same thing, which may lead to confusion (and may = make >>> learning pandoc markdown harder). Another question is whether fenced co= de >>> blocks would then have to support that style as well... >>> >>> >>> On Wednesday, June 26, 2019 at 5:55:27 PM UTC+2, Chao Xu wrote: >>>> >>>> Does it make sense to make them mutually exclusive? >>>> >>>> The syntax is identical to the `header_attributes` extension. Except f= or >>>> that string in front is the class name instead of the header. >>>> However, it still makes sense, because often the class name itself act= s >>>> as a header for a div. (warning, theorem, remark, etc) >>>> >>>> I'm suggesting making an enhancement, allowing the one I showed in the >>>> email. >>>> >>>> Best, >>>> Chao Xu >>>> >>>> >>>> On Wed, Jun 26, 2019 at 9:16 AM BP Jonsson wrote: >>>> >>>>> The two styles, a *single* class without braces or CSS-like attribute= s >>>>> in braces, are mutually exclusive, i.e. you can use one or the other = on any >>>>> given block but you can't mix them on the same block, so if you want = both a >>>>> class and an id you must use {#id .class} >>>>> >>>>> Den tis 25 juni 2019 23:12Chao Xu skrev: >>>>> >>>>>> Hi all, >>>>>> >>>>>> What should be the desired behavior for the following code in Pandoc >>>>>> Markdown? >>>>>> >>>>>> ::: Theorem {#id} >>>>>> This is a theorem. >>>>>> ::: >>>>>> >>>>>> Knowing both::: Theorem and ::: {.Theorem #id} exists, I would expec= t >>>>>> it behaves as >>>>>> >>>>>> ::: {.Theorem #id} >>>>>> This is a theorem. >>>>>> ::: >>>>>> >>>>>> But that is not true. The HTML output is. >>>>>> >>>>>>

::: Theorem {#id} This is a theorem. :::

>>>>>> >>>>>> >>>>>> Of course, as the current pandoc markdown states: >>>>>> > As with fenced code blocks, one can use either attributes in curly >>>>>> braces or a single unbraced word, which will be treated as a class n= ame. >>>>>> >>>>>> But I do believe what I suggest is more reasonable, especially most = of >>>>>> the time there are no additional attributes except the class name. >>>>>> >>>>>> I've raised the issue here. >>>>>> https://github.com/jgm/pandoc/issues/5611 >>>>>> >>>>>> Best, >>>>>> Chao Xu >>>>>> >>>>>> -- >>>>>> 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, se= nd >>>>>> an email to pandoc-...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>>>>> To post to this group, send email to pandoc-...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>>>>> To view this discussion on the web visit >>>>>> https://groups.google.com/d/msgid/pandoc-discuss/7ed7a801-1691-4285-= 9ad5-56945a90558a%40googlegroups.com >>>>>> >>>>>> . >>>>>> For more options, visit https://groups.google.com/d/optout. >>>>>> >>>>> -- >>>>> You received this message because you are subscribed to a topic in th= e >>>>> Google Groups "pandoc-discuss" group. >>>>> To unsubscribe from this topic, visit >>>>> https://groups.google.com/d/topic/pandoc-discuss/2NWx-P7p7P4/unsubscr= ibe >>>>> . >>>>> To unsubscribe from this group and all its topics, send an email to >>>>> pandoc-...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>>>> To post to this group, send email to pandoc-...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>>>> To view this discussion on the web visit >>>>> https://groups.google.com/d/msgid/pandoc-discuss/CAFC_yuSJDq9oNEP2Ka4= bs3dhTQRMqD-JfpMsfNjnJpqALnW1Ug%40mail.gmail.com >>>>> >>>>> . >>>>> For more options, visit https://groups.google.com/d/optout. >>>>> >>>> -- >>> You received this message because you are subscribed to a topic in the >>> Google Groups "pandoc-discuss" group. >>> To unsubscribe from this topic, visit >>> https://groups.google.com/d/topic/pandoc-discuss/2NWx-P7p7P4/unsubscrib= e. >>> To unsubscribe from this group and all its topics, send an email to >>> pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>> To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/pandoc-discuss/8e050d22-4d80-45c9-b5c= 8-74dbb263da11%40googlegroups.com >>> >>> . >>> For more options, visit https://groups.google.com/d/optout. >>> >> -- >> You received this message because you are subscribed to the Google Group= s >> "pandoc-discuss" group. >> To unsubscribe from this group and stop receiving emails from it, send a= n >> email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/pandoc-discuss/CAJQg2_35kSAh3ooTEOuT0n= mqW1PJurM1mSsbgFeTkj1njvLsxQ%40mail.gmail.com >> >> . >> For more options, visit https://groups.google.com/d/optout. >> > > --=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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit https://groups.google.com/d/msgi= d/pandoc-discuss/CAFC_yuQuSke3By09b48QXDL3dis2wrtXc7UNL%3Dq42faiqMoMng%40ma= il.gmail.com. > For more options, visit https://groups.google.com/d/optout. --=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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/= pandoc-discuss/87muhvmo8m.fsf%40johnmacfarlane.net. For more options, visit https://groups.google.com/d/optout.