LoginSignup
4
4

More than 5 years have passed since last update.

ドキュメントヘッダーを設定する

Last updated at Posted at 2019-05-13

ドキュメントのヘッダー作成

Asciidocにはドキュメントのヘッダーを記載するマークアップがあります。
PDFで出力した時、HTMLで出力した時で動作は異なるみたいですが、マークアップ自体は共通の用です。

MarkUp メモ(自己解釈の説明
lang 文書の言語?<恐らくメタ情報>
doctype 文書の種類(恐らくこれの指定でマークアップの表現が変化する?)
toc 目次の位置指定?
toclevel 目次へ出力する見出しのレベル
toc-title 目次のタイトル
sectnum 章見出しを出力するか?
sectnumlevels 見出し番号を出力するレベル 1.1.1 の場合は"3"
sectlinks 見出しにリンク(アンカー)を設定するか
icons 恐らくICONを文字で表示するかの指定?
example-caption サンプルブロックのプリフィックス 例:例1
table-caption 表タイトルのプリフィックス 例:表1
figure-caption 画像タイトルのプリフィックス 例:図1
docname ドキュメントのタイトル
author 作成者
revnumber 改定番号

サンプルとしてはこんな感じです。

sample.adoc
:lang: ja
:doctype: book
:toc: left
:toclevels: 6
:toc-title: 目次
:sectnums:
:sectnumlevels: 6
:sectlinks:
:icons: font
:example-caption: 例
:table-caption: 表
:figure-caption: 図
:docname: サンプルAsciidoc
:author: author<autho.example.com>
:revnumber: 0.1
:revdate: 2017/12/25

Gitで表示した時のサンプル

GitHubやGitLabにPushすると、良い感じに表示されました。

GitHubで表示したときのサンプル

4
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
4