Giter Site home page Giter Site logo

stone-zeng / fduthesis Goto Github PK

View Code? Open in Web Editor NEW
774.0 774.0 199.0 3.85 MB

LaTeX thesis template for Fudan University

License: LaTeX Project Public License v1.3c

TeX 98.53% Shell 0.59% Lua 0.72% Batchfile 0.10% Perl 0.06%
fudan-university latex latex-template latex-thesis-template

fduthesis's Introduction

I’m Xiangdong Zeng working with

  |Physics⟩ ⊗ |LaTeX⟩ ⊗ (|Font engineering⟩ + |Type design⟩) / √2.
My GitHub Stats Top Langs

fduthesis's People

Contributors

atxy-blip avatar jinyu121 avatar muzimuzhi avatar shichaosun avatar sonnyhcl avatar stone-zeng avatar yuanshengzhao 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

fduthesis's Issues

关于致谢问题

你好,我想问一下用什么命令把致谢那一页插进去,谢谢

章节号样式切换

希望支持“第一章”和“第1章”的切换。
计算机学院的模板好像是中文的。


如果已经有了的话,建议在模板手册里面增加一个 FAQ 吧。

谢谢!

新年快乐!

=====

另外最近我也会把模板使用过程中的 笔记 和 问题解决办法 都发到Issue上来,可能issue会多一点。

LuaTeX 下的脚注编号

footnotestyle = xits / libertinus 等在 LuaTeX 下会使用中文字体显示。
感觉可以用 \ltjalchar 处理。见 luatexja 文档 4.1 节。

用户手册相关问题

  • 同步 l3doc 更新,不再手动添加 intaux,见 latex3/latex3@4b803e5 (LaTeX3 release 2017-12-05)
  • 减小函数列表左侧边距(implementation)
  • 函数列表允许占据右侧文字位置(documentation)
  • implementation 之间不插入分页

索引中区分:

  • 环境
  • 选项
  • 宏包

新环境的描述:

  • \env 命令添加索引
  • 使 environment 环境在 documentation 部分也可正常使用
  • 解决 environment 环境与 macro 嵌套时文字重叠的问题

选项名称

现在有几种方案:

  • 所有字母小写(automakecover),这是目前的方案,类似 ctex
  • 单词开头大写(AutoMakeCover),类似 xeCJK
  • 所有字母小写,但用连字符隔开(auto-make-cover),类似 siunitx

个人更倾向于最后一种。不过暂时不准备更改,还是维持现状。

句号形状切换

目前使用类别码切换句号形状,但此种方法不会影响宏定义中的句号。
xeCJK 的 mapping 又会转换所有句号,不太方便。

希望可以打开这个repo的wiki

一些已经在Issue里面解决了的问题,可以整理到Wiki里面,方便后人查阅。

目前想法是,一边写文章,一边把中间遇到的问题/解决办法记录到这个Wiki里面。

比如

  1. 安装

    1. Mac
    2. Linux
    3. Windows
  2. 编辑器设置

    1. TexStudio
    2. VS Code自定义设置
  3. 基本模板

    在这里参照test,给出一个比较简单而全面的例子

  4. 插图的奇淫技巧

  5. 插表格的奇淫技巧

  6. 插入引用

  7. 如何在正文之前插入一些页

    1. 指导小组名单
    2. 评审委员会
    3. 自动生成符号表(哦,如果能的话)
    4. 图索引、表索引
    5. 中英文对照表
    6. 其他
  8. 如何在正文之后插入一些页

    1. 攻读学位期间参与的项目
    2. 攻读学位期间发表的文章
    3. 致谢
  9. 其他还没想好

关于参考文献[S.l.]: [s.n.]的问题

我用gb7714-2015标准编译论文后在参考文献那里会出现很多[S.l.]: [s.n.],我看gb7714-2015这个宏包有可以控制出版信息缺失处理增加的选项,那我在模板里该怎样操作使得参考文献里不出现[S.l.]: [s.n.]

