Giter Club home page Giter Club logo

tongjithesis's Introduction

TongjiThesis

总览

同济大学硕博士论文LaTeX模板。

效果预览:请到这里下载PDF。 注意:由于我们不经常打tag,因此release界面往往不是最新的,请在本页面下载最新模板。

本次修改的发起者:

特别致谢:

贡献者列表:请点击这里

主要参考资料:

版本说明

  1. master branch 目前只需要下载 Texlive 2019 并安装字体文件即可使用。
  2. resume branch 按照关于发表论文和研究成果的另一种解决方案更优雅地实现了个人简历一节,截止目前(2019/05/12)还需要手动更新biblatex-gb7714-2015宏包。

使用说明

注意: 采用biber编译参考文献。

安装

推荐使用 Texlive 2019,直接在tuna下载很快的。

如果你使用 Texlive2017 或 Texlive2018 发行版,请更新其自带的biblatex-gb7714-2015宏包至最新版本,否则无法使用。 这是因为本模板参考文献部分依赖biblatex-gb7714-2015宏包的2018版本,因此必须在安装好Texlive后更新此宏包,Texlive2018 自带的biblatex-gb7714-2015宏包依然较老,无法正常运行本模板。 推荐使用其包管理器更新此宏包,如若更新失败(我更新了好几次都失败了,它还把我的这个宏包给删了,郁闷),那么可按照 官方页面 的安装介绍,在你的tex安装目录搜索biblatex-gb7714-2015文件夹,将该文件夹中的四个文件替换为官方页面 提供的文件即可。

使用(一定要仔细看啊)

主文件为 thesis.tex,该文档头部说明了本模板的所有选项(包含 数字式引用及作者年份引用的切换选项,默认使用数字上标的引用格式)。

  1. 基本的编译步骤是:tex,biber,tex,tex(这里的tex替换成你常用的tex,如xelatex)。一般的前端都可以定制成一键运行这些步骤,如emacs的C-c C-a,vscode的 LaTeX Workshop 插件,WinEdt自带的编译按键等。
  2. 首选xelatex编译,次选pdflatexlualatex貌似也能用。
  3. 使用xelatex时,如果提示缺少某字体,不要慌,请参考下面的字体安装说明。

字体安装注意事项:

  1. 可在此处下载安装。
  2. 或者自己想办法下载安装(各种系统对应的字库详见: ctex 宏集文档。如果你用的是windows系统,可以搜索中易的对应字体下载,如中易隶书,Mac系统的字体则是华文字库,且其隶书的设置较为复杂,详见下节的配置。)
  3. 对于windows系统而言,如果不想安装字体的话,可参考 自动进行字体配置+pifont的修改,将tongjithesis.cls中的这一行:\IfFileExists{/dev/null}{}{\PassOptionsToClass{fontset=windowsold}{ctexbook}} 删掉。

实用技能 以及 注意事项

编译过程中出现未知的奇怪的错误怎么办

若提示缺少字体,安装该字体即可。若碰到奇怪的错误,最好的方法就是: 清除所有临时文件,重新编译

Mac系统隶书的配置(MacTeX发行版)

切换至 /usr/local/texlive/2018/texmf-dist/tex/latex/ctex/fontset/ 目录,打开ctex-fontset-mac.def文件。

  1. \setCJKfamilyfont { zhkai } { STKaiti }后边添加一行:\setCJKfamilyfont { zhli } { STLiti }
  2. \NewDocumentCommand \kaishu { } { \CJKfamily { zhkai } } 后边添加一行:\NewDocumentCommand \lishu { } { \CJKfamily { zhli } }

注:我们要在系统里安装华文隶书,然后打开系统的字体查看软件,就会看到,该字体的名字就是STLiti,因此,其它字体若不支持的话,也可以采用此方法进行添加。 大原则为:先安装字体文件,若安装好该字体文件以后,仍无法使用对应的字体命令,如\lishu,就采用以上方法添加该字体的命令。 如 \songti,\heiti,\fangsong,\kaishu,\lishu,\youyuan,\yahei,目测幼圆字体即可按上述原则进行配置。

关于 author year 的引用

学校word模板中的author-year格式在正文中是符合国标的,但参考文献列表明显是numeric的,这么混用不能忍啊!本模板严格遵循国标,如对此有疑问,请通过借酒消愁等方式解决。

关于参考文献bib的生成

推荐使用 Zotero 进行文献管理和bib生成,其中bib的生成推荐使用 Zotero 的 Better Bib(La)TeX 插件。 如果你也用zotero管理文献的话,可以参考 这里 的文献库导出设置,这样就可以方便地将bib文件的language域删掉或另行处理,(很久以前需要删掉这个language域,现在不确定是否需要删,没时间测试了,诸位自行定夺)。

本模板对老模板的主要改动

相较于老版tongjithesis,我这个版本融合了thuthesis (ThuThesis 2017/12/24 5.4.3)的很多新改动,个人认为比较大的改动如下:

  1. 加入更详尽的注释。我甚至将很多宏的用法用例子进行阐述,当然详细的注释主要集中在“宏展开”的部分。这就极大地方便了模板的阅读和理解,期待校友们更多地参与到对此模板的改进。
  2. 老版基于book制作,新版基于ctexbook。
  3. 新版采用ctex宏集(目前参考的是2018/01/28 v2.4.12《ctex宏集手册》)自带的字体配置,比如在新版windows操作系统上,采用的是中易字库+ 微软雅黑。
  4. 页面设置采用geometry宏包。
  5. 使用kvoptions宏包,从而可以使用key-value input的方式设置class的option
  6. 使用fancyhdr宏包设置页眉页脚
  7. 修改了老版的许多错误参数(当年也许是对的)。
  8. 章节标题的设置使用ctex宏集提供的\ctexset进行设置。
  9. 使用较新的性能更强的宏包替代老宏包。如etoolbox引入了LATEX kernel commands的不同实现,但功能一样;xparse提供了更强的\NewDocumentCommand,以替代\newcommand;使用subcaption替代subfig,并使用subcaption进行浮动体参数的设定等。
  10. chapter标题段前距离的修改
  11. 各级标题上下间隙调整
  12. 增加degreetype选项
  13. 使用biblatex包实现参考文献的引用
  14. 增加author-year的引用。

tongjithesis's People

Contributors

cnchence avatar marquistj13 avatar shoujiaxin avatar williamwenda 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

tongjithesis's Issues

伪黑体错误

学长这个错误是什么原因呢?
! LaTeX Error: Unknown option AutoFakeBold=1.2' for package fontspec'.

关于页眉

请问页眉信息如何删除?
以及封面上的信息如何修改?

编译后不显示参考文献

你好,我在TeXstudio上编译模板时,参考文献部分不显示。请问怎么解决一下?
系统是win 10

关于Logo

Logo体积实在太大了,作为一个毕业15年的同济人,我写了个宏包见附件。
tjlogo.zip

\documentclass{article}
\usepackage{tjlogo}
\usepackage{xcolor}
\begin{document}
  %\TJLogo[<color>]{<Height>}
  \TJLogo[blue!30!black]{3cm}
\end{document}

可以尝试一下。

这个项目遵循的license是什么?

非常感谢这个项目,但是在使用时,不太清楚这个项目应该遵循哪一个license的使用规则,希望项目所属者们能够给一个明确的license版权要求,以便规范使用。

关于页边距

对比了你的模版和word模版,上边界貌似貌似不一样,这是我配置的原因吗?

关于字体大小

师兄大佬,你好,如何将一个表格的所有字体设的小一点,我使用\tiny没有效果。谢谢!

如何每章设置单独的图片搜索路径

如题,将每张图片放置在一个搜索路径下太杂乱了,如果设置多个搜索路径\graphicspath{{path1/},{path2/}}又避免不了同名图片的搜索问题,那么如何每一章节设置一个单独的图片搜索路径,这样的文件结构就清爽很多。

