Skip to content

Conversation

@rogenobl
Copy link
Contributor

@rogenobl rogenobl commented Oct 30, 2024

処理の流れは基本的に従来と同じですが、AozoraEpub3のタイプ(テンプレートがオリジナルか電協準拠か)により選択されたデータセットを使う事で両対応しています。
#419 も参照

  • aozora.rb
    • 現状はタイプ判定の関係のみだが、将来的にAozoraEpub3とkindlegen関係をまとめたい
  • AozoraEpub3.:aozoraepub3_type. AozoraEpub3.:aozoraepub3_type_with_path
    • AozoraEpub3のタイプを判別して必要なデータセットをハッシュで返す
    • 現状はタイプ、名前、タイプを判定するためのファイル、CSSファイル、fontファイルからなる
  • 濁点フォン関係で切替えていたCSSファイルを一つに統合
  • 変更部分は pathname を使用した
    • AozoraEpub3.:aozoraepub3_type_with_pathの引数は pathname 前提

追加した AozoraEpub3 と直接的な変更の Command::Init, NovelConverter 以外で Helper.erb_copy を修正している

@kokotaro
Copy link

kokotaro commented Oct 31, 2024

正規版と改造版の判定は問題なく、後書きのスタイルも前と同じ表示になっていたのでいい感じです。

あとはCopilotが吐き出したコードなので問題ありそうですが、vertical_font.cssの末尾に以下を追加すると表紙も似た出力になっている感じです。一応タイトルを長いものにしてみましたが破綻して無さそうです。

body.p-titlepage {
  margin: 0;
  padding: 0;
  height: 98%;
  text-align: center;
  line-height: 1.5;
  font-family: 'Arial', 'Helvetica', sans-serif;
}

.book-title-main {
  padding: 20% 5% 0 5%;
  height: 50%;
  text-align: center;
}

.author {
  padding: 0 5%;
  height: 25%;
  text-align: center;
}

.book-title, .book-title-main p, .author p {
  text-align: center;
  line-height: 1.25;
  font-family: 'Arial', 'Helvetica', sans-serif;
}

.book-title-main p {
  font-size: 2em;
}

.author p {
  padding-top: 5%;
  font-size: 1.25em;
}

@rogenobl
Copy link
Contributor Author

rogenobl commented Nov 1, 2024

表紙設定は元々本家の下記でCSS直書きされていたのが電書協対応で抜け落ちた感じです。
https://github.com/hmdev/AozoraEpub3/blob/master/template/OPS/xhtml/title_horizontal.vm
改造版の方にissue上げてみます。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants