Skip to content

MD Viewer Pro v1.4.2

Latest

Choose a tag to compare

@oriyu90 oriyu90 released this 03 Aug 17:27

macOS 向け Markdown ビューア & エディタ MD Viewer Pro の v1.4.2 です。
書き心地まわりの不具合をまとめて直し、あわせて LaTeX の体裁コマンド(\newpage 等)に対応しました。

インストール: MDViewerPro-1.4.2-Installer.dmg をダウンロードし、MDViewerPro.app を Applications フォルダへドラッグしてください。
未署名のため初回は右クリック →「開く」→ もう一度「開く」で起動します。


日本語

新機能

  • LaTeX の体裁コマンド(\newpage 等)に対応: \newpage のように文書の体裁を
    指示するコマンドを、文字列として表示するのをやめ、指示として解釈して表示に
    反映するようにしました。
    • 改ページ (\newpage / \pagebreak / \clearpage / \cleardoublepage):
      PDF 書き出しでは実際にそこでページが分かれます(A4文書 / B5文書 / フリーの
      いずれでも)。A4文書 / B5文書の表示では次のページの先頭まで送られ、
      ページ区切り線が入ります。フリー表示ではページの概念がないため何も表示しません。
    • 縦の空き (\vspace{1cm} / \bigskip / \medskip / \smallskip):
      指定された分の空きを入れます。
    • 改行・段落 (\newline / \linebreak / \par): 指示どおりに改行します。
    • 体裁のみのコマンド (\noindent / \centering / \raggedright 等):
      表示には反映できないため、隠すだけにします。
    • MD編集モードでは、場所が分かるように破線とコマンド名を薄く表示します
      (削除・移動できます)。開いて保存しても元の記述はそのまま残ります。
    • コードブロック / インラインコード / 数式の中のコマンドは対象外です。説明として
      `\newpage` と書いたものが消えることはありません。対応していない
      コマンドも消さずにそのまま表示します。

修正

  • 改行が無視される問題: 文章を書いて改行しても、閲覧モードでは前の行に
    つながって表示されていました。空行を入れないと改行できない状態で、v1.4.1 で
    編集して保存した文書を開き直すと、書いたはずの改行が消えてしまっていました。
    Enter で入れた改行をそのまま改行として表示するようにしました。
    行の途中の折り返しではなく、書いた行のとおりに表示されます。
    コードブロック・表の中は今までどおりで、変わりません。
    素の Markdown の挙動が必要な場合は、詳細設定の「改行の扱い」でオフに
    できます(既定はオン)。
  • HTML / PDF に書き出すと改行が消える問題: 上と同じ原因です。書き出しは
    閲覧モードと同じ描画を使っているため、こちらも一緒に直っています。
    画面で見えているとおりに書き出されます。
  • 見出しで改行すると次の行も見出しになる問題(MD編集): H1 / H2 / H3 に
    した行で Enter を押すと、続きの行まで見出しの書式のままになり、本文に
    戻せなくなることがありました。見出しの行で改行したときは、新しくできる行を
    必ず本文にするようにしました。行末・行の途中・行頭のどこで改行しても同じです。
    中身が空の見出しで Enter を押した場合は、その行自体が本文に戻ります。
  • 見出しにした直後に「本文」を押しても戻らない問題: 何も入力していない行を
    H1 / H2 / H3 にしてから、そのまま「本文」を押しても書式が戻りませんでした。
    • MD編集: 空の見出しや、ツールバーを押してカーソルの選択が外れた状態でも
      確実に本文へ戻るようにしました。
    • TXT編集: 見出しボタンが行頭の記号を「足すだけ」だったため、H1 のあと H2 を
      押すと ## # 本文 のように記号が積み重なり、「本文」を押しても 1 段しか
      外れませんでした。見出し・引用・箇条書き・番号付きのボタンは、いま付いている
      書式を「置き換える」ようにし、「本文」はすべての記号を一度に外すようにしました。
      同じ書式のボタンをもう一度押すと本文に戻ります。
      過去のバージョンで記号が積み重なってしまった行も、「本文」を一度押せば戻ります。
  • MD編集で Enter を押して入れた空行が、保存すると消える問題: 段落と段落の間を
    もう少し空けようと Enter を押しても、保存して開き直すと元に戻っていました。
    空行は Markdown の仕様上そのままでは表現できない(連続した空行は無視される)ため、
    空行を表す <br> の行として保存するようにしました。開き直しても同じ空行が残り、
    編集と保存を繰り返しても増えたり減ったりしません。
    ※ このためファイルの中に <br> という行が入ります。
  • MD編集で入力した直後に保存すると、その編集が保存されない問題: MD編集モードの
    内容は、入力が途切れてから少し遅れて内部に取り込まれる作りになっていました。
    そのため、文字を打ってすぐに保存すると直前の編集がファイルに入らず、
    Enter で入れた改行ごと消えてしまい、開き直すと改行されていない状態に
    なっていました。保存・PDF / HTML 書き出しの直前に必ず取り込むようにしました。
    あわせて、入力した直後にウィンドウを閉じると「変更あり」と判定されず、
    確認も出ないまま編集が捨てられていた問題も直しました。
  • 改行の扱いを詳細設定で切り替えられるようにしました: 詳細設定に「改行の扱い」を
    追加しました。既定はオン(書いたとおりに改行する)で、オフにすると素の Markdown
    仕様どおりの表示に戻せます。設定は次回起動時にも引き継がれます。

