Giter Site home page Giter Site logo

matnoble / latex-document Goto Github PK

View Code? Open in Web Editor NEW
73.0 5.0 16.0 6.74 MB

LaTeX Templates for Document

Home Page: https://github.com/MatNoble/LaTeX-Document

License: LaTeX Project Public License v1.3c

TeX 100.00%
latex-template latex-document latex tex emacs

latex-document's Introduction

LaTeX-Document 中英文科技文档模板

LaTeX

特色: 为文章增加红, 蓝, 黄, 绿四色(Google 配色), 使文章不再单调. 定理部分借鉴 这里

模板源代码有适当注释, 简单易懂, 易上手, 易自定义. 有问题, 欢迎提交 Issues

使用说明

git clone [email protected]:MatNoble/LaTeX-Document.git

克隆到本地即可使用.

预览

英文预览

数系家园LaTeX英文文档 数系家园LaTeX英文文档

更多预览

中文预览

数系家园LaTeX中文文档 数系家园LaTeX中文文档

更多预览

字体问题

公式字体

\usepackage[lite,subscriptcorrection,slantedGreek,nofontinfo,amsbb,eucal]{mtpro2}
% \usepackage{newtxtext,newtxmath} % New Times Roman
% \usepackage{mathptmx} % 打印 times
% \usepackage{charter}  % 屏读
% \usepackage{fourier}

注: mtpro2 字体需自行安装

中文字体

中文版需要下载并安装下列字体

思源字体是开源的,更好看的宋体和黑体。由 Adobe 和 Google 合作开发

代码环境

Minted 是 Latex 上非常好用的代码高亮工具, 可以借助 Python 包 Pygement 根据不同的语法高亮. 需要安装 python, 然后使用工具安装 pygments. 这里假设你已经安装了 pip 和相关 Python.

  1. pip install Pygments;
  2. 使用 xelatex 编译的时候需要加上参数 –shell-escape.

效果如下:

若不使用代码环境, 在对应的 .sty 文件中把对应代码注释掉即可.

% 代码高亮
% \RequirePackage{minted}
% \usemintedstyle{emacs}

授权情况

本模板代码按 LPPL v1.3c 协议 授权

联系方式

latex-document's People

Contributors

matnoble 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

Watchers

 avatar  avatar  avatar  avatar  avatar

latex-document's Issues

编译出现pygmentize需要安装错误

已经安装python3.8 还有pygments包。利用texstudio运行xelatex编译。出现如下错误
`
Package minted Error: You must invoke LaTeX with the -shell-escape flag. \usemintedstyle

Package minted Error: You must have `pygmentize' installed to use this package. \begin{document}

Package minted Error: Missing Pygments output; \inputminted wasor may be using frozencache with a missing file. \end{minted}^^M

Package minted Error: Missing Pygments output; \inputminted wasor may be using frozencache with a missing file. \end{minted}^^M

Package minted Error: Missing Pygments output; \inputminted wasor may be using frozencache with a missing file. \end{minted}
Package minted Error: Missing Pygments output; \inputminted wasor may be using frozencache with a missing file. \end{minted}
Package minted Error: Missing Pygments output; \inputminted wasor may be using frozencache with a missing file. \end{minted}
Package minted Error: Missing Pygments output; \inputminted wasor may be using frozencache with a missing file. \end{minted}
Package minted Error: Missing Pygments output; \inputminted wasor may be using frozencache with a missing file. \end{minted}

inputenc package ignored with utf8 based engines.
shell escape is disabled, so I can only detect \ifwindows.
Label `table' multiply defined.

\headheight is too small (12.0pt): Make it at least 15.69998pt.

No autoref name for listing' There were multiply-defined labels.

附图是我在命令行运行pygmentize -h,说明我已经安装pygments
Uploading Screen Shot 2021-11-08 at 12.42.12 AM.png…

矩阵虚线问题

\[
\left[ {\begin{array}{c:c}
		\begin{matrix}
			1 & 12 & 3 & 8 \\
			14 & 5 & 16 &21\\
			7 & 18 & 9 &7 \\
			23 & 0 & -1 &8\\
		\end{matrix}&
		\begin{matrix}
			1 & 4 \\
			2 & 5 \\
			3 & 6 \\
			13 & 26 \\
		\end{matrix}
\end{array}} \right]
\]

这个代码会编译错误,不产生虚线

@dariusorz 可以在导言区加入 arydshln 宏包, \usepackage{arydshln}. 然后在 tex 里这样写

\[
\left[ \begin{array}{c;{2pt/2pt}c}
		\begin{matrix}
			1 & 12 & 3 & 8 \\
			14 & 5 & 16 &21\\
			7 & 18 & 9 &7 \\
			23 & 0 & -1 &8\\
		\end{matrix}&
		\begin{matrix}
			1 & 4 \\
			2 & 5 \\
			3 & 6 \\
			13 & 26 \\
		\end{matrix}
\end{array} \right]
\]

效果如下:
数系家园 矩阵虚线

参考:

https://tex.stackexchange.com/questions/183258/how-to-add-dash-lines-in-matrix

Originally posted by @MatNoble in #1 (comment)

新手踩坑【已解决】

因为我是LaTeX的新手,所以使用这个模板遇到了一些问题,经过搜索之后自行解决了。在这里记录一下,希望可以起到提示后人的作用。

  • 使用这个模板安装了python,之后再用pip install pygmentize 安装了pygmentize来使用list和代码高亮。

  • 我的编译器是Texlive,文本编辑软件是WinEdt,在WinEdt里选择XeLaTeX进行编译,并且在Options-Execution Models-Console Applications-XeLateX的Switches里添加了 --shell-escape

  • 安装字体的话,也遇到了一些坑。我是win10专业版的系统。安装字体是进入到文件夹后,选中此文件夹里所有后缀为otf的文件后,右键-用管理员的身份为所有的用户安装。之前我试过双击单个otf的文件进行安装,但是好像找不到字体,所有又重装了一下。

  • 装完字体之后,要改一下matnoble-doc-cn.sty这个文件里的楷体和宋体的字体名。因为我只用了中文的模板,就没看英文的模板。打开matnoble-doc-cn.sty这个文件后,把原来的Adobe Kaiti改成AdobeKaitiStd-Regular,就是改成安装的原字体文件的名字,不是安装之后字体在系统里显示的名字。相应地,把宋体地字体也改成AdobeSongStd-Light。注意,楷体有两个地方,宋体只有一个地方要改。

  • 还有就是我编译的时候,遇到了\and这个命令编译不过的情况,我用的解决方法是把\and删掉,在原\and的位置新换一行,再加上 两个反斜杠(\\)。

最后谢谢原主提供的模板,真的很好看~

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.