编译多次以后,参考文献无法按顺序进行编号

临时解决方案:删除临时文件,重写编译。
(建议在打印大论文之前以及审阅之前这么搞,要不然每次都删临时文件,编译速度感人啊)

期望的解决方案:使用 biblatex宏包 重写模板文件的参考文献部分。
该宏包具有很高的自由度,例如:

  1. 提供了关闭参考文献中 “出版地不详”“出版者不详” 等的选项
  2. 非上标引用时,使用标准的 parencite 命令即可,无需自己定义 \inlinecite 命令

@CNchence 你来搞一下?

如何阻止二级标题另起一页

十分感谢精心调制的 latex 模板!

\section\subsection 等二级、三级标题,在当前页还有小于等于 8 行左右空间时,标题会另起新的一页。但是旧的一页还有空间去放置这个标题以及之后的若干行的,一个例子如下图所示:

image

可能是标题的一些设置的问题吗?多谢多谢 :)

2022年实测还可以用

latex模板和2022年最新的word模板有细微的不同,最好调整一下。

之前 fork 了一份代码,但是现在要清理掉这个仓库,就把我之前做的一些改动以截图的方式贴在这里吧。

中文封面更新:所在院系->学院,专业学位名称->专业学位类别
英文封面更新:Master of Science -> Master of Engineering

image

参考文献人名仅首字母大写

image

已经顺利毕业,感谢师兄们的工作,这个模板很好用。

Mac 配置问题可以参考这个 issue #25

关于格式

  1. 参考文献中英文人名全是大写,这个怎么修改为人名只首字母大写呢?
  2. 标题中文字体是黑体,标题的编号是Time New Rooms,怎么将标题的编号也改成黑体呢?
  3. 使用模板提供的\shuji(tongjithesis.cls第1058行)会导致排版变乱,请问书脊怎么插入呢?

参考文献格式

参考文献格式好像跟官方的不太一样。官方格式里没有[J]、[M]等的杂志会议区分标志。

参考文献无法生成

如题。即使直接使用git上下载下来的一系列文件直接编译也无法生成参考文献。
操作步骤:对thesis.tex文件分别使用XeLatex-Bibtex-Xelatex-Xelatex编译
在BiBtex运行时会报以下错误:

This is BibTeX, Version 0.99d (TeX Live 2018)
The top-level auxiliary file: thesis.aux
A level-1 auxiliary file: data/chap01.aux
I found no \citation commands---while reading file thesis.aux
I found no \bibdata command---while reading file thesis.aux
I found no \bibstyle command---while reading file thesis.aux
(There were 3 error messages)

环境

系统:macOS Mojave 10.14.2
编译器:TeXShop
biblatex-gb7714-2015已经按照readme文件中的说明替换过了4个文件。

非常抱歉跑来提issue,但是真的折腾了两天了也没有解决这个问题。。

字体安装

前言

鉴于大多数情况下需要安装字体,我决定把字体文件传到这里:字体文件.zip

安装方法

字体文件.zip中的字体适用于windows 系统:,并包含:

  1. KaiTi_GB2312.ttf
  2. LiShu.ttf
  3. FangSong_GB2312.ttf

安装方法:下载、解压后,右键选择字体文件,然后选择 为所有用户安装

注意事项

如何查看系统中安装的字体?
答:打开终端(cmd),运行 fc-list :lang=zh-cn > font.txt 即可将字体列表输出到 font.txt 文件,查看该文件即可。

Package fontspec Error: The font "LiSu" cannot be found. \makecover

一直出现这个问题,我是在Windows 10上进行的安装 texlive 2023 和 texstudio 2023,已经安装了 原有up 提供的 三个字体。我深入到C:\texlive\2023\texmf-dist\tex\latex\ctex\fontset\ctex-fontset-windows.def:

