我想将所有内容对齐到顶部,但 LaTeX 似乎会自动对齐到中心以占据所有列空间。
\documentclass[a4paper, 8pt, landscape, parindent=0pt, parskip=0pt]{extarticle}
\usepackage[utf8]{inputenc}
\usepackage{mathptmx} % more compact font
\usepackage[framemethod=TikZ]{mdframed}
\usepackage{amsmath,amssymb,amsthm,amsfonts}
\usepackage{mathtools}
\usepackage{awesomebox}
\usepackage{subfig}
\usepackage{multicol}
\usepackage{tabularx}
\usepackage{parskip}
\usepackage{array}
\usepackage{float}
\usepackage{graphicx}
\usepackage{paralist} % for compacter lists
\usepackage{hyperref} % for Todo's and similar things
\usepackage[left=4.5mm, right=4.5mm, top=4.5mm, bottom=6mm, landscape, nohead, nofoot]{geometry}
\usepackage[small,compact]{titlesec}
\usepackage{xparse}
\usepackage[listings,breakable,skins,most]{tcolorbox}
\tcbset{before upper={\parindent0em}}
\newtcolorbox{theorem}[1]{colback=red!5!white,colframe=red!75!black,fonttitle=\bfseries,title=#1,breakable,enhanced jigsaw,before=\smallskip\noindent,after=\smallskip\noindent,top=0pt, bottom=0pt}
\newtcolorbox{criterio}[1]{colback=blue!5!white,colframe=blue!75!black,fonttitle=\bfseries,title=#1,breakable,enhanced jigsaw,before=\smallskip\noindent,after=\smallskip\noindent,top=0pt, bottom=0pt}
\newtcolorbox{practical}[1]{colback=green!5!white,colframe=green!75!black,fonttitle=\bfseries,title=#1,breakable,enhanced jigsaw,before=\smallskip\noindent,after=\smallskip\noindent,top=0pt, bottom=0pt}
\newcommand*{\defeq}{\stackrel{\text{def}}{=}}
\newtcbtheorem[number within=chapter]{Theorem}{}{
enhanced,
sharp corners,
attach boxed title to top left={
xshift=-1mm,
yshift=-5mm,
yshifttext=-1mm
},
left = 0pt,
right = 0pt,
top=1.5em,
halign=center,
valign=center,
colback=white,
colframe=blue!75!black,
fonttitle=\bfseries,
boxed title style={
sharp corners,
size=small,
colback=blue!75!black,
colframe=blue!75!black,
}
}{thm}
\newenvironment{myTheorem}[2]{ \begin{Theorem}[adjusted title=#1]{}{#2}
\textbf{Theorem \thetcbcounter.} }{\end{Theorem}}
% compact text
\linespread{0.9}
\setlength{\parindent}{0pt}
% compact lists even more
\setdefaultleftmargin{0em}{0em}{0em}{0em}{0em}{0em}
% compact sections
\titlespacing*{\section}{0pt}{0em}{0em}
\titlespacing*{\subsection}{0pt}{0em}{0em}
\titlespacing*{\subsubsection}{0pt}{0em}{0em}
% coloured section headings for easier read
\titleformat{name=\section}[block]
{\sffamily}
{}
{0pt}
{\colorsection}
\newcommand{\colorsection}[1]{%
\colorbox{red!10}{\parbox[t][0em]{\dimexpr\columnwidth-2\fboxsep}{\thesection\ #1}}}
\titleformat{name=\subsection}[block]
{\sffamily}
{}
{0pt}
{\subcolorsection}
\newcommand{\subcolorsection}[1]{%
\colorbox{orange!10}{\parbox[t][0em]{\dimexpr\columnwidth-2\fboxsep}{\thesubsection\ #1}}}
\titleformat{name=\subsubsection}[block]
{\sffamily}
{}
{0pt}
{\subsubcolorsection}
\newcommand{\subsubcolorsection}[1]{%
\colorbox{blue!10}{\parbox[t][0em]{\dimexpr\columnwidth-2\fboxsep}{\thesubsubsection\ #1}}}
% environment for multicols inside a list
\NewDocumentEnvironment{listcols}{O{2} O{0pt}}
{%
\bgroup %
\setlength{\multicolsep}{#2} %
\begin{multicols*}{#1} %
}
{%
\end{multicols*} %
\egroup %
}
% multicols lines & spacing
\setlength{\columnsep}{0.2cm}
\setlength{\columnseprule}{0.2pt}
% No page numbers
\pagenumbering{gobble}
% math helpers
\DeclareMathOperator*{\argmin}{arg\,min}
\DeclareMathOperator*{\argmax}{arg\,max}
\begin{document}
\begin{multicols*}{3}
% Chapter 1
\section{Basis knowledge}
\textbf{Densità}$=\frac{massa}{volume}$\\
\textbf{Nozione in relazione ad espressioni che variano in base ad un parametro:} \label{var} Se abbiamo un'espressione $A$ che varia in base ad un parametro $\delta$, e dobbiamo un'equazione $B$ in funzione di $A$, dobbiamo considerare l'elemento infinitesimo di $A$ e l'elemento infinitesimo di $B$ per poi integrare $B$ dal parametro $\delta$ di partenza al parametro $\delta '$ di arrivo. e.g. materiale non omogeneo di massa definita secondo una legge...
\begin{myTheorem}{Fermats Last Theorem}{thm:FermatsLastTheorem}
Strategia 1: II Legge di Newton = Schema delle forze. Si può uguagliare $(F=m\cdot a)=$ schema delle forze applicate su un corpo.
\end{myTheorem}
some text
% Chapter 2
\columnbreak
\section{Calcolo vettoriale ed analisi dimensionale}
\columnbreak
...
\raggedcolumns
\end{multicols*}
\end{document}