Skip to content

Commit 59c4f72

Browse files
committed
Initialize.
0 parents  commit 59c4f72

File tree

172 files changed

+100610
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

172 files changed

+100610
-0
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules/
2+

Back.png

4.73 MB
Loading

Front.png

5.43 MB
Loading

Gemfile

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# A sample Gemfile
2+
source "https://rubygems.org"
3+
4+
gem 'review', '2.2.0'
5+
gem 'review-peg', '0.2.2'

Gemfile.lock

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
GEM
2+
remote: https://rubygems.org/
3+
specs:
4+
review (2.2.0)
5+
rouge
6+
rubyzip
7+
review-peg (0.2.2)
8+
rouge (3.0.0)
9+
rubyzip (1.2.1)
10+
11+
PLATFORMS
12+
ruby
13+
14+
DEPENDENCIES
15+
review (= 2.2.0)
16+
review-peg (= 0.2.2)
17+
18+
BUNDLED WITH
19+
1.10.4

Gruntfile.js

+139
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
"use strict";
2+
3+
let fs = require("fs");
4+
let yaml = require("js-yaml");
5+
6+
const articles = "articles";
7+
const bookConfig = yaml.safeLoad(fs.readFileSync(`${articles}/config.yml`, "utf8"));
8+
9+
const reviewPrefix = process.env["REVIEW_PREFIX"] || "bundle exec ";
10+
const reviewPostfix = process.env["REVIEW_POSTFIX"] || ""; // REVIEW_POSTFIX="-peg" npm run pdf とかするとPEGでビルドできるよ
11+
const reviewPreproc = `${reviewPrefix}review-preproc${reviewPostfix}`;
12+
const reviewCompile = `${reviewPrefix}review-compile${reviewPostfix}`;
13+
const reviewPdfMaker = `${reviewPrefix}review-pdfmaker${reviewPostfix}`;
14+
const reviewEpubMaker = `${reviewPrefix}review-epubmaker${reviewPostfix}`;
15+
16+
module.exports = grunt => {
17+
grunt.initConfig({
18+
clean: {
19+
review: {
20+
src: [
21+
`${articles}/${bookConfig.bookname}-*/`, // pdf, epub temp dir
22+
`${articles}/*.pdf`,
23+
`${articles}/*.epub`,
24+
`${articles}/*.html`,
25+
`${articles}/*.md`,
26+
`${articles}/*.xml`,
27+
`${articles}/*.txt`
28+
]
29+
}
30+
},
31+
shell: {
32+
preprocess: {
33+
options: {
34+
execOptions: {
35+
cwd: articles,
36+
}
37+
},
38+
command: `${reviewPreproc} -r --tabwidth=2 *.re`
39+
},
40+
compile2text: {
41+
options: {
42+
execOptions: {
43+
cwd: articles,
44+
}
45+
},
46+
command: `${reviewCompile} --target=text`
47+
},
48+
compile2markdown: {
49+
options: {
50+
execOptions: {
51+
cwd: articles,
52+
}
53+
},
54+
command: `${reviewCompile} --target=markdown`
55+
},
56+
compile2html: {
57+
options: {
58+
execOptions: {
59+
cwd: articles,
60+
}
61+
},
62+
command: `${reviewCompile} --target=html --stylesheet=style.css --chapterlink`
63+
},
64+
compile2latex: {
65+
options: {
66+
execOptions: {
67+
cwd: articles,
68+
}
69+
},
70+
command: `${reviewCompile} --target=latex --footnotetext`
71+
},
72+
compile2idgxml: {
73+
options: {
74+
execOptions: {
75+
cwd: articles,
76+
}
77+
},
78+
command: `${reviewCompile} --target=idgxml`
79+
},
80+
compile2pdf: {
81+
options: {
82+
execOptions: {
83+
cwd: articles,
84+
}
85+
},
86+
command: `${reviewPdfMaker} config.yml`
87+
},
88+
compile2epub: {
89+
options: {
90+
execOptions: {
91+
cwd: articles,
92+
}
93+
},
94+
command: `${reviewEpubMaker} config.yml`
95+
}
96+
}
97+
});
98+
99+
function generateTask(target) {
100+
return ["clean", "shell:preprocess", `shell:compile2${target}`];
101+
}
102+
103+
grunt.registerTask(
104+
"default",
105+
"原稿をコンパイルしてPDFファイルにする",
106+
"pdf");
107+
108+
grunt.registerTask(
109+
"text",
110+
"原稿をコンパイルしてTextファイルにする",
111+
generateTask("text"));
112+
113+
grunt.registerTask(
114+
"markdown",
115+
"原稿をコンパイルしてMarkdownファイルにする",
116+
generateTask("markdown"));
117+
118+
grunt.registerTask(
119+
"html",
120+
"原稿をコンパイルしてHTMLファイルにする",
121+
generateTask("html"));
122+
123+
grunt.registerTask(
124+
"idgxml",
125+
"原稿をコンパイルしてInDesign用XMLファイルにする",
126+
generateTask("idgxml"));
127+
128+
grunt.registerTask(
129+
"pdf",
130+
"原稿をコンパイルしてpdfファイルにする",
131+
generateTask("pdf"));
132+
133+
grunt.registerTask(
134+
"epub",
135+
"原稿をコンパイルしてepubファイルにする",
136+
generateTask("epub"));
137+
138+
require('load-grunt-tasks')(grunt);
139+
};