多文件编译,章标题页占一页

多文件编译,每章在一个单独的chapter.tex中,编译后章的标题占一整页,章的主体内容从下一页开始,这个可以调整为内容不从新页开始吗? # #

工具宏包的载入

增加 \fduloadpkg 命令,以实现半自动的宏包载入,尽量避免冲突。大概想法是

\fduloadpkg
  {
    package-1 [ options ],
    package-2 [ options ],
    ...
  }

常用宏包列表:

  • 数学

    • breqn
    • mathtools
    • tensor
    • xfrac
  • 物理

    • physics
    • siunitx
  • 化学

    • chemfig
    • mhchem
  • 计算机

    • algorithm2e
    • listings
    • shortvrb
    • verbatim
  • 多语言

    • babel
    • tipa
  • 表格

    • aryshln
    • booktabs
    • colortbl
    • diagbox
    • makecell
    • multirow
    • tabu
    • tabularx
  • 绘图

    • asymptote
    • PGF/tikz
  • 浮动体、插图

    • float
    • newfloat
    • wrapfig
  • 其他

    • enumitem
    • hologo
    • microtype
    • syntonly

通用模板框架

考虑到目前模板使用的一大问题是格式难以修改,下一步的规划是使用 xtemplate 重构,建立通用的模板框架。主要包括:

  • 封面
  • 目录
  • 章节样式
  • 页眉页脚
  • 字体
  • 浮动体
  • 图注表注
  • 定理环境
  • 参考文献

以及其他杂项。

以上各部分均可用 template 给出实现框架,并通过 key-value 的方式给出具体配置。对于比较复杂的设置,原则上也可以提供接口进行单独处理。不同论文样式可以通过 .def 文件给出。

同步 fontspec 与 unicode-math

这几天 @wspr 做了一些比较大的调整,可能会出现兼容性的问题。另外希望之前 unicode-math 版本号检查不到的问题已被修复。

校名图片的载入

目前校名 fudan-name.pdf 没有上传至 CTAN,需要自行下载或生成,比较麻烦。

pkuthss 的类似文件放在了 TEXMF/tex/latex/pkuthss,不知道这样是否合理。

定理环境

目标

实现类似 thmtools 的功能。核心考虑使用 ntheorem

例子

%% 导言区
\fdunewtheorem[style=plain, headerfont=xxx, bodyfont=xxx]{theorem}{定理}
\fdunewtheorem[style=nonumberplain, qed={\ensuremath{\QED}}]{proof}{证明}
%% 导言区

\begin{theorem}
    这是一个定理。
\end{theorem}

\begin{proof}
    Cubum autem in duos cubos, aut quadratoquadratum in duos quadratoquadratos
    & generaliter nullam in infinitum ultra quadratum potestatem in duos
    eiusdem nominis fas est dividere cuius rei demonstrationem mirabilem sane
    detexi. Hanc marginis exiguitas non caperet.
\end{proof}

旻 字无法显示

旻 字死活出不来……

环境: MAC
编译工具: LuaLaTeX
字体设置相关:全部给注释掉了,所以应该都是默认值吧

尝试过的其他方法:

{\fontspec{Source Han Sans SC}旻}
\font\1="STHeiti Medium"
\1{旻}
\setmainfont{Source Han Serif SC}

均失败

章节标题间距处理

物理系本科生毕业论文格式要求:

标题的层次:标题序号一律用阿拉伯数字编排,序号与文字间空一格。

  • 一级:第 1 章,居中,黑体, 3 号;占 3 行
  • 二级:1.1,居中,宋体,小 4 号;占 2 行
  • 三级:1.1.2,顶格,黑体,5 号;占 2 行
  • 四级:1.,缩 2 格,楷体,5 号;占 1 行

两级及以上标题连排时,每加一级减 1 行,例如章与节连排时共占 4 行。

