summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/tiet-question-paper/README.md
blob: e03586d4fece6d030edbc33617a858729fd57dd1 (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
# `tiet-question-paper.cls` #

[Installation](#installation) | 
[Usage](#usage) | 
[Emacs Org Integration](#emacs-org-integration)

Author: Raghav B. Venkataramaiyer  
Email: bv.raghav -at- thapar -dot- edu  
Email: bvraghav -at- gmail -dot- com  
License: [MIT License](./LICENSE)  
Version: 2024-06-22

Provide a document class `tiet-question-paper` in order
to create a question paper for [the Thapar
Institute](https://thapar.edu/) in $\LaTeX$.  Although
created for the TIET, the module, however, is adaptable
to any organisation.

The following example is a screenshot from
[`sample.pdf`](./sample.pdf), with the source at
[`sample.tex`](./sample.tex)

![](./images/sample.png)

## Installation ##

### CTAN ###

TBA

### From Source ###

1. `tlmgr init-usertree`
2. `kpsewhich -var-value=TEXMFHOME` should return
   `~/texmf`
3. `mkdir -p ~/texmf/tex/latex`
4. `cd ~/texmf/tex/latex`
5. `git clone
   git@github.com:bvraghav/qptiet_latex-class tiet-question-paper`
6. Verify that `kpsewhich tiet-question-paper.cls` finds `tiet-question-paper.cls`.

## Usage ##

### Document Class ###

The document class is based on `article`.  And all the
options are passed forward as is.

```latex
\documentclass[11pt,onecolumn]{tiet-question-paper}
```

### Title Block ###

Only the following macros contribute to the title block.

```latex
\date{28 May 2024}
% \institute{Thapar Institute of Engineering \&
%   Technology}                   % Default value
% \abbrevinst{\textsc{tiet}}      % Reserved for future
% \instaddress{Patiala 147004}    % Reserved for future
% \cohort{}                       % Reserved for future
% \instlogo{images/tiet-logo.pdf} % Optional
\schoolordepartment{Computer Science \& Engineering Department}
\examname{End Semester Examination}
\coursecode{UCS505}
\coursename{Computer Graphics}
\timeduration{3 hours}
\maxmarks{45}
\faculty{ANG,AMK,HPS,YDS,RGB}
```

### Geometry ###

The class loads `geometry` package with following
default options,

```latex
\RequirePackage[%
  a4paper,%
  left=1in,%
  top=0.5in,%
  right=0.75in,%
  bottom=0.75in%
]{geometry}
```

However, a user may reconfigure using `\geometry`
command in [the
preamble](https://duckduckgo.com/?q=what+is+a+preamble+in+latex+document)
for example,

```latex
\geometry{letterpaper,bindingoffset=0.2in,
          left=1.2in,right=1.2in,top=.8in,bottom=.8in,
          footskip=.25in}
```

### Rules ###

```latex
\bvrhrule
\bvrhrule[2pt]
```
Create a horizontal rule with length equal to line
width and thickness `0.4pt` by default.  Optional
argument specifies line thickness.  Here’s the
implementation detail,

```latex
\DeclareRobustCommand%
% Horizontal rule after each question
\bvrhrule[1][0.4pt]{\rule{\linewidth}{#1}}
```

### Line Skip ###

```latex
\bvrskipline
\bvrskipline[1.2]
```

Create vertical blank space with height specified as a
factor of `\baselineskip`.  Optional argument specifies
the factor, `1.0` by default.  Here’s the
implementation detail,

```latex
\DeclareRobustCommand%
% Skip line
\bvrskipline[1][]{\vspace{#1\baselineskip}}
```

## Emacs Org Integration ##
Add the following to [the
init-file](https://www.gnu.org/software/emacs/manual/html_node/emacs/Init-File.html) 
```elisp
(add-to-list 'org-latex-classes
	     `("tiet-question-paper" "\\documentclass{tiet-question-paper}
[NO-DEFAULT-PACKAGES]
\\usepackage{amsmath}
\\usepackage{graphicx}
\\usepackage{wrapfig}
\\usepackage{amssymb}
\\usepackage[unicode]{hyperref}
" nil))
```

Here’s a [`sample-org`](./sample-org.org) file; that
produces a [`PDF`](./sample-org.pdf)