Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bibpaperのLATEXBuilderでの展開結果のタグ付け #838

Open
kmuto opened this issue Sep 28, 2017 · 4 comments
Open

bibpaperのLATEXBuilderでの展開結果のタグ付け #838

kmuto opened this issue Sep 28, 2017 · 4 comments

Comments

@kmuto
Copy link
Owner

kmuto commented Sep 28, 2017

今はちょっとシンプル&単なる段落なのでTeXで装飾のしようがない。見た目は同じでも、妥当なタグを付けておきたいところ。

def bibpaper_header(id, caption)
  puts "[#{@chapter.bibpaper(id).number}] #{compile_inline(caption)}"
  puts macro('label', bib_label(id))
end

def bibpaper_bibpaper(_id, _caption, lines)
  print split_paragraph(lines).join
  puts ''
end
@kmuto
Copy link
Owner Author

kmuto commented Sep 21, 2018

HTMLをTeXに寄せる

@kmuto
Copy link
Owner Author

kmuto commented Sep 24, 2018

というより、そもそも現状が適当すぎるのをなんとかしようというissueだった。
2なら現状保持、3系ではスタイルを変えるという前提で、箇条書きにしちゃおうかな。

@kmuto
Copy link
Owner Author

kmuto commented Sep 24, 2018

箇条書きやbibliography環境にするには、bibpaper群の始まり・終わりを宣言しないといけないのだけれども、現状の記法だとこれを判断できない、ということに気付きました…。

カスタムな文書ならembedでもなんとでもなるけど、汎用化するには困った。

@kmuto
Copy link
Owner Author

kmuto commented Sep 24, 2018

texファイルを再パースしてbegin/endを入れるということも実装してみていたのですが、節見出しで分断されるパターンも書籍ではよくあるなぁということで、やっぱりうまくいかなそうです。

抽象化だけしておこうかな…。あと、bibpaper_bibpaperのほうはsplit_paragraphしたあとはjoin("\n\n")にしないと段落にならないのではということに気付きました。

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

No branches or pull requests

1 participant