-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathappunti_print_a4_vert.tex
executable file
·35 lines (27 loc) · 1.14 KB
/
appunti_print_a4_vert.tex
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
%!TEX encoding = UTF-8 Unicode
\documentclass[a4paper,fleqn]{report}
\usepackage[twoside,asymmetric,top=2.5cm,bottom=2cm,left=1cm,textwidth=345pt,bindingoffset=1cm,marginparwidth=5.5cm]{geometry}
\usepackage[font={sf}]{caption} % sans font in captions to distinguish them from main text
\usepackage{etoolbox} % \patchcmd
\usepackage{collect}
\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{3}
\let\oldmarginpar\marginpar
\renewcommand\marginpar[1]{\oldmarginpar{\sffamily\scriptsize #1}}
\patchcmd{\chapter}{plain}{fancy}{}{}
\newenvironment{lesson}[4]{%
% \addcontentsline{toc}{section}{Lezione \DTMdisplaydate{#1}{#2}{#3}{-1} (#4)}%
\marginpar{\large Lezione \DTMdisplaydate{#1}{#2}{#3}{-1} (#4)}}{%
}
\newcommand*\headcmacro{}
% --- SOLUTIONS ---
\definecollection{solfile}
\newcommand\mycollect[1]{\collect{solfile}{\subsection*{Soluzione esercizio #1}}{}}
\newenvironment{solution} % solution to be put in the "solutions" chapter
{\begingroup\edef\x{\endgroup\noexpand\mycollect{\theexercise}}\x}%
{\endcollect}
\newcommand\solutions{%
\appendix\chapter{Soluzioni degli esercizi}
\includecollection{solfile}}
% -----------------
\input{appunti_core.tex}