Training @ Lu Lab
Lu Lab Docs
  • Home
    • Training @ Lu Lab
  • Drylab Training
    • Genomics
      • RNA Types in Genome
  • Wetlab Training
    • Wetlab Safety Guide
    • Wetlab FAQ
  • Archive
    • Archive 2021
      • cfDNA Methylation
      • Genomic Annotation
    • Archive 2019 - Wetlab Training
      • Class I. Basics
        • 1. Wet Lab Safety
        • 2. Wet Lab Regulation
        • 3. Wet Lab Protocols
        • 4. How to design sample cohort
        • 5. How to collect and manage samples
        • 6. How to purify RNA from blood
        • 7. How to check the quantity and quality of RNA
        • 8. RNA storage
        • 9. How to remove DNA contanimation
        • 10. What is Spike-in
      • Class II. NGS - I
        • 1. How to do RNA-seq
        • 2. How to check the quantity and quality of RNA-seq library
        • 3. What is SMART-seq2 and Multiplex
    • Archive 2019 - Drylab Training
      • Getting Startted
      • Part I. Programming Skills
        • Introduction of PART I
        • 1.Setup
        • 2.Linux
        • 3.Bash and Github
        • 4.R
        • 5.Python
        • 6.Perl
        • Conclusion of PART I
      • Part II. Machine Learning Skills
        • 1.Machine Learning
        • 2.Feature Selection
        • 3.Machine Learning Practice
        • 4.Deep Learning
      • Part III. Case studies
        • Case Study 1. exRNA-seq
          • 1.1 Mapping, Annotation and QC
          • 1.2 Expression Matrix
          • 1.3.Differential Expression
          • 1.4 Normalization Issues
        • Case Study 2. exSEEK
          • 2.1 Plot Utilities
          • 2.2 Matrix Processing
          • 2.3 Feature Selection
        • Case Study 3. DeepSHAPE
          • 3.1 Background
          • 3.2 Resources
          • 3.3 Literature
      • Part IV. Appendix
        • Appendix I. Keep Learning
        • Appendix II. Public Data
        • Appendix III. Mapping Protocol of RNA-seq
        • Appendix IV. Useful tools for bioinformatics
      • Part V. Software
        • I. Docker Manual
        • II. Local Gitbook Builder
        • III. Teaching Materials
  • Archive 2018
Powered by GitBook
On this page
  • Install command line gitbook tool
  • Install packages for gitbook tool
  • Build gitbook (html)
  • How to build pdf/epub
Edit on GitHub
  1. Archive
  2. Archive 2019 - Drylab Training
  3. Part V. Software

II. Local Gitbook Builder

Contributed by Xupeng Chen

Gitbook 新版不再支持pdf和其他静态导出,也不再兼容旧版command line版本,旧版command line不支持右边栏和一些hint和embed语法,需要第三方插件,

Install command line gitbook tool

先安装brew和npm两个包管理软件

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install node
brew install npm

再用npm安装gitbook

npm install gitbook -g
npm install gitbook-cli -g
gitbook -V #查看版本gitbook和gitbook-cli版本

Install packages for gitbook tool

在book.json中填入插件名称,then run gitbook install就可以自动安装依赖的插件。安装新版gitbook的一些替代插件以及一些额外的美化插件。

urlembed取代embed,效果不是很完美,tabs也没有新版gitbook的效果 插件用法

<div data-gb-custom-block data-tag="urlembed">

https://website.org/stuff/this-is-the-path-name

</div>
<div data-gb-custom-block data-tag="tabs" data-0=', third=' data-first='First Tab' data-second='Second Tab'></div>

<div data-gb-custom-block data-tag="content" data-0='first'></div>

Content for first tab ...

<div data-gb-custom-block data-tag="content" data-0='second'></div>

Content for second tab ...

<div data-gb-custom-block data-tag="content" data-0='third'>

Content for third tab ...

</div>

Build gitbook (html)

gitbook init #自动生成SUMMARY.md,但多级目录似乎无法找到,建议略过这一步用手工编辑版本
gitbook serve #可在浏览器预览,默认在http://localhost:4000
gitbook build #产生html

How to build pdf/epub

  • 下载calibre

  • 链接到bin下

  • ln -s /Applications/calibre.app/Contents/MacOS/ebook-convert /usr/local/bin

  • 产生pdf gitbook pdf . training_book.pdf

Last updated 3 years ago

https://calibre-ebook.com/dist/osx