html
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseHTML による説明ドキュメント
HTML Explanatory Documents
文章
Text
説明内容と日本語表現を補うため、次のスキルの併用を推奨する。
- :概念や仕組みを説明するときの用語定義、説明の粒度、構成
explain - :日本語の技術文書、記事、解説文の構成と文章規範
japanese-tech-writing - :読み物としての緩急が必要な長文の文章規範
cognitive-rhythm-writing
いずれも推奨スキルであり、 の必須依存ではない。
htmlTo supplement the content of explanations and Japanese expressions, we recommend using the following skills in combination:
- : Term definitions, explanation granularity, and structure when explaining concepts and mechanisms
explain - : Structure and writing standards for Japanese technical documents, articles, and explanatory texts
japanese-tech-writing - : Writing standards for long texts that require pacing as readable materials
cognitive-rhythm-writing
All of these are recommended skills and not mandatory dependencies for .
html成果物
Deliverables
- HTML を作る
- ビルドなしでブラウザが直接描画できる状態にする
- 保存先が指定されている場合は従う。指定がなければ現在の作業ディレクトリへ保存する
- ファイル名は とする。既存ファイルの更新では名前を変えない
{yyyymmdd}-{内容を表すケバブケース}.html - 個別の文書管理システム、メタデータ、Viewer、公開先に関する規則は、このスキルを参照する上位スキルの指示に従う
- Create HTML
- Ensure it can be rendered directly by a browser without building
- Follow the specified save location if provided; save to the current working directory if no location is specified
- Use the filename format . Do not change the name when updating an existing file
{yyyymmdd}-{kebab-case-representing-content}.html - Follow the instructions of the higher-level skill referencing this skill for rules regarding individual document management systems, metadata, viewers, and publication destinations
デザインシステム
Design System
作成前に を確認する。コンポーネント集は 、数式コピー機能は を正とする。
design-system/component-samples.htmldesign-system/document.cssdesign-system/math-copy.js既定では、成果物と一緒に必要なファイルを配置し、次の相対パスで読み込む。上位スキルが共有アセットのパスを指定した場合は、その指定を優先する。
html
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Ubuntu+Sans:wght@400;500;700&family=Noto+Sans+JP:wght@400;500;700&family=Ubuntu+Mono:wght@400;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="./design-system/document.css">
<script src="./design-system/math-copy.js"></script>
<script async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/highlight.min.js"></script>
<script>document.addEventListener("DOMContentLoaded", () => hljs.highlightAll());</script>主要規則は次のとおり。
- 背景は 。部品は白地、黒罫線、角丸を基本とする
#FAF9F6 - 自然言語は Ubuntu Sans と Noto Sans JP、コード・URL・日付は Ubuntu Mono を使う
- 有彩色はリンク青 とアクセント赤
#2990DAに限定する#D63A2F - 赤い強調は原則として 1 ページ 1 箇所までとする
- シンタックスハイライトとコード差分の色は、意味を区別する機能色としてこの制限の対象外とする
- 余白は上下左右の均衡を保つ
- 引用は を使い、原文と訳文を同じ文字サイズ・色で上下に並べる
.mb-quote - は並列の固有名や分類名の列挙にだけ使う
.mb-chip - 絵文字や矢印文字を図記号として使わない。必要な記号はインライン SVG で描く
- 表は短い対応関係に使い、3 列までを基本とする
- 行見出しのセルには を付け、語中の折り返しを防ぐ
.mb-rowlabel - コード差分は を使い、変更理由を散文で説明してから必要な断片を示す
pre.mb-diff - ページ固有の は図の配置調整など最小限にとどめる
<style>
Check before creating. The component set is based on , and the formula copy function is based on .
design-system/component-samples.htmldesign-system/document.cssdesign-system/math-copy.jsBy default, place necessary files together with the deliverable and load them using the following relative paths. If a higher-level skill specifies a path for shared assets, prioritize that specification.
html
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Ubuntu+Sans:wght@400;500;700&family=Noto+Sans+JP:wght@400;500;700&family=Ubuntu+Mono:wght@400;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="./design-system/document.css">
<script src="./design-system/math-copy.js"></script>
<script async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/highlight.min.js"></script>
<script>document.addEventListener("DOMContentLoaded", () => hljs.highlightAll());</script>The main rules are as follows:
- Background color is . Components are based on white backgrounds, black borders, and rounded corners
#FAF9F6 - Use Ubuntu Sans and Noto Sans JP for natural language, and Ubuntu Mono for code, URLs, and dates
- Limit colored text to link blue and accent red
#2990DA#D63A2F - In principle, limit red emphasis to one occurrence per page
- Syntax highlighting and code diff colors are excluded from this restriction as functional colors that distinguish meaning
- Maintain balanced margins on all sides
- Use for citations, placing the original text and translation side by side vertically with the same font size and color
.mb-quote - Use only for listing parallel proper nouns or category names
.mb-chip - Do not use emojis or arrow characters as symbols. Draw necessary symbols using inline SVG
- Use tables for short correspondence relationships, with a maximum of 3 columns as a basic rule
- Add to row header cells to prevent line breaks within words
.mb-rowlabel - Use for code diffs, explain the reason for changes in prose before showing necessary fragments
pre.mb-diff - Keep page-specific to a minimum, such as for adjusting figure placement
<style>
構成とフォーマット
Structure and Format
説明対象に合わせて、並置、図解、タイムライン、要約、折りたたみを使い分ける。
一方向の単純な手順を、必要性なくフローチャートにしない。
基本構成は次の順とする。
- 用語リスト
- 背景
- 本論
- 具体例
- 補足・限界・関連事項
h1 とリード文の後に の目次を置き、各 h2 に対応する を付ける。
用語リストは 内の に置く。
専門用語は本文で使う前に 1〜2 文で定義する。
.mb-tocid.mb-wrapaside.mb-glossaryUse side-by-side comparison, illustrations, timelines, summaries, and collapsible sections appropriately according to the subject of the explanation.
Do not unnecessarily convert one-way simple procedures into flowcharts.
The basic structure is as follows in this order:
- Glossary
- Background
- Main argument
- Specific examples
- Supplements, limitations, and related matters
Place a table of contents after the h1 and lead paragraph, and assign corresponding attributes to each h2.
Place the glossary in within .
Define technical terms in 1-2 sentences before using them in the main text.
.mb-tocidaside.mb-glossary.mb-wrap図
Figures
- は、画像・SVGなどの視覚資料とキャプションを一つにまとめる外枠である。特定の図形や「矢印で結んだ箱」を意味しない
.mb-figure - は視覚資料の表示面、
.mb-figure-frameは図番号・説明・出所の表示領域として使うfigcaption - 原典に重要な図がある場合は、出所を明示して引用する
- 原典の図があるのに模倣図を作らない
- 自作図はインライン SVG とし、アスキーアートを使わない
- 黒一色の線画を基本とし、に載せる
.mb-figure-frame - ノード数が多い場合は縦方向を優先する
- 矢印が交差する構成を避ける
- 単なる直列手順は番号付きの説明として表現する
- is an outer frame that groups visual materials such as images and SVG with captions. It does not refer to specific shapes or "boxes connected by arrows"
.mb-figure - Use as the display area for visual materials, and
.mb-figure-frameas the display area for figure numbers, explanations, and sourcesfigcaption - If there is an important figure in the original source, cite it clearly with the source indicated
- Do not create imitation figures if the original source's figures are available
- Create custom figures as inline SVG; do not use ASCII art
- Use black line drawings as the base and place them in
.mb-figure-frame - Prioritize vertical orientation when there are a large number of nodes
- Avoid configurations where arrows cross
- Express simple sequential procedures as numbered explanations
コード
Code
- Highlight.js を必ず読み込み、言語に応じたシンタックスハイライトを適用する
- には
pre code、language-javascript、language-pythonなどの言語クラスを必ず付けるlanguage-html - ハイライトしないテキストには を付ける
language-plaintext - 独自の色付けでコードを装飾せず、の
document.css規則を使う.hljs-* - には
pre.mb-diff codeを付け、差分専用の色と行頭記号を使うnohighlight
- Always load Highlight.js and apply syntax highlighting according to the language
- Always add language classes such as ,
language-javascript,language-pythontolanguage-htmlpre code - Add to text that does not require highlighting
language-plaintext - Do not decorate code with custom coloring; use the rules in
.hljs-*document.css - Add to
nohighlightand use diff-specific colors and line prefix symbolspre.mb-diff code
数式
Formulas
- MathJax 3 を使う
- インライン数式は 、ディスプレイ数式は
$...$とする$$...$$ - ベクトルと行列は を使う
\boldsymbol{...} - スカラー、添字、集合名は装飾しない
- 名前付きの演算は 、標準 LaTeX コマンドはそのまま使う
\mathtt{...} - により、すべての数式から LaTeX 原文をコピーできるようにする
math-copy.js - ページ側で を再定義しない
window.MathJax - 未知のコマンドを別記法へ勝手に置換しない
- Use MathJax 3
- Use for inline formulas and
$...$for display formulas$$...$$ - Use for vectors and matrices
\boldsymbol{...} - Do not decorate scalars, subscripts, or set names
- Use for named operations, and use standard LaTeX commands as-is
\mathtt{...} - Enable copying of the original LaTeX text from all formulas using
math-copy.js - Do not redefine on the page side
window.MathJax - Do not arbitrarily replace unknown commands with alternative notations
印刷と PDF
Printing and PDF
印刷対応は の を使う。
PDF 化はユーザーから明示的に依頼された場合だけ を実行する。
document.css@media printrender-pdf.shUse in for print compatibility.
Execute only when explicitly requested by the user to convert to PDF.
@media printdocument.cssrender-pdf.sh