typeset 0.1.0
縦書き・横書きの日本語組版ライブラリ(JLReq 水準、ラスタ / PDF / SVG)
読み取り中…
検索中…
一致する文字列を見つけられません
flow_layouter.hpp
[詳解]
1#ifndef TYPESET_PAGE_FLOW_LAYOUTER_HPP
2#define TYPESET_PAGE_FLOW_LAYOUTER_HPP
3
4#include <map>
5#include <string>
6#include <vector>
7
11#include "typeset/page/page.hpp"
12
24namespace typeset::page {
25
28 std::map<std::u16string, std::u16string> fields;
30 bool drawGuides = false;
32 bool balanceLastPage = true;
34 std::u16string headingNumberSeparator = u" ";
36 std::u16string figureFormat = u"図 {n}";
37 std::u16string tableFormat = u"表 {n}";
39 std::u16string equationFormat = u"({n})";
41 std::u16string footnoteMarkerFormat = u"{n}";
42 std::u16string footnoteLabelFormat = u"{n} ";
44 bool footnotePerPage = false;
47 float footnoteRuleLength = 0.3f;
52};
53
55public:
56 explicit FlowLayouter(font::FontSet& fonts) : fonts_(fonts) {}
57
58 std::vector<Page> layout(const block::Flow& flow, const PageSequence& seq,
59 const FlowLayoutOptions& opts = {});
60
61private:
62 font::FontSet& fonts_;
63};
64
65} // namespace typeset::page
66
67#endif // TYPESET_PAGE_FLOW_LAYOUTER_HPP
FlowLayouter(font::FontSet &fonts)
std::vector< Page > layout(const block::Flow &flow, const PageSequence &seq, const FlowLayoutOptions &opts={})
page/flow_layouter — Flow をページ列へ流し込む
float Pt
Definition geom.hpp:17
bool footnotePerPage
脚注の番号をページごとに 1 から振り直す(false なら文書を通して連番)
obj::ObjectRegistry * objects
外部オブジェクト(数式など)のハンドラ。null なら ObjectBlock / 行内オブジェクトは代替テキストになる
std::u16string headingNumberSeparator
見出し番号の後ろに付ける区切り
std::map< std::u16string, std::u16string > fields
{title} 等の置換フィールド({page} {pages} は自動。本文中の {ref:ラベル} {page:ラベル} {fig} {table} も置換する)
std::u16string figureFormat
図番号・表番号の書式({n} が番号)
std::u16string footnoteMarkerFormat
脚注: 本文中の記号と注の頭の書式({n} が番号。文書を通して連番)
bool drawGuides
版面・段の枠を薄く描く(デバッグ用)
bool balanceLastPage
最終ページ(段組)の段の高さを揃える
Pt footnoteGap
脚注: 本文との間(罫の上)、罫の長さ(行長に対する比)と太さ、罫と注の間
std::u16string equationFormat
式番号の書式