tedxz / xjtuthesis-x Goto Github PK
View Code? Open in Web Editor NEW西安交通大学毕业论文LaTeX模板
西安交通大学毕业论文LaTeX模板
使用的是xelatex,使用algorithm可以正常编译,但是修改成breakablealgorithm出现错误。
但是texstudio可以正常导出pdf,显示也正常。
When I am running under the framwork directory, I found that the reference can not work normally. Here is the makefile result:
➜ framework git:(master) ✗ make bachelor
mkdir -p build
xelatex -output-directory build/ --no-pdf --interaction=nonstopmode bachelor.tex >/dev/null
bibtex bachelor || true
I couldn't open file name `bachelor.aux'
xelatex -output-directory build/ --no-pdf --interaction=nonstopmode bachelor.tex >/dev/null
xelatex -output-directory build/ --interaction=nonstopmode bachelor.tex >/dev/null
As you can see, bibtex can not find bachelor.aux
.
在macOS XeTeX 3.14159265-2.6-0.99998 (TeX Live 2017)
上使用模版生成的pdf无法将文字正确复制出来,我怀疑这会影响到查重的正确性和可靠性
模版中的汉字支持是使用的 xeCJK
包
使用 \usepacakge{ctex}
包在此设备可以正确的处理汉字复制问题
Sometimes LaTex would add extra vertical spaces between paragraphs so that in the beginning of the next page, a new numbered section will begin at the top of the page. This 'feature' is wrong according to the official document: no extra spaces between paragraphs.
A simple way to solve it is to use: '\raggedbottom' command in style files. I suggest that to make it as the default setting and update the document.
本模板中图片的注释caption间距过窄,行与行之间几乎没有任何空隙,非常影响美观,而且与官方的word模板不一致。
word模板中,caption的间距是WORD默认的,大致为1.5倍行距。
While testing the templete, I found that when I use the environment as that:
\begin{equation}
equation
\end{equation}
the equation will indent for 4 bytes, but on centering.
Since this commit 858dfd8, writing decorated pseudo codes is in supported. However, the '/begin{algorithm} /end{algorithm}' block is float, so that if the pseudo codes are long enough (20 lines or so), LaTex would break the page and make a whole new page for pseudo codes. This way of dealing with long pseudo codes is not right according to the document from dean.
If we will stick to algorithmic package, I found a way to solve this problem. Someone called Werner proposed a solution of breakable algorithm block in this page:
http://tex.stackexchange.com/questions/33866/algorithm-tag-and-page-break
Here are his code:
\makeatletter
\newenvironment{breakablealgorithm}
{% \begin{breakablealgorithm}
\begin{center}
\refstepcounter{algorithm}% New algorithm
\hrule height.8pt depth0pt \kern2pt% \@fs@pre for \@fs@ruled
\renewcommand{\caption}[2][\relax]{% Make a new \caption
{\raggedright\textbf{\ALG@name~\thealgorithm} ##2\par}%
\ifx\relax##1\relax % #1 is \relax
\addcontentsline{loa}{algorithm}{\protect\numberline{\thealgorithm}##2}%
\else % #1 is not \relax
\addcontentsline{loa}{algorithm}{\protect\numberline{\thealgorithm}##1}%
\fi
\kern2pt\hrule\kern2pt
}
}{% \end{breakablealgorithm}
\kern2pt\hrule\relax% \@fs@post for \@fs@ruled
\end{center}
}
\makeatother
Then use breakablealgorithm as the replacement of algorithm to wrap the algorithmic block.
example:
\begin{breakablealgorithm}
\caption{队列操作}
\label{alg:queue}
\begin{algorithmic}[1]
\Procedure {queueUpdate}{$\bm{Q^{(1)}, Q^{(2)}, Q^{(3)}}$, $block$}
\State $I am the code$
\end{algorithmic}
\end{breakablealgorithm}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.