あわせて直したもの

  • MD編集で開くと引用が本文になってしまう問題: 引用を含む文書を MD編集モードで
    開いて保存すると、2 行目以降の > が失われて引用が崩れていました。
  • MD編集で開くたびに箇条書きの行間が広がる問題: 項目の間に空行が入り、
    編集を繰り返すうちに箇条書きが崩れていました。入れ子の箇条書きの階層も
    保たれるようにしました。
  • TXT編集で、折り返した長い行の途中に書式記号が入る問題: 画面の折り返し位置を
    行頭と見なしていたため、長い行では # が行の途中に入ってしまうことがありました。

English

New features

  • LaTeX layout commands such as \newpage: commands that describe document
    layout are no longer printed as literal text — they are interpreted and applied
    to the rendering.
    • Page breaks (\newpage / \pagebreak / \clearpage /
      \cleardoublepage): PDF export produces a real page break (in A4 Document,
      B5 Document and Free alike). In A4 / B5 Document view the content is pushed to
      the top of the next page and a page separator is drawn. Free view shows
      nothing, since it has no pages.
    • Vertical space (\vspace{1cm} / \bigskip / \medskip /
      \smallskip): inserts the requested amount of space.
    • Line and paragraph breaks (\newline / \linebreak / \par): break
      as instructed.
    • Layout-only commands (\noindent / \centering / \raggedright, …):
      cannot be reflected in the rendering, so they are simply hidden.
    • MD Edit shows a faint dashed marker with the command name so you can find,
      move or delete it. Opening and saving keeps the original text intact.
    • Commands inside code blocks, code spans and math are left alone, so writing
      `\newpage` as an example never disappears. Unsupported commands are
      still shown verbatim.

Fixes

  • Line breaks were ignored: pressing Enter did not produce a line break in
    View mode — the next line was joined onto the previous one, and a blank line was
    the only way to break text. Documents written and saved with v1.4.1 lost their
    line breaks when reopened. Line breaks you type are now rendered as line breaks.
    Code blocks and tables are unaffected. If you need standard Markdown behaviour,
    turn it off under Settings → Line Breaks (on by default).
  • HTML / PDF export dropped line breaks: same root cause — export uses the same
    rendering as View mode, so it is fixed as well. Exports now match what you see.
  • Pressing Enter in a heading kept the heading format (MD Edit): after making a
    line H1 / H2 / H3, the following line stayed a heading and could not be turned
    back into body text. A line created by pressing Enter inside a heading is now
    always body text, whether the caret is at the end, in the middle, or at the start.
    Pressing Enter in an empty heading turns that line back into body text.
  • The Body button did nothing right after applying a heading: applying H1 / H2 /
    H3 to a line and pressing Body without typing anything left the format in place.
    • MD Edit: now works reliably for empty headings and when the selection has been
      lost because focus moved to the toolbar.
    • TXT Edit: heading buttons only ever prepended their marker, so H1 followed by
      H2 produced ## # text and Body stripped just one level. Heading, quote, list
      and numbered-list buttons now replace the current block format, and Body
      removes every marker at once. Pressing the same format button again returns the
      line to body text. Lines that accumulated markers in earlier versions are fixed
      by a single press of Body.
  • Blank lines added with Enter in MD Edit disappeared on save: pressing Enter to
    put more space between paragraphs had no effect once the file was saved and
    reopened. A blank line cannot be expressed in plain Markdown (consecutive blank
    lines are ignored), so it is now written as a <br> line. The blank line survives
    reopening and does not grow or shrink across repeated edits. Note that this puts a
    literal <br> line into the file.
  • Edits made just before saving were lost in MD Edit: MD Edit content was only
    picked up a moment after you stopped typing. Saving right after typing therefore
    wrote the file without your most recent edits — including the line breaks you
    had just entered
    — so reopening the file showed no break. The content is now
    captured synchronously before saving and before PDF / HTML export. Closing the
    window right after typing also failed to register as "modified" and discarded
    the edits without asking; that is fixed too.
  • A setting to choose how line breaks are handled: Settings now has a
    "Line Breaks" section. It is on by default (render what you typed); turning it
    off restores standard Markdown rendering. The choice is remembered.

Also fixed

  • Blockquotes were flattened into body text when a document was opened in MD Edit
    and saved: the > marker was lost from every line after the first.
  • Bulleted lists grew looser on every MD Edit round trip, eventually breaking
    apart. Nested list levels are now preserved too.
  • TXT Edit inserted format markers mid-line on long wrapped lines, because the
    visual wrap position was treated as the start of the line.


改行の扱いについて / A note on line breaks

素の Markdown では単一の改行は無視されますが、本アプリは v1.4.2 から
Enter で入れた改行をそのまま改行として表示します(Obsidian や Typora と同じ考え方)。
空行を入れたときの段落区切りは今までどおりです。
従来どおりの表示に戻したい場合は、詳細設定 →「改行の扱い」 でオフにできます。

Plain Markdown ignores a single newline. From v1.4.2 this app renders it as a line
break instead, following the same convention as editors such as Obsidian and Typora.
Blank lines still separate paragraphs as before. You can restore the old behaviour
under Settings → Line Breaks.