Git Product home page Git Product logo

thuthesis's Introduction

Actions Status GitHub downloads GitHub commits GitHub release CTAN

ThuThesis

Scroll down for the English version of README.

ThuThesisTsinghua University Thesis LaTeX Template 的缩写。

此宏包旨在建立一个简单易用的清华大学学位论文 LaTeX 模板,包括本科综合论文训练、硕士论文、博士论文以及博士后出站报告。

由于模板升级频繁,在开始使用和提问前,请确保您已经认真完整地阅读了使用说明文档和示例代码。

任何违反 LaTeX项目公共许可证 v1.3c 使用 ThuThesis 的行为将被记录在 耻辱柱 页面中,以示警告。

下载

推荐下载发布版模板,里面包括具体使用说明以及示例文档:

  • 模板使用说明(thuthesis.pdf
  • 示例文档(thuthesis-example.pdf

在开始书写前,建议将 thuthesis-example.tex 复制或重命名为其他有意义的名称。

下载途径

注意事项

  • GitHub 仓库的开发版仅供开发者与需要尚未发布的功能的有经验的 TeX 用户使用,不提供任何保证。
  • 任何在其他途径分发的 ThuThesis(包含其变体或衍生物)均不是官方版本,请谨慎使用。

更新日志

每个版本的详细更新日志,请见 CHANGELOG.md。使用文档中也包含了这一内容。

升级

自动更新

通过 TeX 发行版工具(如 tlmgr)自动从 CTAN 更新。

手动更新

发布版

下载发布版的的 zip 包,使用其中的 thuthesis.cls 等文件覆盖原有的即可,无须额外操作。

开发版

有两种获得开发版编译结果的方式:

  1. 从 GitHub 上对应 commit 的名为 Test 的 workflow 中下载 thuthesis-snapshot-release 并解压,其中的 dist 文件夹包含了编译后的开发版代码。
  2. 从 GitHub clone 项目源码或者下载源码 zip 包,执行 xetex thuthesis.ins

提问

按推荐顺序排序:

  • 先到 FAQ 看看常见问题;
  • GitHub Discussions 搜索已有讨论,如果没有则提出新问题;
  • 如果认为模板存在问题,可在 Issues 中使用相应的模板提出。

Makefile的用法

make [{thesis|doc|clean|cleanall|distclean}]

目标

  • make thesis 生成论文 thuthesis-example.pdf
  • make doc 生成模板使用说明书 thuthesis.pdf
  • make clean 删除示例文件的中间文件(不含 thuthesis-example.pdf);
  • make cleanall 删除示例文件的中间文件和 thuthesis-example.pdf
  • make distclean 删除示例文件和模板的所有中间文件和 PDF。

ThuThesis

ThuThesis is an abbreviation of Tsinghua University Thesis LaTeX Template.

This package establishes a simple and easy-to-use LaTeX template for Tsinghua dissertations, including general undergraduate research papers, masters theses, doctoral dissertations, and postdoctoral reports. An English translation of this README follows the Chinese below.

This template is subject to frequent changes. Please make sure you have read the usage documentation and example code completely and carefully before using and asking questions.

Any use of ThuThesis in violation of The LaTeX project public license v1.3c will be recorded in the Hall of Shame.

Downloads

Published versions are recommended. Specific usage documentation and examples can be found in the archive. At present, these documents are only available in Chinese:

  • Template usage documentation (thuthesis.pdf)
  • Template example (thuthesis-example.pdf)

Before you start writing, it is recommended to copy or rename thuthesis-example.tex to another meaningful name.

Download Methods

Notes

  • The development version in the GitHub repository is intended for developers and experienced TeX users who require unreleased features, and no guarantees are provided.
  • ThuThesis (including its variants / derivatives) distributed in any other way is NOT an official version. Use at your own risk.

Changelog

See CHANGELOG.md for detailed changes in each release. They are also included in the usage documentation.

Updates

Automatic

Get the most up-to-date published version with your TeX distribution from CTAN.

Manual

Published versions

Download the published zip files, extract thuthesis.cls and other files (if needed) and override the existing ones in your thesis.

Development versions

There are two ways to obtain the compiled development version:

  1. Download the thuthesis-snapshot-release from the Test workflow of the corresponding commit on GitHub and extract it. The dist folder contains the compiled template of development version.
  2. Clone the project source code from GitHub or download the source code tarball, and run xetex thuthesis.ins.

Reporting Issues

Please follow the procedure below:

  • Check the FAQ.
  • Search GitHub Discussions and create if not existed.
  • Create an issue (with specified template) if you believe there is a bug.

Makefile Usage

make [{all|thesis|doc|clean|cleanall|distclean}]

Targets

  • make thesis generate thesis thuthesis-example.pdf;
  • make doc generate template documentation thuthesis.pdf;
  • make clean delete all examples' files (excluding thuthesis-example.pdf);
  • make cleanall delete all examples' files and thuthesis-example.pdf;
  • make distclean delete all examples' and templates' files and PDFs.

thuthesis's People

Contributors

3tothe6 avatar abuccts avatar ahyangyi avatar alick avatar bigeagle avatar cageyz avatar dwt136 avatar edyfox avatar emiapwil avatar fengzee avatar frankpzh avatar harry-chen avatar heheda12345 avatar jjyyxx avatar liuml07 avatar lockmatrix avatar mattandryc avatar namasikanam avatar nero19960329 avatar pingplug avatar sun-rongyang avatar toubun avatar wogong avatar xavieryao avatar xinhangzhou avatar xueruini avatar yge avatar yuruihong avatar zepinglee avatar zhaofeng-shu33 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

thuthesis's Issues

在文档中加入日期或版本信息

话说现在thuthesis需要一种能把日期或版本嵌入到pdf
但又会出现打印后的纸版上(正式版本后就不能在页面上加水印了,但来回增删水印容易出问题)
而且还方便查看的方法(查看PDF内嵌的属性略麻烦)

暂时的想法是把这个信息作为一个书签放在pdf中
大家对此有啥看法?

授权页段落缩进与页面边距问题

原始bug报告链接:http://www.newsmth.net/nForum/article/TeX/316652?s=316653

问题:“关于学位论文使用授权的说明”没有空两格,只空了一个半,并且每一行
的字数也比学校的少了一个。

BUG:\parindent 全局只设过一次,对应正文字号的两个字符,
但硕士/博士授权这里字号不一样。
至于每行少了一个字,那是因为学校的word页面左右边距是3.2cm,
不同于正文的 3cm,而这个数值指南里未曾提及。
thuthesis 里没有对该页特殊处理。

章与节间的间距有问题

当在章标题下面没有文字直接开始本章第一节的时候,会出现间距变大的问题,如您给出的示例的第二章。

xetex编译时数学模式字体中混有Computer Modern

为了解决中英文间的自动空格,从 pdflatex 尝试切换到了 xelatex, 然后就出现了一堆问题……xelatex 编译出来的 pdf 里面很多数学模式字体都是 Computer Modern 而不是 Times New Roman, 包括但不限于以下位置:

  • 数学模式上下标中的数字、运算符与大写希腊字母
  • \si (siunitx)中的$
  • pgfplots 图中的 tick label (可以通过设置 /pgf/number format/assume math mode 绕开数学模式检查)

用 Acrobat 查看 pdf 中的字体就能发现以上位置的字体全都是 CMR, 而用 pdflatex 编译时就都是 Nimbus Roman No9 L.

MWE:

% !TeX program = xelatex
\documentclass[doctor]{thuthesis}
\usepackage{siunitx}
\begin{document}
\begin{equation}
c_1^2 = a_1^2 + b_1^2
\end{equation}
$\Delta f (\xi), \Omega (\ell)$, \si{\$/MW}
\end{document}

Msmake无法生成文档

J:\Library\xueruini-thuthesis-93579b9\latex>msmake setup
正在生成thuthesis宏包...
成功生成thuthesis宏包
正在生成thuthesis宏包的说明文档...
J:\Library\xueruini-thuthesis-93579b9\latex\thuthesis.dtx:54: Undefined control
sequence
J:\Library\xueruini-thuthesis-93579b9\latex\thuthesis.dtx:54: Undefined control
sequence
J:\Library\xueruini-thuthesis-93579b9\latex\thuthesis.aux:3: 无法生成说明文档thu
thesis.pdf

应使用 geometry 包重构有关页面尺寸的代码

目前这部分代码很乱不说,对纸张大小的设置是直接用 \special 命令完成的:

\AtBeginDvi{\special{papersize=\the\paperwidth,\the\paperheight}}
\AtBeginDvi{\special{!%
      \@percentchar\@percentchar BeginPaperSize: a4
      ^^Ja4^^J\@percentchar\@percentchar EndPaperSize}}

而把几个输出后端的代码挤在一起,又不顾场合的用法,会造成混乱和错误。

例如这里报告的关于 tikz external 库出错的问题。

geometry 包能有效简化代码并处理这类问题。

Debian Squeeze 下用源中的 texlive 出错

这里是部分出错的信息

(/usr/share/texmf-texlive/tex/latex/oberdiek/refcount.sty)) (./main.out)
(./main.out)

Package hyperref Warning: Rerun to get /PageLabels entry.

(/usr/share/texmf/tex/latex/CJK/UTF8/UTF8.bdg)
(/usr/share/texmf/tex/latex/CJK/UTF8/UTF8.enc)
(/usr/share/texmf/tex/latex/CJK/UTF8/UTF8.chr)
! Undefined control sequence.
try@size@range ...extract@rangefontinfo font@info 
                                                  <-*>@nil <@nnil 
l.20 \begin{document}

? 
! Emergency stop.
try@size@range ...extract@rangefontinfo font@info 
                                                  <-*>@nil <@nnil 
l.20 \begin{document}

No pages of output.
Transcript written on main.log.

我运行的命令是 latex main.tex, 之前报错缺少的 .sty 都已经加进去了.

有什么办法可以解决吗?

Mac下实现的问题

在搜索了众多的网上的问题之后,不得不求助于您。

我是用的是最新的MacTeX 2013,所需要的四个Adobe字体也已经安装OK。
从Github上下载了最新的模板,但是仍然出现了Italicfont的错误= =
真的不知道该怎么做了= =

! xeCJK error: "key-unknown"!! Sorry, but xeCJK/options does not have a key called ItalicFont'.!! The keyItalicFont' is being ignored.!! See the xeCJK documentation for further information.!! Type to continue.!............................................... \ProcessKeysOptions { xeCJK / options }

关于Makefile的doc target

这个make doc这个target,到底是不是给用户使用的呢?

如果是的话,用xelatex的用户就没法build了,应该想办法让这部分人也能编译上。(比如我到现在还没成功编译出thuthesis.pdf 呢,因为我没有latex-cjk 需要的字体...)

如果不是的话,就不应该作为默认target。应该比如all: main.pdf shuji.pdf,把doc排除在all之外。
另外还应该想个办法提供manual的pdf...(比如我现在看manual还都是眼看dtx ... - -b)

禁止脚注被分页

使用中发现footnote会被分页,可以在某处添加
{{{
\interfootnotelinepenalty=10000
}}}
来禁止

CTeX 2.8测试情况

  1. hypernat需要手动安装
  2. thuthesis.pdf编译出错:
! Undefined control sequence.
\@enddocumenthook ...up }\AtVeryEnd@RedefCheckEnd                                                 
l.55 \end{document}

