-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
124 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,3 +8,5 @@ packaging | |
handinCTAN.zip | ||
handin/ | ||
docs/handin.tex | ||
README.md.bak | ||
src/_minted-manual/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
% Use , 2018/04/01 | ||
\begin{tabular}{lll} | ||
\begin{tabularx}{\textwidth}{llX} | ||
Version&Date&Changes\\ | ||
v0.0.2&2018/04/01&Problems are now added to the table of contents by default\\ | ||
v0.0.2b34&2018/04/02&Updated documentation syntax | ||
\end{tabular} | ||
v0.0.2b34&2018/04/02&Updated documentation syntax\\ | ||
@@VERSIONB&@@DATE&\begin{itemize} | ||
\item German language added | ||
\end{itemize}\\ | ||
\end{tabularx} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# Handin/submission LaTeX template | ||
Light weight template for handing in school submissions using LaTeX. Suitable for math, physics, statistics and the like. | ||
Here is the [handin-doc.pdf](https://raw.githubusercontent.com/Strauman/Handin-LaTeX/master/docs/handin-doc.pdf) | ||
## Versions | ||
The current latest version available on GitHub is @@VERSION (@@DATE) build @@BUILD | ||
|
||
The current latest version available on CTAN is 0.0.2 (2018-04-01) build 2 | ||
|
||
*Be aware that it can take at least 24-48 hours from the CTAN date above until the package is updated on CTAN, TeXLive and MiKTeX are updated* | ||
|
||
## Super quick start | ||
### Texlive (MacOS and Linux): Only if you have texlive 2018 | ||
1. Install the package from [CTAN](https://ctan.org/pkg/handin). With `texlive`: `tlmgr install handin` | ||
if you dont have texlive 2018, you can pretest it [here](https://www.tug.org/texlive/pretest.html): https://www.tug.org/texlive/pretest.html | ||
2. Add `\usepackage{handin}` to your preamble (that is any place before `\begin{document}` | ||
|
||
### MikTeX (Windows): | ||
It's already a part of MikTeX, so just do `\usepackage{handin}` | ||
|
||
### And then | ||
use the [docs](http://mirrors.ctan.org/macros/latex/contrib/handin/handin-doc.pdf). | ||
|
||
Since this package is in early stages, the CTAN-version is probably not the latest version though. There will be multiple builds pushed here first. Current CTAN-version is `0.0.2 build 30`. | ||
|
||
## Quickstart | ||
`\usepackage{handin}`. However I reccomend checking out the example.tex in the quickstart: | ||
|
||
Download the [example.zip](https://github.com/Strauman/Handin-LaTeX-template/blob/master/example.zip?raw=true). It contains two files: [example.tex](https://raw.githubusercontent.com/Strauman/Handin-LaTeX-template/master/example.tex) and [handin.sty](https://raw.githubusercontent.com/Strauman/Handin-LaTeX-template/master/handin.sty). Build example.tex and you're all good to go. | ||
|
||
## Example files | ||
Look at the [example.pdf](https://raw.githubusercontent.com/Strauman/Handin-LaTeX-template/master/example.pdf) generated by [example.tex](https://raw.githubusercontent.com/Strauman/Handin-LaTeX-template/master/example.tex) for an example that could be used at UiT - The Arctic University of Norway. | ||
|
||
## Dependencies | ||
`inputenc,graphicx,lastpage,scrextend,fancyhdr,geometry,amsmath,mathtools,bm,esint,iflang` | ||
|
||
## Internationalization | ||
Currently using `iflang` to decide betwen norwegian and english. | ||
|
||
## Quick docs: | ||
### Commands | ||
`\problem{1}` would create a *Problem 1* headline and `\pproblem{a}` would then print *1a)* subheadline (with some margin magic and other snacks). More functionality will be made, also feel free to request functionality. | ||
|
||
### Front page (`\maketitle`) | ||
[layout.pdf](https://raw.githubusercontent.com/Strauman/Handin-LaTeX-template/master/layout.pdf?raw=true) is an overview of what commands writes out what where. They are all used as commands to be set: | ||
- `\title{Assignment title}` | ||
- `\author{Author(s)}` | ||
- `\coursename{TST-101}` | ||
- `\coursetitle{Test course}` | ||
- `\institute{Institute of Physics and Technology}` | ||
- `\logo{path/to/logo/or/image}` | ||
- `\pagetext{Page \thepage~of \pageref{LastPage}}` | ||
- `\containspages{Contains \pageref{LastPage} pages, front page included}` | ||
|
||
`pagetext` and `containspages` are set to the values you see above. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,42 @@ | ||
cd $sourceDir; | ||
cp $tmpDir/handin.sty ./ | ||
|
||
|
||
# cp bin/example.pdf ./ | ||
cp example.tex ./handin | ||
cp img/universityTromsoLogo.pdf ./handin | ||
|
||
cp layout.tex handin/ | ||
|
||
cd handin/ | ||
outHandle "Error in latexmk example" latexmk -pdf "example.tex" -outdir="./bin" --shell-escape -interaction=nonstopmode -f | ||
outHandle "Error in latexmk layout" latexmk -pdf "layout.tex" -outdir="./bin" --shell-escape -interaction=nonstopmode -f | ||
cp bin/example.pdf ./ | ||
cp bin/layout.pdf ./ | ||
rm -rf bin | ||
rm layout.tex | ||
echo "$mainDir"; | ||
function tex_compile(){ | ||
pushd . >/dev/null; | ||
cd "$CTANDir" | ||
outHandle "Error in latexmk $1" latexmk -pdf "$1.tex" -outdir="./bin" --shell-escape -interaction=nonstopmode -f | ||
cp "bin/$1.pdf" ./ | ||
rm -rf bin/ | ||
popd >/dev/null; | ||
} | ||
|
||
# --- | ||
# - handin.sty : The handin package | ||
# - handin-doc.pdf : Description of how the package works | ||
# - handin-doc.tex : Source of handin-doc.tex | ||
# ^^ AUTO | ||
# - example.tex : Contains example code | ||
# - universityTromsoLogo.pdf : An image to be used in the example | ||
add_to_CTANDir layout.tex example.tex img/universityTromsoLogo.pdf | ||
|
||
# - example.pdf : Output of example.tex | ||
tex_compile "example" | ||
# - layout.pdf : Contains an overview on which macro goes where in the new \maketitle | ||
tex_compile "layout" | ||
# layout.tex is not going to CTAN | ||
rm $CTANDir/layout.tex | ||
|
||
# Get github README ready | ||
mv ../README.md ../README.md.bak | ||
echo -e "<!---\n DO NOT EDIT THIS FILE \n EDITS SHOULD BE DONE IN src/README.template.md \n-->" > ../README.md | ||
cat README.template.md >> ../README.md | ||
cd ../ | ||
# rm example.zip | ||
# zip example.zip example.tex example.pdf img/universityTromso.pdf | ||
|
||
# cp example.zip ../ | ||
# cp example.zip handin/ | ||
|
||
rm ../example.tex | ||
cp example.tex ../ | ||
|
||
rm ../handin.sty | ||
cp handin.sty ../ | ||
|
||
rm -rf ../img | ||
cp -r ./img ../ | ||
outHandle "Error when inserting package-variables to README.md-file" $perlDir/vars.pl -v $version -p $packagename -g $github -b $build README.md | ||
|
||
rm ../layout.pdf | ||
cp layout.pdf ../ | ||
# Zip CTAN file | ||
zip handinCTAN.zip -r $CTANDir/ | ||
rm $mainDir/haninCTAN.zip | ||
rm -rf $mainDir/handin | ||
mv $sourceDir/handinCTAN.zip $mainDir/ | ||
mv $CTANDir/ $mainDir/$packagename | ||
|
||
zip handinCTAN.zip -r handin/ | ||
mv handinCTAN.zip ../ | ||
rm -rf ../handin | ||
mv handin ../ | ||
# unzip example.zip -d example | ||
echo "Tag as v${version}b$build" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.