目前发现实现起来比较困难。主要问题有:

  1. 间距很难与行距保持精确一致。
  2. 页面开头的节标题没有 beforeskip
  3. 对于连排标题,这里采用了类似 xpeek 宏包的手段,只能处理字面上的 \section 等,如果有 \include 等操作将失效。同时这种处理只能改变两个标题之间的距离,貌似效果不会很好。
  4. 如果一二三级连排,占据 5 行;一二三四级连排,同样占据 5 行。很奇怪。

请问指导教师这个小栏目如何改成多行?

例如希望两位导师能够并列于此栏位,希望能够让标题页上的指导教师后面能够多行显示,每行一个名字。
我尝试了一下直接使用

supervisor = {某某某\quad 教授 \\ 某某某\quad 教授}

是不能通过编译的。
那么这种该如何操作呢?感谢~

不能使用\bibliography,只能在最前面的设置中设置bib文件路径

好像会议啊期刊啊什么的都习惯用 \bibliography{reference.bib} 来导入参考文献列表。然后发现在这个模板中,用这种方式导入的话会报错。必须在最上面style里面设置才可以用。

LuaTex报错信息:

Can be used only in preamble. \bibliography

XeTex报错信息

Can be used only in preamble. ^^I\bibliography

配置文件载入方式

使用 config = { <导言区前>, <导言区后> } 的方式,作为模板选项给出。默认不再需要载入配置文件。

脚注样式

原来使用 pifont 宏包提供的 dingbat,后来发现 XITS-Math 和 Libertinus 字体均自带带圈数字。

增加 footnotestyle 选项,同时要在使用相应字体时自动切换到对应的样式。

Mac下 XeLaTeX 编译报错

最小例子:

\documentclass{fduthesis} 
\begin{document}
	\chapter{ 欢 迎 }
	\section{Welcome to fduthesis!}
	你 好 ,\LaTeX{}! 
\end{document}

使用TexStudio编译。所有包已同步官方源最新。报错如下:

错误 : File ended while scanning use of \__fontspec_strip_leading_sign:Nw.
警告 : Font 'FandolSong' does not contain script 'CJK'.

同样代码,LuaTeX可以正常编译。

报错的Log文件:

main.log

兼容 fancyvrb 宏包

由于重定义了 \@makefntext,会导致使用 fancyvrb 宏包并开启 \VerbatimFootnotes 时脚注排版错误。

其实可以直接修改脚注命令,支持插入抄录文本。

文档中的星号

listing 环境中的 * 不知何故掉了下去:

image

使用字体为 Source Code Pro。

关于 citet

希望使用\citet{bib_index}的时候,出现的是$XXX 等人^{[x]}$。
目前出现的是 XXX et al. ^{[x]}

可以参考一下这里 https://github.com/xueruini/thuthesis/blob/master/thuthesis-numeric.bst#L106

其他参考: https://github.com/xueruini/thuthesis/issues/303

最小例子:

2016年,\citet{alphago}提出的AlphaGo 轻松打败人类。

想显示的效果(额,没想好怎么打,脑补一下?):

2018年,Google 等人^{[233]} 提出的AlphaGo轻松打败人类。

Mac下找不到字体

Mac下找不到字体。有几个:

Package fontspec Error: The font "XITS" cannot be found. \documentclass{fduthesis} \begin{document}

Font TU/XITS(0)/m/n/12.045=XITS at 12.045pt not loadable: Metric (TFM) file or installed font not found. \documentclass{fduthesis} \begin{document}

Package fontspec Error: The font "TeX Gyre Heros" cannot be found. \documentclass{fduthesis} \begin{document}

Package fontspec Error: The font "XITS Math" cannot be found. \documentclass{fduthesis} \begin{document}

Package fontspec Error: The font "FandolSong" cannot be found. \documentclass{fduthesis} \begin{document}

Package fontspec Error: The font "FandolKai" cannot be found. \documentclass{fduthesis} \begin{document}

