From 38a78463ec7f1f26051e5cdd5425d41a38c597ea Mon Sep 17 00:00:00 2001 From: Petter Reinholdtsen Date: Sat, 4 Jul 2020 10:47:07 +0200 Subject: [PATCH] =?utf8?q?Fiks=20bygging=20av=20gr=C3=B8nt=20hefte.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- Makefile | 13 ++++++++++--- SLmaster-kjemi.tex | 12 +----------- hefte-groenn.tex | 16 ++++++---------- ourmacros.tex | 10 ++++++++++ 4 files changed, 27 insertions(+), 24 deletions(-) create mode 100644 ourmacros.tex diff --git a/Makefile b/Makefile index 82c2ac4..0d2a135 100644 --- a/Makefile +++ b/Makefile @@ -18,13 +18,20 @@ clean: distclean: clean $(RM) $(PDFS) -SLmaster-kjemi.pdf: SLmaster-kjemi.tex *.tex exercise/*.tex *.bib +SLmaster-kjemi.pdf: Makefile SLmaster-kjemi.tex *.tex exercise/*.tex *.bib pdflatex SLmaster-kjemi biber SLmaster-kjemi makeindex SLmaster-kjemi pdflatex SLmaster-kjemi pdflatex SLmaster-kjemi +hefte-groenn.pdf: Makefile hefte-groenn.tex all-groenn.tex exercise/*.tex *.bib + pdflatex hefte-groenn + biber hefte-groenn + makeindex hefte-groenn + pdflatex hefte-groenn + pdflatex hefte-groenn + .gif.png: convert $^ $@ @@ -33,5 +40,5 @@ SLmaster-kjemi.pdf: SLmaster-kjemi.tex *.tex exercise/*.tex *.bib .SUFFIXES: .tex .pdf .gif .png .tiff -all-groenn.tex: *.tex exercise/*.tex - for m in $$(grep -rl '% category: green' *.tex exercise/ |grep '.tex$$'|sed 's/.tex$$//'); do echo "\include{$$m}"; done > all-groenn.tex.new && mv all-groenn.tex.new all-groenn.tex +all-groenn.tex: exercise/*.tex + for m in $$(grep -rl '% category: green' exercise/ |grep '.tex$$'|sed 's/.tex$$//'); do echo "\include{$$m}"; done > all-groenn.tex.new && mv all-groenn.tex.new all-groenn.tex diff --git a/SLmaster-kjemi.tex b/SLmaster-kjemi.tex index 601b491..d627e7d 100644 --- a/SLmaster-kjemi.tex +++ b/SLmaster-kjemi.tex @@ -1,7 +1,6 @@ \documentclass[11pt,a4paper,norsk]{book} \usepackage[norsk]{babel} %\documentclass[twocolumn,a4paper]{report} -\usepackage[norsk]{babel} \usepackage{multicol} \usepackage{color} \usepackage{fancyhdr} @@ -41,16 +40,7 @@ %%----------------------------------------------------------%% \begin{document} -\newcommand{\sv}{svovelsyre, H$_{2}$SO$_{4}$\xspace} -\newcommand{\trijodid}{nitrogentrijodid, NI$_{3}$\xspace} -\newcommand{\pik}{C$_{6}$H$_{2}$O$_{7}$N$_{3}$, Pikrinsyre\xspace} -\newcommand{\vann}{H$_{2}$O\xspace} -\newcommand{\amm}{ammoniakk, NH$_{3}$\xspace} -\newcommand{\sal}{salpetersyre, HNO$_{3}$\xspace} -\newcommand{\ma}{malonsyre CH$_{2}$(COOH)$_{2}$} -\newcommand{\hyd}{hydrogenperoksyd, H$_{2}$O$_{2}$\xspace} -\newcommand{\am}{NH$_{3}$\xspace} -\newcommand{\celcius}{$^{\circ}$C\xspace} +\include{ourmacros} \setcounter{tocdepth}{2} \makeatletter diff --git a/hefte-groenn.tex b/hefte-groenn.tex index 7750edd..1fd119f 100644 --- a/hefte-groenn.tex +++ b/hefte-groenn.tex @@ -3,7 +3,7 @@ \usepackage{multicol} \usepackage{color} \usepackage{fancyhdr} -\usepackage{bibunits} +\usepackage[refsection=section+]{biblatex} \usepackage{graphicx} \usepackage{colordvi} \usepackage{times} @@ -14,6 +14,10 @@ \usepackage{minitoc} \usepackage{amsmath} \usepackage{amssymb} %Ekstra symboler + +\addbibresource{references.bib} +\defbibheading{bibliography}[Referanser]{\subsubsection*{#1}\markboth{#1}{#1}} + \makeindex \title{Kjemi i skolen - grønt hefte} \date{utkast 2020} @@ -36,15 +40,7 @@ %%----------------------------------------------------------%% \begin{document} -\newcommand{\sv}{svovelsyre, H$_{2}$SO$_{4}$\xspace} -\newcommand{\trijodid}{nitrogentrijodid, NI$_{3}$\xspace} -\newcommand{\pik}{C$_{6}$H$_{2}$O$_{7}$N$_{3}$, Pikrinsyre\xspace} -\newcommand{\vann}{H$_{2}$O\xspace} -\newcommand{\amm}{ammoniakk, NH$_{3}$\xspace} -\newcommand{\sal}{salpetersyre, HNO$_{3}$\xspace} -\newcommand{\ma}{malonsyre CH$_{2}$(COOH)$_{2}$} -\newcommand{\hyd}{hydrogenperoksyd, H$_{2}$O$_{2}$\xspace} -\newcommand{\am}{NH$_{3}$\xspace} +\include{ourmacros} \setcounter{tocdepth}{2} \maketitle diff --git a/ourmacros.tex b/ourmacros.tex new file mode 100644 index 0000000..f04c073 --- /dev/null +++ b/ourmacros.tex @@ -0,0 +1,10 @@ +\newcommand{\sv}{svovelsyre, H$_{2}$SO$_{4}$\xspace} +\newcommand{\trijodid}{nitrogentrijodid, NI$_{3}$\xspace} +\newcommand{\pik}{C$_{6}$H$_{2}$O$_{7}$N$_{3}$, Pikrinsyre\xspace} +\newcommand{\vann}{H$_{2}$O\xspace} +\newcommand{\amm}{ammoniakk, NH$_{3}$\xspace} +\newcommand{\sal}{salpetersyre, HNO$_{3}$\xspace} +\newcommand{\ma}{malonsyre CH$_{2}$(COOH)$_{2}$} +\newcommand{\hyd}{hydrogenperoksyd, H$_{2}$O$_{2}$\xspace} +\newcommand{\am}{NH$_{3}$\xspace} +\newcommand{\celcius}{$^{\circ}$C\xspace} -- 2.47.2