Sphinx によって生成された HTML ドキュメントがいくつかあります。Sphinx は本文テキストを両端揃えしdiv
、幅 50em に設定します。もちろん、生成された CSS/HTML を編集することもできます。テキストには、ブラウザで表示したときに本文テキストの約 50% の幅である、事前にレンダリングされた画像の形式のインライン方程式が含まれています。両端揃えのテキストと幅広で壊れにくいインライン画像を組み合わせると、単語間に大きく醜いスペースができることがあります。
スペース ストレッチの量を減らしながら、正当化されたテキストを使用する方法はありますか? たとえば、スペース幅を最大値に制限し、スペースを引き伸ばした後に行が不足している場合、行を左に揃えることはできますか?
例で編集:
幅の広い画像の前に短いテキスト行があると、不適切な間隔が発生します。生成された HTML ソースの一部を次に示します。alt タグには数式の TeX ソースが含まれているため、これらの数式が 1 つの単語と比較してどれだけ大きいかがわかります。
<p>Suppose that we want to sort a list of pairs, using the pair's first member as the key.
Given the list
<img class="math" src="math001.png" alt="[\pair 13,\pair 19,\pair 36,\pair 24,\pair 38]"/>,
we want a list of pairs starting with 1, a list of pairs starting with 2, and so forth.
The sorted list would be
<img class="math" src="math002.png" alt="[\,[\pair 13,\pair 19], [\pair 24], [\pair 36,\pair 38],[]\,]"/>.
More text follows.</p>
最後の数式は幅が広すぎて行末に収まらないため、次の行に移動され、単語間の間隔が非常に狭くなります。
Suppose that we want to sort a list of pairs, using the pair's first member
as the key. Given the list [<1,3>, <1,9>, <2,4>, <3,6>, <3,8>], we want a
list of pairs starting with 1, a list of pairs starting with 2, and so
forth. The sorted list would be <-- This line!
[[<1,3>, <1,9>], [<2,4>], [<3,6>, <3,8>], []]. More text follows.
次のようなものを見たいと思います。私は他の提案を受け入れます。
Suppose that we want to sort a list of pairs, using the pair's first member
as the key. Given the list [<1,3>, <1,9>, <2,4>, <3,6>, <3,8>], we want a
list of pairs starting with 1, a list of pairs starting with 2, and so
forth. The sorted list would be
[[<1,3>, <1,9>], [<2,4>], [<3,6>, <3,8>], []]. More text follows.