www.digitalmars.com         C & C++   DMDScript  

D - D manual in Latex

reply ssuukk <ssuukk .go2.pl> writes:
I just started typesetting the D manual in Latex, which would give (at 
least some of us) a much better accessible document. But there's a pleed 
to Walter:

WALTER - PLEASE! Each time you update your online documentation, can you 
also post here info on which html files were changed? Although I have 
some HTML to LaTeX scripts, they're not perfect, I have to make a lot of 
amendments to the LaTeX file, and it would be much easier to just copy - 
paste than convert everything from scratch again. Without this info it 
will get outdated as the former PDF document :-)
Jan 19 2004
next sibling parent reply Andy Friesen <andy ikagames.com> writes:
ssuukk wrote:
 I just started typesetting the D manual in Latex, which would give (at 
 least some of us) a much better accessible document. But there's a pleed 
 to Walter:
 
 WALTER - PLEASE! Each time you update your online documentation, can you 
 also post here info on which html files were changed? Although I have 
 some HTML to LaTeX scripts, they're not perfect, I have to make a lot of 
 amendments to the LaTeX file, and it would be much easier to just copy - 
 paste than convert everything from scratch again. Without this info it 
 will get outdated as the former PDF document :-)

The documentation is released along with the compiler, so you could just diff it against previous versions. Easy as pie. (get cygwin if you don't have unix tools at your disposal: <http://cygwin.com>) If you want to get really ambitious, you could write a script to transform and apply those diffs to the LaTeX source. -- andy
Jan 19 2004
next sibling parent reply ssuukk <ssuukk .go2.pl> writes:
Andy Friesen wrote:
 
 The documentation is released along with the compiler, so you could just 
 diff it against previous versions.  Easy as pie.  (get cygwin if you 
 don't have unix tools at your disposal: <http://cygwin.com>)
 
 If you want to get really ambitious, you could write a script to 
 transform and apply those diffs to the LaTeX source.
 

will work...
Jan 19 2004
parent Andy Friesen <andy ikagames.com> writes:
ssuukk wrote:
 
 If you want to get really ambitious, you could write a script to 
 transform and apply those diffs to the LaTeX source.

will work...

Right, but that doesn't happen frequently enough to be a huge issue. -- andy
Jan 19 2004
prev sibling parent J Anderson <REMOVEanderson badmama.com.au> writes:
Andy Friesen wrote:

 The documentation is released along with the compiler, so you could 
 just diff it against previous versions.  Easy as pie.  (get cygwin if 
 you don't have unix tools at your disposal: <http://cygwin.com>)

Or even just check the modification date.
 If you want to get really ambitious, you could write a script to 
 transform and apply those diffs to the LaTeX source.

  -- andy

Jan 19 2004
prev sibling parent reply "Walter" <walter digitalmars.com> writes:
"ssuukk" <ssuukk .go2.pl> wrote in message
news:bugg1r$1285$1 digitaldaemon.com...
 I just started typesetting the D manual in Latex, which would give (at
 least some of us) a much better accessible document. But there's a pleed
 to Walter:

 WALTER - PLEASE! Each time you update your online documentation, can you
 also post here info on which html files were changed? Although I have
 some HTML to LaTeX scripts, they're not perfect, I have to make a lot of
 amendments to the LaTeX file, and it would be much easier to just copy -
 paste than convert everything from scratch again. Without this info it
 will get outdated as the former PDF document :-)

There are two ways to tell. 1) I keep the file creation time correct in the zip file, so just look at the files with dates on them later than the last latex document. 2) I also embed the last modified date into the html files themselves, look at the top of each page. Although this is less accurate, as sometimes I forget to update it.
Jan 19 2004
parent reply J Anderson <REMOVEanderson badmama.com.au> writes:
Walter wrote:

2) I also embed the last modified date into the html files themselves, look
at the top of each page. Although this is less accurate, as sometimes I
forget to update it.

  

