From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-oi0-f52.google.com (mail-oi0-f52.google.com [209.85.218.52]) by fantadrom.bsd.lv (OpenSMTPD) with ESMTP id e9d8cae6 for ; Fri, 6 May 2016 15:45:30 -0500 (EST) Received: by mail-oi0-f52.google.com with SMTP id v145so152028921oie.0 for ; Fri, 06 May 2016 13:45:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to; bh=pJC7TNIZCfW5DQDUVLuVS5OxOUyHJk8/II7w+exSKxY=; b=CdjOoJBTPFcnqvCqndCd+clCoyN8x1iC8PXBf89nOgD0IPwAZieiLMetl+aoHBxE2r bcQriLTcaG+1PUd9o85H3H/ccjXYkHUUVnIbR4PZvmFNl31xPyg4ds0yiYuuHt7BdBNQ wHmMUL1jLe8WnObubX6o+V0o+VFA1S/gIU/kEl11TfKOTI/vj9mnMfFKDjjFkGpvC+iN 49r7/QC5XbUfxx81ovpDMxabg2/DTWwNVB6MrtrZ02ljVPk6izBdFogwQ9IX1enf6umX yigqfPZhGG64WgzVii3Tb6HN//jQtFTo46t8O8Y5BSq3Nnx0J4RWxevLIQ1mzSe9VlS/ Nxhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to; bh=pJC7TNIZCfW5DQDUVLuVS5OxOUyHJk8/II7w+exSKxY=; b=Ufa7SjTWY9qcbkySXK+3ugYcOK4W9teTYsZOv0pt0WKvDmLyU5QCi601qLSTvtncck JmdaX8dF3CoHTZUzVUQyFb+vPASJcKQVvV/2ywH9r7IBnjqyQRBRYvZFdFuADw5/bl/T huce9lKSY+uI4iQUvMGwRDVDmWSmzHQYDPWTfIggegjTbZQXbJq9IgKjkr57DG+dvhxq qRT+OvIljmYomhcR8uW4xnhnxexGFI/jnvqp4t5tMpmAY7ebnpn+1BMy2Xv85h/TaJap 6fThETy5lGn2cybCpr+5sCGPvRcyCbilPGnuc2mXamMp/9VWPTmu8EWtrtVXCT7shUIT Lacg== X-Gm-Message-State: AOPr4FVtO4/SDVYSoeAXJFZahSnQ71SJyC6v/C5h2fojrzBG4a/BlSC7QzY+JkVqnQdt1WRVSG639vqt8mXtkQ== X-Mailinglist: mdocml-discuss Reply-To: discuss@mdocml.bsd.lv MIME-Version: 1.0 X-Received: by 10.202.56.132 with SMTP id f126mr11189766oia.141.1462567527938; Fri, 06 May 2016 13:45:27 -0700 (PDT) Received: by 10.157.15.212 with HTTP; Fri, 6 May 2016 13:45:27 -0700 (PDT) In-Reply-To: <23922.1462562312@CATHET.us> References: <23922.1462562312@CATHET.us> Date: Sat, 7 May 2016 02:15:27 +0530 Message-ID: Subject: Re: Mandoc HTML Output - Recognizing Sections From: Abhinav Upadhyay To: discuss@mdocml.bsd.lv Content-Type: text/plain; charset=UTF-8 Hi Anthony, On Sat, May 7, 2016 at 12:48 AM, Anthony J. Bentley wrote: > Hi Abhinav, > > Abhinav Upadhyay writes: >> I was thinking it would be nice if the HTML output from mandoc also >> added the section name to the class of the section divs. For example >>
. >> >> It would allow section specific styling, for example the EXAMPLES >> sections could be styled better, maybe with syntax highlighting etc. >> :) > > Seems like you could do the same with ~ in CSS. See CSS Selectors Level 3 > section 8.3.2 "General sibling combinator": > > https://www.w3.org/TR/css3-selectors/#general-sibling-combinators > > For example, "h1#EXAMPLES ~ pre.display { ... }" Thanks, I didn't know of that. I tried it, and it works for my purposes. However, the ids of the h1 tags seems to be some kind of encoding or hash (I didn't see the code to see how is it generated). As long as that id is consistent, I guess the solution you suggested will work for me. Thanks again. -- Abhinav -- To unsubscribe send an email to discuss+unsubscribe@mdocml.bsd.lv