| 1 |
% \iffalse meta-comment |
| 2 |
%% unifront-manual.tex |
| 3 |
%% Copyright 2023 Weifan Wei |
| 4 |
% |
| 5 |
% This work may be distributed and/or modified under the |
| 6 |
% conditions of the LaTeX Project Public License, either version 1.3c |
| 7 |
% of this license or (at your option) any later version. |
| 8 |
% The latest version of this license is in |
| 9 |
% https://www.latex-project.org/lppl.txt |
| 10 |
% and version 1.3c or later is part of all distributions of LaTeX |
| 11 |
% version 2008 or later. |
| 12 |
% |
| 13 |
% This work has the LPPL maintenance status `maintained'. |
| 14 |
% |
| 15 |
% The Current Maintainer of this work is Weifan Wei |
| 16 |
% |
| 17 |
% This work consists of the files unifront-manual.tex and unifront.sty. |
| 18 |
% \fi |
| 19 |
% \iffalse |
| 20 |
%<*driver> |
| 21 |
\ProvidesFile{unifront-manual.tex}[2023-05-07 v1.0 Unique front structure] |
| 22 |
\documentclass{ltxdoc} |
| 23 |
\title{An Unique Front Structure} |
| 24 |
\author{Weifan Wei} |
| 25 |
\date{2023/05/07} |
| 26 |
\begin{document} |
| 27 |
\maketitle |
| 28 |
\DocInput{unifront-manual.tex} |
| 29 |
\end{document} |
| 30 |
%</driver> |
| 31 |
% \fi |
| 32 |
% \section{Introduction} |
| 33 |
% This package can help you format your notes easily and give them a unique front page for every chapter and section. |
| 34 |
% It calculates your progress and then displays the progress bar under the title. |
| 35 |
% It also displays a partial table of contents under every progress bar and only shows the subdirectories of the current part. |
| 36 |
% To generate this, you can simply enter your current completed titles with a command that accepts Variable Arguments. Still, that also helped you review your notes. |
| 37 |
% You can also customise the colour of the bar. |
| 38 |
% \section{Commands} |
| 39 |
% \begin{macro}{\usepackage} |
| 40 |
% \cmd{\usepackage\oarg{options}\{unifront\}} \\ |
| 41 |
% \oarg{options}: You can choose from 'red', 'blue', 'yellow', 'help'. |
| 42 |
% \end{macro} |
| 43 |
% |
| 44 |
% \begin{macro}{\currentchapter} |
| 45 |
% \cmd{\currentchapter\marg{chapter name}\marg{chapter name}...\marg{chapter name}...}\\ |
| 46 |
% You can put many \marg{chapter name} as you want after \cmd{\currentchapter} .\\ |
| 47 |
% \marg{chapter name}: The name of completed chapter. |
| 48 |
% \end{macro} |
| 49 |
% |
| 50 |
% \begin{macro}{\currentsections} |
| 51 |
% \cmd{\currentsections\marg{section name}\marg{section name}...\marg{section name}...}\\ |
| 52 |
% You can put many \marg{section name} as you want after \cmd{\currentsections}.\\ |
| 53 |
% \marg{section name}: The name of completed section. |
| 54 |
% \end{macro} |
| 55 |
% |
| 56 |
% \begin{macro}{\currentsubsections} |
| 57 |
% \cmd{\currentsubsections\marg{subsection name}...\marg{subsection name}...}\\ |
| 58 |
% You can put many \marg{subsection name} as you want after \cmd{\currentsubsections}.\\ |
| 59 |
% \marg{subsection name}: The name of completed subsection. |
| 60 |
% \end{macro} |
| 61 |
% |
| 62 |
% \begin{macro}{\newtitle} |
| 63 |
% \cmd{\newtitle\marg{title name}\marg{number of chapters}\{\cs{currentchapter}\marg{n}\marg{n}...\}}\\ |
| 64 |
% It generate the front page for your document.\\ |
| 65 |
% \marg{title name}: The name of your document.\\ |
| 66 |
% \marg{number of chapters}: The total number of the chapters you are planing to do.\\ |
| 67 |
% \{\cs{currentchapter}\marg{n}...\}: Put the name of each completed chapter in to \marg{n} in order. |
| 68 |
% \end{macro} |
| 69 |
% |
| 70 |
% \begin{macro}{\newchapter} |
| 71 |
% \cmd{\newchapter\marg{chapter name}\marg{number of sections}\{\cs{currentsection}\marg{n}\marg{n}...\}}\\ |
| 72 |
% It generate the front page for the current chapter.\\ |
| 73 |
% \marg{chapter name}: The name of the chapter.\\ |
| 74 |
% \marg{number of sections}: The total number of the sections you are planing to do.\\ |
| 75 |
% \{\cs{currentsection}\marg{n}...\}: Put the name of each completed section in to \marg{n} in order. |
| 76 |
% \end{macro} |
| 77 |
% |
| 78 |
% \begin{macro}{\newsection} |
| 79 |
% \cmd{\newsection\marg{section name}\marg{number of subsections}\{\cs{currentsubsection}\marg{n}\marg{n}...\}}\\ |
| 80 |
% It generate the front page for the current section.\\ |
| 81 |
% \marg{section name}: The name of the section.\\ |
| 82 |
% \marg{number of subsections}: The total number of the subsections you are planing to do.\\ |
| 83 |
% \{\cs{currentsection}\marg{n}...\}: Put the name of each completed subsection in to \marg{n} in order. |
| 84 |
% \end{macro} |
| 85 |
% |
| 86 |
% \begin{macro}{\newsubsection} |
| 87 |
% \cmd{\newsubsection\marg{subsection name}}\\ |
| 88 |
% It give you a subsection \\ |
| 89 |
% \marg{subsection name}: The name of the subsection. |
| 90 |
% \end{macro} |
| 91 |
% |
| 92 |
% \section{Example} |
| 93 |
% The basic structure should look like the following:\footnote{Go to \url{https://github.com/weifanw/unifront} for more information} |
| 94 |
\begin{verbatim} |
| 95 |
%% Preset |
| 96 |
\documentclass[a4paper, twoside]{report} |
| 97 |
|
| 98 |
\usepackage[blue]{unifront} |
| 99 |
\usepackage{hyperref} |
| 100 |
|
| 101 |
%% Document information |
| 102 |
\author{Weifan W.} |
| 103 |
\date{04/05/2023} |
| 104 |
|
| 105 |
%% Document start from here |
| 106 |
\begin{document} |
| 107 |
|
| 108 |
\newtitle{This is a title name}{5}{\currentchapter{chapter1name}{chapter2name}} |
| 109 |
|
| 110 |
%% Chapter1 start from here |
| 111 |
\newchapter{chapter1name}{12}{\currentsections{section1name}{section2name}{section3name}{section4name}} |
| 112 |
|
| 113 |
%% section1 start from here |
| 114 |
\newsection{section1name}{5}{\currentsubsections{subsection1name}{subsection2name}} |
| 115 |
This is a sentence. |
| 116 |
|
| 117 |
\newsubsection{subsection1name} |
| 118 |
This is a sentence. |
| 119 |
|
| 120 |
\newsubsection{subsection2name} |
| 121 |
This is a sentence. |
| 122 |
|
| 123 |
%% section2 start from here |
| 124 |
\newsection{section2name}{5}{\currentsubsections{subsection3name}} |
| 125 |
|
| 126 |
\newsubsection{subsection3name} |
| 127 |
This is a sentence. |
| 128 |
|
| 129 |
%% section3 start from here |
| 130 |
\newsection{section3name}{4}{\currentsubsections{subsection4name}{subsection5name}{subsection6name}{subsection7name}} |
| 131 |
This is a sentence. |
| 132 |
|
| 133 |
\newsubsection{subsection4name} |
| 134 |
This is a sentence. |
| 135 |
|
| 136 |
\newsubsection{subsection5name} |
| 137 |
This is a sentence. |
| 138 |
|
| 139 |
\newsubsection{subsection6name} |
| 140 |
This is a sentence. |
| 141 |
|
| 142 |
%% section4 start from here |
| 143 |
\newsection{section4name}{5}{\currentsubsections{subsection7name}} |
| 144 |
|
| 145 |
\newsubsection{subsection7name} |
| 146 |
This is a sentence. |
| 147 |
|
| 148 |
%% Chapter2 start from here |
| 149 |
\newchapter{chapter2name}{9}{\currentsections{section5name}{section6name}} |
| 150 |
|
| 151 |
%% section5 start from here |
| 152 |
\newsection{section5name}{5}{\currentsubsections{subsection8name}{subsection9name}} |
| 153 |
|
| 154 |
\newsubsection{subsection8name} |
| 155 |
This is a sentence. |
| 156 |
|
| 157 |
\newsubsection{subsection9name} |
| 158 |
This is a sentence. |
| 159 |
|
| 160 |
%% section6 start from here |
| 161 |
\newsection{section6name}{5}{\currentsubsections{subsection10name}{subsection11name}} |
| 162 |
|
| 163 |
\newsubsection{subsection10name} |
| 164 |
This is a sentence. |
| 165 |
|
| 166 |
\newsubsection{subsection11name} |
| 167 |
This is a sentence. |
| 168 |
|
| 169 |
\end{document} |
| 170 |
\end{verbatim} |
| 171 |
% \Finale |
| 172 |
% |
| 173 |
\endinput |