automaticly update when you modify the document.
Jan 19 2004
parent reply "Walter" <walter digitalmars.com> writes:
"J Anderson" <REMOVEanderson badmama.com.au> wrote in message
news:buhl83$2u73$1 digitaldaemon.com...
 Walter wrote:

2) I also embed the last modified date into the html files themselves,


at the top of each page. Although this is less accurate, as sometimes I
forget to update it.

automaticly update when you modify the document.

I don't use an html editor, I use microemacs <g>.
Jan 19 2004
parent reply ssuukk <ssuukk .go2.pl> writes:
In some HTML editors you can insert a special field that will
automaticly update when you modify the document.

I don't use an html editor, I use microemacs <g>.

automatic translation of these pages real hell...
Jan 20 2004
next sibling parent reply Brad Anderson <brad sankaty.dot.com> writes:
Can you/Walter try to use HTML Tidy utility to clean up the original html docs?

http://tidy.sourceforge.net/

BA


ssuukk wrote:
 In some HTML editors you can insert a special field that will
 automaticly update when you modify the document.

I don't use an html editor, I use microemacs <g>.

automatic translation of these pages real hell...

Jan 20 2004
parent ssuukk <ssuukk .go2.pl> writes:
Brad Anderson wrote:
 Can you/Walter try to use HTML Tidy utility to clean up the original 
 html docs?
 
 http://tidy.sourceforge.net/
 

Jan 21 2004
prev sibling parent reply "Walter" <walter digitalmars.com> writes:
"ssuukk" <ssuukk .go2.pl> wrote in message
news:buj6dr$2bq3$1 digitaldaemon.com...
In some HTML editors you can insert a special field that will
automaticly update when you modify the document.

I don't use an html editor, I use microemacs <g>.


Hmm. Can you give me an example?
 which make
 automatic translation of these pages real hell...

Jan 20 2004
next sibling parent reply J C Calvarese <jcc7 cox.net> writes:
Walter wrote:

 "ssuukk" <ssuukk .go2.pl> wrote in message
 news:buj6dr$2bq3$1 digitaldaemon.com...
 
In some HTML editors you can insert a special field that will
automaticly update when you modify the document.

I don't use an html editor, I use microemacs <g>.

Unfortunately it shows: there are lots of unclosed tags,

Hmm. Can you give me an example?

I think I can explain the unclosed tags issue, but I don't have a clue how important closed tags are to producing Latex. In order to get html to validate, virtually all tags need to be closed. There are a few exceptions: <hr>, <br>, <img>, <meta>, (and more?). If a <tr> occurs, it would need to be matched with a </tr>. Also, every <td> must be matched up with a </td>. Apparently, ssuukk's program prefers somewhat valid html. I found an actual example in the second file I visually checked. I think he's referring to sections like this table (in arrays.html): <table border=1 cellpadding=4 cellspacing=0> <tr><td>int* p; <td>Pointers to data <tr><td>int[3] s; <td>Static arrays <tr><td>int[] a; <td>Dynamic arrays <tr><td>int[char[]] x; <td>Associative arrays (discussed later) </table> "Valid" html might look like this (in fact, any web browser will assume this is what you meant): <table border=1 cellpadding=4 cellspacing=0> <tr><td>int* p; </td><td>Pointers to data</td></tr> <tr><td>int[3] s; </td><td>Static arrays</td></tr> <tr><td>int[] a; </td><td>Dynamic arrays</td></tr> <tr><td>int[char[]] x; </td><td>Associative arrays (discussed </td>later)</tr> </table> In short, it can take a lot of effort to make pages valid html with questionable benefit. -- Justin http://jcc_7.tripod.com/d/
Jan 20 2004
next sibling parent Brad Anderson <brad sankaty.dot.com> writes:
Using Tidy is not a lot of effort, and points you to all your "mistakes" or 
omissions.  Often it fixes them for you, and if it can't, it will notify you 
with a list including line numbers.  There are also HTML beautifiers out there 
as well.  They don't fix code, but they do format it nicely.

