Comments (18)
将artratex.sty
中
\captionsetup[figure][bi-first]{format=hang,hangindent=-0.5em}%
\captionsetup[figure][bi-second]{format=hang,hangindent=-2em,name=Figure}%
\captionsetup[table][bi-first]{format=hang,hangindent=-0.5em}%
\captionsetup[table][bi-second]{format=hang,hangindent=-2em,name=Table}%
替换为
\captionsetup[bi-first]{bi-first}
\captionsetup[bi-second]{bi-second}
\DeclareCaptionOption{bi-first}[format=hang,hangindent=-0.5em]{
\def\tablename{表}
\def\figurename{图}}
\DeclareCaptionOption{bi-second}[format=hang,hangindent=-2em]{
\def\tablename{Table}
\def\figurename{Figure}}
可使longtable
环境支持bicaption
from ucasthesis.
更新后的 longtable 使用可见 跨页长表
from ucasthesis.
@allenwoods 刚去修改 跨页长表 时才发现原来那些功能都已在那个样例里了,那些英文字头就是在制表时加进去的,是我没认真读下全部内容,弄了个大乌龙 :D。
你的 {\bfseries 表 \thetable\ 续表}
改为 {\bfseries\small \tablename\ \thetable\ {续表}}
会更理想。
对了,因为我当前只有一个操作系统可用来测试,所以无法复现那个 Tex capacity exceeded 的问题,但我推测了一下问题的可能所在并进行了更新,请你有时间时测试一下看是否解决了问题。
感谢~
from ucasthesis.
你好,若无具体的代码样本,很难明白问题出在那里。注释掉caption就没问题并不意味着是caption或模板设置的问题。问题很可能仍出在你的制表的命令上,特别是缺少必要的换行命令或是对齐命令等。制表是LaTeX中最容易出错了,就我个人经验,99%问题最终都是出在制表命令的细节里,所以,仔细检查语法更为关键。
from ucasthesis.
你好!
我试了一个简单的例子,在 artracom.sty 末尾加上
\RequirePackage{longtable}
\RequirePackage{multirow}
然后正文例子来自 longtable example
\begin{longtable}{|c|c|c|c|}
\caption{A simple longtable example}\\
\hline
\textbf{First entry} & \textbf{Second entry} & \textbf{Third entry} & \textbf{Fourth entry} \\
\hline
\endfirsthead
\multicolumn{4}{c}%
{\tablename\ \thetable\ -- \textit{Continued from previous page}} \\
\hline
\textbf{First entry} & \textbf{Second entry} & \textbf{Third entry} & \textbf{Fourth entry} \\
\hline
\endhead
\hline \multicolumn{4}{r}{\textit{Continued on next page}} \\
\endfoot
\hline
\endlastfoot
1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\
1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\
1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\
1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\
1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\
1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\
1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\
1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\
1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\
1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\
1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\
1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\
\end{longtable}
编译会报错
Misplaced \noalign
如果注释掉artratex.sty 258-264行关于caption的内容则可通过。
我想知道注释掉后影响大么?
谢谢啦!!
from ucasthesis.
测试了一下,问题确实存在,而且是一个尴尬的问题,问题的核心出在longtable的自带的caption的设计上。冲突不在你注释掉的所有行,只有:
\captionsetup[table][bi-first]{format=hang,hangindent=-0.5em}%
\captionsetup[table][bi-second]{format=hang,hangindent=-2em,name=Table}%
只需注释掉这一行即可,但其导致的问题就是你的普通table的标题若用bicaption命令,则第二个标题无法是“Table”而是“表”,解决的办法是:
1) 不用longtable,只需用普通的table环境,请慎重考虑一个跨页的longtable的必要性,至少我是不愿去读这样一个表的。
2) 若坚持用longtable,只需注释掉如下行
%\captionsetup[table][bi-first]{format=hang,hangindent=-0.5em}%
%\captionsetup[table][bi-second]{format=hang,hangindent=-2em,name=Table}%
然后所有table(包括普通的和longtable)的双语标题的实现都如如下样例:
\begin{longtable}{|c|c|c|c|}
\caption[这是一个样表]{这是一个样表\\Table~\ref{tab:longtab} A simple longtable example}\label{tab:longtab}\\
\hline
\textbf{First entry} & \textbf{Second entry} & \textbf{Third entry} & \textbf{Fourth entry} \\
\hline
\endfirsthead
\multicolumn{4}{c}%
{\tablename\ \thetable\ -- \textit{Continued from previous page}} \\
\hline
\textbf{First entry} & \textbf{Second entry} & \textbf{Third entry} & \textbf{Fourth entry} \\
\hline
\endhead
\hline \multicolumn{4}{r}{\textit{Continued on next page}} \\
\endfoot
\hline
\endlastfoot
1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\
1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\
1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\
1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\
1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\
1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\
1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\
1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\
1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\
1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\
1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\
1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\
\end{longtable}
其结果如图
最后,longtable跨页所产生的英文注释,我也不知如何解决
祝好
from ucasthesis.
from ucasthesis.
@allenwoods 但是悬挂缩进无效。。。
from ucasthesis.
@allenwoods 根据 tex.se 1 以为两种形式是等价的,没想到效果确实有不一样。
根据 tex.se 2 ,bicaption 作者说解决了此问题,但用替换前的形式确实与 longtable 不兼容,而用替换后的形式,虽然与 longtable 兼容, 则导致缩进选项无效。
再次读了下 caption 和 bicaption 宏包文档,可设定的参数实在是很多。试得昏天暗地的,但还好最终试出了一套方案,现已更新,请测试。
感谢提醒~
from ucasthesis.
感谢修复~已测试可用,悬挂缩进没有怎么注意,没看出前后差别😂
在表格\endfirsthead
后添加
\endfirsthead
%
\multicolumn{5}{c}%
{{\bfseries 表 \thetable\ 续表}} \\
\endhead
\bottomrule
\multicolumn{5}{r}{\textit{续表见下页}} \\
%
\endfoot
%
\endlastfoot
可以换为中文,效果如下:
from ucasthesis.
另,更新模板后会出现
TeX capacity exceeded, sorry [input stack size=5000].
\reserved@a ->\def \reserved@a
经查似乎是因为URL的问题,回退到之前的版本就没有问题。
from ucasthesis.
- 悬挂缩进无效是指你最开始提供的替换方案会导致图标的长标题不再缩进。
- 好的,谢谢提供续表的修改方案~
- 请问
TeX capacity exceeded, sorry [input stack size=5000].
\reserved@a ->\def \reserved@a
是怎么出现的呢?我当前用 texlive + xelatex 无法复现这一问题,可以把你编译生成的 .log 文件发过来吗?
from ucasthesis.
测试了下,还是不成功,log如下:
Thesis.log
bat编译后仍然会正常弹出pdf,但是没有参考文献以后的内容。
另外我才发现,使用之前的版本也会有问题,参考文献没有数字。
会不会和我的内容有关?附上我的bib文件
citations.zip
from ucasthesis.
删除引用中的URL后原版本style可用,但新的还是无法编译参考文献以后内容。
我测试了注释掉附录的数据,以及\RequirePackage
后仍然无法编译。
附件为我目前用的版本,供参考
0215ucasthesis.zip
我的编译环境是Win10+TexLive2018,添加了
% !TEX program = xelatex
% !BIB program = bibtex
另外我也在MacTex下进行了测试,pa
xa
出现和Win下一样的错误,la
提示许多字体找不到。
from ucasthesis.
另外Win下和Mac下编译失败有些不同,Win下仍会生成目录,直到附录一节。Mac编译后的PDF没有目录。
from ucasthesis.
@allenwoods 你好,测试是一个比较复杂的过程,特别是信息掌握不全时,很难发现问题所在,从而需要尽量保证测试过程是有序受控的。
当发现问题并进行测试时,
-
请首先只测试下载的未经任何改动的ucasthesis,看是否问题存在。若存在,则可确认是模版的问题,若不存在,则进行第2步。
-
测试你自己的论文文档,若第1步没问题,而这一步出了问题,问题很可能则是在你的使用上。
根据你目前所提供的信息,不知道你直接测试下载的最新模版有没有问题,你当前的文档编译失败,可能是你的模版更新时出了问题,因为最近的几次更新对 几个超链接命令进行了修改,改动涉及到了 Thesis.tex, Frontpage.tex,Prematter.tex 等文件,从而移植文档时需比较细心才行。建议的更新移植方法请见: 更新指南
from ucasthesis.
OK,我还是先把毕业论文写完再改吧🤣
from ucasthesis.
是的,我再仔细看了下你的Thesis.log文件,应该是你在更新时沿用了你的旧的Thesis.tex。Thesis.tex 里有一个 intotoc 命令是用来添加参考文献的目录和书签的,而最新版里,对这个命令的功能进行了扩充和拓展,因而\intotoc命令的使用方式与以前是不一样的,若不修改,就会报错:D
你是对的,先把论文写完是最重要的,研究LaTeX最容易变成一种对写论文的逃避和拖延:D
from ucasthesis.
Related Issues (20)
- 如何取消正文章之间的空白页? HOT 2
- 页眉分割线和第一行之间的距离太小了,请问有什么方法可以放大吗? HOT 2
- 声明页如何插入多段内容 HOT 2
- 定理的字体怎么改成宋体呢 HOT 1
- 2023版要求更改了参考文献字号,求问如何更改。急 HOT 1
- 使用algorithm2e包编辑算法 HOT 2
- 如何去掉目录页的页码
- 脚注如何设置每页重新编号,且取消自带的首行缩进?
- 引用仅有两个作者的文献,编译结果文中还是显示Yang 等,2020,而非Yang 和 Zhang,2020. HOT 7
- 采用(著者—出版年制)格式,参考文献处字符第二行只缩进1个字不是缩进两个字,不清楚在哪里可以修改缩进的字 HOT 5
- 文中引用(作者年格式) (姓,年)与(名,姓年)的混杂出现 HOT 12
- 参考文献列出了bib文件中的所有文献 HOT 1
- 需要在图中添加很长的“注”来对图片进行注释(写在\fignote{}{}里),“注”显示不全不能显示到下一页中且会侵入到页脚,请问大佬这该如何解决。 HOT 2
- 正文内容无需生成空白页,要如何修改 HOT 6
- 按要求配置字体后中文变成方块 HOT 4
- 附录标题字体不一致等问题
- 使用宏包中的数学字体后崩溃 HOT 1
- 博士后出站报告需要更改部分字体设置 HOT 2
- 编译未找到日志文件
- Overleaf使用adobe字体后文字变成带问号的方框
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ucasthesis.