README.md

+112
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
# IndieVisualLab執筆環境
2+
3+
## 利用ツール
4+
5+
### Re:View
6+
7+
Re:View使います
8+
9+
達人出版会の中の人が開発してるそう
10+
11+
#### インストール
12+
13+
https://github.com/kmuto/review
14+
15+
ここ見ればOK
16+
17+
### md2review
18+
19+
MarkDownを.reファイルに変換してくれるぞい
20+
21+
Gemfileに追加してるので
22+
```bash
23+
bundle install
24+
```
25+
26+
で入るはず
27+
28+
### TeX
29+
30+
Re:View動かすのにTeXがいるのでインストール
31+
32+
#### Macの場合
33+
34+
http://www2.kumagaku.ac.jp/teacher/herogw/
35+
36+
ここからpTeXをDownloadしてくる(Sierra 10.12.5でいけた)
37+
38+
pTexを/Applications以下に移動して,
39+
/Applications/pTeX.app/teTeX/binにPATHを通す.
40+
41+
.bashrcとかに
42+
```bash
43+
export PATH=$PATH:/Applications/pTeX.app/teTeX/bin
44+
```
45+
とか書けばOK
46+
47+
#### Macの場合 その2
48+
上記の方法で出来なかった場合は
49+
http://qiita.com/hideaki_polisci/items/3afd204449c6cdd995c9
50+
51+
ここを参考にMacTexをインストールする。
52+
53+
.bashrcとかに
54+
```bash
55+
export PATH=$PATH:/Library/TeX/texbin
56+
```
57+
と書いてパスを通す
58+
59+
#### Windowsの場合
60+
61+
Mr.Yata「Bash on Windows使えばいける」
62+
63+
bash on windowsのインストールの仕方は下記参照
64+
http://qiita.com/Aruneko/items/c79810b0b015bebf30bb
65+
66+
bash on Windowsインストール後、bash上でRE:VIEWとTexをインストールする
67+
```bash
68+
sudo gem install review
69+
sudo apt install texlive-full
70+
sudo apt install build-essential
71+
sudo apt-get install ruby-dev
72+
sudo gem install md2review
73+
```
74+
75+
## Re:Viewでの執筆フロー
76+
77+
### pdf化
78+
79+
```bash
80+
review-pdfmaker config.yml
81+
```
82+
もしくは、
83+
84+
```bash
85+
rake pdf
86+
```
87+
88+
でPDF生成
89+
90+
### 章ごとのファイル追加
91+
92+
catalog.yml内に
93+
```yaml
94+
CHAPS:
95+
- Preface.re
96+
- Chapter1.re
97+
- Chapter2.re
98+
```
99+
という風に記述すると章ごとに使いたいファイルを指定できる.
100+
101+
### MarkDownからRe:Viewフォーマットに変換
102+
103+
```bash
104+
md2review hoge.md > hoge.re
105+
```
106+
ってやるだけ
107+
108+
109+
110+
111+
# サンプルコードリポジトリ
112+
https://github.com/IndieVisualLab/UnityGraphicsProgramming

articles/Credit.re

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
= 権利について
2+
3+
コンテンツデータの著作権は全て著作権者に帰属します。
4+
コンテンツデータは、再出版、展示、頒布、譲渡、貸与、翻案、公衆送信することはできません。著作権者に同意を得ない上記の行為は、著作権侵害となり、著作権法およびその他の知的財産権に関する法律ならびに条約により禁止されております。たとえば、データの一部または全部を著作権者の許諾を得ずにホームページに転載することや、社内のLANなどで配信することは違法行為となります。
5+
著作権者は、購入者の違法行為により生じた一切の損害、損失および費用の賠償を警告なく、購入者に対して請求するものとします。
6+
ダウンロードしたコンテンツデータの権利は著作権者が購入者に譲渡するものではありません。購入者は所持する記憶媒体にデータを保管し所持しますが、コンテンツデータの所有権その他すべての権利およびコンテンツデータに含まれるすべての知的財産権は著作権者に帰属するものとし、購入者はコンテンツデータを閲覧する権限のみが許諾されるものとします。

articles/Credit.tex

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
2+
\section*{権利について}
3+
4+
コンテンツデータの著作権は全て著作権者に帰属します。
5+
コンテンツデータは、再出版、展示、頒布、譲渡、貸与、翻案、公衆送信することはできません。著作権者に同意を得ない上記の行為は、著作権侵害となり、著作権法およびその他の知的財産権に関する法律ならびに条約により禁止されております。たとえば、データの一部または全部を著作権者の許諾を得ずにホームページに転載することや、社内のLANなどで配信することは違法行為となります。
6+
著作権者は、購入者の違法行為により生じた一切の損害、損失および費用の賠償を警告なく、購入者に対して請求するものとします。
7+
ダウンロードしたコンテンツデータの権利は著作権者が購入者に譲渡するものではありません。購入者は所持する記憶媒体にデータを保管し所持しますが、コンテンツデータの所有権その他すべての権利およびコンテンツデータに含まれるすべての知的財産権は著作権者に帰属するものとし、購入者はコンテンツデータを閲覧する権限のみが許諾されるものとします。

0 commit comments

Comments
 (0)