http://www.w3.org/People/Raggett/tidy/

BA

 In short, it can take a lot of effort to make pages valid html with 
 questionable benefit.
 

Jan 20 2004
prev sibling next sibling parent The Lone Haranguer <The_member pathlink.com> writes:
Sounds like there's holes in the Latex. That can lead to a lot of crying and
poopy diapers.

In article <buke02$192q$1 digitaldaemon.com>, J C Calvarese says...
Walter wrote:

 "ssuukk" <ssuukk .go2.pl> wrote in message
 news:buj6dr$2bq3$1 digitaldaemon.com...
 
In some HTML editors you can insert a special field that will
automaticly update when you modify the document.

I don't use an html editor, I use microemacs <g>.

Unfortunately it shows: there are lots of unclosed tags,

Hmm. Can you give me an example?

I think I can explain the unclosed tags issue, but I don't have a clue how important closed tags are to producing Latex. In order to get html to validate, virtually all tags need to be closed. There are a few exceptions: <hr>, <br>, <img>, <meta>, (and more?). If a <tr> occurs, it would need to be matched with a </tr>. Also, every <td> must be matched up with a </td>. Apparently, ssuukk's program prefers somewhat valid html. I found an actual example in the second file I visually checked. I think he's referring to sections like this table (in arrays.html): <table border=1 cellpadding=4 cellspacing=0> <tr><td>int* p; <td>Pointers to data <tr><td>int[3] s; <td>Static arrays <tr><td>int[] a; <td>Dynamic arrays <tr><td>int[char[]] x; <td>Associative arrays (discussed later) </table> "Valid" html might look like this (in fact, any web browser will assume this is what you meant): <table border=1 cellpadding=4 cellspacing=0> <tr><td>int* p; </td><td>Pointers to data</td></tr> <tr><td>int[3] s; </td><td>Static arrays</td></tr> <tr><td>int[] a; </td><td>Dynamic arrays</td></tr> <tr><td>int[char[]] x; </td><td>Associative arrays (discussed </td>later)</tr> </table> In short, it can take a lot of effort to make pages valid html with questionable benefit. -- Justin http://jcc_7.tripod.com/d/

Jan 20 2004
prev sibling parent reply "Walter" <walter digitalmars.com> writes:
"J C Calvarese" <jcc7 cox.net> wrote in message
news:buke02$192q$1 digitaldaemon.com...
 Walter wrote:

 "ssuukk" <ssuukk .go2.pl> wrote in message
 news:buj6dr$2bq3$1 digitaldaemon.com...

In some HTML editors you can insert a special field that will
automaticly update when you modify the document.

I don't use an html editor, I use microemacs <g>.

Unfortunately it shows: there are lots of unclosed tags,

Hmm. Can you give me an example?

I think I can explain the unclosed tags issue, but I don't have a clue how important closed tags are to producing Latex. In order to get html to validate, virtually all tags need to be closed. There are a few exceptions: <hr>, <br>, <img>, <meta>, (and more?). If a <tr> occurs, it would need to be matched with a </tr>. Also, every <td> must be matched up with a </td>. Apparently, ssuukk's program prefers somewhat valid html. I found an actual example in the second file I visually checked. I think he's referring to sections like this table (in arrays.html): <table border=1 cellpadding=4 cellspacing=0> <tr><td>int* p; <td>Pointers to data <tr><td>int[3] s; <td>Static arrays <tr><td>int[] a; <td>Dynamic arrays <tr><td>int[char[]] x; <td>Associative arrays (discussed later) </table> "Valid" html might look like this (in fact, any web browser will assume this is what you meant): <table border=1 cellpadding=4 cellspacing=0> <tr><td>int* p; </td><td>Pointers to data</td></tr> <tr><td>int[3] s; </td><td>Static arrays</td></tr> <tr><td>int[] a; </td><td>Dynamic arrays</td></tr> <tr><td>int[char[]] x; </td><td>Associative arrays (discussed </td>later)</tr> </table>

