View mode: basic / threaded / horizontal-split · Log in · Help
January 07, 2013
Re: dlangspec.pdf?
> Heh, here's the first thing that I actually got to compile error-free from
> spec.dd and lex.dd: http://erdani.com/d/dlangspec.**pdf<http://erdani.com/d/dlangspec.pdf>.
> Had to fudge a few macros and some stuff doesn't expand to what it should,
> but from here the path is relatively easy.


I tried to find all the macros that created those ugly <a = href...
thingies before posting, but it looks like there are still some wandering
around :)
January 07, 2013
Re: dlangspec.pdf?
>
> "htmldoc" converts html files into pdf, generating a toc.
>
> In this sample I've removed original toc and "htmldoc" generated a toc
> with 2 levels.
> http://d-packages.googlecode.com/files/dlangspec.pdf
>
>
Nice looking doc.

Having 'dmd -D latex.ddoc spec.dd' generate that will be our first goal :)
(the second one would to get it as nice as TDPL)
January 08, 2013
Re: dlangspec.pdf?
On 1/7/13 2:36 PM, Philippe Sigaud wrote:
> Did you find a way to get syntax-highlighted code?

Listings package.

Andrei
January 08, 2013
Re: dlangspec.pdf?
Al 07/01/13 20:19, En/na Andrei Alexandrescu ha escrit:
> On 1/7/13 10:23 AM, Andrei Alexandrescu wrote:
>> On 1/7/13 9:30 AM, H. S. Teoh wrote:
>>> On Mon, Jan 07, 2013 at 02:35:09AM -0500, Andrei Alexandrescu wrote:
>>>> ??? I already have something in progress.
>>> [...]
>>>
>>> Curious ears want to hear what that something is. :-)
>>
>> A set of ddoc macros that convert to LaTeX starting from Philippe's
>> macros. The one systemic issue I encountered so far is tables, which in
>> LaTeX must set the number of columns in advance.
>>
>> Andrei
> 
> Heh, here's the first thing that I actually got to compile error-free from spec.dd and lex.dd: http://erdani.com/d/dlangspec.pdf. Had to fudge a few macros and some stuff doesn't expand to what it should, but from here the path is relatively easy.
> 
> Andrei
> 

wkhtmltopdf v0.11.0 (static)
https://code.google.com/p/wkhtmltopdf/

Converts html files into pdf, generating a toc index, and accepts css!

An example built in Linux 64-bit:
http://d-packages.googlecode.com/files/dlangspec-2.pdf

-- 
Jordi Sayol
January 08, 2013
Re: dlangspec.pdf?
On Tuesday, 8 January 2013 at 03:45:36 UTC, Jordi Sayol wrote:
> wkhtmltopdf v0.11.0 (static)
> https://code.google.com/p/wkhtmltopdf/
>
> Converts html files into pdf, generating a toc index, and 
> accepts css!
>
> An example built in Linux 64-bit:
> http://d-packages.googlecode.com/files/dlangspec-2.pdf

 Glanced it over and it looks nice. :)
January 08, 2013
Re: dlangspec.pdf?
On Tue, Jan 8, 2013 at 5:02 AM, Era Scarecrow <rtcvb32@yahoo.com> wrote:

> On Tuesday, 8 January 2013 at 03:45:36 UTC, Jordi Sayol wrote:
>
>> wkhtmltopdf v0.11.0 (static)
>> https://code.google.com/p/**wkhtmltopdf/<https://code.google.com/p/wkhtmltopdf/>
>>
>> Converts html files into pdf, generating a toc index, and accepts css!
>>
>> An example built in Linux 64-bit:
>> http://d-packages.googlecode.**com/files/dlangspec-2.pdf<http://d-packages.googlecode.com/files/dlangspec-2.pdf>
>>
>
>  Glanced it over and it looks nice. :)
>

