LoginSignup
1
3

More than 5 years have passed since last update.

Pandoc のバージョンアップで表が壊れて焦った話

Last updated at Posted at 2018-02-06

背景

普段は Emacs の Org-mode を利用してドキュメントを作成している。

そして、Pandoc を利用して Markdown や ReStructuredText などに変換を行っている。

Markdown は Qiita の投稿に利用し、ReStructuredText は Sphinx のビルドに利用している。

あまり意識することはないが、Pandoc にはお世話になっている。

何気なく Ubuntu のシステムアップデートをしたら、Sphinx のビルドが失敗するようになった。

エラーメッセージを見ると Org-mode から変換した表が壊れているようだ。

何が原因を、どんな変更が行われたのを調査結果を記録する。

結論

時間のない人向けに結論を書いておくと、pandoc のオプションには以下のオプションを追加することで回避できる。

  • 「–columns=NUMBER」

最新の Pandoc

Pandoc の最新(2018/02 時点) は、以下である。

リファレンスを参照

–wrap=auto|none|preserve

Determine how text is wrapped in the output (the source code, not the rendered version). With auto (the default), pandoc will attempt to wrap lines to the column width specified by –columns (default 72). With none, pandoc will not wrap lines at all. With preserve, pandoc will attempt to preserve the wrapping from the source document (that is, where there are nonsemantic newlines in the source, there will be nonsemantic newlines in the output as well). Automatic wrapping does not currently work in HTML output.

–columns=NUMBER

Specify length of lines in characters. This affects text wrapping in the generated source code (see –wrap). It also affects calculation of column widths for plain text tables (see Tables below).

参考情報

1
3
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
1
3