discuss@mandoc.bsd.lv
 help / color / mirror / Atom feed
* html div positioning
@ 2010-12-14  0:17 Will Backman
  2010-12-14  1:09 ` Kristaps Dzonsons
  0 siblings, 1 reply; 9+ messages in thread
From: Will Backman @ 2010-12-14  0:17 UTC (permalink / raw)
  To: discuss

First, thank you for mdocml!
I have been searching for a way to get the man pages put together into an epub file for offline reading on something like a Nook or Kindle.  The ebook readers have very narrow screens.
man2html just wraps up the man pages in pre tags, which doesn't allow the man pages to fit an entire line of text on the narrow screen.  mdocml is much closer, and the html displays well even down to a 640x480 resolution.  There is still some absolute positioning going on in the html output, such as "padding-left: 16.00em" on certain div tags.  These add up on some portions of the man pages, and produce the following example of a.out(5) on a Nook:
http://cisx1.uma.maine.edu/~wbackman/photo-1.JPG
I'm not sure I can override this with the -Ostyle=mycss.css option.
Thoughts?

And thank you once again.  A fast and versatile tool.


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

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

* Re: html div positioning
  2010-12-14  0:17 html div positioning Will Backman
@ 2010-12-14  1:09 ` Kristaps Dzonsons
  2010-12-14  1:21   ` Kristaps Dzonsons
  2010-12-14 19:08   ` Will Backman
  0 siblings, 2 replies; 9+ messages in thread
From: Kristaps Dzonsons @ 2010-12-14  1:09 UTC (permalink / raw)
  To: discuss

> First, thank you for mdocml! I have been searching for a way to get
> the man pages put together into an epub file for offline reading on
> something like a Nook or Kindle.  The ebook readers have very narrow
> screens. man2html just wraps up the man pages in pre tags, which
> doesn't allow the man pages to fit an entire line of text on the
> narrow screen.  mdocml is much closer, and the html displays well
> even down to a 640x480 resolution.  There is still some absolute
> positioning going on in the html output, such as "padding-left:
> 16.00em" on certain div tags.  These add up on some portions of the
> man pages, and produce the following example of a.out(5) on a Nook:
> http://cisx1.uma.maine.edu/~wbackman/photo-1.JPG I'm not sure I can
> override this with the -Ostyle=mycss.css option. Thoughts?
>
> And thank you once again.  A fast and versatile tool.

Will, welcome!  Awesome use of mandoc, by the way...

This is an issue with the browser's rendering of mandoc's heavy-handed 
CSS2.  Basically, the only way I've found that produces ok-looking "Bl 
-tag" output is

   [div margin-left=xx]
     [div margin-right=-xx float=left]
       Left
     [/div]
     [div]
       Right
     [/div]
   [/div]

where "xx" is the width of "Left" (usually given by the -width tag). 
This mark-up handles overruns in the left column more-or-less how they 
appear on a terminal, only without the line-break (I couldn't find a way 
to preserve it exactly).  However, it only works with new browsers, and 
specifically, new browsers that I've tried.

 From mandoc.1:

CAVEATS
      The -Thtml and -Txhtml CSS2 styling used for -mdoc input lists
      does not render properly in older browsers, such as Internet
      Explorer 6 and earlier.

If you can suggest mark-up that works in this situation across more 
browsers, I'll immediately jump on implementing it.  If, however, you've 
any even more awesome ideas, then I'm all ears: -T[x]html isn't burdened 
by "prior art".

This has long since been an open issue, so any suggestions you have are 
very welcome!

Thanks,

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

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

* Re: html div positioning
  2010-12-14  1:09 ` Kristaps Dzonsons
@ 2010-12-14  1:21   ` Kristaps Dzonsons
  2010-12-14 20:23     ` Ingo Schwarze
  2010-12-14 19:08   ` Will Backman
  1 sibling, 1 reply; 9+ messages in thread
From: Kristaps Dzonsons @ 2010-12-14  1:21 UTC (permalink / raw)
  To: discuss

> [div margin-left=xx]
> [div margin-right=-xx float=left]
> Left
> [/div]
> [div]
> Right
> [/div]
> [/div]

