Coder Social home page Coder Social logo

elegantnote's Introduction

ElegantNote

Homepage | Github | CTAN | Download | Wiki | Weibo

License CTAN Version Github Version Repo Size

ElegantNote is designed for Notes. Just enjoy it! If you have any questions, suggestions or bug reports, you can create issues, pull requests or email us at [email protected].

设计 ElegantNote 是为了方便记录笔记和阅读笔记。如果你有其他问题、建议或者报告 bug,可以提交 issues 或者给我们发邮件:[email protected]。最近我们新建了一个 QQ 用户交流群(Q 群:692108391),欢迎加入。

Caution: This template will no longer be maintained since January 1st, 2023.

注意:本模板自 2023 年 1 月 1 日开始,不再维护,不建议使用本系列模板!

License

This work is released under the LaTeX Project Public License, v1.3c or later.

本模板发布遵循 LaTeX 项目公共许可证 1.3 c 或更高版本。

elegantnote's People

Contributors

ethandeng avatar syvshc 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  avatar  avatar  avatar  avatar  avatar  avatar

elegantnote's Issues

可以尝试增加纸张纹理

可以通过background包加入纸张纹理。

\RequirePackage{background}

% Add paper texture
\ifdefstring{\ELEGANT@mode}{gpaper}{
  \backgroundsetup{
	scale=1,
	color=black,
	opacity=0.15,
	angle=0,
	contents={%
		\includegraphics[width=\paperwidth,height=\paperheight]{image/bkg1.jpg}
	}%
}
}{\relax}

发现模板对于希里尔文字母(俄文)不能够显示

即使用

\usepackage{fontspec}%多语言支持
\setmainfont{CMU Serif}%使用computer modern unicode字体,主要是为了显示俄文字母

还是不能够显示,不知道什么原因。
不用模板,就可以显示希里尔文字母。

EN版本下definition环境中字体是斜体

如题,正常来说应该不是斜体,我看definition的设置也是对的:

\ifdefstring{\ELEGANT@lang}{en}{
  \theoremstyle{plain}% default
  \newtheorem{theorem}{Theorem}[section] %
  \newtheorem{lemma}[theorem]{Lemma} %
  \newtheorem{proposition}[theorem]{Proposition} %
  \newtheorem*{corollary}{Corollary} %
  \theoremstyle{definition} %
  \newtheorem{definition}{Definition}[section] %
  \newtheorem{conjecture}{Conjecture}[section] %
  \newtheorem{example}{Example}[section] %
  \theoremstyle{remark} %
  \newtheorem*{remark}{Remark} %
  \newtheorem*{note}{Note} %

definition环境的style确实也是 \theoremstyle{definition}但是为啥还是斜的呢?

image

关于目录的问题

各位大佬,能否对定理类环境定制一个目录呢。
比如对example生成一个目录,方便查阅。目录的内容为example下的可选参数。向老师有篇博客是讲这个的https://yuxtech.github.io/2019/09/09/table/
我太菜,未能在ElegantNote中复现,各位大佬若有空,能否帮忙?感谢!

字体设置问题

问题一:全局字体设置问题

\documentclass[geye, pad, blue, 8pt]{elegantnote}\documentclass[geye, pad, blue, 14pt]{elegantnote}全文字体大小没变化啊,永远都是那么大。(删除了辅助文件)

问题二:更改字体的问题

\setmainfont{Source Han Serif CN}使用思源宋体,但remark环境里的楷体也发生了改变,我不想让他改变,只改变正文的字体,有办法么。
image

引用定理时引导词显示不正确

例如有proposition标签为xxx,使用\autoref{xxx}时输出的是以theorem而不是proposition或者“命题” 作为引导词。

建议在定义定理环境之前加入cleveref。

elegantNote怎样添加目录

直接添加\tableofcontents命令,目录是生成了,但是编译报下面的错误
LaTeX3 Error: Mismatched LaTeX support files detected. \ExplLoaderFileDate{expl3.sty}}
Undefined control sequence. \sys_if_output_pdf:TF

无法生成参考文献

我按照 ElegantPaper 的方式生成参考文献,但是无法成功实现。请问在 ElegantNote 下怎么生成参考文献?谢谢!

请问 linux 下怎么更改 cls 里面的字体呢

