This work is based on Mat Lipson's template, which in turn is based on Tom Pollard's, updated with Seyoon Ko's snuthesis to be used for writing korean thesis with SNU requirements. Sujin Lee's guide was the inspiration for this work.
Write in simple text like this:
Type make pdf
or make html
or make docx
. End up with latex (or html, or docx) like this:
.html | .docx | |
---|---|---|
Bash 환경에서 make pdf
를 실행하여 PDF를 생성합니다.
다음의 파일들을 수정하여 사용합니다.
(단순히 파일명을 정하는 용도)
- STDNO = 학번
- FULLNAME = 이름
- fontfamilies = 한국어 글꼴 설정
- fontsize = 본문 글씨 크기
- geometry = 용지 레이아웃 (우리에게 익숙한 B시리즈 용지는 뒤에 j를 붙여야 합니다.)
- classoption
- [one|two]side = 단면/양면 (용지 여백 등 차이)
- open[any|right] = 장을 아무/홀수 쪽에서 시작
- 서울대 논문 양식에서 사용되는 메타데이터를 모아놓았습니다.
- Chocolatey (윈도 패키지 설치 도구) 설치 https://chocolatey.org/install
choco install pandoc
(Chocolatey를 이용해 pandoc 설치)choco install rsvg-convert python miktex
(pandoc에 필요한 패키지 설치)- 텍스트 에디터 설치 (VS code 추천:
choco install vscode
) choco install git make
(PDF 변환에 필요한 bash 및 make 설치)
- XeLaTeX만 지원합니다.
- 용지는 46배판 대신 JIS B5를 사용했습니다.
- 자유롭게 배포가능한 나눔글꼴을 기본으로 설정했습니다.
- 2번 이상 사용되는 것만 변수로 만들고 최대한 WYSIWYG으로 만들려 노력했습니다.
If you have used this template in your work, please cite the following publication:
Tom Pollard et al. (2016). Template for writing a PhD thesis in Markdown. Zenodo. http://dx.doi.org/10.5281/zenodo.58490
Markdown is a super-friendly plain text format that can be easily converted to a bunch of other formats like PDF, Word and LaTeX. You'll enjoy working in Markdown because:
- it is a clean, plain-text format...
- ...but you can use LaTeX when you need it (for example, in laying out mathematical formula).
- it doesn't suffer from the freezes and crashes that some of us experience when working with large, image-heavy Word documents.
- it automatically handles the table of contents, bibliography etc with Pandoc.
- comments, drafts of text, etc can be added to the document by wrapping them in <!-- -->
- it works well with Git, so keeping backups is straightforward. Just commit the changes and then push them to your repository.
- there is no lock-in. If you decide that Markdown isn't for you, then just output to Word, or whatever, and continue working in the new format.
There are some minor annoyances:
- if you haven't worked with Markdown before then you'll find yourself referring to the style-guide fairly often at first.
- it isn't possible to add a short caption to tables
and figures(figures are now fixed, thanks to @martisak). This means that /listoftables includes the long-caption, which probably isn't what you want. If you want to include the list of tables, then you'll need to write it manually. - the style documents in this framework could be improved. The PDF and HTML (thanks @ArcoMul) outputs are acceptable, but
HTML andWord needs work if you plan to output to this format. there is no straightforward way of specifying image size in the markdown right now, though this functionality is coming (see: tompollard/phd_thesis_markdown#15)(Image size can now be specified. Thanks to @rudolfbyker for highlighting this).- ... if there are more, please add them here.
- README.md => these instructions.
- License.md => terms of reuse (MIT license).
- Makefile => contains instructions for using Pandoc to produce the final thesis.
- output/ => directory to hold the final version.
- source/ => directory to hold the thesis content. Includes the references.bib file.
- source/figures/ => directory to hold the figures.
- style/ => directory to hold the style documents.
-
Install the following software:
- A text editor, like Sublime, which is what you'll use write the thesis.
- A LaTeX distribution (for example, MacTeX for Mac users).
- Pandoc, for converting the Markdown to the output format of your choice. You may also need to install Pandoc cite-proc to create the bibliography.
- Install @martisak's shortcaption module for Pandoc, with
pip install pandoc-shortcaption
- Git, for version control.
-
Fork the repository on Github
-
Clone the repository onto your local computer (or download the Zip file).
-
Navigate to the directory that contains the Makefile and type "make pdf" (or "make html") at the command line to update the PDF (or HTML) in the output directory.
In case of an error (e.g.make: *** [pdf] Error 43
) run the following commands:sudo tlmgr install truncate sudo tlmgr install tocloft sudo tlmgr install wallpaper sudo tlmgr install morefloats sudo tlmgr install sectsty sudo tlmgr install siunitx sudo tlmgr install threeparttable sudo tlmgr update l3packages sudo tlmgr update l3kernel sudo tlmgr update l3experimental
-
Edit the files in the 'source' directory, then goto step 4.
Some useful points, in a random order:
- each chapter must finish with at least one blank line, otherwise the header of the following chapter may not be picked up.
- add two spaces at the end of a line to force a line break.
- the template uses John Macfarlane's Pandoc to generate the output documents. Refer to this page for Markdown formatting guidelines.
- PDFs are generated using the LaTeX templates in the style directory. Fonts etc can be changed in the TeX templates.
- To change the citation style, just overwrite ref_format.csl with the new style. Style files can be obtained from citationstyles.org/
- For fellow web developers, there is a Grunt task file (Gruntfile.js) which can be used to 'watch' the markdown files. By running
$ npm install
and then$ npm run watch
the PDF and HTML export is done automatically when saving a Markdown file. - You can automatically reload the HTML page on your browser using LiveReload with the command
$ npm run livereload
. The HTML page will automatically reload when saving a Markdown file after the export is done.
Contributions to the template are encouraged! There are lots of things that could be improved, like:
- finding a way to add short captions for the tables, so that the lists of tables can be automatically generated.
- cleaning up the LaTeX templates, which are messy at the moment.
- improving the style of Word and TeX outputs.
Please fork and edit the project, then send a pull request.