discuss@mandoc.bsd.lv
 help / color / mirror / Atom feed
* Mandoc HTML Output - Recognizing Sections
@ 2016-05-06 17:58 Abhinav Upadhyay
  2016-05-06 19:18 ` Anthony J. Bentley
  0 siblings, 1 reply; 5+ messages in thread
From: Abhinav Upadhyay @ 2016-05-06 17:58 UTC (permalink / raw)
  To: discuss

Hi,

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
<div class="section name">.

It would allow section specific styling, for example the EXAMPLES
sections could be styled better, maybe with syntax highlighting etc.
:)

I will probably try to implement this if it isn't too difficult. Is
this something which will be accepted?

Regards
Abhinav
--
 To unsubscribe send an email to discuss+unsubscribe@mdocml.bsd.lv

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Mandoc HTML Output - Recognizing Sections
  2016-05-06 17:58 Mandoc HTML Output - Recognizing Sections Abhinav Upadhyay
@ 2016-05-06 19:18 ` Anthony J. Bentley
  2016-05-06 20:45   ` Abhinav Upadhyay
  0 siblings, 1 reply; 5+ messages in thread
From: Anthony J. Bentley @ 2016-05-06 19:18 UTC (permalink / raw)
  To: discuss

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
> <div class="section name">.
> 
> 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 { ... }"

-- 
Anthony J. Bentley
--
 To unsubscribe send an email to discuss+unsubscribe@mdocml.bsd.lv

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Mandoc HTML Output - Recognizing Sections
  2016-05-06 19:18 ` Anthony J. Bentley
@ 2016-05-06 20:45   ` Abhinav Upadhyay
  2016-05-06 20:54     ` Anthony J. Bentley
  0 siblings, 1 reply; 5+ messages in thread
From: Abhinav Upadhyay @ 2016-05-06 20:45 UTC (permalink / raw)
  To: discuss

Hi Anthony,

On Sat, May 7, 2016 at 12:48 AM, Anthony J. Bentley <anthony@anjbe.name> 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
>> <div class="section name">.
>>
>> 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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Mandoc HTML Output - Recognizing Sections
  2016-05-06 20:45   ` Abhinav Upadhyay
@ 2016-05-06 20:54     ` Anthony J. Bentley
  2016-05-06 21:05       ` Abhinav Upadhyay
  0 siblings, 1 reply; 5+ messages in thread
From: Anthony J. Bentley @ 2016-05-06 20:54 UTC (permalink / raw)
  To: discuss

Hi Abhinav,

Abhinav Upadhyay writes:
> 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.

The version of mandoc in CVS just uses the name of the section directly.
Older releases used hex ASCII values (for compliance with HTML4, which
is no longer necessary).

-- 
Anthony J. Bentley
--
 To unsubscribe send an email to discuss+unsubscribe@mdocml.bsd.lv

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Mandoc HTML Output - Recognizing Sections
  2016-05-06 20:54     ` Anthony J. Bentley
@ 2016-05-06 21:05       ` Abhinav Upadhyay
  0 siblings, 0 replies; 5+ messages in thread
From: Abhinav Upadhyay @ 2016-05-06 21:05 UTC (permalink / raw)
  To: discuss

On Sat, May 7, 2016 at 2:24 AM, Anthony J. Bentley <anthony@anjbe.name> wrote:
> Hi Abhinav,
>
> Abhinav Upadhyay writes:
>> 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.
>
> The version of mandoc in CVS just uses the name of the section directly.
> Older releases used hex ASCII values (for compliance with HTML4, which
> is no longer necessary).

Thanks, that should work. :)

--
Abhinav
--
 To unsubscribe send an email to discuss+unsubscribe@mdocml.bsd.lv

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-05-06 21:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-06 17:58 Mandoc HTML Output - Recognizing Sections Abhinav Upadhyay
2016-05-06 19:18 ` Anthony J. Bentley
2016-05-06 20:45   ` Abhinav Upadhyay
2016-05-06 20:54     ` Anthony J. Bentley
2016-05-06 21:05       ` Abhinav Upadhyay

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).