{ \setCJKmainfont { SimSun } [ BoldFont = SimHei , ItalicFont = KaiTi ] \setCJKsansfont { Microsoft~YaHei } [ BoldFont = *~Bold ] \setCJKmonofont { FangSong } \setCJKfamilyfont { zhsong } { SimSun } \setCJKfamilyfont { zhhei } { SimHei } \setCJKfamilyfont { zhfs } { FangSong } \setCJKfamilyfont { zhkai } { KaiTi } \setCJKfamilyfont { zhyahei } { Microsoft~YaHei } [ BoldFont = *~Bold ] \setCJKfamilyfont { zhli } { LiSu } \setCJKfamilyfont { zhyou } { YouYuan } } \NewDocumentCommand \songti { } { \CJKfamily { zhsong } } \NewDocumentCommand \heiti { } { \CJKfamily { zhhei } } \NewDocumentCommand \fangsong { } { \CJKfamily { zhfs } } \NewDocumentCommand \kaishu { } { \CJKfamily { zhkai } } \NewDocumentCommand \lishu { } { \CJKfamily { zhli } } \NewDocumentCommand \youyuan { } { \CJKfamily { zhyou } } \NewDocumentCommand \yahei { } { \CJKfamily { zhyahei } } %% %% %% End of filectex-fontset-windows.def'.`
没有任何改变。
在texstudio 中运行出来,第一页pdf 没有中文,而且没有目录。我已经尝试了三天,实在不知道该怎么办了。在这里请求大家的帮助。我在mac 上也是 安装 texlive 2023 和 texstudio 2023 也是遇到了相同的问题。现在是求告无门~~!!!

如何删除多余的空白页

非常感谢各位学长/学姐的工作!有一些问题想要请教:

  1. 生成的pdf中有一些多余的空白页如何删掉呢?
    image
  2. 在latex生成的pdf中没有找到这一页。
    image

关于Mac中“Undefined control sequence. [\makecover]”问题的解决方法

这个问题困扰我好久了,具体就是出现Undefined control sequence. [\makecover]这个error但是PDF还是可以编译出来的,是不是感觉很不爽!原因是:

你肯定没有解决隶书字体问题!😂

因为cover中用了隶书字体,所以实际上这个error与这个字体定义有关!怎么解决在mac中的隶书字体问题在首页中有说明,我就不赘述啦!

请叫我雷锋!✌️

tex无法编译

您好,我用windows的WinEdt和mac 的texshop都编译不了这个tex,弄了好久,怎么办呀?能否帮帮忙,谢谢

关于Mac

mac 10.15.1
mactex: 2019.050

默认情况下,使用的是fandol,因此修改ctex-fontset-mac.def并不能解决问题

关于发表论文和研究成果的另一种解决方案

从resume.tex文档看,发表论文和研究成果是以enumerate直接写的,但其实因为这些信息也类似于参考文献信息,因此完全可以利用参考文献的解决方案来避免大量的人工书写。

从其内容看,两者与参考文献的差别仅在于文献条目的格式,比如没有文献类型标识符,文献的作者的格式是不同的,条目后面还存在一个注释(说明)信息,而这些差异完全可以利用格式局部化调整的方式来实现。

下面给出一个示例,来展示这样的局部化调整,其中为同时给出作者年制的文献表,使用了gb7714-2015mx样式。后面的第二个示例是精确实现resume.tex样式的。

\documentclass[twoside]{article}
    \usepackage{ctex}
    \usepackage{xcolor}
    \usepackage{toolbox}
    \usepackage{hyperref}
    \usepackage{lipsum}
    \usepackage[paperwidth=21cm,paperheight=29cm,top=10pt,bottom=10pt,left=1cm,right=1cm]{geometry}

\usepackage[backend=biber,style=gb7714-2015mx]{biblatex}

