{"id":17540527,"url":"https://github.com/fromkk/bitrise_docker_review_sample","last_synced_at":"2026-01-07T10:42:41.614Z","repository":{"id":37876972,"uuid":"226451062","full_name":"fromkk/Bitrise_Docker_Review_Sample","owner":"fromkk","description":"Sample project for build re:view on Bitrise with Docker","archived":false,"fork":false,"pushed_at":"2022-12-04T23:33:48.000Z","size":564,"stargazers_count":0,"open_issues_count":4,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-03T14:28:19.894Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TeX","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fromkk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-12-07T03:42:35.000Z","updated_at":"2021-05-07T12:03:51.000Z","dependencies_parsed_at":"2023-01-22T23:31:43.338Z","dependency_job_id":null,"html_url":"https://github.com/fromkk/Bitrise_Docker_Review_Sample","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fromkk%2FBitrise_Docker_Review_Sample","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fromkk%2FBitrise_Docker_Review_Sample/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fromkk%2FBitrise_Docker_Review_Sample/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fromkk%2FBitrise_Docker_Review_Sample/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fromkk","download_url":"https://codeload.github.com/fromkk/Bitrise_Docker_Review_Sample/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246140538,"owners_count":20729797,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-20T22:24:09.590Z","updated_at":"2026-01-07T10:42:36.562Z","avatar_url":"https://github.com/fromkk.png","language":"TeX","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Re:VIEW Template\n\nこのリポジトリはRe:VIEW用の書籍テンプレートです。Re:VIEWバージョン4.0に対応します。\nメンテナンスはTechBoosterが行っています。\n\n * [B5紙面サンプル（PDF）](https://github.com/TechBooster/ReVIEW-Template/tree/master/pdf-sample/TechBooster-Template-B5.pdf)\n * [A5紙面サンプル（PDF）](https://github.com/TechBooster/ReVIEW-Template/tree/master/pdf-sample/TechBooster-Template-A5.pdf)\n * [B5紙面電子書籍サンプル（PDF）](https://github.com/TechBooster/ReVIEW-Template/tree/master/pdf-sample/TechBooster-Template-ebook.pdf)\n\n## このテンプレートのビルドの仕方は？\n\n細かい準備(TeX入れたり)は[『技術書をかこう！』](https://github.com/TechBooster/C89-FirstStepReVIEW-v2)に準じます。\n\nTeXの導入をしない場合でもHTMLやEPUBの出力は可能です。Dockerコンテナでビルドすることもできます。\n\n## Re:VIEWの使い方は？\n\n[技術書をかこう！〜はじめてのRe:VIEW〜改訂版](https://github.com/TechBooster/C89-FirstStepReVIEW-v2)\nのリポジトリで解説しています。Re:VIEWに対応した執筆ノウハウ本です。\nRe:VIEWの使い方と制作にあたっての企画〜執筆〜編集〜告知〜会場頒布までのノウハウをギュッと詰めています。\n\nhttps://techbooster.booth.pm/ でPDF版の販売予定があります\n\n## 環境の準備\n\n本書は[Atom](https://atom.io/)で[language-review](https://atom.io/packages/language-review)と[linter-redpen](https://atom.io/packages/linter-redpen)を導入している前提です。\n内部的に[RedPen](http://redpen.cc/)を利用するため、 `brew install redpen` とかしておいてください。\n\nAtom以外の環境の場合、[prh](https://github.com/vvakame/prh)または[reviewjs-prh](https://github.com/vvakame/reviewjs-prh)とRedPenを自力でなんとか頑張って適用してください。\n\n警告やlintのエラーを放置して編集に突入してしまうと @mhidaka が過労で死にます。\nRedPenは試験的に導入したため、知見やルールについてまだ固まっていません。\n意見・感想・修正案などあれば @mhidaka までご相談ください。\n\n## PDF出力する\n\nrbenvやnodebrewを利用してRubyやNode.jsの準備をしている前提です。\nもしそうではない場合、適宜sudoを補うこと。\nNode.jsは4.x系以上が必須です。\n\ngraphvizを使ったのでbrew install graphvizとかが必要かもしれません。\n\n```\n$ gem install bundler\n$ git clone git@github.com:TechBooster/ReVIEW-Template.git\n$ cd ReVIEW-Template\n$ npm install\n$ npm run pdf\n```\n\n### Re:VIEWコマンドでPDFを出力する\n\nセットアップが完了していれば `npm run pdf` のかわりに\n```\n$ cd ReVIEW-Template/articles\n$ rake pdf\n```\n\nまたは\n\n```\n$ cd ReVIEW-Template/articles\n$ review-pdfmaker config.yml\n```\n\nでも生成できます。\n\n## EPUB・Webページ・テキストの出力\n\nPDF以外に、EPUB・Webページ・テキストを出力することもできます。\n\n### EPUBを出力する\n\n```\n$ npm run epub\n```\n\nまたは\n\n```\n$ cd ReVIEW-Template/articles\n$ rake epub\n```\n\nまたは\n\n```\n$ cd ReVIEW-Template/articles\n$ review-epubmaker config.yml\n```\n\n### Webページを出力する（webrootフォルダ）\n\n```\n$ npm run web\n```\n\nまたは\n\n```\n$ cd ReVIEW-Template/articles\n$ rake web\n```\n\nまたは\n\n```\n$ cd ReVIEW-Template/articles\n$ review-webmaker config.yml\n```\n\n### テキストファイルを出力する\n\n```\n$ npm run text\n```\n\nまたは\n\n```\n$ cd ReVIEW-Template/articles\n$ rake text\n```\n\nまたは\n\n```\n$ cd ReVIEW-Template/articles\n$ review-textmaker config.yml\n```\n\n## Dockerを使う\n\nTeXの環境構築が困難な場合、一式セットアップ済みの[dockerイメージ](https://registry.hub.docker.com/u/vvakame/review/)を用意してあるので使ってください。\nDockerがうまく動くようになっている場合、以下のコマンドで細かい準備なしにビルドを行うことができます。\n\n```\n$ docker pull vvakame/review:4.0\n$ ./build-in-docker.sh\n```\n\n## 紙面や設定ファイルの切り替え\n\nB5やA5といった紙面サイズ、印刷用・電子用といったメディアの切り替えは、articles/config.ymlのtexdocumentclassパラメータで設定しています。\n\n```\n# B5の設定(10pt 40文字×35行) - 紙版\ntexdocumentclass: [\"review-jsbook\", \"media=print,paper=b5,serial_pagination=true,hiddenfolio=nikko-pc,openany,fontsize=10pt,baselineskip=15.4pt,line_length=40zw,number_of_lines=35,head_space=30mm,headsep=10mm,headheight=5mm,footskip=10mm\"]\n# B5の設定(10pt 40文字×35行) - 電子版\n# texdocumentclass: [\"review-jsbook\", \"media=ebook,paper=b5,serial_pagination=true,openany,fontsize=10pt,baselineskip=15.4pt,line_length=40zw,number_of_lines=35,head_space=30mm,headsep=10mm,headheight=5mm,footskip=10mm\"]\n# A5の設定(9pt 38文字×37行) - 紙版\n# texdocumentclass: [\"review-jsbook\", \"media=print,paper=a5,serial_pagination=true,hiddenfolio=nikko-pc,openany,fontsize=9pt,baselineskip=13pt,line_length=38zw,number_of_lines=37,head_space=15mm,headsep=3mm,headheight=5mm,footskip=10mm\"]\n# A5の設定(9pt 38文字×37行) - 電子版\n# texdocumentclass: [\"review-jsbook\", \"media=ebook,paper=a5,serial_pagination=true,openany,fontsize=9pt,baselineskip=13pt,line_length=38zw,number_of_lines=37,head_space=15mm,headsep=3mm,headheight=5mm,footskip=10mm\"]\n```\n\nデフォルトはB5・印刷用の設定になっていますが、たとえばA5・印刷用にしたい場合にはB5のパラメータをコメントアウトし、A5のほうを有効にします。\n\n```\n# B5の設定(10pt 40文字×35行) - 紙版 ↓これをコメントアウトし…\n# texdocumentclass: [\"review-jsbook\", \"media=print,paper=b5,serial_pagination=true,hiddenfolio=nikko-pc,openany,fontsize=10pt,baselineskip=15.4pt,line_length=40zw,number_of_lines=35,head_space=30mm,headsep=10mm,headheight=5mm,footskip=10mm\"]\n# B5の設定(10pt 40文字×35行) - 電子版\n# texdocumentclass: [\"review-jsbook\", \"media=ebook,paper=b5,serial_pagination=true,openany,fontsize=10pt,baselineskip=15.4pt,line_length=40zw,number_of_lines=35,head_space=30mm,headsep=10mm,headheight=5mm,footskip=10mm\"]\n# A5の設定(9pt 38文字×37行) - 紙版 ↓こちらを有効にする\ntexdocumentclass: [\"review-jsbook\", \"media=print,paper=a5,serial_pagination=true,hiddenfolio=nikko-pc,openany,fontsize=9pt,baselineskip=13pt,line_length=38zw,number_of_lines=37,head_space=15mm,headsep=3mm,headheight=5mm,footskip=10mm\"]\n# A5の設定(9pt 38文字×37行) - 電子版\n# texdocumentclass: [\"review-jsbook\", \"media=ebook,paper=a5,serial_pagination=true,openany,fontsize=9pt,baselineskip=13pt,line_length=38zw,number_of_lines=37,head_space=15mm,headsep=3mm,headheight=5mm,footskip=10mm\"]\n```\n\n印刷用と電子用の両方を作りたいときには、設定ファイルの継承機能を利用できます。たとえばB5電子版の設定ファイルの例をconfig-ebook.ymlとして用意しています。この内容は次のようにシンプルに既存のconfig.ymlのtexdocumentclassパラメータを置き換えているだけです。\n\n```\n# 継承元設定\ninherit: [\"config.yml\"]\n\n# B5の設定(10pt 40文字×35行) - 電子版\ntexdocumentclass: [\"review-jsbook\", \"media=ebook,paper=b5,serial_pagination=true,openany,fontsize=10pt,baselineskip=15.4pt,line_length=40zw,number_of_lines=35,head_space=30mm,headsep=10mm,headheight=5mm,footskip=10mm\"]\n# A5の設定(9pt 38文字×37行) - 電子版\n# texdocumentclass: [\"review-jsbook\", \"media=ebook,paper=a5,serial_pagination=true,openany,fontsize=9pt,baselineskip=13pt,line_length=38zw,number_of_lines=37,head_space=15mm,headsep=3mm,headheight=5mm,footskip=10mm\"]\n```\n\nこのconfig-ebook.ymlを使ってPDFを生成するには次のようにします。\n\n```\n$ REVIEW_CONFIG_FILE=config-ebook.yml npm run pdf\n```\n\n\nまたは\n\n```\n$ cd ReVIEW-Template/articles\n$ REVIEW_CONFIG_FILE=config-ebook.yml rake pdf\n```\n\nまたは\n\n```\n$ cd ReVIEW-Template/articles\n$ review-pdfmaker config-ebook.yml\n```\n\nDocker環境でも以下のように指定できます。\n\n```\n$ REVIEW_CONFIG_FILE=config-ebook.yml ./build-in-docker.sh\n```\n\n紙版と電子版では以下のような違いがあります。\n\n * 紙版：印刷用に、トンボ、デジタルトンボを設置。いくつかの同人誌印刷所で要求事項となっているノドへの隠しノンブル、大扉からのアラビア数字通し。ハイパーリンクは無効化。表紙（cover）は無視。\n * 電子版：電子配布用に、仕上がり紙面サイズ。大扉からのアラビア数字通し。ハイパーリンク有効。表紙（cover）を中央合わせで配置。\n\n### EPUB/Web出力用CSSファイルの編集方法\n\narticles/ディレクトリ以下の各種*.scssファイルを編集し、\n\n```\n./rebuild-css.sh\n```\n\nコマンドでCSSファイルをビルドしてください。\n\n## 過去のRe:VIEW 3依存プロジェクトをRe:VIEW 4に移行する\n\nRe:VIEW 3のプロジェクトは、review-updateコマンドで簡単に更新できます。\n\n既存のプロジェクトフォルダ内 (本リポジトリを使っている場合はarticlesフォルダ) で、review-updateコマンドを実行してください。\n\n```\n$ review-update\n** review-update はプロジェクトを 4.0.0 に更新します **\nconfig.yml: 'review_version' を '4.0' に更新しますか? [y]/n\nプロジェクト/sty/review-base.sty は Re:VIEW バージョンのもの (/var/lib/gems/2.5.0/gems/review-4.0.0/templates/latex/review-jsbook/review-base.sty) で置き換えられます。本当に進めますか? [y]/n\nプロジェクト/sty/review-jsbook.cls は Re:VIEW バージョンのもの (/var/lib/gems/2.5.0/gems/review-4.0.0/templates/latex/review-jsbook/review-jsbook.cls) で置き換えられます。本当に進めますか? [y]/n\n完了しました。\n```\n\n## 過去のRe:VIEW 2依存プロジェクトをRe:VIEW 4に移行する\n\nRe:VIEW 2系向けの過去のTechBoosterテンプレートは、Re:VIEW 3以降とは互換性がありません。Re:VIEWは2から3以上への移行を支援する「review-update」というコマンドを提供していますが、TechBoosterテンプレートを使用しているプロジェクトは対象外となっています。\n\n### Re:VIEW 3以降の互換モードを使う\n\nconfig.ymlで`review_version: 2.0`としておけば、当面は互換モードによりRe:VIEW 3以降でも変わりなく動作します。ただし、一部のRe:VIEW 3以降固有の機能は利用できません。また、将来的に互換は破棄される可能性があります。\n\n### Re:VIEW 4のテンプレートに置き換える\n\nRe:VIEW 3以降ではTeX関連のファイルが大きく変わっているため、Re:VIEW 2系のプロジェクトの既存のファイルをいったん退避し、必要に応じて設定を書き戻すという手順になります。\n\n1. 事前にフォルダごと必ずバックアップを取っておいてください。\n2. layoutsフォルダをリネーム（たとえばlayouts-oldなど）します。\n3. styフォルダをリネーム（たとえばsty-oldなど）します。\n4. config.ymlファイルをリネーム（たとえばconfig.yml-oldなど）します。\n5. TechBoosterテンプレートのarticles/styフォルダをフォルダごとコピーします。\n6. TechBoosterテンプレートのarticles/config.ymlファイルをコピーします。\n7. TechBoosterテンプレートのlibフォルダをフォルダごとコピーします。\n8. TechBoosterテンプレートのRakefileファイルをコピーします。\n9. config.ymlに、カスタマイズしていた書名や著者名などを書き戻します。\n\n書き戻しではなくどうしても古いconfig.ymlの書き換えで対処したいという場合は、以下の点に注意してください。\n\n * review_versionパラメータ：値を4.0にする必要があります。\n * texstyleパラメータ：値を[\"reviewmacro\"]とします。\n * texdocumentclassパラメータ：2つの引数の内容は大きく変わっています。\n * texcommandパラメータ：オプションを指定していた場合、texoptionsパラメータに移設する必要があります。\n * dvicommandパラメータ：オプションを指定していた場合、dvioptionsパラメータに移設する必要があります。\n\nlayouts/layouts.tex.erbやsty/techbooster-doujin.styに何らかのカスタマイズを加えていた場合は、sty/review-custom.styに類似の実装をする必要があります。Re:VIEW 2系のTechBoosterテンプレートはマクロ定義時点から書き換える手法をとっていましたが、Re:VIEW 3系から`\\renewcommand`・`\\reenvironment`・`\\def`などの命令を使って既存のマクロ定義を再定義するというやり方に変わっています。\n\n### Re:VIEW 3以降の変更点について\n\nRe:VIEW 3以降で変わったことの詳細については、以下を参照してください。\n\n* [Re:VIEW 4.0 での変更点](https://review-knowledge-ja.readthedocs.io/ja/latest/releases/review400.html)\n* [Re:VIEW 3からのLaTeX処理](https://review-knowledge-ja.readthedocs.io/ja/latest/latex/review3-latex.html)\n\n### Re:VIEW 2用のテンプレートの入手\n\n何らかの理由でどうしてもRe:VIEW 2系のTechBoosterテンプレートが必要なときには、以下のリリースページから「review-2.4」リリースアーカイブファイルを利用してください。\n\n* https://github.com/TechBooster/ReVIEW-Template/releases\n\n## 権利\n\n * 設定ファイル、テンプレートなど制作環境（techbooster-doujin-base.styなど）はMITライセンスです\n   * 再配布などMITライセンスで定める範囲で権利者表記をおねがいします\n   * 本設定を使って生成した書籍は現段階のRe:VIEWではソフトウェアたりえません。したがってライセンスは発生しません（あとがきなどへの表記はあると嬉しいものの生成物での表記は不要です）\n * articles/styにあるファイルには以下のライセンスが適用されています。\n   * review-jsbook.cls, review-base.sty, review-style.sty, review-custom.sty: MIT License\n   * jumoline.sty: The LaTeX Project Public License\n   * plistings.sty: MIT License\n   * gentombow.sty: BSD License\n   * jsbook.cls: BSD License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffromkk%2Fbitrise_docker_review_sample","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffromkk%2Fbitrise_docker_review_sample","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffromkk%2Fbitrise_docker_review_sample/lists"}