Coder Social home page Coder Social logo

bvraghav / qptiet_latex-class Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 212 KB

Provide a document class qptiet in order to create a question paper for the Thapar Institute in LaTeX. Although created for the TIET, the module, however, is adaptable to any organisation.

License: MIT License

TeX 98.86% Makefile 1.14%

qptiet_latex-class's Introduction

tiet-question-paper.cls

Installation | Usage | Emacs Org Integration | [Overleaf Template]

Author: Raghav B. Venkataramaiyer
Email: bv.raghav -at- thapar -dot- edu
Email: bvraghav -at- gmail -dot- com
License: MIT License
Version: 2024-06-22

Provide a document class tiet-question-paper in order to create a question paper for the Thapar Institute in $\LaTeX$. Although created for the TIET, the module, however, is adaptable to any organisation.

The following example is a screenshot from sample.pdf, with the source at sample.tex

Installation

CTAN

tlmgr --usermode --repository ctan install tiet-question-paper

In case there are errors like pubkey missing, or backups folder not found; Try the following (may require root permissions):

  1. mkdir -p /usr/share/tlpkg/backups
  2. tlmgr --repository ctan update --self
  3. tlmgr --repository ctan install texlive-scripts

And/ or (with local user login):

  1. mkdir -p /home/bvraghav/texmf/tlpkg/backups

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 [email protected]: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.

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

Title Block

Only the following macros contribute to the title block.

\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,

\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 for example,

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

Rules

\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,

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

Line Skip

\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,

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

Emacs Org Integration

Add the following to the init-file

(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 file; that produces a PDF

qptiet_latex-class's People

Contributors

bvraghav avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.