用vue做的网站怎么实现响应式,网站开发的基本语言,阿里巴巴1688官网,网站及新媒体平台建设报告有时候你需要自制一份课件PPT或者手写笔记的关键词索引#xff0c;用来开卷考试查阅PPT或者复习查阅笔记时能快速定位查阅内容位置#xff0c;这时你可能想要一个按字母顺序排序的列表来帮助构建需要的索引。LaTeX自身的index本身并不支持这样的功能#xff0c;修改起来也颇…有时候你需要自制一份课件PPT或者手写笔记的关键词索引用来开卷考试查阅PPT或者复习查阅笔记时能快速定位查阅内容位置这时你可能想要一个按字母顺序排序的列表来帮助构建需要的索引。LaTeX自身的index本身并不支持这样的功能修改起来也颇为麻烦这里使用datatool包创建一个数据库然后添加条目最后排序输出。创建list数据库 DTLifdbexists{list}{DTLcleardb{list}}{DTLnewdb{list}} 定义添加行的命令sortitem newcommand{sortitem}[2]{%DTLnewrow{list}%DTLnewdbentry{list}{label}{#1}%DTLnewdbentry{list}{description}{#2}%
}定义条目输出命令showlist 这里使用列表输出用到了纸鸢段尾右对齐指定语句zhuanlan.zhihu.com中定义的myright 命令来右对齐标记页码或者其他以及DTLforeach命令来遍历数据库中的条目 newcommandshowlist{begin{itemize}DTLforeach*{list}{theLabellabel,theDescdescription}{%item {sffamilybfseriestheLabel}myright{theDesc}}%end{itemize}%
}最后定义sortedlist环境来收集条目录入数据库newenvironment{sortedlist}{%DTLifdbexists{list}{DTLcleardb{list}}{DTLnewdb{list}}%
}{%setlengthcolumnseprule{0.4pt}begin{paracol}{2}section*{Original order}showlistDTLsort{label}{list}%switchcolumnsection*{Alphabetical order}showlistend{paracol}
} 测试一下begin{sortedlist}sortitem{software engineering difficulties}{1-3}sortitem{requirements analysis}{1-8}sortitem{design and architecture}{0-1}sortitem{architecture-centric design}{0-2}sortitem{non-functional properties and design}{0-3}
end{sortedlist}输出正常完整代码documentclass[a4paper,12pt]{article}
usepackage{datatool}
usepackage[top2cm, bottom2cm, left2cm, right2cm]{geometry}
usepackage{paracol}
usepackage{enumitem}defmyright#1{%{unskipnobreakhfilpenalty50hskip1emhbox{}nobreakhfil{itshape #1}parfillskip0pt finalhyphendemerits0 par}}newcommand{sortitem}[2]{%DTLnewrow{list}%DTLnewdbentry{list}{label}{#1}%DTLnewdbentry{list}{description}{#2}%
}newcommandshowlist{begin{itemize}DTLforeach*{list}{theLabellabel,theDescdescription}{%item {sffamilybfseriestheLabel}myright{theDesc}}%end{itemize}%
}newenvironment{sortedlist}{%DTLifdbexists{list}{DTLcleardb{list}}{DTLnewdb{list}}%
}{%setlengthcolumnseprule{0.4pt}begin{paracol}{2}section*{Original order}showlistDTLsort{label}{list}%switchcolumnsection*{Alphabetical order}showlistend{paracol}
}begin{document}
begin{sortedlist}sortitem{software engineering difficulties}{1-3}sortitem{requirements analysis}{1-8}sortitem{design and architecture}{0-1}sortitem{architecture-centric design}{0-2}sortitem{non-functional properties and design}{0-3}
end{sortedlist}
end{document}