techbooster / firststepreview-v3 Goto Github PK
View Code? Open in Web Editor NEW技術書をかこう!はじめてのRe:VIEWは技術書の執筆ノウハウ本のリポジトリです
Home Page: https://techbooster.booth.pm/items/586727
技術書をかこう!はじめてのRe:VIEWは技術書の執筆ノウハウ本のリポジトリです
Home Page: https://techbooster.booth.pm/items/586727
# 著者名。["高橋征義", "John Doe"] のように配列を使うことで複数指定可
aut: ["TechBooster編"]
# 出版社。配列書式で複数指定可能
prt: TechBooster
# 編集者。配列書式で複数指定可能
edt: ["mhidaka"]
を1人で配列指定した場合、PDFの作成者が ["TechBooster編"] になる(PDFファイルのプロパティより確認できる)。
たぶんConfig.ymlの設定値が生でみえてる
EPUB出力時とHTML出力時のconfigファイルの設定値が競合している
stylesheet: ["style.css"]
EPUBでは epub_style.css を利用して、HTMLではstyle.cssを差し替えたい。
npm run pdf コマンドを実行したら以下のerrorが出ました。
rubyなどを初めて触るので、どこにエラーがあるのかわからず、ご教授いただきたいです。
コマンド実行手順
rubyをinstall
rbenvをinstall
nmpをinstall
Node.jsをinstall
graphvizをinstall
gem install bundler
git clone [email protected]:TechBooster/C89-FirstStepReVIEW-v2.git
cd C89-FirstStepReVIEW-v2
npm install
npm run pdf
info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'run', 'pdf' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prepdf', 'pdf', 'postpdf' ]
5 info lifecycle [email protected]~prepdf: [email protected]
6 info lifecycle [email protected]~pdf: [email protected]
7 verbose lifecycle [email protected]~pdf: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]~pdf: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/chibahiroshi/Desktop/C89-FirstStepReVIEW-v2/node_modules/.bin:/Users/chibahiroshi/anaconda3/bin:/Users/chibahiroshi/.kiex/elixirs/elixir-1.3.4/bin:/Users/chibahiroshi/.kiex/bin:/Users/chibahiroshi/.rvm/gems/ruby-2.4.0/bin:/Users/chibahiroshi/.rvm/gems/ruby-2.4.0@global/bin:/Users/chibahiroshi/.rvm/rubies/ruby-2.4.0/bin:/path/to/anaconda/bin:/Users/chibahiroshi/.nodebrew/current/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/chibahiroshi/.rvm/bin
9 verbose lifecycle [email protected]~pdf: CWD: /Users/chibahiroshi/Desktop/C89-FirstStepReVIEW-v2
10 silly lifecycle [email protected]~pdf: Args: [ '-c', 'grunt pdf' ]
11 silly lifecycle [email protected]~pdf: Returned: code: 6 signal: null
12 info lifecycle [email protected]~pdf: Failed to exec pdf script
13 verbose stack Error: [email protected] pdf: `grunt pdf`
13 verbose stack Exit status 6
13 verbose stack at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:285:16)
13 verbose stack at EventEmitter.emit (events.js:127:13)
13 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:127:13)
13 verbose stack at maybeClose (internal/child_process.js:936:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:220:5)
14 verbose pkgid [email protected]
15 verbose cwd /Users/chibahiroshi/Desktop/C89-FirstStepReVIEW-v2
16 verbose Darwin 16.7.0
17 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "pdf"
18 verbose node v9.7.0
19 verbose npm v5.6.0
20 error code ELIFECYCLE
21 error errno 6
22 error [email protected] pdf: `grunt pdf`
22 error Exit status 6
23 error Failed at the [email protected] pdf script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 6, true ]
Sphinx(https://www.sphinx-doc.org/ja/master/ であるなら)はRe:VIEWと大体同じ層のドキュメンテーションツール(軽量記法→各種変換)であるため、マークアップの例示に含めるのは不適ではないかと思います。
articles/writing-book.re
世の中にはRe:VIEW以外にも、Microsoft Wordなどのワープロソフトや、Markdown、textile、reStructuredText、AsciiDoc、LaTeX、Sphinxなどのマークアップまで、さまざまな形式があります。VivliostyleなどはRe:VIEWと同じく組版を対象としています。
ebookブランチでビルド時、config.ymlのhistoryが表示されていない
確認すること。
LICENSEファイル置くのとpackage.jsonのライセンス欄に書く
基本的な構成は変わらないが、ReVIEWと及び周辺ツールの変化を取り込む
ほしい!
最新の vvakame/review
イメージだと、bundler のバージョンが Gemfile.lock
に BUNDLED WITH で書かれているバージョンの 1.15.3
と合わずにエラーになるようです。
$ ./build-in-docker.sh
(省略)
+ bundle install --path vendor/bundle
Traceback (most recent call last):
2: from /usr/local/bin/bundle:23:in `<main>'
1: from /usr/lib/ruby/2.5.0/rubygems.rb:303:in `activate_bin_path'
/usr/lib/ruby/2.5.0/rubygems.rb:284:in `find_spec_for_exe': Could not find 'bundler' (1.15.3) required by your /book/Gemfile.lock. (Gem::GemNotFoundException)
To update to the latest version installed on your system, run `bundle update --bundler`.
To install the missing version, run `gem install bundler:1.15.3`
> [email protected] pdf /book
> grunt pdf
Running "clean:review" (clean) task
>> 0 paths cleaned.
Running "clean:publish" (clean) task
>> 0 paths cleaned.
Running "shell:preprocess" (shell) task
/usr/lib/ruby/2.5.0/rubygems.rb:284:in `find_spec_for_exe': Could not find 'bundler' (1.15.3) required by your /book/Gemfile.lock. (Gem::GemNotFoundException)
To update to the latest version installed on your system, run `bundle update --bundler`.
To install the missing version, run `gem install bundler:1.15.3`
from /usr/lib/ruby/2.5.0/rubygems.rb:303:in `activate_bin_path'
from /usr/local/bin/bundle:23:in `<main>'
Warning: Command failed: bundle exec review-preproc -r --tabwidth=2 *.re
/usr/lib/ruby/2.5.0/rubygems.rb:284:in `find_spec_for_exe': Could not find 'bundler' (1.15.3) required by your /book/Gemfile.lock. (Gem::GemNotFoundException)
To update to the latest version installed on your system, run `bundle update --bundler`.
To install the missing version, run `gem install bundler:1.15.3`
from /usr/lib/ruby/2.5.0/rubygems.rb:303:in `activate_bin_path'
from /usr/local/bin/bundle:23:in `<main>'
Use --force to continue.
Aborted due to warnings.
npm ERR! code ELIFECYCLE
npm ERR! errno 6
npm ERR! [email protected] pdf: `grunt pdf`
npm ERR! Exit status 6
npm ERR!
npm ERR! Failed at the [email protected] pdf script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2019-12-16T13_02_41_051Z-debug.log
回避策として、Gemfile.lock
の BUNDLED WITH を 2.0.3
にすればビルドできることを確認しました。ただ、自分が ruby に詳しくないためこの修正が適切なのかよくわからず、すみませんがご対応お願いいたします。
素晴らしい書籍の公開ありがとうございます!
こちらのurlが404になっているようです
https://github.com/TechBooster/C89-FirstStepReVIEW-v2/blob/master/setup.sh#L9
本文中でも説明があるとおり、多くの印刷所では「印刷に出る場所」に「通しノンブル」が必要ですが、Re:VIEWの標準出力ではその要求を満たしていないという認識です(扉にノンブルがない。目次等のノンブルがローマ数字)。
僕らが最初にRe:VIEWを使ったときも、この制約で苦労しましたね。あの時はカスタムの仕方がわからず、Re:VIEWのソースを直接書き換えたのを覚えています。
原稿のモノクロ化は印刷所でやってくれる場合もあります。事実、僕の使っている印刷所はRe:VIEWで出力したPDFをそのまま渡しています。しかし、ノンブルについては通しノンブルがなくても受けてくれる印刷所を僕は知りません
印刷に出ない場所にノンブルを振る(隠しノンブル)でもOKという印刷所は知っています。それでも標準のRe:VIEWは仕様を満たしません。また、頑張って頼み込めばノンブル無しで印刷してくれるかもしれませんが、その場合、何が起きても自己責任になります。
したがって、この本の通りにやっても「入稿可能なPDFデータ」は作成できないという認識です。
現状の内容はデータ出力には使えますが、今後想定される「書籍制作」には使えない内容です。
「書籍制作」を謡い、書籍制作の要件に「通しノンブル」を記載しているのにやり方を説明していないのは、本の品質に関わることなので、本件、きちんとカバーすべきと考えます。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.