Correction: the second should be "div margin-left=-xx" (the negative is 
the important part of course).  The whole thing should be wrapped in a 
padding-left=xx.  Thus:

  [div padding-left=xx]
    [div margin-left=-xx]
      Left
    [/div]
    [div]
      Right
    [/div]
   [/div]

Best to just look at the HTML output itself, of course...
--
 To unsubscribe send an email to discuss+unsubscribe@mdocml.bsd.lv

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

* Re: html div positioning
  2010-12-14  1:09 ` Kristaps Dzonsons
  2010-12-14  1:21   ` Kristaps Dzonsons
@ 2010-12-14 19:08   ` Will Backman
  1 sibling, 0 replies; 9+ messages in thread
From: Will Backman @ 2010-12-14 19:08 UTC (permalink / raw)
  To: discuss

--- On Mon, 12/13/10, Kristaps Dzonsons <kristaps@bsd.lv> wrote:
> 
> If you can suggest mark-up that works in this situation
> across more browsers, I'll immediately jump on implementing
> it.  If, however, you've any even more awesome ideas,
> then I'm all ears: -T[x]html isn't burdened by "prior art".
> 
> This has long since been an open issue, so any suggestions
> you have are very welcome!
> 
> Thanks,
> 
> Kristaps

As someone who can't program much more than a "hello world" program in C, I'm reluctant to ask for much.
But (there is always a but), would it be possible to have the various div tags labeled so that the hard coded positioning could be more easily overridden with an external CSS?
I guess I should work up an example xhtml version with an example of my concept and link to it on the list.




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

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

* Re: html div positioning
  2010-12-14  1:21   ` Kristaps Dzonsons
@ 2010-12-14 20:23     ` Ingo Schwarze
  2010-12-14 21:04       ` Kristaps Dzonsons
  0 siblings, 1 reply; 9+ messages in thread
From: Ingo Schwarze @ 2010-12-14 20:23 UTC (permalink / raw)
  To: discuss

Hi Will & Kristaps,

i must admit i never really looked at the HTML code,
so my comment is probably not that informed, but:

>  [div padding-left=xx]
>    [div margin-left=-xx]
>      Left
>    [/div]
>    [div]
>      Right
>    [/div]
>  [/div]

That looks horribly wrong.  I mean, the whole point of HTML
is structural markup.  So, it seems obvious to me that .Bl -tag
has to be rendered using <dl>, anything else seems just insane.

Maybe some additional CSS to beautify the formatting, but
without <dl>?!  Even if you say "it doesn't look nice":
What is the point of using HTML without using it?

Yours,
  Ingo
--
 To unsubscribe send an email to discuss+unsubscribe@mdocml.bsd.lv

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

* Re: html div positioning
  2010-12-14 20:23     ` Ingo Schwarze
@ 2010-12-14 21:04       ` Kristaps Dzonsons
  2010-12-15  2:21         ` Will Backman
  0 siblings, 1 reply; 9+ messages in thread
From: Kristaps Dzonsons @ 2010-12-14 21:04 UTC (permalink / raw)
  To: discuss

> i must admit i never really looked at the HTML code,
> so my comment is probably not that informed, but:
>
>>   [div padding-left=xx]
>>     [div margin-left=-xx]
>>       Left
>>     [/div]
>>     [div]
>>       Right
>>     [/div]
>>   [/div]
>
> That looks horribly wrong.  I mean, the whole point of HTML
> is structural markup.  So, it seems obvious to me that .Bl -tag
> has to be rendered using<dl>, anything else seems just insane.
>
> Maybe some additional CSS to beautify the formatting, but
> without<dl>?!  Even if you say "it doesn't look nice":
> What is the point of using HTML without using it?

Yeah, a little harsh there---note I was asking for help on exactly this 
problem about a year ago.  As it, I haven't even heard of this tag.  But 
it might just do the trick, which would considerably simplify the code.

Will, if it's alright with you, maybe I can shoot you some HTML files to 
test while I look into this?  This is a good opportunity to muck out 
that area anyway.

Thanks!

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

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

* Re: html div positioning
  2010-12-14 21:04       ` Kristaps Dzonsons
@ 2010-12-15  2:21         ` Will Backman
  2010-12-15 23:00           ` Kristaps Dzonsons
  0 siblings, 1 reply; 9+ messages in thread
