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

texstyleパラメータでstyへのオプション値指定をできるようにする #1109

Closed
kmuto opened this issue Sep 18, 2018 · 1 comment

Comments

@kmuto
Copy link
Owner

kmuto commented Sep 18, 2018

今のtexstyleパラメータは文字列配列をとる(単一文字列でも一度配列化している)ようになっており、各要素がstyファイル名と見なされてそのまま\usepackageに展開される仕組み。

styファイルにはオプションを付けることができるが、現状の実装のままだと\usepackage{[bar]foo}のような誤り文になってしまう。

  • 案1 texstyle: ["[bar]foo", "foo2"] 見た目がキモい、[]の分離パースが必要
  • 案2 texstyle: [{name: "foo", option: "bar"}, {name: "foo2"}] Hashの記法を導入。でもこちらのほうが実装しやすく、記述も間違いづらいか
  • オプションは,区切りで複数の可能性あり

課題

  • 受けるsty側には明示的に対応するDeclareOptionが必要
  • sty内で子styに継承させるにはそのロジック記述も必要
  • reviewmacroに紙サイズとか指定できたらいいなと思ったけど(documentclassのオプション追加/書き換えは普通は荷が重いので)、reviewmacroがDeclareOptionでゴチャゴチャするのは嬉しくないかも
@kmuto
Copy link
Owner Author

kmuto commented Sep 21, 2018

継承で汚くなりそうなのと、オプションはreview-jsbook.clsで吸収するほうが妥当そうということでcloseします。

@kmuto kmuto closed this as completed Sep 21, 2018
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