Skip to content
This repository has been archived by the owner on Sep 5, 2023. It is now read-only.

Latest trpl, trpl 2nd edition and rustonomicon sources. Dockerized all the things. #52

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

abcdev
Copy link

@abcdev abcdev commented Jun 2, 2018

In order to work with latest rustonomicon sources and trpl 2nd edition, I altered some things in the project. Some changes are cosmetic others are necessary (like working with a newer pandoc version).

Dockerized the application for easy access and execution.

abcdev added 10 commits June 2, 2018 13:50
Each document directory now contains a meta.yml by default (Optionally elsewhere)
The "prefix" argument becomes the same as the document directory name by default (Optionally something else)

Removed unused imports.
Added files of TRPL 2nd Edition.
Adjusted Programm to behave accordingly.

pandoc version >= 2 is required
Updated release date
Added make option for trpl 2nd edition.

* dockerize:
  Fixed Makefile
  Dockerized the application. Runnable via make
@killercup
Copy link
Owner

Wow, just looking at the commits this looks very impressive. You seem to have spend a lot of time on this! Can you publish the PDF files that this produces?

(I currently don't have time to maintain this further. If what this produces is any good, I'd gladly nominate you the new maintainer of the project.)

Reverted code for chapters and trpl2 SUMMARY accordingly.
@ohbadiah
Copy link

I ran into an error building the pdf for trpl2, but otherwise this worked great for me, and I'm now happily reading the second edition on my ereader. Let me know if it would be helpful for me to send the build artifacts in some way.

(Also - shouldn't these files be supplied by the project itself? I guess they don't want to stop on the toes of the publisher.)

@abcdev
Copy link
Author

abcdev commented Jun 21, 2018

Thanks for the offer @killercup . But I'd like not to keep this in my hands as my rust skills are somewhat rusty. And I hope the official mdBook solution gets a proper EPUB option. I've send you the PDF files you asked for. As @ohbadiah mentioned the creation of the PDFs for the trpl second edition fails. It looks like there is a parsing error in "ch14-04-installing-binaries.md". I was not able to find the actual problem resulting in that error.

@dimonomid
Copy link

@abcdev , thanks a lot for that! Would it be possible to post those PDF files somewhere so that other people also can get them before issues get resolved? I'd love to see those PDFs!

@dimonomid
Copy link

dimonomid commented Jul 1, 2018

Here are the errors I'm getting with generating PDFs:

Error producing PDF.                                                                     
! Undefined control sequence.                                                                                                                                  
l.1007 ...et/debug/hello\_cargo} (or *target\debug                                       
                                                                                          
[✓] A4.PDF   

I checked and apparently that comes from the file ch01-03-hello-cargo.md, there are a few lines with backslashes, like this:

This command creates an executable file in *target/debug/hello_cargo* (or
*target\debug\hello_cargo.exe* on Windows) rather than in your current
directory. You can run the executable with this command:

and apparently it isn't handled correctly when generating tex file:

This command creates an executable file in
\emph{target/debug/hello\_cargo} (or *target\debug\hello\_cargo.exe* on
Windows) rather than in your current directory. You can run the
executable with this command:

I'm not sure what's the real issue, but I just worked it around for me by replacing those backslashes with / in sources, and PDF was generated successfully! There was a bunch of warnings like this

[WARNING] Missing character: There is no ב in font [lmroman10-regular]:mapping=tex-text!                                                                       
[WARNING] Missing character: There is no ר in font [lmroman10-regular]:mapping=tex-text!                                                                       
[WARNING] Missing character: There is no י in font [lmroman10-regular]:mapping=tex-text!                                                                       
[WARNING] Missing character: There is no ת in font [lmroman10-regular]:mapping=tex-text!

But still, the PDF looks quite readable. Thanks again!

@dimonomid
Copy link

dimonomid commented Jul 1, 2018

For the future readers who just want to get some PDFs, let me attach those:

trpl2-2018-06-02.a4.pdf
trpl2-2018-06-02.letter.pdf
trpl2-2018-06-02.epub.zip (zipped because Github refused to attach it otherwise by saying that it doesn't support that filetype)

@makramkd
Copy link

makramkd commented Sep 6, 2019

Hey guys, I know this PR is quite old, but wondering if it would be simpler to simply fetch the latest rustbook + nomicon from the website instead of storing it in the repo. It will be part of the running process, i.e cargo run ... will call out to rust-lang.org or whichever is appropriate (some branch of rustbook/nomicon on github release that is latest stable).

That way it will always be up to date. What do you guys think?

@h5rdly
Copy link

h5rdly commented Aug 13, 2020

Would be great to have it on the website, I found this by prodding through github issues, it's a shame..

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants