bit2r / bitPublish

Quarto extension for a template to publish a PDF book with LaTeX styling.
GNU General Public License v2.0
7 stars 2 forks source link

연습문제 해답 및 힌트 관련 사항 추가 #38

Open statkclee opened 1 year ago

statkclee commented 1 year ago

연습문제 예제는 정상작동합니다. 관련하여 연습문제 해답과 힌트 관련 사항도 예제 파일에 포함되면 좋겠다고 생각됩니다.

chap_intro_bitpublish.qmd 파일에서 연습문제에 대한 부분을 별도로 빼서 연습문제, 힌트, 해답 사례가 명기되면 저작자에게 도움이 되겠습니다.

choonghyunryu commented 1 year ago

@statkclee,

연습문제 해답은 고려하고 있었습니다. 사례를 구현하는 것이 까다로워 홀딩한 상태에서 멀티 아웃 포맷으로 작업의 우선순위가 이동해서 뒤로 밀렸습니다.

전자책이 아니라, 서책의 출판이 우선적으로 고려한다면, 멀티 아웃 포맷보다 PDF 저작을 위한 작업을 우선 순위로 올릴 필요가 있어 보입니다.

statkclee commented 1 year ago

@choonghyunryu 기본적인 사항은 현재 만들어진 것으로 충분한 것으로 보입니다. 다만, GPT Shell 출판을 위한 PDF 제작을 하다보니 여러 기능상 오류가 보입니다. 예를 들어 연습문제에 각 문항에 그림이 들어간다거나 코드 덩어리가 들어가는 경우 오류가 있습니다. 그리고 _extenstion.yml 파일에 draft 모드를 추가해서 컴파일해도 속도가 매우 느려... 저작에 속도가 빠르지 않습니다.

    pdf:
      documentclass: book
      classoption: draft

GPT Shell 출판을 위한 PDF 제작을 하면서 생기는 이슈들 계속 이슈에 공유토록 하겠습니다.

choonghyunryu commented 1 year ago

@statkclee,

PDF를 랜더링하는 로그를 보니, xelatex이 세번 컴파일되는 것 같더라구요.

속도 문제는 아쉬운대로 모든 chapter를 넣고 랜더링하지말고, 필요한(현재 저작중인) chapter만 넣고 컴파일 한 후, 마지막에 전체 chapter를 넣어 랜더링하는 것도 방법일 것 같습니다.

statkclee commented 1 year ago

@choonghyunryu 다음과 같이 작업하니 나름 속도가 빨라집니다.

  1. chapter만 컴파일한다.
  2. preview 모드에서 작업한다.
  3. draft 모드를 켜둔다.
  4. _extension.yml 에서 색인을 주석처리한다.
      # include-after-body:
      #   - text: |
      #       \printindex

작업 완료 후 전제를 원복시키고 다시 컴파일한다.

choonghyunryu commented 1 year ago

@statkclee

텍린이를 벗어나야 할 때인가요? 루아 필터도 영접하게될 것 같은 불길함이 엄습합니다.

statkclee commented 1 year ago

From ChatGPT ...

Pandocfilter and Luafilter are not the same, but both are related to Pandoc, a universal document converter.

Pandocfilter is a Python module for writing Pandoc filters. Pandoc filters are a way to transform or manipulate a Pandoc document. They are programs that read a JSON representation of the Pandoc abstract syntax tree (AST), transform it in some way, and output JSON. Filters can be written in any language, but this module makes it particularly easy to write them in Python.

Luafilter, on the other hand, is a reference to Lua filters in Pandoc. Starting with version 2.0, Pandoc has built-in support for Lua scripting. This means you can write filters in Lua that work directly with the Pandoc AST without needing to deal with JSON. Lua filters are usually simpler and more efficient than JSON-based filters.

image

So, while both Pandocfilter and Luafilter relate to manipulating the structure of documents processed by Pandoc, they utilize different languages (Python and Lua, respectively) and have some differences in their functionalities and ease of use.

choonghyunryu commented 1 year ago

@statkclee

version 0.2.6 버전에서 해당 기능을 구현했습니다. 사용 방법은 문서의 본문에 기술했으니 참고하세요.