Latex - LAb Uom Progrm Updated
Latex - LAb Uom Progrm Updated
Latex - LAb Uom Progrm Updated
PART –A
1. Write the Latex command to print pmatrix, bmatrix, Bmatrix, vmatrix, Vmatrix
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{equation}
A=
\begin{pmatrix}
1 & 2 & 3 \\
4 & 5 & 6 \\
7 & 8 & 9 \\
\end{pmatrix}
\end{equation}
\begin{equation}
A=
\begin{bmatrix}
a & b & c \\
d & e & f \\
g & h & i \\
\end{bmatrix}
\end{equation}
\begin{equation }
C=
\begin{Bmatrix}
a_{11} & a_{12} & a_{13} \\
a_{21} & a_{22} & a_{23} \\
a_{31} & a_{32} & a_{33} \\
\end{Bmatrix}
\end{equation}
\begin{equation}
D=
\begin{vmatrix}
a_{11} & a_{12} & a_{13} \\
a_{21} & a_{22} & a_{23} \\
a_{31} & a_{32} & a_{33} \\
\end{vmatrix}
\end{equation}
\begin{equation}
F=
\begin{Vmatrix}
a_{11} & a_{12} & a_{13} \\
a_{21} & a_{22} & a_{23} \\
a_{31} & a_{32} & a_{33} \\
\end{Vmatrix}
\end{equation}
\end{document}
OUTPUT
Lab Activity 2
Part-A
2. Write code to produce the following equations and refer to the below equations
in your
Latex document.
and
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{equation*}
Y=\sqrt{\frac{x^2}{z}}t
\end{equation*}
\begin{equation*}
\frac{d}{dx}\int_{0}^{\infty}f(s)ds=dx
\end{equation*}
\end{document}
OUTPUT
Lab Activity
Part-A
Idli 1 25
Dosa 2 40
Coffee 1 20
Vada 2 20
\documentclass[12pt]{article}
\usepackage{epsfig,graphics}
\begin{document}
\begin{table}
\centering
\begin{tabular}{|c|c|c|} \hline
Items & Quality & Price(Rs) \\ \hline
Idli & 1 & 25\\ \hline
Dosa & 2 & 40\\ \hline
Coffee & 1 & 20\\ \hline
Vada & 2 & 20\\ \hline
\end{tabular}
\end{table}
\end{document}
OUTPUT
LATEX Lab Activity
4. Write latex commands to insert an image in PDF and JPEG format into
your document in Latex.
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\graphicspath{{./images/}}
\documentclass{article}
\begin{document}
\begin{figure}[htbp]
\includegraphics[width=1.0\textwidth,angle=0] {time-table.pdf}\\
\includegraphics[width=0.5\textwidth,angle=0] {logo.png}
\end{figure}
\end{document}
OUTPUT
Courses offered
1.B.Sc
∙ PMCS
∙ EMCS
∙ SMCS
2.BCA
3.B.Com
4.B.A
∙ HEP
∙ HPS
\documentclass{report}
\usepackage{enumitem}
\begin{document}
Courses Offered
\begin{enumerate}
\item B.sc
\begin{itemize}
\item PMCs
\item EMCs
\item SMCs
\end{itemize}
\item BCA
\item B.Com
\item B.A
\begin{itemize}
\item HEP
\item HPS
\end{itemize}
\end{enumerate}
\end{document}
OUTPUT
Part-B
1. Write the latex commands to carry out the following operations
∙ Set paper size to A4, margin to 2 inches and orientation to landscape.
∙ Insert a web address in blue color.
∙ Insert a link to local files in Magenta color.
\documentclass{report}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{hyperref}
\hypersetup{
colorlinks=true,
linkcolor=blue,
filecolor=magenta,
urlcolor=cyan,
pdfpagemode=landscape,
\begin{document}
\href{http://www.google.co.in}{Google}\\
OR\\
url: \url{http://www.google.co.in} \\
Local Link
\end{document}
2. Using beamer class create a simple presentation of 3 slides with the following
features ∙ Highlight important text
∙ Use Madrid theme
∙ Two column slide
\documentclass{beamer}
\usepackage[utf8]{inputenc}
\usetheme{Madrid}
%\usecolortheme{beaver}
%\usefonttheme{structuresmallcapsserif}
\AtBeginSection[]
\begin{frame}
\frametitle{Table of Contents}
\tableofcontents[currentsection]
\end{frame}
\begin{document}
\begin{frame}
\frametitle{Introduction to Latex}
LaTeX is a software for \alert {typesetting documents}. In other words, it's a document
preparation system. LaTeX is not a word processor, but is used as a \alert{ document markup
language}.
\begin{block}{Why LaTeX?}
\end{block}
\end{frame}
\begin{frame}
\frametitle{Two-column slide}
\begin{columns}
\column{0.5\textwidth}
LaTeX.
\column{0.5\textwidth}
Installing LaTeX.
This distribution is available for Windows, Linux, Mac OS X, and other Unix-
like operating systems. TeX Live is well maintained and it is being actively developed.
\end{columns}
\end{frame}
\end{document}
3. Using latex commands create a model question paper for 20 marks with two
sections.
\documentclass[a4paper,11pt]{exam}
\usepackage{ragged2e}
\usepackage{amsmath}
\begin{document}
\centering
\LARGE
\large
V semester BCA \\
C1 Examination \\
Computer Applications \\
INTRODUCTION TO LATEX\\
\vspace{30px}
\bf{PART A} \\
\vspace{15px}
\raggedright
\normalsize
\begin{questions}
\end{questions}
\centering
\vspace{30px}
\bf{PART B} \\
\vspace{15px}
\raggedright
\normalsize
\begin{questions}
\end{questions}
\end{document}
4. Using latex commands create a simple resume of yours.
\usepackage[english]{babel}
\usepackage[utf8x]{inputenc}
\usepackage[protrusion=true,expansion=true]{microtype}
\usepackage{geometry}
\usepackage{url}
\pagestyle{empty} % No pagenumbers/headers/footers
%%% ------------------------------------------------------------
\usepackage{sectsty}
\sectionrule{0pt}{0pt}{-5pt}{3pt}}
%%% Macros
%%% ------------------------------------------------------------
\newlength{\spacebox}
\newcommand{\MyName}[1]{ % Name
\newcommand{\NewPart}[1]{\section*{\uppercase{#1}}}
\newcommand{\PersonalEntry}[2]{
\noindent\hangindent=2em\hangafter=0 % Indentation
\noindent\hangindent=2em\hangafter=0 % Indentation
\newcommand{\EducationEntry}[4]{
\parbox{6em}{%
\normalsize \par}
\normalsize \par}
%%% ------------------------------------------------------------
\begin{document}
\MyName{Your Name}
\MySlogan{Curriculum Vitae}
\sepspace
%%% ------------------------------------------------------------
\NewPart{Personal details}{}
\PersonalEntry{Birth}{January 1, 1980}
\PersonalEntry{Phone}{(123) 000-0000}
\PersonalEntry{Mail}{\url{[email protected]}}
%%% Education
%%% ------------------------------------------------------------
\NewPart{Education}{}
University}{Descriptive text goes here. In order to maintain a stylish look, try to fill this
description with a few lines of text. Do the same for the other entries in the education section.}
\sepspace
%%% ------------------------------------------------------------
\NewPart{Work experience}{}
\sepspace
%%% ------------------------------------------------------------
\NewPart{Skills}{}
\SkillsEntry{}{English (fluent)}
\SkillsEntry{}{German (fluent)}
%%% References
%%% ------------------------------------------------------------
\NewPart{References}{}
\end{document}
Resume
\documentclass[10pt]{article}
\usepackage[margin=3cm]{geometry}
\author{[email protected]}
\date{}
\definecolor{lightgray}{gray}{0.8}
\newcolumntype{L}{>{\raggedleft}p{0.14\textwidth}}
\newcolumntype{R}{p{0.8\textwidth}}
\begin{filecontents}{publication.bib}
@article{lamport1986latex,
author={Lamport, L.},
year={1986},
publisher={Addison-Wesley}
@book{knuth2006art,
author={Knuth, D.E.},
volume={4},
year={2006},
publisher={addison-Wesley}
\end{filecontents}
\begin{document}
\maketitle
\vspace{1em}
\begin{minipage}[ht]{0.48\textwidth}
City 12345\\
State of Sabotage
\end{minipage}
\begin{minipage}[ht]{0.48\textwidth}
Nonlandian\\
+12 34 56 789
\end{minipage}
\vspace{20pt}
\section*{Objective}
Find a job.
\section*{Professional Experience}
\begin{tabular}{L!{\VRule}R}
&\lipsum[66]\\
\end{tabular}
\section*{Education}
\begin{tabular}{L!{\VRule}R}
\end{tabular}
\section*{Languages}
\begin{tabular}{L!{\VRule}R}
Klingon&Mother tongue\\
Japanese&Fair\\
\end{tabular}
\bibliographystyle{plain}
\nobibliography{publication}
\section*{Publications}
\begin{tabular}{L!{\VRule}R}
2006&\bibentry{knuth2006art}\\[5pt]
1986&\bibentry{lamport1986latex}\\
\end{tabular}
{\vspace{20pt}\newline\newline
\vspace{20pt}
\end{document}