指导小组成员 希望增加其他对齐方式

估计这个需求会被打死的吧……
Markdown排版,见谅。知道意思即可~

  1. 只有名字,居中对齐即可。
      某某
      教师B
     某某某
    
  2. 考虑到最极端情况……可以像这样
    教师A     教师B     教师C     教师D     教师E
    教师F     教师G     教师H     教师I     教师J
                教师K     教师L
    
  3. 教师+职称,中间空格对齐(其实可以用没有边框的表格来搞,左边一列右对齐,右边一列左对齐)——我们正在用这个样式
        某某    教授
       某某某    副教授
     某某某某    助理研究员
    
  4. 学校+教师+职称,直接用没有边框的表格吧……——见过师兄的论文在用这个样式
    XX大学      某某        教授
    XX大学      某某某      副教授
    XXXX大学    某某某某    助理研究员
    

感觉最简单的办法是设置没有边框的表格。


目前行为是,即使info/instructors为空,也会生成 指导小组成员 这一页。希望是“如果info/instructors为空,那么就不插入 指导小组成员 这一页”。然后由使用者自己在适当地方加入chapter,并自定义样式,例如按照需要插入边框不可见的表格。

文字环绕

位置参数

  • absolute_postion:指定坐标(X,Y)
  • relative_postion:指定相对文字的位置(行锚点 + 水平位置)

环绕方式

(抄 MS word)

  • 四周
  • 上下
  • 浮于文字上
  • 衬于文字下
  • 环绕顶点?

重构定理环境

使用 xtemplate,可以模仿 xtheorem。主要功能仍依靠 ntheorem 实现,并与之保持兼容。

模板运行报错

TEXlive中包已经是最新的 ,但还是报错
LaTeX error: "kernel/message-unknown" Unknown message 'l3-too-old' for module 'fduthesis'. For immediate help type H . }

字体设置接口

想法是绕开 fontspec\setmainfont 命令,然后归入 fdu/style 类,类似这样:

\fdusetup
  {
    style / advanced-font =
      {
        main =
          {
            name   = <font-name>,
            option = { <option1>, <option2> }
          },
        sans         = { name = <font-name>, option = { <option-list> } },
        mono         = { name = <font-name>, option = { <option-list> } },
        <family>     = { name = <font-name>, option = { <option-list> } },
        cjk-main =
          {
            name     = <font-name>,
            option   = { <option-list> },
            fallback = { name = <font-name>, option = { <option-list> } }
          },
        cjk-sans     = { name = <font-name>, option = { <option-list> } },
        cjk-mono     = { name = <font-name>, option = { <option-list> } },
        cjk-song     = { name = <font-name>, option = { <option-list> } },
        cjk-hei      = { name = <font-name>, option = { <option-list> } },
        cjk-fang     = { name = <font-name>, option = { <option-list> } },
        cjk-kai      = { name = <font-name>, option = { <option-list> } },
        cjk-<family> = { name = <font-name>, option = { <option-list> } }
      }
  }

一些小建议,以及为你点赞

Hi,
项目最近的进度看起来十分喜人,恭喜。

不过在编译用户文档和测试文档时有几个问题:

  1. fduthesis-cover.pdf文件(估计是.gitignore造成的,你可以使用git add解决):
l.266 ...s[width=8cm]{../logo/fduthesis-cover.pdf}
  1. 用户文档依赖字体太多,装起来十分费劲,特别是下面几个,版权问题很微妙:

image

  1. /logo/目录中的tex文件需要预先编译为pdf文件才能正常使用,这点希望在README.md里提一下。

  2. 在编译test文件夹下的范例时,有一个依赖zhlipsum(很棒的作品)没有在ctan登记,建议你将这个宏包上传到ctan,方便用户,也方便你的Travis测试。

这个模板在技术上十分超前,为你点赞!:+1:
祝好。

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.