「子由數學小學堂」為國小數學的線上題庫網站,使用者可以透過選擇主題、版本、年級、單元來完成組卷並開始作答,使用者組卷的動作是透過自動化組卷系統來完成,可以自由組合各個單元來產生線上或紙本練習題。 本論文最主要目的為設計「子由數學小學堂」後端題源檔,包括:data檔、一般題型、圖片題型與圖樣 (icon) ,詳細介紹其命題過程與內容架構;此外,除了題源檔,所有從組卷到產生PDF檔的過程與題源檔所需要使用到的程式或檔案也會加以說明並優化,共分為aitest.py與wtex.py兩部分。 ;“Ziyou Mathematics Elementary School" is an online question bank website for elementary school mathematics. Users can complete the question set and start answering by selecting the theme, version, grade, and unit. Combine individual units to generate online or paper practice questions. The main purpose of this paper is to design the back-end topic file of "Ziyou Mathematics Elementary School", including: data files, general question types, picture question types and icons, and introduce the process and content structure of the question in detail. In addition to the topic, the file, all the programs or files needed to be used in the process from setting the question to generating the PDF file and the question file will also be explained and optimized. It is divided into two parts: aitest.py and wtex.py.