英文之前的空格被消除了

最新的版本把英文之前的空格清除了,之前用空格来给英文和中文加间距,现在只有一边有空格,不对称了。这是新的feature?

我实在windows下用的CTex,latex和pdflatex出来的结果都是如此

硕士论文的英文封面

\documentclass[master,nofonts]{thuthesis}配置完之后硕士论文的封面还是中文标题加英文翻译,没有专门的英文页面,但是thuthesis.dtx的注释里说% 研究生论文需要增加英文封面,但似乎没有生效?如何解决这个问题呢?谢谢~

更新xeCJK 至version 3.2.9 会出错

由于需要把程序代码放在目录中,所以用了\usepackage{listings},同时希望程序中的中文注释也能显示颜色,但是如果是xeCJK v3.2.0的话,注释中的中文是黑色的。

这是xeCJK的一个bug,在最新版version 3.2.9中已经修复。但是如果用3.2.9的话,thuthesis将不能编译通过。最后经过尝试,我发现用xeCJK 3.2.3可以修复中文注释的颜色问题,并且也能正确编译。

thuthesis的代码与xeCJK v3.2.9的兼容问题,能否跟进看看?

补充一下:我用的是thuthesis v4.8dev + xelatex + win 7, 博士论文

About makefile

I'm cleaning the Makefile, and I see something strange.
I see this sentence in the Makefile:

