From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/23436 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: BP Jonsson Newsgroups: gmane.text.pandoc Subject: Re: Conditional Formatting Date: Wed, 18 Sep 2019 16:12:47 +0200 Message-ID: References: <34b81ee8-2405-5b3a-bbc9-23600a2802c5@linuxacademy.com> <214b77f6-5739-eba4-ff5d-ea5d1fa553b9@linuxacademy.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000003b0a350592d46ff5" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="130812"; mail-complaints-to="usenet@blaine.gmane.org" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBDIY76M674FRB3PWRDWAKGQETNYQ65A-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Wed Sep 18 16:13:03 2019 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane.org Original-Received: from mail-ot1-f57.google.com ([209.85.210.57]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1iAahb-000Xtc-O9 for gtp-pandoc-discuss@m.gmane.org; Wed, 18 Sep 2019 16:13:03 +0200 Original-Received: by mail-ot1-f57.google.com with SMTP id e21sf3662062otq.23 for ; Wed, 18 Sep 2019 07:13:03 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1568815982; cv=pass; d=google.com; s=arc-20160816; b=Siga1kC9s/LQ5WzKIyvavMhHMXPZMXQpJiGLzBS+aSiq03+fiKouC0dUVQQWLfX8ga fJm1KX8HV3XZ/9/oR/1ai7ZOtQZebHoiJOpjFsjLekQQBqmZFvrOEyGLil+zliT2KxNu tV6VVxIZTbJpuSfpJqNq02gBt5HPeHRTzWSoc4RS4HwIBwfRrKuIdQuvMm/WB0Of7ZyR OurimV8w1zwGU1WomcUfbUIv/kZfiWrCYOz2EInToCvEluEHJSeu2vA5ivL9qzBqnnmc Io4FcDQG2DwTjgsnHLH6D/hZQFn6nFU8hx6+G7khDGT6GNgypVGoECLn2bOthoBl2+3G WfkQ== 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:to:subject:message-id:date :from:in-reply-to:references:mime-version:sender:dkim-signature :dkim-signature; bh=IHp0llDv3b+JTbC9s6ZYkeK2hrLAo1UDAS/fZTcVSqw=; b=rcs/KXssBLJ/gx7MVUB/YFov0bjJMpDcZIYwCIuxearv/nMzkknkJ5FfR5QnnqfItY MBkSv/JXsukfbBCnzyg6yf/y0IDqh+yAvbAy3R7vig7pzsOdanNySDqPyHC1Dvsug1u0 Iqz5sLIV3Q5CW5MtA8AtZtZDXltW733Z0jl+7H1H8PP8QC3jm07s8lSi/j+p27FKV2zi Pavrhw+hGvQCgC3Iq8T0lOtGvJepLusCBITtkuEw+AirSkgUvHrdjahZDNByQfkqwQFs iJAUiXxamcSDMNDMwER/cKdPLgir3oWYAjgEbCXeRTXztmSk3RNgQtzgbc8tLl1b6PaK R8Mw== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Pizwvb7l; spf=pass (google.com: domain of bpjonsson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::635 as permitted sender) smtp.mailfrom=bpjonsson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:mime-version:references:in-reply-to:from:date:message-id :subject: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=IHp0llDv3b+JTbC9s6ZYkeK2hrLAo1UDAS/fZTcVSqw=; b=hUV7BYjYJVx0x3L+fiZHQPFMNDSbkStn0dyFvyJWl8roQyTNsSP1mY9saLcCKljr41 AwWT7FGoIvSKzjR/W2I6Gr41mpH65YEB6Z8GZuOskl6YLs/VtMvUPK4mTaWPPd3bbbaJ Z7sX/El0ePoytqDTMTnAbP2WLgoFpcganX2sMiS4Aj3fStiGKbTPYGicPOXa8NgusAmV 5fKBZ2r6IYgqJsjCbCD+vdhqVBZp0RRSLkiDk4RbJUZ8jLZYcAkyoQq39cEP6tna3JiV mvy+gYiX3BuM28RVS/EtWvlkUTj/O7lw/RWXM+r6J5lfmhb3ZcZ3FJTRepkhllKp4Bi2 CE4A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject: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=IHp0llDv3b+JTbC9s6ZYkeK2hrLAo1UDAS/fZTcVSqw=; b=dF7tjiQTl/5A93azM5O3ktrGp5vmjFxpHzPnq98MQYJSHvfLibL2Zf8v9fjwOj/bev cBxWbox2mpWjy2A9zcupqCpPPq0Khh8ktu6y6k8MaTGa+zU+JhnbcD8/L8KE748yvCrc SC27oFicQ5PQ7O3BcA7vXRGvv2/RJlDpz7ZLqIg3HZjlrkcTfx9ZH0sPpnhXbMSTVyn0 3k5VM834dqDp0364Y/GrDDoPk/v8kg7y0hslTk/ehaN6VDcU1Y1CH+3zMBy17yhClEcK o9h5Dfhwi4TDH6tWxRd4zurFoKjBj1ICDNP5KkLCU/dMQo3feH8iwka3krINZZ7Takyt mmrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:mime-version:references:in-reply-to:from :date:message-id:subject: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=IHp0llDv3b+JTbC9s6ZYkeK2hrLAo1UDAS/fZTcVSqw=; b=UImb+d+qGRLjTTLbQX8XFKy4kGJzwML22w0DB4FwfWpB/dZA0LrY5QXHqI9W3iIeah 7hNr3TfgmFw0+YSomZHpMWx28jJqnjaVKNk3HgBWM6+W9MNRY9w1HQ04YQ/t6hSGRFnZ uddNsOLWtQy2rVRQUYi1dW7e4hFPsuT5+PF5S6J9sgSSCt1DA7FKg8TIOn9eowxqc9JK mZMeapVAXYRofkCpUbod9obc2LqUG8PTC8jAJMul9zVkJrM8LIBuCW9NbpYmOOlF/q1B zTFQK9fH3CbMiEEpo78W3QlocXGw3A2d2gAE4KNlPN3uNH28zolBln4DjLJedM2ME1aZ ATZw== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: APjAAAVfHeDOoSQ1zGBwpekoTFmnWGEmMFckWPZQebwIjt8afHjKT3/L aP5cyzHhyPPwem6PRPNXSNY= X-Google-Smtp-Source: APXvYqzWK5U7kzLipvXApR1rygKI/ciFs4UasCHd4MDjixIlwEeiWZEK/18UknCy5W/83bbR+xAJVA== X-Received: by 2002:a9d:6355:: with SMTP id y21mr2889757otk.53.1568815982424; Wed, 18 Sep 2019 07:13:02 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a9d:688:: with SMTP id 8ls33593otx.9.gmail; Wed, 18 Sep 2019 07:13:01 -0700 (PDT) X-Received: by 2002:a9d:5f09:: with SMTP id f9mr3130778oti.341.1568815981589; Wed, 18 Sep 2019 07:13:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568815981; cv=none; d=google.com; s=arc-20160816; b=AAamG4nbWN3nxkxdzpNvfWJpjyV6vnnbPb4CES7fSNP87mqYgIwI4qyp4F7g8HYu6Q ZEAsDQ9qCuBy+pwaTgohKu6U3KhMBLvfifChnijXQ9Nbio8G/QCov6IPcSBjrijyIy+c lThVW14CeKh4lB1MiCGQqxXYaWubluCtu493hg4mlvySq5jC6ZLyaEwtUhMRlRniHRSp kQehoKbxlnXDxIr8m9xoCihRJhdP0rb643AXhCGHiGM9QWfPhbhWFubRNap3Sqdy8mdg +27coNacT1pyKQAqYoYaG5WpP5yqhVSM7C1GTT5UTvjnc5B4E/RhR157KkIwvG8dUSsd 6DRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=931KBZxggKnofT4OeIucfXCJMX9KRX5INqLK4yT2UeA=; b=EoKAlmnXXH1MSXCM3W8sJ34mkv/tVkiqLF8tdcibTdxdLNCflObLxIQy8b7T8OKWvg ewxjkVa1yaQ+USiwKV+/Zy9TMJLVJbLjMAGXP1L81wxk3Lk7136yBZSP6HMvC+TTMDDM 4nWfljyA4+fav/lDacw6ZZfFgA4qs26INtOBn8DHSyPAftiGCbVOmIELTuHgYpkWcJnS CvgCw0TpoKNDwo1lzQC8NPQJ2K1DjL3fqZ0a0aJkZKSyJyonfxJ/Nj6XXtmQfvD60xG8 tYXgW4gqvSxKQj4EF5g3SbwkBCpy9o2KHC33JMNbPh8MbkC80/qhr1Jt3SUzJQrrDvCt a+mQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Pizwvb7l; spf=pass (google.com: domain of bpjonsson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::635 as permitted sender) smtp.mailfrom=bpjonsson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Original-Received: from mail-pl1-x635.google.com (mail-pl1-x635.google.com. [2607:f8b0:4864:20::635]) by gmr-mx.google.com with ESMTPS id q3si374699ota.4.2019.09.18.07.13.01 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 18 Sep 2019 07:13:01 -0700 (PDT) Received-SPF: pass (google.com: domain of bpjonsson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::635 as permitted sender) client-ip=2607:f8b0:4864:20::635; Original-Received: by mail-pl1-x635.google.com with SMTP id 4so3231426pld.10 for ; Wed, 18 Sep 2019 07:13:01 -0700 (PDT) X-Received: by 2002:a17:902:a618:: with SMTP id u24mr4142265plq.342.1568815980414; Wed, 18 Sep 2019 07:13:00 -0700 (PDT) In-Reply-To: X-Original-Sender: bpjonsson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Pizwvb7l; spf=pass (google.com: domain of bpjonsson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::635 as permitted sender) smtp.mailfrom=bpjonsson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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:23436 Archived-At: --0000000000003b0a350592d46ff5 Content-Type: text/plain; charset="UTF-8" You can of course do it manually with divs in your Markdown as well: ````markdown :::shallow - a - b - c ::: :::deep - A - B - a - b - c - C ::: ```` and then in your CSS: ````css div.shallow > ul { /* style here */ } div.deep > ul { /* style here */ } ```` The main point is that Pandoc doesn't support attributes on most elements, so you have to put block elements inside a div and inline elements inside a span, set the attributes on the div/span and use a child selector in CSS. Den ons 18 sep. 2019 01:39John MacFarlane skrev: > Craig Parker writes: > > > So if I define a ul.shallow and a ul.deep in my css, you're saying a lua > > filter would render (in the html)
    and
      > class="deep"> ? > > No, I'm not saying that. > > You could write a lua filter that would identify "shallow" and > "deep" lists, and insert a div with class "shallow" or "deep" > around the list. > > Css could then have a rule like .shallow > ul or .deep > ul. > > > Are creating lua filters anything like coding in other languages? I know > > bash and PHP... > > sort of, yes. See the documentation for lua filters on the pandoc > website. > > -- > 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/msgid/pandoc-discuss/yh480kr24eh4s5.fsf%40johnmacfarlane.net > . > -- 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/msgid/pandoc-discuss/CAFC_yuQ3GEoYovUB%2Btg6iSs_hL9bDGq7RCoDT93GemZXz%2BCSYw%40mail.gmail.com. --0000000000003b0a350592d46ff5 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
      You can of course do it manually with d= ivs in your Markdown as well:

      ````markdown
      :::shallow

      -=C2=A0 =C2=A0a
      -=C2=A0= =C2=A0b
      -=C2=A0 =C2=A0c

      =
      :::

      :::deep

      -=C2=A0 =C2= =A0A
      -=C2=A0 =C2=A0B

      =C2=A0 =C2=A0 -=C2=A0 =C2=A0a
      = =C2=A0 =C2=A0 -=C2=A0 =C2=A0b
      =C2=A0 =C2=A0 -=C2=A0 = =C2=A0c
      =C2=A0 =C2=A0=C2=A0
      -= =C2=A0 =C2=A0C

      :::
      =
      ````

      a= nd then in your CSS:

      ```= `css
      div.shallow > ul { /* style here */ }
      <= div dir=3D"auto">
      div.deep > ul { /* style he= re */ }
      ````

      The main point is that Pandoc doesn't support attributes on= most elements, so you have to put block elements inside a div and inline e= lements inside a span, set the attributes on the div/span and use a child s= elector in CSS.


      Den ons 18 sep. 2019 01:39= John MacFarlane <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org> skrev:
      Craig Parker <= craigp-UzRat0APdLvLPIzirxu/xA@public.gmane.org> writes:

      > So if I define a ul.shallow and a ul.deep in my css, you're saying= a lua
      > filter would render (in the html) <ul class=3D"shallow"&g= t; and <ul
      > class=3D"deep"> ?

      No, I'm not saying that.

      You could write a lua filter that would identify "shallow" and "deep" lists, and insert a div with class "shallow" or = "deep"
      around the list.

      Css could then have a rule like .shallow > ul or .deep > ul.

      > Are creating lua filters anything like coding in other languages? I kn= ow
      > bash and PHP...

      sort of, yes. See the documentation for lua filters on the pandoc
      website.

      --
      You received this message because you are subscribed to the Google Groups &= quot;pandoc-discuss" group.
      To unsubscribe from this group and stop receiving emails from it, send an e= mail to pandoc-discuss+unsubscribe@googlegroups.= com.
      To view this discussion on the web visit https://groups.google.com/d/msgid/p= andoc-discuss/yh480kr24eh4s5.fsf%40johnmacfarlane.net.

      --
      You received this message because you are subscribed to the Google Groups &= quot;pandoc-discuss" group.
      To unsubscribe from this group and stop receiving emails from it, send an e= mail to pand= oc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
      To view this discussion on the web visit https://gro= ups.google.com/d/msgid/pandoc-discuss/CAFC_yuQ3GEoYovUB%2Btg6iSs_hL9bDGq7RC= oDT93GemZXz%2BCSYw%40mail.gmail.com.
      --0000000000003b0a350592d46ff5--