From: Will Backman @ 2010-12-15  2:21 UTC (permalink / raw)
  To: discuss

--- On Tue, 12/14/10, Kristaps Dzonsons <kristaps@bsd.lv> wrote:
> But it might just do
> the trick, which would considerably simplify the code.
> 
> Will, if it's alright with you, maybe I can shoot you some
> HTML files to test while I look into this?  This is a
> good opportunity to muck out that area anyway.
> 
> Thanks!
> 
> Kristaps

Something like:
<dl>
<dt>NAME</dt>
<dd style="padding:10px">a.out &#8212; format of executable binary files</dd>
<dt>SYNOPSIS</dt>
<dd style="padding:10px">#include &lt;a.out.h&gt;</dd>
<dt>DESCRIPTION</dt>
<dd style="padding:10px">The include file &lt;a.out.h&gt; declares three structures and several macros. The structures describe the format of executable machine code files ('binaries') on the system.</dd>
<dd style="padding:10px">A binary file consists of up to 7 sections. In order, these sections are:</dd>
<dt>SEE ALSO</dt>
<dd style="padding:10px">as(1), gdb(1), ld(1), brk(2), execve(2), nlist(3), core(5), elf(5), link(5), stab(5)</dd>
</dl>



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

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

* Re: html div positioning
  2010-12-15  2:21         ` Will Backman
@ 2010-12-15 23:00           ` Kristaps Dzonsons
  2010-12-15 23:36             ` Will Backman
  0 siblings, 1 reply; 9+ messages in thread
From: Kristaps Dzonsons @ 2010-12-15 23:00 UTC (permalink / raw)
  To: discuss

> <dl>
> <dt>NAME</dt>
> <dd style="padding:10px">a.out&#8212; format of executable binary files</dd>
> <dt>SYNOPSIS</dt>
> <dd style="padding:10px">#include&lt;a.out.h&gt;</dd>
> <dt>DESCRIPTION</dt>
> <dd style="padding:10px">The include file&lt;a.out.h&gt; declares three structures and several macros. The structures describe the format of executable machine code files ('binaries') on the system.</dd>
> <dd style="padding:10px">A binary file consists of up to 7 sections. In order, these sections are:</dd>
> <dt>SEE ALSO</dt>
> <dd style="padding:10px">as(1), gdb(1), ld(1), brk(2), execve(2), nlist(3), core(5), elf(5), link(5), stab(5)</dd>
> </dl>

Will,

I've checked in a raft of changes to the -T[x]html code that use more 
standard HTML for the construction of lists and some other stuff here 
and there.  It's still in progress, but there's already lots to test.

If you're willing to test it on your system, please let me know and I 
can shoot you the latest tarballs of the system...

Thanks,

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

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

* Re: html div positioning
  2010-12-15 23:00           ` Kristaps Dzonsons
@ 2010-12-15 23:36             ` Will Backman
  0 siblings, 0 replies; 9+ messages in thread
From: Will Backman @ 2010-12-15 23:36 UTC (permalink / raw)
  To: discuss

--- On Wed, 12/15/10, Kristaps Dzonsons <kristaps@bsd.lv> wrote:
> 
> Will,
> 
> I've checked in a raft of changes to the -T[x]html code
> that use more standard HTML for the construction of lists
> and some other stuff here and there.  It's still in
> progress, but there's already lots to test.
> 
> If you're willing to test it on your system, please let me
> know and I can shoot you the latest tarballs of the
> system...
> 
> Thanks,
> 
> Kristaps
> --

Send 'em my way.
Thank you!

-- Will



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

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

end of thread, other threads:[~2010-12-15 23:37 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-14  0:17 html div positioning Will Backman
2010-12-14  1:09 ` Kristaps Dzonsons
2010-12-14  1:21   ` Kristaps Dzonsons
2010-12-14 20:23     ` Ingo Schwarze
2010-12-14 21:04       ` Kristaps Dzonsons
2010-12-15  2:21         ` Will Backman
2010-12-15 23:00           ` Kristaps Dzonsons
2010-12-15 23:36             ` Will Backman
2010-12-14 19:08   ` Will Backman

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).