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

\usepackage[blue]{unifront}
\usepackage{hyperref}

%% Document information
\author{Weifan W.}
\date{04/05/2023}

%% Document start from here
\begin{document}

\newtitle{This is a title name}{5}{\currentchapter{chapter1name}{chapter2name}}

%% Chapter1 start from here
\newchapter{chapter1name}{12}{\currentsections{section1name}{section2name}{section3name}{section4name}}

%% section1 start from here
\newsection{section1name}{5}{\currentsubsections{subsection1name}{subsection2name}}
This is a sentence.

\newsubsection{subsection1name}
This is a sentence.

\newsubsection{subsection2name}
This is a sentence.

%% section2 start from here
\newsection{section2name}{5}{\currentsubsections{subsection3name}}

\newsubsection{subsection3name}
This is a sentence.

%% section3 start from here
\newsection{section3name}{4}{\currentsubsections{subsection4name}{subsection5name}{subsection6name}{subsection7name}}
This is a sentence.

\newsubsection{subsection4name}
This is a sentence.

\newsubsection{subsection5name}
This is a sentence.

\newsubsection{subsection6name}
This is a sentence.

%% section4 start from here
\newsection{section4name}{5}{\currentsubsections{subsection7name}}

\newsubsection{subsection7name}
This is a sentence.

%% Chapter2 start from here
\newchapter{chapter2name}{9}{\currentsections{section5name}{section6name}}

%% section5 start from here
\newsection{section5name}{5}{\currentsubsections{subsection8name}{subsection9name}}

\newsubsection{subsection8name}
This is a sentence.

\newsubsection{subsection9name}
This is a sentence.

%% section6 start from here
\newsection{section6name}{5}{\currentsubsections{subsection10name}{subsection11name}}

\newsubsection{subsection10name}
This is a sentence.

\newsubsection{subsection11name}
This is a sentence.

\end{document}
\end{verbatim}
% \Finale
%
\endinput