-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathnewLatex.ps1
More file actions
102 lines (85 loc) · 3.07 KB
/
Copy pathnewLatex.ps1
File metadata and controls
102 lines (85 loc) · 3.07 KB
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
if ($args) {
$loc = $args[0]
}else {
$loc = Get-Location
}
$main=@"
\documentclass[10pt]{article}
\input{settings.tex}
\title{\textbf{Name of the Experiment}}
\author{Aritra Mukhopadhyay\\(Roll. No.: 2011030)}
\date{}
\begin{document}
\maketitle
\begin{multicols*}{2}
\input{sections/aim&aparatus.tex}
\input{sections/theory.tex}
\input{sections/observations.tex}
\input{sections/calculation.tex}
\input{sections/error.tex}
\input{sections/conclusion.tex}
\bibliographystyle{apalike}
\bibliography{ref.bib}
\nocite{*}
\end{multicols*}
\newpage
\end{document}
"@
$settings=@"
% importing packages
\usepackage[left=1.6cm, right= 1.6cm, top=1.0cm, bottom=1.36cm]{geometry} % page margins
\usepackage{multicol} % multiple columns
\usepackage[utf8]{inputenc} % input encoding
\usepackage{gensymb} % math symbols
\usepackage{indentfirst} % indent first line of paragraph
\usepackage{graphicx} % adding pictures
\usepackage{float} % floating figures
\usepackage{fancyvrb} % verbatim
\usepackage{mathtools} % math
\usepackage{xfrac} % fractions
% \usepackage[italicdiff]{physics} % physics
\usepackage[center]{caption} % centering captions
\usepackage{hyperref} % for hyperlinks
\usepackage{amsmath} % for math symbols
\usepackage{physics} % for physics symbols
\usepackage{multirow} % for tables
\usepackage{amssymb} % for math symbols
\usepackage{longtable}
% defining new commands
\newcommand{\angstrom}{\textup{\AA}} % angstrom
\DeclareMathOperator{\taninv}{tan^{-1}}
\DeclareUnicodeCharacter{2212}{-}
\setlength{\columnsep}{0.5cm} % column separation
% defining graphics path
\graphicspath{ {./images/} }
% the next 5 lines help in removing the ugly
% boxes around links and making them look better
\hypersetup{
colorlinks = true,
urlcolor = black,
linkcolor = black,
citecolor = black,
}
"@
$ref=@"
@article{manual,
title = {Lab Manual},
author = {SPS},
note = {\url{https://...}},
year = {2022},
journal = {Website}
}
"@
$lorem = "Lorem ipsum dolor, sit amet consectetur adipisicing elit. Impedit mollitia illo reiciendis, nam at blanditiis dolore repellat. Placeat nisi, neque odio, debitis et possimus quo obcaecati totam cupiditate omnis culpa labore aut dolor! Ratione minima optio excepturi architecto itaque sint perspiciatis quos, molestiae nobis, porro cumque dolorem harum necessitatibus temporibus!"
Write-Output $main > "$loc\main.tex"
Write-Output $settings > "$loc\settings.tex"
Write-Output $ref > "$loc\ref.bib"
mkdir images
mkdir sections
mkdir tables
Write-Output "\section{Aim \& Aparatus}`n`t$lorem" > "$loc\sections\aim&aparatus.tex"
Write-Output "\section{Theory}`n`t$lorem $lorem" > "$loc\sections\theory.tex"
Write-Output "\section{Observations}`n`t$lorem $lorem" > "$loc\sections\observations.tex"
Write-Output "\section{Calculation}`n`t$lorem $lorem" > "$loc\sections\calculation.tex"
Write-Output "\section{Error}`n`t$lorem $lorem" > "$loc\sections\error.tex"
Write-Output "\section{Conclusion}`n`t$lorem $lorem" > "$loc\sections\conclusion.tex"