如题, 已更新为最新版

不知道这样怎么改

\xeCJKsetup{PunctStyle=plain}
\setCJKmainfont[ItalicFont=方正楷体简体]{思源宋体 CN}
\setCJKsansfont{思源黑体 CN}
\setCJKmonofont{方正楷体简体}
\renewcommand\emshape{\color{red}}
\setCJKfamilyfont{zhsong}{思源宋体 CN}
\setCJKfamilyfont{zhhei}{思源黑体 CN}
\setCJKfamilyfont{zhkai}{方正楷体简体}
\setCJKfamilyfont{zhfs}{方正楷体简体}
\renewcommand*{\songti}{\CJKfamily{zhsong}} % 宋体
\renewcommand*{\heiti}{\CJKfamily{zhhei}}   % 黑体
\renewcommand*{\kaishu}{\CJKfamily{zhkai}}  % 楷书
\renewcommand*{\fangsong}{\CJKfamily{zhfs}} % 仿宋

我尝试后没有效果

错误为:

test1.tex|7 error| LaTeX Error: Command \emshape undefined.

警告为

test1.tex||  Package xeCJK Warning: Redefining CJKfamily `\CJKrmdefault' (FandolSong-Regular)
test1.tex|| Package xeCJK Warning: Redefining CJKfamily `\CJKsfdefault' (FandolHei-Regular).                                                          
  1 test1.tex|| Package xeCJK Warning: Redefining CJKfamily `\CJKttdefault' (Fa ndolFang-Regular).                                                         
  2 test1.tex|| Package xeCJK Warning: Redefining CJKfamily `zhsong' (FandolSon g-Regular).                                                                
  3 test1.tex|| Package xeCJK Warning: Redefining CJKfamily `zhhei' (FandolHei-Regular).
```

建议将定理环境中 \kaishu 更改为 \emph

ElegantNote 定理环境中使用 \kaishu,但在「en」语言环境下便无法起到「强调」或「区分」作用了。

能否将定理环境中字体\kaishu更改为\emph,以便使得无论在「cn」还是「en」语言下均可使用。

「ElegantNote.cls」摘要 :