It's common practice to not bother with the redundant </td> and </tr>, and if some html processor can't handle it, frankly, it's a bug in that processor. (BTW, the html spec is hardly rigorous, I've found several official conflicting definitions of what an html comment is. They haven't even gotten that right.)
Jan 20 2004
parent reply J Anderson <REMOVEanderson badmama.com.au> writes:
Walter wrote:

"J C Calvarese" <jcc7 cox.net> wrote in message
news:buke02$192q$1 digitaldaemon.com...
  

Walter wrote:

    

"ssuukk" <ssuukk .go2.pl> wrote in message
news:buj6dr$2bq3$1 digitaldaemon.com...

      

In some HTML editors you can insert a special field that will
automaticly update when you modify the document.
            




how important closed tags are to producing Latex. In order to get html to validate, virtually all tags need to be closed. There are a few exceptions: <hr>, <br>, <img>, <meta>, (and more?). If a <tr> occurs, it would need to be matched with a </tr>. Also, every <td> must be matched up with a </td>. Apparently, ssuukk's program prefers somewhat valid html. I found an actual example in the second file I visually checked. I think he's referring to sections like this table (in arrays.html): <table border=1 cellpadding=4 cellspacing=0> <tr><td>int* p; <td>Pointers to data <tr><td>int[3] s; <td>Static arrays <tr><td>int[] a; <td>Dynamic arrays <tr><td>int[char[]] x; <td>Associative arrays (discussed later) </table> "Valid" html might look like this (in fact, any web browser will assume this is what you meant): <table border=1 cellpadding=4 cellspacing=0> <tr><td>int* p; </td><td>Pointers to data</td></tr> <tr><td>int[3] s; </td><td>Static arrays</td></tr> <tr><td>int[] a; </td><td>Dynamic arrays</td></tr> <tr><td>int[char[]] x; </td><td>Associative arrays (discussed </td>later)</tr> </table>

It's common practice to not bother with the redundant </td> and </tr>, and if some html processor can't handle it, frankly, it's a bug in that processor. (BTW, the html spec is hardly rigorous, I've found several official conflicting definitions of what an html comment is. They haven't even gotten that right.)

xhtml is the standardised html (like ANSC is to C). Most browsers aim to support xhtml webpages so that it looks the same on every browser. Format: http://www.vbxml.com/xhtml/articles/html_to_xhtml/default4.asp Checker: http://www.htmlvalidator.com/lite/
Jan 20 2004
parent Brad Anderson <brad sankaty.dot.com> writes:
I couldn't agree more.  XHTML transitional or strict - There is a brief 
description of the differences on http://www.w3schools.com.  There are still 
tags that are single, like <br />, but by and large, it is a more pure way to 
code a page.  I believe Tidy has settings to make code XHTML-compliant.  There 
is also the ability to make your own tags, and stylesheets obviously go 
hand-in-hand.

BA

J Anderson wrote:
 Walter wrote:
 
 "J C Calvarese" <jcc7 cox.net> wrote in message
 news:buke02$192q$1 digitaldaemon.com...
  

 Walter wrote:

   

 "ssuukk" <ssuukk .go2.pl> wrote in message
 news:buj6dr$2bq3$1 digitaldaemon.com...

     

 In some HTML editors you can insert a special field that will
 automaticly update when you modify the document.
           

I don't use an html editor, I use microemacs <g>.

Unfortunately it shows: there are lots of unclosed tags,

Hmm. Can you give me an example?

