本文旨在讲述:如何在LaTeX中生成复选框(可以打勾打叉的那种),制作todo list。
创作时间:2019年9月30日06:43:55
写这篇文章,主要是因为似乎在百度没有看到合适的方案,所以记录之。
方案
1) 先在\begin{document}之前添加:
% for to-do-list, check box
\usepackage{enumitem,amssymb}
\newlist{todolist}{itemize}{2}
\setlist[todolist]{label=$\square$}
% for check symbol
\usepackage{pifont}
\newcommand{\cmark}{\ding{51}}%
\newcommand{\xmark}{\ding{55}}%
\newcommand{\done}{\rlap{$\square$}{\raisebox{2pt}{\large\hspace{1pt}\cmark}}\hspace{-2.5pt}}
\newcommand{\wontfix}{\rlap{$\square$}{\large\hspace{1pt}\xmark}}
1
2
3
4
5
6
7
8
9
10
2)在正文中添加(示例代码):
\begin{itemize}
\item 2019年9月30日计划
\begin{todolist}
\item [\wontfix] 休息休息
\item [\done] 吃饭
\item [\done] 学习
\item 8点开始学习。
\item 待完成。。。
\end{todolist}
\end{itemize}
1
2
3
4
5
6
7
8
9
10
3)对应效果展示: