hmemcpy / milewski-ctfp-pdf

Bartosz Milewski's 'Category Theory for Programmers' unofficial PDF and LaTeX source
https://bartoszmilewski.com/2014/10/28/category-theory-for-programmers-the-preface/
Other
10.88k stars 578 forks source link

Merging trhelper.py #199

Closed stet-stet closed 5 years ago

stet-stet commented 5 years ago

src(preamble 있는 쪽)에 trhelper.py 라는 파일을 만들어놨습니다. 해당 경로에서 python trhelper.py 하시면 됩니다.

기능은 3개를 넣어놨는데 1: 현재 preamble에 있는 용어를 특정 챕터에 적용 2: 특정 챕터에 있는 용어 중, preamble에 없는 것을 전부 프린트하기. 3: 특정 챕터의 텍스트에 자동 조사 붙이기 이렇게이구요, 1.3에만 테스트해봤는데 잘 돌아갑니다.

다만 지금 상태에선 기능 1은 좀 조심해서 써야 합니다. 일부 단어(eg. categories)의 경우 복수형이 단수형이랑 조금 다르게 생겨서(y -> ies), categories가 \trCategory로 치환되지 않는 등의 문제가 생깁니다.

이 문제를 해결(?)할 방법으로는 3가지가 떠오릅니다.

  1. 영어 문법책에서, 우리가 쓸 만한 복수형 변환 법칙을 전부 찾아서, 코드가 단어 원형만 가지고 모든 것을 알아서 하게끔 하는 것 (이게 되....나요?)
  2. preamble에 \newcommand{\trAAA}{} % aaa, bbb, ccc같이 쓰면, 우리가 고른 텍스트에 있는 aaa, bbb, ccc가 모두 \trAAA로 대체되게끔 코드를 짜는 것 (프리앰블 쓰기 엄청나게 귀찮을 것 같아요)
  3. 일단 그냥 냅두고 정 불편하면 나중에 다시 고치는 것 그런데 1, 2는 구현법이 지금은 잘 생각이 안 납니다.

그래서 일단 머지시켜두고, 이 브랜치는 유지하면서 조금조금씩 필요한 기능을 더해가면 어떨까 합니다.

어떻게 보시는지 궁금합니다. 일단 1이나 2를 구현하고 다시 오는 게 나을까요?

stet-stet commented 5 years ago

I am sorry, I was drowsy and made an unfortunate mistake while working on a PR intended for a fork of this repo. Please never mind this PR. Thanks.

hmemcpy commented 5 years ago

All good :) Are you translating it to Korean, by chance?

stet-stet commented 5 years ago

Thank you for understanding! And yes, we are working on the translation at our own pace. The book looked interesting, then we thought that if we started translating, we might be able to study this book (and English) in an in-depth manner.

hmemcpy commented 5 years ago

Good luck! :)

stet-stet commented 5 years ago

Thank you :)