I think I can explain the unclosed tags issue, but I don't have a clue how important closed tags are to producing Latex. In order to get html to validate, virtually all tags need to be closed. There are a few exceptions: <hr>, <br>, <img>, <meta>, (and more?). If a <tr> occurs, it would need to be matched with a </tr>. Also, every <td> must be matched up with a </td>. Apparently, ssuukk's program prefers somewhat valid html. I found an actual example in the second file I visually checked. I think he's referring to sections like this table (in arrays.html): <table border=1 cellpadding=4 cellspacing=0> <tr><td>int* p; <td>Pointers to data <tr><td>int[3] s; <td>Static arrays <tr><td>int[] a; <td>Dynamic arrays <tr><td>int[char[]] x; <td>Associative arrays (discussed later) </table> "Valid" html might look like this (in fact, any web browser will assume this is what you meant): <table border=1 cellpadding=4 cellspacing=0> <tr><td>int* p; </td><td>Pointers to data</td></tr> <tr><td>int[3] s; </td><td>Static arrays</td></tr> <tr><td>int[] a; </td><td>Dynamic arrays</td></tr> <tr><td>int[char[]] x; </td><td>Associative arrays (discussed </td>later)</tr> </table>

It's common practice to not bother with the redundant </td> and </tr>, and if some html processor can't handle it, frankly, it's a bug in that processor. (BTW, the html spec is hardly rigorous, I've found several official conflicting definitions of what an html comment is. They haven't even gotten that right.)

xhtml is the standardised html (like ANSC is to C). Most browsers aim to support xhtml webpages so that it looks the same on every browser. Format: http://www.vbxml.com/xhtml/articles/html_to_xhtml/default4.asp Checker: http://www.htmlvalidator.com/lite/

Jan 21 2004
prev sibling parent reply ssuukk <ssuukk .go2.pl> writes:
Walter wrote:

 "ssuukk" <ssuukk .go2.pl> wrote in message
 news:buj6dr$2bq3$1 digitaldaemon.com...
 
In some HTML editors you can insert a special field that will
automaticly update when you modify the document.

I don't use an html editor, I use microemacs <g>.

Unfortunately it shows: there are lots of unclosed tags,

Hmm. Can you give me an example?

http://www.digitalmars.com/d/module.html But anyway - if you use any of available online html validators/verifiers you will see a lot of complaints... This one will be at least able to interpret this code and find unclosed phrases: http://www.htmlhelp.com/tools/validator/ This won't process yout html at all because of missing html version specification... http://www.htmlhelp.com/tools/validator/
Jan 21 2004
parent reply "Walter" <walter digitalmars.com> writes:
"ssuukk" <ssuukk .go2.pl> wrote in message
news:bulevl$2tqv$1 digitaldaemon.com...
 This one will be at least able to interpret this code and find unclosed
 phrases:

 http://www.htmlhelp.com/tools/validator/

Thanks, I'll give that one a try.
 This won't process yout html at all because of missing html version
 specification...

 http://www.htmlhelp.com/tools/validator/

When I put the html version specification in, it complains then that I have an invalid <body> tag. Even though my use of the body tag matches their example. Oh well, I left off the version spec. (I tried it on www.digitalmars.com/d/expression.html)
Jan 21 2004
next sibling parent JanC <usenet_spam janc.invalid> writes:
"Walter" <walter digitalmars.com> schreef:

 http://www.htmlhelp.com/tools/validator/

When I put the html version specification in, it complains then that I have an invalid <body> tag. Even though my use of the body tag matches their example. Oh well, I left off the version spec. (I tried it on www.digitalmars.com/d/expression.html)

Try the "official" W3C validator: <http://validator.w3.org/> (A proper DOCTYPE is mandatory for every HTML version after 2.0 BTW) -- JanC "Be strict when sending and tolerant when receiving." RFC 1958 - Architectural Principles of the Internet - section 3.9
Jan 21 2004
prev sibling parent ssuukk <ssuukk .go2.pl> writes:
 
This one will be at least able to interpret this code and find unclosed
phrases:

http://www.htmlhelp.com/tools/validator/

Thanks, I'll give that one a try.
This won't process yout html at all because of missing html version
specification...

http://www.htmlhelp.com/tools/validator/

When I put the html version specification in, it complains then that I have an invalid <body> tag. Even though my use of the body tag matches their example. Oh well, I left off the version spec. (I tried it on www.digitalmars.com/d/expression.html)

http://www.digitalmars.com/d/module.html :-)
Jan 21 2004