elifeq ($(METHOD),ps2pdf)

But it seems to be invalid. I can only find this in manual of GNU make:

 CONDITIONAL-DIRECTIVE
 TEXT-IF-ONE-IS-TRUE
 else CONDITIONAL-DIRECTIVE
 TEXT-IF-TRUE
 else
 TEXT-IF-FALSE
 endif

Is it a problem or not?

黑体和仿宋字体与word模板对比有差别

我用的是v4.8dev + xelatex + Textlive在Win 7下编译的,字体选项用的是默认的winfont,编译出来与学校的word对比发现,博士封面的仿宋字体以及各个章节标题的黑体字体都与word模板不太一样,主要表现为latex的比较淡,如下面两幅图对比。

还有一个明显的问题,从这幅图也可以看出,字的间距也和word的不一致,不知道格式审查能不能过。。。

这是学校word模板的:

word

这是xelatex生成的:
latex

更好的中文字体配置

在 LaTeX 里,中文字体配置始终是一个纠结的问题。XeTeX 提供了方便的使用系统
字体的机制,但中文字体

即使这样,我们还是希望能给出不错的默认配置,以满足几类用户的需求:

  1. 普通用户,不关心字体配置。目前默认用 Adobe 的四种字体。只要安装了它们,论文是可以正常用 xelatex 编译的。
  2. 需要自定义字体,不想折腾 fc-list 等。最好提供个脚本,自动/半自动地生成字体配置文件。
  3. 需要自定义字体,不介意折腾 fc-list。这个还是自己手写字体配置文件吧。

