\documentclass[11pt, a4paper]{amsart}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}

\usepackage{xstring}
\def\omamuuttujakieli{finnish} % Change language here
\IfStrEq{\omamuuttujakieli}{finnish}{
	\usepackage[finnish]{babel}
	}{}
\IfStrEq{\omamuuttujakieli}{english}{
	\usepackage[english]{babel}
	}{}

\usepackage[citestyle=alphabetic,bibstyle=authoryear]{biblatex}
%\usepackage[citestyle=authoryear,bibstyle=authoryear]{biblatex}
%\usepackage[citestyle=alphabetic,bibstyle=alphabetic]{biblatex}

\usepackage[bookmarks=true,bookmarksnumbered=true,hidelinks]{hyperref}

\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{amsthm}

\usepackage{faktor}

\usepackage{mathtools}
\usepackage{verbatim}
\usepackage{enumitem}

%\usepackage{geometry}      %muokkaa sivukokoa tai margineita
\usepackage{setspace}
\usepackage{lmodern}       %nätimpiä fontteja
%\usepackage{xcolor}
\usepackage{mdframed}
\usepackage{csquotes}
\usepackage{fancyhdr}

\usepackage{graphicx}
%\graphicspath{}

\usepackage{tikz}
\usepackage{tikz-cd}
\usetikzlibrary{calc}
\usetikzlibrary{patterns}
\usepackage{tkz-euclide}

\usepackage{subfiles} % load last

\tolerance=1500
\hbadness=1500

\IfStrEq{\omamuuttujakieli}{english}{
	\newtheorem{theorem}{Theorem}[section]
	\newtheorem{corollary}[theorem]{Corollary}
	\newtheorem{lemma}[theorem]{Lemma}
	\newtheorem{definition}[theorem]{Definition}
	}{}
\IfStrEq{\omamuuttujakieli}{finnish}{
	\newtheorem{theorem}{Lause}[section]
	\newtheorem{corollary}[theorem]{Korollaari}
	\newtheorem{lemma}[theorem]{Lemma}
	\newtheorem{definition}[theorem]{Määritelmä}
	}{}

\newcommand{\C}{\mathbb{C}} % Complex numbers
\newcommand{\N}{\mathbb{N}} % Natural numbers
\newcommand{\Q}{\mathbb{Q}} % Rational numbers
\newcommand{\R}{\mathbb{R}} % Real numbers
\newcommand{\Z}{\mathbb{Z}} % Integers
\newcommand{\A}{\mathbb{A}} % Affine space
%\newcommand{\A}{\mathcal{A}} % Area
\newcommand{\Proj}{\mathbb{P}} % Projective space
\newcommand{\pr}{\text{pr}} % Projection
\newcommand{\D}{\mathbb{D}} % disk
\newcommand{\Half}{\mathbb{H}} % Half-space
\newcommand{\E}{\mathcal{E}} % script E
\newcommand{\Sp}{\mathbb{S}} % Sphere
\newcommand{\Os}{\mathcal{O}}
\DeclareMathOperator{\dvol}{dvol} % volume form
\DeclareMathOperator{\vol}{vol} % volume form
\DeclareMathOperator{\diam}{diam} % diameter
\DeclareMathOperator{\grad}{grad} % gradient
\DeclareMathOperator{\Id}{Id} % identity map
\DeclareMathOperator{\Imag}{Im} % imaginary part
\DeclareMathOperator{\Isom}{Isom} % isometry group
\DeclareMathOperator{\tr}{tr} % trace
\DeclareMathOperator{\Tr}{Tr} % trace
\DeclareMathOperator{\mat}{mat} % matrix
\DeclareMathOperator{\Bl}{Bl} % Blow-up
\DeclareMathOperator{\Spec}{Spec} % Spectrum

\newcommand{\ol}[1]{\overline{#1}} % overline
\newcommand{\dif}[1]{\frac{\partial}{\partial #1}} 
\newcommand{\difbar}[2]{\left.\frac{\partial}{\partial #1}\right|_{#2}} 

\definecolor{carmine}{rgb}{0.59, 0.0, 0.09}
\newcommand{\kommentti}[1]{{\color{carmine}\it [#1]}}

\mdfdefinestyle{mustalaatikko}{linewidth=1pt,linecolor=black}


% Define the commands for CC-license
\newcommand{\cclisenssi}[1]{
	\IfStrEq{\omamuuttujakieli}{english}{
		\begin{center}
			This work is licensed under a\\
			\href{http://creativecommons.org/licenses/by-sa/4.0/}{Creative Commons Attribution-ShareAlike 4.0 International License.}
		\end{center}
		}{
		\IfStrEq{\omamuuttujakieli}{finnish}{
			\begin{center}
				Tämä teos on lisensoitu\\
				\href{http://creativecommons.org/licenses/by-sa/4.0/}{Creative Commons Nimeä-JaaSamoin 4.0 Kansainvälinen -lisenssillä}.
			\end{center}
		}{\kommentti{NO LANGUAGE VARIABLE DEFINED FOR CC-LICENSE!}}
		}
}



