ソフトウェア工学
nドキュメンテーション
• コメント,リファレンスマニュアル,Docstring,自動ド
キュメント生成,Sphinx,Doxygen,マークアップ言語,
Markdown,RST,pandoc
玉木徹(名工大)
ドキュメンテーション
ドキュメントは重要
nプロジェクト開発では必須
• 品質管理のため
• チームメンバー間の意思疎通のため
• 設計と実装とテストは別人が行うた
め
nドキュメントの種類
• プロジェクト管理
• 議事録,管理計画・記録表
• 仕様書
• 要求仕様書
• WBS,ガントチャート
• 外部設計書
• 構成図,業務フロー図,画面
遷移図,...
• 内部設計書
• 詳細設計書,イベント定義書,
クラス定義書,各種UML
図,...
• テスト仕様書・実施結果報告書
• コードのコメント
• コードの説明文
• 関数などのインターフェース
コメント
nコード中で実行されない部分
• 人間にとって意味のある情報を
書くため
nコメントの方法
• 行内のある部分から行末までの
コメント
• 複数行からなるコメント
nコメントアウト
• コードの一部をコメントにする
こと
PytorchのConv1D
コメントの書き方は言語依存
nC言語
/* comment */
/*
comment
*/
nC++
// comment
/* comment */
/*
comment
*/
nJava
// comment
/*
comment
*/
nPython
# comment
"""
comment
"""
良いコメントと悪いコメント
n良いコメント
• そのコードが存在する理由を書く
n悪いコメント
• そのコードが行っている内容を書
く
• 悪い理由
• コードそれ自体が処理内容を表
しているので不要
• コードとコメントの2つを管理
しなければならないので無駄な
手間が増える
• よくある例のほとんどは初心者の
ための説明用でしかない!
• 教科書,授業
nできるだけコメントは書かない
• 必要最小限にする
• 良いコードにはほとんどコメント
がない
• ロジックも明快
• そもそも設計書がある
• 書くなら冒頭にまとめる
• 関数や変数名がわかりやすい
• コメントは不要
#include <stdio.h> /* 標準入出力のライブラリを読み込む */
/* メイン関数の始まり */
int main(void)
{
printf("hello world¥n"); /* hello worldと表示 */
return 0; /* 返り値は0 */
}
最悪のコメント例
良いコメントと悪いコメント
n書くべきコメント
• なぜそのようにコードが書かれて
いるのかを書く
• 何が達成されるのかを書く
• 他人が読むことを前提にして書く
nそもそも
• できるだけコメントを書かずに済
むようにコードを書く
n書くべきでないコメント
• 変数の説明
• 変数名自体が詳しい内容を表し
ていればよい
• マジックナンバーの説明
• それらを表すわかりやすい変数
を使えば良い
• 改変履歴や時刻
• バージョン管理を使えばよい
• 自分用のメモ
• コードを汚染してしまう
リファレンスマニュアル
マニュアルとは
nリファレンスマニュアル
• 機能を一覧にしたドキュメント
• APIリファレンス
• 関数やクラス,メソッドの使い方
• 引数と返り値の意味
• 使用例
nドキュメントの一種
• 作成したモジュールのコードと同様に納品
• ただしコードとマニュアルを別々に作成すると二度手間
• 管理も二重になるのでミスが発生しやすい
Pythonのマニュアル
n公式ドキュメント
• 使い方はここから調べる
https://docs.pyt
hon.org/ja/3/
https://docs.python.org/ja/3/library/math.html
ライブラリのマニュアル
https://pytorch.org/docs/stable/generat
ed/torch.nn.Conv2d.html
https://numpy.org/doc/stable/referenc
e/generated/numpy.arctan2.html
n公式ドキュメント
• 使い方はここから調べる
マニュアルの表示
https://docs.python.org/3/library/math.html
エディタによってはマ
ウスオーバーでマニュ
アルを表示する
pythonのhelpコマンド
はマニュアルを表示す
る
webマニュアルは公式
サイトにある
help表示を終了するには
キーボードの'q'を押す
docker composeを利用する
起動する
$ cd 12_01_sphinx
$ docker compose build
$ docker compose up -d
確認する
$ docker compose ps
停止する
$ docker compose down
Docstring
nPythonの仕様(PEP275)
• 関数やクラスの仕様を説明するコメント
• 宣言の冒頭の文字列リテラルがdocstringになる
docstring
自作関数でも
docstringが表
示される
docstringを検索してイ
ンストール
関数やクラスの宣言の
直後に”””を入力すると,
docstring生成機能が働
く
これを押すと
もしくはコマンドパ
レットからGenerate
Docstringを選択すると
生成される
フォーマットに
沿ったテンプレー
トが挿入される
必要な情報を入力
すれば完成
マニュアルの作成と生成
マニュアルの自動作成
nマニュアル作成の問題点
• コードとマニュアルを別々に作成すると二度手間
• 管理も二重になるのでミスが発生しやすい
• マニュアルを複数のメディアで提供することも多い
• 例:HTML版とPDF版
• 別々に作成・管理することは非効率
n解決策
• 規約に沿って書かれたDocstringからマニュアルを自動生成
• コーディング時にマニュアルの情報も記述する
Pytorchの例
https://pytorch.org/docs/stable/generat
ed/torch.nn.Conv2d.html
該当するソースコード
https://github.com/pytorch/pytorch/blob
/master/torch/nn/modules/conv.py
Sphinx
docker composeを利用する
起動する
$ cd 12_01_sphinx
$ docker compose build
$ docker compose up -d
確認する
$ docker compose ps
停止する
$ docker compose down
Sphinx
nドキュメント作成ツール
• 入力
• Docstringを含むコード
• 出力
• HTMLやPDF形式のマニュアル
• 元々はPython用
• 現在は他の言語にも対応
https://www.sphinx-doc.org/ja/master/
Sphinxの例
n用意したファイル
• compute.py
• integration.py
• main.py
nDocstring
• テンプレートに従って記載
import argparse
from compute import myadd, mymult
from integration import AddOrMult
def mycompute(a, b, c):
"""aとbの和もしくは積を計算する
Args:
a (int): 1つ目の引数
b (int): 2つ目の引数
c (str): "add"もしくは"mult"."add"が
指定されたらa+bを,"mult"が指定されたら"a*b"を返す
Returns:
int: a+bまたはa*b
"""
if c == "add":
class AddOrMult():
"""myaddもしくはmymultを計算する
"""
def __init__(self, add_func, mult_func):
super().__init__()
self.add = add_func
self.mult = mult_func
def do(self, a, b, c):
"""aとbの和もしくは積を計算する
Args:
a (int): 1つ目の引数
b (int): 2つ目の引数
c (str): "add"もしくは"mult"."add"
が指定されたらa+bを,"mult"が指定されたら"a*b"を返す
def myadd(a, b):
"""aとbの和を計算する
Args:
a (int): 1つ目の引数
b (int): 2つ目の引数
Returns:
int: aとbの和
"""
if a > 0 and b > 0:
return a + b
if a < 0 and b < 0:
return a + b
main.py
integration.py
compute.py
$ docker compose exec mypython sphinx-quickstart docs
Welcome to the Sphinx 4.5.0 quickstart utility.
Please enter values for the following settings (just press Enter to
accept a default value, if one is given in brackets).
Selected root path: docs
You have two options for placing the build directory for Sphinx output.
Either, you use a directory "_build" within the root path, or you separate
"source" and "build" directories within the root path.
> Separate source and build directories (y/n) [n]: y
The project name will occur in several places in the built documentation.
> Project name: AddMult
> Author name(s): Toru Tamaki
> Project release []: 0.1
If the documents are to be written in a language other than English,
you can select a language here by its language code. Sphinx will then
translate text that it generates into that language.
For a list of supported codes, see
https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-language.
> Project language [en]:
「y」を入力
(buildとsource
に分かれる)
プロジェクトの情報を入力
(自分の名前を入れること)
ドキュメントを作成
するディレクトリ
sphinx-quickstart:設定開始
生成され
るディレ
クトリ
設定は
conf.pyに
記録され
る
The project name will occur in several places in the built documentation.
> Project name: AddMult
> Author name(s): Toru Tamaki
> Project release []: 0.1
If the documents are to be written in a language other than English,
you can select a language here by its language code. Sphinx will then
translate text that it generates into that language.
For a list of supported codes, see
https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-language.
> Project language [en]:
Creating file /mnt/docs/source/conf.py.
Creating file /mnt/docs/source/index.rst.
Creating file /mnt/docs/Makefile.
Creating file /mnt/docs/make.bat.
Finished: An initial directory structure has been created.
You should now populate your master file /mnt/docs/source/index.rst and create other documentation
source files. Use the Makefile to build the docs, like so:
make builder
where "builder" is one of the supported builders, e.g. html, latex or linkcheck.
$
日本語ならjaと入力する
(enなら英語)
sphinx-quickstart:設定開始
生成され
るディレ
クトリ
設定は
conf.pyに
記録され
る
# Configuration file for the Sphinx documentation builder.
#
# For the full list of built-in configuration values, see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
import os
import sys
sys.path.insert(0, os.path.abspath(os.path.join('..', '..')))
# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
project = 'AddMult'
copyright = '2023, Toru Tamaki'
author = 'Toru Tamaki'
release = '0.1'
# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.napoleon',
]
templates_path = ['_templates']
exclude_patterns = []
language = 'ja'
# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
html_theme = 'sphinx_rtd_theme'
html_static_path = ['_static']
docs/source/conf.pyの編集
conf.pyに対する
ソースコードの
ある位置の変更
自動作成の拡張を追加
(詳しくはこちら)
テーマをRead
the Docに変更
手動で修正
sphinx-apidoc:APIリファレンスの作成
ファイルを上書き
-oで生成中間ファイル
(rst)を保存する
ディレクトリを指定
ソースコードのある
フォルダを指定
各ソースコードに対
してrstが作成される
$ docker compose exec mypython sphinx-apidoc -f -o docs/source/ ./
Creating file docs/source/compute.rst.
Creating file docs/source/integration.rst.
Creating file docs/source/main.rst.
Creating file docs/source/modules.rst.
$
$ docker compose exec mypython sphinx-build -b html docs/source/ docs/build/html
Running Sphinx v4.5.0
making output directory... done
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 5 source files that are out of date
updating environment: [new config] 5 added, 0 changed, 0 removed
reading sources... [100%] modules
looking for now-outdated files... none found
pickling environment... done
checking consistency... /mnt/docs/source/modules.rst: WARNING: document isn't included in any toctree
done
preparing documents... done
writing output... [100%] modules
generating indices... genindex py-modindex done
writing additional pages... search done
copying static files... done
copying extra files... done
dumping search index in English (code: en)... done
dumping object inventory... done
build succeeded, 1 warning.
The HTML pages are in docs/build/html.
$
sphinx-build;HTMLファイルの作成
docs/sourceにあるrstファイルを使って
HTMLが生成された
生成されるhtmlファイ
ルをdocs/build/htmlに
保存
HTMLファイルを生成する指定
できたHTMLをブラ
ウザで表示する(も
しくはvscodeでも表
示できる)
index.html
modules.html
compute.html
Doxygen
docker composeを利用する
起動する
$ cd 12_02_doxgen
$ docker compose build
$ docker compose up -d
確認する
$ docker compose ps
停止する
$ docker compose down
Doxygen
nドキュメント作成ツール
• 入力
• コメントにDoxygenコマンドを
を含むコード
• 出力
• HTMLやPDF形式のマニュアル
• C, C++, Java, Pythonなど
• Docstringとは異なる独自フォーマッ
ト
https://www.doxygen.nl/
注意: http://www.doxygen.jp は10
年メンテされてない...
Doxygenの例
n用意したファイル
• compute.py
• integration.py
• main.py
nコメント
• Doxygenスタイルに従って記載
main.py
compute.py
integration.py
## @fn mycompute(a, b, c)
# @brief aとbの和もしくは積を計算する
# @param a (int): 1つ目の引数
# @param b (int): 2つ目の引数
# @param c (str): "add"もしくは"mu...
# @return int: a+bまたはa*b
def mycompute(a, b, c):
if c == "add":
return myadd(a, b)
if c == "mul":
return mymult(a, b)
return
## @fn myadd(a, b)
# @brief aとbの和を計算する
# @param a (int): 1つ目の引数
# @param b (int): 2つ目の引数
# @return int: aとbの和
def myadd(a, b):
if a > 0 and b > 0:
return a + b
if a < 0 and b < 0:
return a + b
## @class AddOrMult
# @brief myaddもしくはmymultを計算する
class AddOrMult():
def __init__(self, add_func, mult_
super().__init__()
self.add = add_func
self.mult = mult_func
...
@から始まるものが
Doxygenコマンド
例:@fnは関数に対
するDoxygenコマン
ド
C言語の例
/** @file main.c
* @brief 2つの整数の和を表示する
* @date 2021/3/2
* @author Toru Tamaki
*/
#include <stdio.h>
/** @fn int main(void)
* @brief 2つの整数の和を表示する
*
* 入力:
* - 標準入力に2つの整数が与えられる
*
* 出力:
* - 2個の整数の和を表示する
*
* @date 2021/3/2
* @author Toru Tamaki
*/
int main(void){
int a, b;
scanf("%d%d", &a, &b);
printf("%d¥n", a + b);
return 0;
}
設定ファイル:Doxyfile
# Doxyfile 1.8.10
#---------------------------------------------------------------------------
# Project related configuration options
#---------------------------------------------------------------------------
DOXYFILE_ENCODING = UTF-8
PROJECT_NAME = AddMult
PROJECT_NUMBER = 0.1
PROJECT_BRIEF = Add or Mult project
PROJECT_LOGO =
OUTPUT_DIRECTORY =
...
#---------------------------------------------------------------------------
# Configuration options related to the input files
#---------------------------------------------------------------------------
INPUT =
INPUT_ENCODING = UTF-8
FILE_PATTERNS = *.py
RECURSIVE = NO
EXCLUDE =
EXCLUDE_SYMLINKS = NO
...
#---------------------------------------------------------------------------
# Configuration options related to the HTML output
#---------------------------------------------------------------------------
GENERATE_HTML = YES
HTML_OUTPUT = html
HTML_FILE_EXTENSION = .html
HTML_HEADER =
プロジェクト名など
ソースコードのファ
イル名パターン
HTMLを生成する指
定(NOならHTMLを
作らない)
Doxygenの実行
設定ファイル
Doxyfileを指定
この中の
index.html
$ docker compose exec mypython doxygen Doxyfile
warning: The selected output language "japanese" has not been updated
since release 1.8.15. As a result some sentences may appear in English.
Doxygen version used: 1.9.1
Searching for include files...
Searching for example files...
Searching for images...
Searching for dot files...
...
Generating member index...
Generating file index...
Generating file member index...
Generating example index...
finalizing index lists...
writing tag file...
Running plantuml with JAVA...
lookup cache used 25/65536 hits=7 misses=25
finished...
$
生成ドキュメント
index.html
doxygenを検索してイ
ンストール
関数の直前でコメント
を開始してリターンを
押すと
フォーマットに従った
テンプレートが挿入さ
れる
注:デフォルト設定で
はコメントはC言語の
み対応
Doxygen vs Sphinx
OpenCV: from Sphinx to Doxygen
https://docs.opencv.org
OpenCV: Doxygen
https://docs.opencv.org/4.5.2/annotated.html
PCL: Doxygen
https://pointclouds.org/documentation/annotated.html
Numpy: Sphinx
https://numpy.org/doc/stable/reference/routines.char.html
Scikit-learn: Sphinx
https://scikit-
learn.org/stable/modules/generated/sklearn.svm.LinearSV
C.html#sklearn.svm.LinearSVC
Pytorch: Sphinx
https://pytorch.org/docs/stable/index.html
Pytorch: and Doxygen
https://pytorch.org/docs/stable/community/contribution_gui
de.html#on-documentation
Doxygen vs Sphinx: 適材適所
nSphinx
• テーマの自由度が大きい
• 最近主流?
• pythonはDocstring
• doctestを使うと単体テストも可
能
nDoxygen
• クラス階層が複雑な場合には便利
• graphvisも併用するとUMLのクラ
ス図が埋め込める
• Javadocと互換性あり
nHTMLでの数式表示
• katex
• mathjax
その他のツール
npdoc
nMkDocs
nPython
Cheatsheet
nPycoco
• Dococoのpython
port
Awesome Python, Python Documentation.
https://python.libhunt.com/categories/170-documentation
マークアップ言語
Markdown (md)
reStructuredText (rst)
docker composeを利用する
起動する
$ cd 12_03_markup
$ docker compose build
$ docker compose up -d
確認する
$ docker compose ps
停止する
$ docker compose down
マークアップ言語とは
nプレーンテキストで構造化された文書を作成する
• wikipediaの定義:文書に注釈を付けるための方法,本文のテキストとは構文的
に区別できる
• 例:HTML(HyperText Markup Language),LaTeX
• 多数の言語がある
• https://en.wikipedia.org/wiki/List_of_markup_languages
n用途
• 少しフォーマットをつけて手軽にドキュメントを書きたい
• コメントに最適
• 代表例
• Markdown(拡張子.md)
• reStructuered Text(拡張子.rst)
OfficeはWYSIWYG
nWYSIWYG(ウィジウィグ)またはWYSWYG(ウィズウィグ)
• What You See Is What You Get(見たとおりのものが得られる)の頭文字
Markdownはプレーンテキスト
n入力はテキストエ
ディタ
n表示にはレンダ
ラーが必要
• 数式も表示できる
vscodeならこのア
イコンを押す
Markdownで検索
簡単なMarkdown文法
# Markdownの文法
## リスト
- 箇条書き
- こうなります
- インデントを2つ下げると
- レベルが上がります
- 箇条書き
- 箇条書き
- 箇条書き
簡単なMarkdown文法
## コード
コードを入力する場合は以下のようなコードブ
ロックを使います.
```python:test.py
def myfunc(a, b, c):
a = b + c
print(a)
```
簡単なMarkdown文法
## 数式
レンダラによっては$y = f(x)$のような
LaTeX数式も対応しています.インラインだけ
でなく,行立ての数式
$$
y = ¥int_a^b f(x, t) dt
$$
も対応しています.数式番号は対応していない
ことがほとんどです(拡張機能が使える場合も
ある).
Qiitaの記事にも使われている
https://qiita.com/tttamaki/private/8fd1ddc3a8cd1bd3d271
GitHubはインライン数式対応中?
https://github.com/se-nitech/12_03_markup/blob/main/markdown.md
Jupyter notebookでも使われる
Google Colabでも
https://drive.google.com/file/d/1vO4XYuZh2BMMMW7Rd-Lq_zMAJ41ROm9Y/view?usp=sharing
それぞれの記法の解説
https://guides.github.com/features/masterin
g-markdown
https://qiita.com/Qiita/items/c686397e4a0f4f11683d
Markdownの短所
n方言が多い
• レンダラによって違いがある
• 数式の対応の有無
• インデントの数の違い
• 2か4か
• https://github.com/commonmark/commonmark-spec/wiki/Markdown-Flavors
reStructuredText(RST)
nMarkdownとは別のマークアップ言語
• 方言がないように統一されている
• 技術ドキュメント用(Markdownはweb用に開発された)
• HTML,LaTeX(PDF),にも変換可能
• Markdownはpandocを使えば変換は必要,でも完璧ではない
• github pagesなどでもサポートされている
• Docstring,Sphinxで使われている
nreStructuredText vs Markdown for documentation
• https://www.zverovich.net/2016/06/16/rst-vs-markdown.html
簡単なreStructuredText文法
============
RSTの文法
============
リスト
===============
* 箇条書き
* こうなります
* インデントを2つ下げると
* レベルが上がります
* 箇条書き
* 箇条書き
* 箇条書き
簡単なreStructuredText文法
コード
=========
コードを入力する場合は以下のようなコードブ
ロックを使います.
.. code-block:: python
def myfunc(a, b, c):
a = b + c
print(a)
簡単なreStructuredText文法
数式
=========
レンダラによっては :math:`y = f(x)` の
ようなLaTeX数式も対応しています.インライ
ンだけでなく,行立ての数式
.. math::
y = ¥int_a^b f(x, t) dt
も対応しています.
MarkdownとRSTの使い分け
nMarkdown
• 方言は多い
• 数式は対応していたりしていな
かったり
• 覚えた文法が使えなかったり
• 用途は多い
• Qiita, GitHub, etc
• Jupyter notebook
• レンダラーやプレビューアも多い
• DoxygenならMarkdown
nRST
• 統一されている
• 覚えるまでが少し大変
• 数式は対応していない
• Sphinx側で対応
• Docstringを書いてSphinxならRST
ドキュメントフォーマットの
変換
Pandoc
nテキストコンバータ
• MarkdownからRSTへ
• RSTからMarkdownsへ
nその他の対応フォーマット
• HTML
• LaTeX/PDF
• Word
• EPUB(電子ブック形式)
• Jupyter notebook
n注意
• 日本語非対応の場合もある
https://pandoc.org
docker composeを利用する
起動する
$ cd 12_03_markup
$ docker compose build
$ docker compose up -d
確認する
$ docker compose ps
停止する
$ docker compose down
Pandocの例:mdからhtmlへ
Markdown HTML ブラウザ表示
変換元入力
ファイル名
-oで変換先出力
ファイル名指定
-fで変換元の
フォーマット
-tで変換先の
フォーマット
$ docker compose exec mypython pandoc -f markdown -t html -o md_to_html.html markdown.md
ブラウザ上で文字化けする
ならエンコード指定を変更
して表示してください
# Markdownの文法
## リスト
- 箇条書き
- こうなります
- インデントを2つ下げると
- レベルが上がります
- 箇条書き
- 箇条書き
- 箇条書き
## コード
コードを入力する場合は以下のようなコードブロックを使います.
```python:test.py
def myfunc(a, b, c):
a = b + c
print(a)
```
<h1 id="markdownの文法">Markdownの文法</h1>
<h2 id="リスト">リスト</h2>
<ul>
<li>箇条書き</li>
<li>こうなります
<ul>
<li>インデントを2つ下げると</li>
<li>レベルが上がります</li>
</ul></li>
<li>箇条書き
<ul>
<li>箇条書き
<ul>
<li>箇条書き</li>
</ul></li>
</ul></li>
</ul>
<h2 id="コード">コード</h2>
<p>コードを入力する場合は以下のようなコードブロックを使いま
す.</p>
<div class="sourceCode" id="cb1"><pre
class="sourceCode python:test.py"><code
class="sourceCode python"><span id="cb1-1"><a
href="#cb1-1" aria-hidden="true"></a><span
Pandocの例:mdからdocxへ
Markdown
Wordで表示
変換元入力
ファイル名
-oで変換先出力
ファイル名指定
-fで変換元の
フォーマット
-tで変換先の
フォーマット
$ docker compose exec mypython pandoc -f markdown -t docx -o md_to_docx.docx markdown.md
# Markdownの文法
## リスト
- 箇条書き
- こうなります
- インデントを2つ下げると
- レベルが上がります
- 箇条書き
- 箇条書き
- 箇条書き
## コード
コードを入力する場合は以下のようなコードブロックを使います.
```python:test.py
def myfunc(a, b, c):
a = b + c
print(a)
```
https://readthedocs.org
Read the Docs (RtD)
nSphinxのホスティングサー
ビス
• ドキュメント公開のSaaS
nGitHubのプロジェクトに連
携できる
• 例
• https://github.com/se-
nitech/12_01_sphinx/tree/
readthedoc
• https://12-01-
sphinx.readthedocs.io/ja/l
atest/py-modindex.html
ソフトウェア工学2023 13 ドキュメンテーション
課題
nSphinxとDoxygenでドキュメントを作成せよ
• スライドで使ったサンプルを多少修正するだけでOK
n文書をmarkdownで作成せよ
• markdownファイルをpandocでWordファイルに変換
• それをPDFに変換
想定試験問題
nドキュメンテーションの重要性を説明せよ
n良いコメントと悪いコメントはどのようなものかを説明せよ
nDocstringとはどのようなものかを具体例を用いて説明せよ
nSphinxやDoxygenなどのツールを使ってドキュメントを作成する利点
を述べよ
nマークアップ言語とは何か,どのようなものがあるのかを述べよ
nmarkdownの文法を,具体例を用いて説明せよ
nreStructuredTextの文法を,具体例を用いて説明せよ

More Related Content

PDF
20121115 fukuoka sublime0_kuroneko
PDF
ソフトウェア工学2023 14 ビルド
PDF
OSS開発勉強会-01B
PDF
.NET Coreとツール類の今
PDF
Python におけるドメイン駆動設計(戦術面)の勘どころ
PPTX
Sphinxはじめの一歩
PDF
Sphinxでドキュメントを書こう
PDF
はてなにおける継続的デプロイメントの現状と Docker の導入
20121115 fukuoka sublime0_kuroneko
ソフトウェア工学2023 14 ビルド
OSS開発勉強会-01B
.NET Coreとツール類の今
Python におけるドメイン駆動設計(戦術面)の勘どころ
Sphinxはじめの一歩
Sphinxでドキュメントを書こう
はてなにおける継続的デプロイメントの現状と Docker の導入

Similar to ソフトウェア工学2023 13 ドキュメンテーション (20)

PPTX
JUS関西 Sphinxワークショップ@関西 Sphinx紹介
PDF
コマンドラインツールとしてのDocker
PDF
論理思考とプログラミング 2013f#10
PDF
SharePoint Framework Extension 基礎講座
ODP
Fuchsia概略その1
PDF
Building document with the Sphinx public edtion
PDF
cf-containers-broker を使ってローカル環境もサービスの恩恵をうける
PDF
Apache CloudStack Documentation
PPTX
Sphinx ではじめるドキュメント生活 2013 #sphinxconjp
PPTX
Newcomer2020 Docker研修
PDF
SharePoint Framework Teams タブ開発基礎講座
PPTX
Dev Containers Customization Short version
PDF
ドキュメントの継続的改善―Sphinxを使いながら
PDF
CodeIgniter東京勉強会 2011.05.14
PPTX
Sphinxの使い方事例
PPTX
node-webkit
PDF
KEONとPEAKが無くてもFirefox OS開発出来る
PPTX
Sphinxで作る貢献しやすい ドキュメント翻訳の仕組み
PPTX
20230128.pptx
PPTX
Sphinx拡張 探訪 2014 #sphinxjp
JUS関西 Sphinxワークショップ@関西 Sphinx紹介
コマンドラインツールとしてのDocker
論理思考とプログラミング 2013f#10
SharePoint Framework Extension 基礎講座
Fuchsia概略その1
Building document with the Sphinx public edtion
cf-containers-broker を使ってローカル環境もサービスの恩恵をうける
Apache CloudStack Documentation
Sphinx ではじめるドキュメント生活 2013 #sphinxconjp
Newcomer2020 Docker研修
SharePoint Framework Teams タブ開発基礎講座
Dev Containers Customization Short version
ドキュメントの継続的改善―Sphinxを使いながら
CodeIgniter東京勉強会 2011.05.14
Sphinxの使い方事例
node-webkit
KEONとPEAKが無くてもFirefox OS開発出来る
Sphinxで作る貢献しやすい ドキュメント翻訳の仕組み
20230128.pptx
Sphinx拡張 探訪 2014 #sphinxjp
Ad

More from Toru Tamaki (20)

PDF
論文紹介:Unboxed: Geometrically and Temporally Consistent Video Outpainting
PDF
論文紹介:OVO-Bench: How Far is Your Video-LLMs from Real-World Online Video​ Unde...
PDF
論文紹介:HOTR: End-to-End Human-Object Interaction Detection​ With Transformers, ...
PDF
論文紹介:Segment Anything, SAM2: Segment Anything in Images and Videos
PDF
論文紹介:Unbiasing through Textual Descriptions: Mitigating Representation Bias i...
PDF
論文紹介:AutoPrompt: Eliciting Knowledge from Language Models with Automatically ...
PDF
論文紹介:「Amodal Completion via Progressive Mixed Context Diffusion」「Amodal Insta...
PDF
論文紹介:「mPLUG-Owl3: Towards Long Image-Sequence Understanding in Multi-Modal La...
PDF
論文紹介:What, when, and where? ​Self-Supervised Spatio-Temporal Grounding​in Unt...
PDF
論文紹介:PitcherNet: Powering the Moneyball Evolution in Baseball Video Analytics
PDF
論文紹介:"Visual Genome:Connecting Language and Vision​Using Crowdsourced Dense I...
PDF
論文紹介:"InfLoRA: Interference-Free Low-Rank Adaptation for Continual Learning" ...
PDF
論文紹介:ActionSwitch: Class-agnostic Detection of Simultaneous Actions in Stream...
PDF
論文紹介:Make Pixels Dance: High-Dynamic Video Generation
PDF
PCSJ-IMPS2024招待講演「動作認識と動画像符号化」2024年度画像符号化シンポジウム(PCSJ 2024) 2024年度映像メディア処理シンポジ...
PDF
論文紹介:T-DEED: Temporal-Discriminability Enhancer Encoder-Decoder for Precise E...
PDF
論文紹介:On Feature Normalization and Data Augmentation
PDF
論文紹介:CLIFF: Continual Latent Diffusion for Open-Vocabulary Object Detection
PDF
論文紹介:MS-DETR: Efficient DETR Training with Mixed Supervision
PDF
論文紹介:Synergy of Sight and Semantics: Visual Intention Understanding with CLIP
論文紹介:Unboxed: Geometrically and Temporally Consistent Video Outpainting
論文紹介:OVO-Bench: How Far is Your Video-LLMs from Real-World Online Video​ Unde...
論文紹介:HOTR: End-to-End Human-Object Interaction Detection​ With Transformers, ...
論文紹介:Segment Anything, SAM2: Segment Anything in Images and Videos
論文紹介:Unbiasing through Textual Descriptions: Mitigating Representation Bias i...
論文紹介:AutoPrompt: Eliciting Knowledge from Language Models with Automatically ...
論文紹介:「Amodal Completion via Progressive Mixed Context Diffusion」「Amodal Insta...
論文紹介:「mPLUG-Owl3: Towards Long Image-Sequence Understanding in Multi-Modal La...
論文紹介:What, when, and where? ​Self-Supervised Spatio-Temporal Grounding​in Unt...
論文紹介:PitcherNet: Powering the Moneyball Evolution in Baseball Video Analytics
論文紹介:"Visual Genome:Connecting Language and Vision​Using Crowdsourced Dense I...
論文紹介:"InfLoRA: Interference-Free Low-Rank Adaptation for Continual Learning" ...
論文紹介:ActionSwitch: Class-agnostic Detection of Simultaneous Actions in Stream...
論文紹介:Make Pixels Dance: High-Dynamic Video Generation
PCSJ-IMPS2024招待講演「動作認識と動画像符号化」2024年度画像符号化シンポジウム(PCSJ 2024) 2024年度映像メディア処理シンポジ...
論文紹介:T-DEED: Temporal-Discriminability Enhancer Encoder-Decoder for Precise E...
論文紹介:On Feature Normalization and Data Augmentation
論文紹介:CLIFF: Continual Latent Diffusion for Open-Vocabulary Object Detection
論文紹介:MS-DETR: Efficient DETR Training with Mixed Supervision
論文紹介:Synergy of Sight and Semantics: Visual Intention Understanding with CLIP
Ad

ソフトウェア工学2023 13 ドキュメンテーション