It indeed looks very nice. If the entire content is here, it should be made
downloadable, as the .mobi version.
January 08, 2013
Re: dlangspec.pdf?
Al 07/01/13 20:19, En/na Andrei Alexandrescu ha escrit:
> On 1/7/13 10:23 AM, Andrei Alexandrescu wrote:
>> On 1/7/13 9:30 AM, H. S. Teoh wrote:
>>> On Mon, Jan 07, 2013 at 02:35:09AM -0500, Andrei Alexandrescu wrote:
>>>> ??? I already have something in progress.
>>> [...]
>>>
>>> Curious ears want to hear what that something is. :-)
>>
>> A set of ddoc macros that convert to LaTeX starting from Philippe's
>> macros. The one systemic issue I encountered so far is tables, which in
>> LaTeX must set the number of columns in advance.
>>
>> Andrei
> 
> Heh, here's the first thing that I actually got to compile error-free from spec.dd and lex.dd: http://erdani.com/d/dlangspec.pdf. Had to fudge a few macros and some stuff doesn't expand to what it should, but from here the path is relatively easy.
> 
> Andrei
> 

"dlangspec" in Electronic Publication (epub) e-book file format, generated with "calibre".

$ ebook-convert dlangspec.html .epub \
	--authors "dlang.org" \
	--comments "The specification of the D programming language" \
	--language en \
	--level1-toc "//h:h1" \
	--level2-toc "//*[name()='h2' or name()='h3']" \
	--level3-toc "//h:h4" \
	--page-breaks-before / \
	--cover dlangspec.png

EPUB example built on Linux 64-bit with calibre v0.3.38:
http://d-packages.googlecode.com/files/dlangspec.epub

-- 
Jordi Sayol
January 08, 2013
Re: dlangspec.pdf?
On 1/4/13 7:53 PM, Andrei Alexandrescu wrote:
> Now that the issue of documentation came up, I wonder if there's
> interest in a high-quality PDF rendering of the language spec (e.g.
> similar to the interior design of TDPL itself). Is it worth the effort?
>
> Thanks,
>
> Andrei

I just pushed the first passable PDF documentation generated via LaTeX 
with ddoc: http://goo.gl/QIP4t. For now I'm only rendering the TOC and 
lex.dd, but at this time we have enough seed for anyone interested to 
convert other files.

Take a look at the generated PDF: http://erdani.com/d/dlangspec.pdf


Andrei
January 08, 2013
Re: dlangspec.pdf?
On 1/8/2013 2:51 PM, Andrei Alexandrescu wrote:
> I just pushed the first passable PDF documentation generated via LaTeX with
> ddoc: http://goo.gl/QIP4t. For now I'm only rendering the TOC and lex.dd, but at
> this time we have enough seed for anyone interested to convert other files.
>
> Take a look at the generated PDF: http://erdani.com/d/dlangspec.pdf
>
>
> Andrei

Looks good to me.

It's also good to keep in mind that when I prepared the kindle version, which 
has a small screen, I had to rather ruthlessly pare down the length of 
preformatted lines like the code examples.
January 08, 2013
Re: dlangspec.pdf?
On Wed, Jan 9, 2013 at 12:12 AM, Walter Bright
<newshound2@digitalmars.com> wrote:
>> Take a look at the generated PDF: http://erdani.com/d/dlangspec.pdf

> Looks good to me.

Yes, that has indeed quite a palatable appearance. I see you defined 2
or 3-cols tables, that's a good idea. Too bad DDoc macros do not
accept numerical arguments :) I guess in the end a 4-cols version will
be necessary, if only for the big tables in std.algorithm.

I also like your use of the `listings` package. How did you 'disable'
the automatic colouring DMD insert in code samples?

> It's also good to keep in mind that when I prepared the kindle version,
> which has a small screen, I had to rather ruthlessly pare down the length of
> preformatted lines like the code examples.

Same here. I have a big tutorial on templates on github. Following
your advice, Walter, I found ways to convert it into .epub or .mobi (I
converted it from LaTex to Markdown). And, indeed, even 60-chars lines
tend to be too long for these screens. That's a pretty harsh limit! I
still have to scan the entire doc to find the longest lines.

Maybe I can start converting it to a big Ddoc file...
2 3 4 5 6 7 8
Top | Discussion index | About this forum | D home