-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnewaps.ps1
132 lines (104 loc) · 4.51 KB
/
newaps.ps1
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
if ($args) {
$loc = $args[0]
}else {
$loc = Get-Location
}
$main=@"
\documentclass[reprint,amsmath,amssymb,aps]{revtex4-2}
\input{settings.tex}
\begin{document}
\title{Title of the experiment}
\author{Aritra Mukhopadhyay}
\affiliation{
National Institute of Science Education and Research\\
Bhubaneswar, Odisha 751005, India\\
3rd year, Integrated M.Sc. Physics\\
Roll No.: 2011030
}
\date{\today}
\input{sections/abstract.tex}
\maketitle
\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{document}
"@
$settings=@"
% % % importing packages
% \usepackage{multicol} % multiple columns
% \usepackage[utf8]{inputenc} % input encoding
% % \usepackage{multirow} % for tables
% % \usepackage[italicdiff]{physics} % physics
% % \usepackage{longtable}
\usepackage{float} % floating figures
\usepackage{gensymb} % math symbols
\usepackage{indentfirst} % indent first line of paragraph
\usepackage{fancyvrb} % verbatim
\usepackage{mathtools} % math
\usepackage{xfrac} % fractions
\usepackage[center]{caption} % centering captions
\usepackage{amsmath} % for math symbols
\usepackage{physics} % for physics symbols
\usepackage{amssymb} % for math symbols
\usepackage{hyperref} % for hyperlinks
\usepackage{graphicx} % adding pictures
\usepackage{dcolumn}
\usepackage{bm}
% 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!"
$abstract=@"
\begin{abstract}
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!
\begin{description}
\item[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!
\item[Ipsum Dolor] 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!
\end{description}
\end{abstract}
"@
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 $abstract > "$loc\sections\abstract.tex"
# \input{sections/theory.tex}
Write-Output "\section{Theory}`n`t$lorem $lorem" > "$loc\sections\theory.tex"
# \input{sections/observations.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"
# \input{sections/error.tex}
Write-Output "\section{Error}`n`t$lorem $lorem" > "$loc\sections\error.tex"
# \input{sections/conclusion.tex}
Write-Output "\section{Conclusion}`n`t$lorem $lorem" > "$loc\sections\conclusion.tex"
code .
exit