\setaystylesection{1}

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
% Encoding: UTF-8
@article{ref-1-1-Yang,
author    = {Yang, Y and Ren, T L and Zhang, L T and others},
title     = {Miniature microphone with silicon-based ferroelectric thin films},
journal   = {Integrated Ferroelectrics},
date      = {2003},
pages      = {229-235},
volume      = {52},
annotation      = {SCI 收录, 检索号:758FZ},
}

@article{ref-2-1-杨轶,
author    = {杨轶 and 张宁欣 and 任天令 and others},
title     = {硅基铁电微声学器件中薄膜残余应力的研究},
journal   = {**机械工程},
pages= {1289-1291},
date      = {2005},
volume      = {16},
number ={14},
annotation ={EI 收录, 检索号:0534931 2907},
}

@article{ref-3-1-杨轶,
author    = {杨轶 and 张宁欣 and 任天令 and others},
title     = {集成铁电器件中的关键工艺研究},
journal   = {仪器仪表学报},
date      = {2003},
volume      = {24},
pages={192-193},
number      = {S4},
annotation      = {EI 源刊},
}

@article{ref-4-1-Yang,
author    = {Yang, Y and Ren, T L and Zhu, Y P and others},
title     = {PMUTs for handwriting recognition},
pubstate ={In press},
annotation      = {已被 Integrated Ferroelectrics 录用. SCI 源刊.},
}


@article{ref-5-1-Wu,
author    = {Wu, X M and Yang, Y and Cai, J and others},
title     = {Measurements of ferroelectric MEMS microphones},
journal   = {Integrated Ferroelectrics},
date      = {2005},
pages={417-429},
volume      = {69},
annotation      = {SCI 收录, 检索号 :896KM.},
}


@article{ref-6-1-贾泽,
author    = {贾泽 and 杨轶 and 陈兢 and others},
title     = {用于压电和电容微麦克风的体硅腐蚀相关研究},
journal   = {压电与声光},
date      = {2006},
pages      = {117-119},
number={1},
volume      = {28},
annotation      = {EI 收录, 检索号:06129773469.},
}


@article{ref-7-1-伍晓明,
author    = {伍晓明 and 杨轶 and 张宁欣 and others},
title     = {基于MEMS技术的集成铁电硅微麦克风},
journal   = {**集成电路},
date      = {2003},
volume      = {53},
pages      = {59-61},
}

@patent{ref-8-1-任天令,
author    = {任天令 and 杨轶 and 朱一平 and others},
title     = {硅基铁电微声学传感器畴极化区域控制和电极连接的方法},
number ={**, CN1602118A},
annotation      = {**专利公开号.},
}

@patent{ref-9-1-Ren,
author    = {Ren, T L and Yang, Y and Zhu, Y P and others},
title     = {Piezoelectric micro acoustic sensor based on ferroelectric materials},
number ={USA, No.11/215, 102},
annotation      = {美国发明专利申请号.},
}
\end{filecontents}


    \addbibresource{\jobname.bib}
    %


    \begin{document}


    \nocite{*}
    \printbibliography


    \begin{refsection}

    \settoggle{bbx:gbtype}{false}%局部设置不输出文献类型和载体标识符
    \settoggle{bbx:gbannote}{true}%局部设置输出注释信息
    \setcounter{gbnamefmtcase}{1}%局部设置作者的格式为大小写不变的国标格式
    \nocite{ref-1-1-Yang,ref-2-1-杨轶,ref-3-1-杨轶,ref-4-1-Yang,ref-5-1-Wu,ref-6-1-贾泽,ref-7-1-伍晓明}

    \printbibliography[title={论文成果}]

    \end{refsection}


    \begin{refsection}

    \settoggle{bbx:gbtype}{false}%局部设置不输出文献类型和载体标识符
    \settoggle{bbx:gbannote}{true}%局部设置输出注释信息
    \setcounter{gbnamefmtcase}{3}%局部设置作者的格式为familyahead格式
    \nocite{ref-8-1-任天令,ref-9-1-Ren}

    \printbibliography[title={专利成果}]

    \end{refsection}

    \end{document} 

结果为:

图片

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.