附录部分依赖 include 命令才能换页

如果没有把 appendix 独立到外部文件,则 act 和 appendix 会连在一起。
当然这是个小问题,不过还是 report 一下比较好。

(环境:Arch Linux + Texlive 2012)

参考文献查重

用xelatex编译的最新模板,查重的时候参考格式出现问题。请问之前用thuthesis模板是怎么解决参考文献查重这个问题的啊?

声明页和授权页替换成扫描的图片

本科生论文最终提交的电子版要求声明页和授权页有签字。这产生了把声明页和授权页整替换成扫描的图片的需求。

我看到context/t-thuthesis里有授权页的定义, 但是不清楚这里如何影响到latex/下面内容的生成。求教:)

如何插入源代码呢?

请问如何在thuthethis里面插入程序的源代码?

要可以引用写caption,还要能ref。

直接用verbatim的话不能达到效果

请教一下:[email protected] 编译出错的问题

(C:\CTEX\UserData\tex\latex\caption\caption3.sty))

Package subfig Warning: Configuration file subfig.cfg not found on input line 2
97.

) (C:\CTEX\MiKTeX\tex\latex\tools\indentfirst.sty)

starting package maintenance...
installation directory: C:\CTEX\UserData
package repository: http://ftp.ctex.org/mirrors/CTAN/systems/win32/miktex/tm/pac
kages/
lightweight database digest: 19f6b5fd155e33636230d4c0fd673025
going to download 26260 bytes
going to install 6 file(s) (1 package(s))
downloading http://ftp.ctex.org/mirrors/CTAN/systems/win32/miktex/tm/packages/pa
ralist.cab...

pdflatex: Error response from server: 404

! LaTeX Error: File `paralist.sty' not found.

Type X to quit or to proceed,
or enter new name. (Default extension: sty)

Enter file name:

上面是出错的地方,找不到文件怎么办?
我对LATEX的配置不是很懂,从CTAN上下paralist,按照说明用paralist.ins生成了paralist.sty,然后把paralist文件夹放在 CTEX\MiKTeX\tex\latex 下了,可编译后还是提示paralist.sty找不到。

求教一下应该怎么解决?

设置pdf文档属性的宏的使用

发现模板中定义了一个宏 \thu@setup@pdfinfo,用来设置 PDF 文档的作者、主题、关键词等信心,但它并未使用过。为什么没去用呢?

在我尝试使用它时发现个问题。因为它依赖的信息在 data/cover.tex 中才有定义,所以要使用需要在 cover.tex 最后,或者 main 中 \input{data/cover}之后。
我测试时发现当使用的代码放在 \makecover 后面时,这个宏会失效。
而放在 \input{data/cover}\makecover 之间时则正常。

示例代码:

%%% 封面部分
\frontmatter
\input{data/cover}
\makecover

% 设置 PDF 文档的作者、主题等属性
\makeatletter
\thu@setup@pdfinfo
\makeatother

图表的双重标题

您好,我是大连海事大学的博士生,想把您的模板port成我们学校的模板。不知道可不可以,这里想征得您的允许。

如果您许可的话,我想问下一个问题。
因为看过模板之后,发现我们学校的要求和清华的非常相似,只是要求图表要有中英文标题,ccaption宏包可以解决,我想替换掉模板中原有的caption宏包,但是发现好像subfig等宏包和caption宏包直接有些关系,不知道直接替换可以吗?

非常感谢!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.