\let\openbox\relax
\newtheoremstyle{plain}{3pt}{3pt}{%
  \ifdefstring{\ELEGANT@lang}{en}{%
    \itshape}{%
   \kaishu}}{}{%
  \color{ecolor}\bfseries}{}{%
  0.5em}{%
  \thmname{#1}\thmnumber{ #2}\thmnote{ (#3)}}

\newtheoremstyle{definition}{3pt}{3pt}{%
  \ifdefstring{\ELEGANT@lang}{en}{%
    \itshape}{%
    \kaishu}}{}{%
  \color{ecolor}\bfseries}{}{%
  0.5em}{}

\newtheoremstyle{remark}{3pt}{3pt}{
  \ifdefstring{\ELEGANT@lang}{en}{
    \itshape}{
    \kaishu}}{}{
  \color{ecolor}\bfseries}{}{
  0.5em}{}

可以考虑增加思源字体族的选项

方正系列字体虽然允许免费商用,但是设计时间比较久远,不如一些现代字体美观。而Adobe提供的思源宋体和思源黑体是优秀的开源字体,除了授权上更加开放,也更加符合现代审美,更适合多语言混合排版等优点,希望可以考虑添加这一组预设。

Python Style Code

Can we have a python style code?
image

Below is MWE. it is a latex style, which is not what I want……

\documentclass{elegantnote}
\begin{document}
\begin{lstlisting}
import numpy as np
from scipy.stats import uniform, norm
from src.iteration import iter_reg

n = 100
p = 10
sigma = 1

x = uniform.rvs(loc = -1, scale = 2, size = n * p).reshape(n, p)
epsilon = norm.rvs(scale = sigma, size = n).reshape(n, 1)
beta = norm.rvs(scale = 0.5, size = p + 1).reshape(p + 1, 1)
z = np.c_[np.ones((n, 1)), x]
y = np.dot(z, beta) + epsilon

model = iter_reg(x, y)
acu = model.fit()

print(acu)
\end{lstlisting}
\end{document}

无法设置文档字号为 `10pt, 11pt, 12pt` 以外的字号。

我这里的情况是,一旦在 documentclass 设置除了 10pt, 11pt, 12pt 以外的字号选项话,编译时就会有如下第三个警告:
issue
并且实际生成的文档对应的字号应该是 fallback 到了 10pt

使用 latexmk 进行编译,相关设置如下:

# 参考:https://www.latexstudio.net/archives/51493.html

# 指定默认编译器,1 pdflatex,5 xelatex
$pdf_mode = 5;
 
# 自定义相关编译命令
$pdflatex = "pdflatex -file-line-error -halt-on-error -interaction=nonstopmode -synctex=1 %O %S";
$xelatex = "xelatex -shell-restricted -file-line-error -halt-on-error -interaction=nonstopmode -no-pdf -synctex=1 %O %S";
# 这里不使用 xelatex 直接生成 pdf 转而用 xdvipdfmk 是为了节省嵌入图片的时间
$xdvipdfmx = "xdvipdfmx -E -o %D %O %S";
 
# 智能化清除 bibtex 命令执行过程中的临时文件
$bibtex_use = 1.5;
 
$out_dir = "latex.out";
 
$pdf_previewer = "start zathura %O %S";
$preview_continuous_mode = 1;
 
$clean_ext = "hd nav snm synctex.gz xdv";
 
add_cus_dep('nlo', 'nls', 0, 'nlo2nls');
sub nlo2nls {
    system("makeindex -s nomencl.ist -o \"$_[0].nls\" \"$_[0].nlo\"");
}
push @generated_exts, "nlo", "nls";

可以复现这一状况的 .tex 源文件:

\documentclass[blue,pc,lang=en,13pt]{elegantnote}

\title{ElegantNote: An Elegant \LaTeX{} Template for Notes}

\author{\href{https://ddswhu.me/}{Dongsheng Deng}}
\institute{\href{https://elegantlatex.org/}{Elegant\LaTeX{} Program}}
\version{2.20}
\date{April 25, 2019}

\begin{document}
\maketitle
% logo
\centerline{\includegraphics[width=0.25\textwidth]{logo.pdf}}

\section{some english and}
some english and
\end{document}

email

在\institute{}之后,可否增加一个功能,添加email?如下面的所示:
\email{[email protected]}

能否增加demo?

目前github的文档中只有tex文档和cls文件,可否增加编译成功的pdf文件,方便感兴趣的用户选择。

默认的参考文献格式好像不是apa

使用biblatex和biber

reference.bib:

@article{irnich_path-reduced_2010,
	title = {Path-Reduced Costs for Eliminating Arcs in Routing and Scheduling},
	volume = {22},
	issn = {1091-9856},
	url = {https://pubsonline.informs.org/doi/10.1287/ijoc.1090.0341},
	doi = {10.1287/ijoc.1090.0341},
	abstract = {In many branch-and-price algorithms, the column generation pricing problem consists of computing feasible paths in a network. In this paper, we show how, in this context, path-reduced costs can be used to remove some arcs from the underlying network without compromising optimality, and we introduce a bidirectional search technique to compute these reduced costs. This arc elimination method can lead to a substantial speedup of the pricing process and the overall branch-and-price algorithm. Special attention is given to variants of shortest-path problems with resource constraints. Computational results obtained for the vehicle routing problem with time windows show the efficiency of the proposed method.},
	pages = {297--313},
	number = {2},
	journaltitle = {{INFORMS} Journal on Computing},
	author = {Irnich, Stefan and Desaulniers, Guy and Desrosiers, Jacques and Hadjar, Ahmed},
	urldate = {2022-08-31},
	date = {2010-05},
	note = {Publisher: {INFORMS}},
	keywords = {vehicle routing, branch and bound, column generation and variable elimination, integer programming},
	
}
@article{hadjar_branch-and-cut_2006,
	title = {A Branch-and-Cut Algorithm for the Multiple Depot Vehicle Scheduling Problem},
	volume = {54},
	issn = {0030-364X},
	url = {https://pubsonline.informs.org/doi/abs/10.1287/opre.1050.0240},
	doi = {10.1287/opre.1050.0240},
	abstract = {We consider the multiple depot vehicle scheduling problem ({MDVSP}) and propose a branch-and-bound algorithm for solving it that combines column generation, variable fixing, and cutting planes. We show that the solutions of the linear relaxation of the {MDVSP} contain many “odd cycles.” We derive a class of valid inequalities by extending the notion of odd cycle and describe a lifting procedure for these inequalities. We prove that the lifted inequalities represent, under certain conditions, facets of the underlying polytope. Finally, we present the results of a computational study comparing several strategies (variable fixing, cutting planes, mixed branching, and tree search) for solving the {MDVSP}.},
	pages = {130--149},
	number = {1},
	journaltitle = {Operations Research},
	author = {Hadjar, Ahmed and Marcotte, Odile and Soumis, François},
	urldate = {2022-09-12},
	date = {2006-02},
	note = {Publisher: {INFORMS}},
	keywords = {algorithms, branch-and-cut algorithm for the {MDVSP}, cutting plane/facet, integer, multicommodity, multicommodity formulation, multiple depot vehicle scheduling problem, networks/graphs, programming, scheduling, transportation, vehicles},
	
}

使用默认的格式,并设定为authoryear:
\documentclass[cn,hazy,blue,14pt,screen, citestyle = authoryear]{elegantnote}

得到的引文和引文目录是:
Hadjar, Marcotte, and Soumis 2006
Irnich et al. 2010

[1] Ahmed Hadjar, Odile Marcotte, and François Soumis. “A Branch-and-Cut Algorithm for the Multiple Depot Vehicle Scheduling Problem”. In: Operations Research 54.1 (Feb. 2006). Publisher: INFORMS, pp. 130–149. ISSN: 0030-364X. DOI: 10.1287/opre.1050.0240. URL: https://pubsonline. informs.org/doi/abs/10.1287/opre.1050.0240 (visited on 09/12/2022).
[2] Stefan Irnich et al. “Path-Reduced Costs for Eliminating Arcs in Routing and Scheduling”. In: INFORMS Journal on Computing 22.2 (May 2010). Publisher: INFORMS, pp. 297–313. ISSN: 1091-9856. DOI: 10.1287/ijoc.1090.0341. URL: https://pubsonline.informs.org/doi/10.1287/ ijoc.1090.0341 (visited on 08/31/2022).

而正确的apa格式是:
Hadjar et al. 2006
Irnich et al. 2010

Hadjar, A., Marcotte, O., & Soumis, F. (2006). A branch-and-cut algorithm for the multiple depot vehicle scheduling problem [Publisher: INFORMS]. Opera- tions Research, 54(1), 130–149. https://doi.org/10.1287/opre.1050.0240
Irnich, S., Desaulniers, G., Desrosiers, J., & Hadjar, A. (2010). Path-reduced costs for eliminating arcs in routing and scheduling [Publisher: INFORMS]. INFORMS Journal on Computing, 22(2), 297–313. https://doi.org/10.1287/ijoc.1090.0341

当我把bibstyle修改为apa时,即:
\documentclass[cn,hazy,blue,14pt,screen, bibstyle = apa, citestyle = authoryear]{elegantnote}
才出现正确的引文目录

不知道是我的问题还是其他什么地方出了什么问题

模板捐赠榜在pad模式下溢出

\begin{table}[htbp]
\small
\centering
\caption{Elegant\LaTeX{} 系列模板捐赠榜}
\begin{tabular}{cccccccc}
\toprule
\textbf{捐赠者} & \textbf{金额} & \textbf{时间} & \textbf{渠道} & \textbf{捐赠者} & \textbf{金额} & \textbf{时间} & \textbf{渠道} \\
\midrule
Lerh & 10 RMB & 2019/5/15 & 微信 & 刘志阔 & 99.99 RMB & 2019/10/15 & 支付宝 \\
越过地平线 & 10 RMB & 2019/5/15 & 微信 & *涛 & 16 RMB & 2019/10/17 & 微信 \\
银桑 & 20 RMB & 2019/5/27 & 微信 & 赤霓 & 12 RMB & 2019/10/17 & 支付宝 \\
*空 & 10 RMB & 2019/5/30 & 微信 & 追寻原风景 & 10 RMB & 2019/10/28 & 微信 \\
latexstudio.net & 666 RMB & 2019/6/5 & 支付宝 & 郭德良 & 88 RMB & 2019/11/3 & 微信 \\
Cassis & 11 RMB & 2019/6/30 & 微信 & 自强不息 & 20 RMB & 2019/11/4 & 支付宝 \\
*君 & 10 RMB & 2019/7/23 & 微信 & 读书之虫 & 20 RMB & 2019/11/18 & 微信 \\
P*u & 50 RMB & 2019/7/30 & 微信 & *等 & 10 RMB & 2019/11/18 & 微信 \\
*萌 & 19 RMB & 2019/8/28 & 微信 & *哲 & 20 RMB & 2019/11/18 & 微信 \\
曲豆豆 & 10 RMB & 2019/8/28 & 微信 & 佚名 & 10 RMB & 2019/11/24 & 微信 \\
李博 & 100 RMB & 2019/10/6 & 微信 & Jiye Qian & 66 RMB & 2019/12/4 & 微信 \\
Njustsll & 10 RMB & 2019/10/11 & 微信 & 阳仔 & 20 RMB & 2019/12/5 & 微信 \\
\bottomrule
\end{tabular}%
\label{tab:donation}%
\end{table}%

建议修改为

% \usepackage{array}

\begin{table}[htbp]
  \small
  \centering
  \caption{Elegant\LaTeX{} 系列模板捐赠榜}
    \begin{tabular}{*{8}{>{\scriptsize}c}}
    \toprule
    \textbf{捐赠者} & \textbf{金额} & \textbf{时间} & \textbf{渠道} & \textbf{捐赠者} & \textbf{金额} & \textbf{时间} & \textbf{渠道} \\
    \midrule
    Lerh  & 10 RMB & 2019/5/15 & 微信    & 刘志阔   & 99.99 RMB & 2019/10/15 & 支付宝 \\
    越过地平线 & 10 RMB & 2019/5/15 & 微信    & *涛    & 16 RMB & 2019/10/17 & 微信 \\
    银桑    & 20 RMB & 2019/5/27 & 微信    & 赤霓    & 12 RMB & 2019/10/17 & 支付宝 \\
    *空    & 10 RMB & 2019/5/30 & 微信    & 追寻原风景 & 10 RMB & 2019/10/28 & 微信 \\
    latexstudio.net & 666 RMB & 2019/6/5 & 支付宝   & 郭德良   & 88 RMB & 2019/11/3 & 微信 \\
    Cassis & 11 RMB & 2019/6/30 & 微信    & 自强不息  & 20 RMB & 2019/11/4 & 支付宝 \\
    *君    & 10 RMB & 2019/7/23 & 微信    & 读书之虫  & 20 RMB & 2019/11/18 & 微信 \\
    P*u   & 50 RMB & 2019/7/30 & 微信    & *等    & 10 RMB & 2019/11/18 & 微信 \\
    *萌    & 19 RMB & 2019/8/28 & 微信    & *哲    & 20 RMB & 2019/11/18 & 微信 \\
    曲豆豆   & 10 RMB & 2019/8/28 & 微信    & 佚名    & 10 RMB & 2019/11/24 & 微信 \\
    李博    & 100 RMB & 2019/10/6 & 微信    & Jiye Qian & 66 RMB & 2019/12/4 & 微信 \\
    Njustsll & 10 RMB & 2019/10/11 & 微信    & 阳仔    & 20 RMB & 2019/12/5 & 微信 \\
    \bottomrule
    \end{tabular}%
  \label{tab:donation}%
\end{table}%

段间距

请问怎么调整正文段间距

Undefined control sequence

newtheorem 由于 \bfseries 与汉字(如”注“)之间没加空格 报错

\ifdefstring{\ELEGANT@lang}{cn}{
  	\theoremstyle{plain}% default
	\newtheorem{theorem}{定理}[section] %
	\newtheorem{lemma}[theorem]{引理} %
	\newtheorem{proposition}[theorem]{性质} %
	\newtheorem*{corollary}{推论} %
	\theoremstyle{definition} %
	\newtheorem{definition}{定义}[section] %
	\newtheorem{conjecture}{猜想}[section] %
	\newtheorem{example}{例}[section] %
	\theoremstyle{remark} %
	\newtheorem*{remark}{\normalfont\bfseries 评论} %
	\newtheorem*{note}{\normalfont\bfseries 注} %
	\newtheorem{case}{\normalfont\bfseries 案例} %
	\renewcommand*{\proofname}{\normalfont\bfseries\color{ecolor}证明} %
	\renewcommand\contentsname{\color{ecolor}目录}
	\renewcommand\refname{\color{ecolor}参考文献} %
	\renewcommand\figurename{图} %
	\renewcommand\tablename{表}

报错为

! Undefined control sequence.
<argument> \normalfont \bfseries注

l.419 注
       意^^I
?

我的环境

xelatex --version                                                                  [d691b71]
XeTeX 3.14159265-2.6-0.99999 (TeX Live 2018/Arch Linux)                                       
kpathsea version 6.3.0
Copyright 2018 SIL International, Jonathan Kew and Khaled Hosny.                              
There is NO warranty.  Redistribution of this software is                                     
covered by the terms of both the XeTeX copyright and                                          
the Lesser GNU General Public License.
For more information about these matters, see the file                                        
named COPYING and the XeTeX source.
Primary author of XeTeX: Jonathan Kew.
Compiled with ICU version 63.1; using 63.1
Compiled with zlib version 1.2.11; using 1.2.11                                               
Compiled with FreeType2 version 2.9.1; using 2.10.0                                           
Compiled with Graphite2 version 1.3.13; using 1.3.13                                          
Compiled with HarfBuzz version 2.3.1; using 2.3.1                                             
Compiled with libpng version 1.6.36; using 1.6.36                                             
Compiled with poppler version 0.74.0
Compiled with fontconfig version 2.13.1; using 2.13.1

Github 上的 2.20 版本将设置 `lang=en` 将无法显示中文。

由于目前 release 的 2.10 版本需要手动指定相关字体(本人使用 linux),因此我尝试直接使用 2.20 版本,发现在设置 lang=en 时 pdf 上将无法显示中文。(设置 lang=cn 可以显示中文)

使用 latexmk 进行编译,相关设置如下:

# 参考:https://www.latexstudio.net/archives/51493.html

# 指定默认编译器,1 pdflatex,5 xelatex
$pdf_mode = 5;
 
# 自定义相关编译命令
$pdflatex = "pdflatex -file-line-error -halt-on-error -interaction=nonstopmode -synctex=1 %O %S";
$xelatex = "xelatex -shell-restricted -file-line-error -halt-on-error -interaction=nonstopmode -no-pdf -synctex=1 %O %S";
# 这里不使用 xelatex 直接生成 pdf 转而用 xdvipdfmk 是为了节省嵌入图片的时间
$xdvipdfmx = "xdvipdfmx -E -o %D %O %S";
 
# 智能化清除 bibtex 命令执行过程中的临时文件
$bibtex_use = 1.5;
 
$out_dir = "latex.out";
 
$pdf_previewer = "start zathura %O %S";
$preview_continuous_mode = 1;
 
$clean_ext = "hd nav snm synctex.gz xdv";
 
add_cus_dep('nlo', 'nls', 0, 'nlo2nls');
sub nlo2nls {
    system("makeindex -s nomencl.ist -o \"$_[0].nls\" \"$_[0].nlo\"");
}
push @generated_exts, "nlo", "nls";

可以复现这一状况的 .tex 源文件:

\documentclass[blue,pc,lang=en]{elegantnote}

\title{ElegantNote: An Elegant \LaTeX{} Template for Notes}

\author{\href{https://ddswhu.me/}{Dongsheng Deng}}
\institute{\href{https://elegantlatex.org/}{Elegant\LaTeX{} Program}}
\version{2.20}
\date{April 25, 2019}

\begin{document}
\maketitle
% logo
\centerline{\includegraphics[width=0.25\textwidth]{logo.pdf}}

\section{some english and 一些中文}
some english and 一些中文
\end{document}

DeepinScreenshot_select-area_20190919201554

设置 en 后无法生成 pdf

问题:
设置 \documentclass[cn,PC,12pt]{elegantnote} 后,在 Texpad 上无法生成对应 PDF,但无 errors 或 warnings。
若设置 \documentclass[en,PC,12pt]{elegantnote},则输入中文为乱码。

系统:
OS: MacOS Big Sur 11.6
elegantnote: 2.3.0
Texpad: 1.9.6

中文模板显示英文的日期格式

系统: ubuntu 18.04; 语言:English; 格式:**

在更新处,显示的是英文格式:July 18, 2019.

请问,怎么在我现有的系统、语言、格式的设定情况下,把时间格式改为中文格式?

谢谢!

LaTeX Error: The key 'ctex/section' is unknown and is being ignored.

想使用ctex的ctexset对section的格式进行设置,总是提示:The module 'ctex' does not have a key called 'ctex/section'

%!TEX program = xelatex
\documentclass[cn,hazy,black,14pt,normal]{elegantnote}
\usepackage[UTF8,heading=true]{ctex}
\usepackage{tcolorbox}
\ctexset{section={
nameformat+=\sectionFormat
}%
}%
\newcommand\sectionFormat[1]{%
\tcbox[on line]{#1}%
}

\title{**哲学简史\%
A Short History of Chinese Philosophy\%
}

\author{冯友兰}

\begin{document}
\maketitle %生成标题
\section{**哲学的精神}%第1章
\section{**哲学的精神2}%第2章
\section{**哲学的精神3}%第3章
\end{document}

Centering of contentsname and page numbers

一,目录生成时,“目录”是靠左的,想让目录居中,加\renewcommand{\contentsname}{\centerline{目录}},“目录”居中但与目录内容间距过大;

二,设备选择如果是screen,页码是居中的,但在normal (A4) 模式下,页码不居中。

新版本会发布到ctan吗?

之前遇到过newtx版本不兼容的问题,看到最近的commits中已经修复了,但是在ctan里还是2.30的版本。请问什么时候会发布到ctan呢

! LaTeX3 Error: Command '\heiti' already defined!

问题背景和描述

  • windows10, texlive2019

命令行编译的报错信息:(虽然一路回车过去也能出pdf)

! LaTeX3 Error: Command '\songti' already defined!

For immediate help type H <return>.
 ...

l.111 ...d \songti   { } { \CJKfamily { zhsong } }

?

! LaTeX3 Error: Command '\heiti' already defined!

For immediate help type H <return>.
 ...

l.112 ...nd \heiti    { } { \CJKfamily { zhhei } }

?

! LaTeX3 Error: Command '\fangsong' already defined!

MWE

\documentclass[hazy, pad, blue, 14pt]{elegantnote}
\usepackage{ctex}

\title{概率论的基本概念}
\author{lanling}
\version{1.0}
\date{}

\begin{document}

\maketitle

测试

\end{document}

选项[math=mtpro2]似乎没有效果

我在使用 ElegantNote 时使用了 math=mtpro2 选项以启用 mtpro2 字体,但在输出的 pdf 中公式仍然为默认的 cm 字体。

我使用的 LaTeX 引擎为 XeLaTeX,TeXLive 2022,ElegantNote 版本 2.40。

ElegantPaper 与 ElegantBook 正常启用了 mtpro2。

与 wrapfig2 的宏包兼容性?

偶然发现,在使用 elegantnote 文档类搭配 wrapfig2 宏进行文字绕排时,编译报错如下:

No counter 'chapter' defined. }(}

但能生成pdf。如图所示
note
error

MWE:

\documentclass[cn]{elegantnote}
\usepackage{wrapfig2}
\usepackage{zhlipsum}
\begin{document}
	\zhlipsum[1]
	\begin{wrapfigure}{r}{0.35\textwidth}
	\centering\unitlength=1mm
	\begin{picture}(40,30)
		\polygon(0,0)(40,0)(40,30)(0,30)
		\Line(0,0)(40,30)\Line(0,30)(40,0)
	\end{picture}
	\caption{book test}
	\end{wrapfigure}
\zhlipsum[2]
\end{document}

但如果仅仅将 note 改为 paper 或 book 文档类,不报错,如下图:

paper

book

MacOS 编译出错

  • 系统:MacOS Mojave,版本 10.14.3

  • LaTeX 环境:TexLive 2018( 对应 MacTeX 20180417 版本)

  • LaTeX 编辑器:TeXMaker,编译方法 XeLaTeX

  • 编译 ElegantNote 中文和英文版均出现问题,如下图,看似缺少字体。在编译 ElegantBook 也有此问题。

  • 但编译 ElegantArticle 中文没有问题。

能否解决 MacOS 以及其他 Linux 比如 Ubuntu 上的模板问题呢?希望能跨平台,字体可以用通用字体,或者能配置在仓库里?

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.