Skip to content

Asiidoc을 기반으로 해서 책을 쓰기 위한 템플릿

Notifications You must be signed in to change notification settings

ihoneymon/asciidoc-book-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Asciidoc 으로 시작하는 책쓰기용 템플릿

아스키독(Asciidoc)을 기반으로 책을 쓸 수 있다는 일념으로 만든 템플릿 프로젝트

Note

실제로는 Asciidoctor를 기반으로 하고 있다고 봐야함.

문서생성을 위한 사전요구사항

책쓰기 프로젝트 시작

$ git clone [email protected]:ihoneymon/asciidoc-book-template.git
$ cd asciidoctor-book-template
$ git remote remove origin
$ rm -rf .git
$ bundle install // (1)
$ ./build.sh    // (2)
  1. Gemfile을 읽어 Rakefile을 실행하는데 필요한 의존성 라이브러리를 설치한다.

  2. build.sh를 실행하면 publication 디렉토리리가 생성되고 그 안에 html, docxpdf 파일이 생성된다.

Note

생성되는 파일명을 변경하고 싶은 경우 build.sh를 열어 publication 을 자신이 원하는 이름으로 변경하면 된다.

#!/usr/bin/env zsh
bundle exec rake "book:build[publication]"
Important

빌드를 실행하면 asciidoctor-pdf-cjk-kai_gen_gothic를 다운로드(하는 척) 하지만 실제로는 다운로드가 일어나지 않는다. asciidoctor-pdf 한글을 랜더링 하기 위해 한글폰트를 필요로 한다. 그 때는 https://www.dropbox.com/s/wn68fkdt93kkkw6/asciidoctor-pdf-font.tar?dl=0를 내려받고 gems/asciidoctor-pdf-cjk-kai_gen_gothic-0.1.1/data/fonts/ 위치에 풀어넣으면 된다.

asciidoctor-pdf-cjk-kai_gen_gothic-0.1.1 폰트를 내려받을 수 없게 되어 있다.

기타

궁금한 것이 있을 경우에는 커피 한 잔이상 사주시면 친절하게 응해드립니다.

코드영역에서 위치변환자(Placeholder)를 사용할 때

아스키독에서는 대체(substitutions) 라는 표현을 쓴다. 그래서 약자(subs)를 사용한다.

    :version: 1.5.6.1

    [source,xml,subs="verbatim,attributes"]
    ----
    <dependency>
      <groupId>org.asciidoctor</groupId>
      <artifactId>asciidoctor-java-integration</artifactId>
      <version>{version}</version>
    </dependency>
    ----

About

Asiidoc을 기반으로 해서 책을 쓰기 위한 템플릿

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published