使用迷你页面和 tikzpicture 的备忘单无法正确溢出

使用迷你页面和 tikzpicture 的备忘单无法正确溢出

这是来自 Overleaf 模板的 Cheat Sheet 模板。

问题: 框 3没有正确溢出(应该完全放在第 2 列),并且其内容继续打印到页面底部

(每一列底部的每个此类框都存在此问题)

(如果我将 Box3 的内容复制粘贴到其自身内部几次,那么 Box3 将正确溢出到列 2)

谢谢你的帮助!

演示: 在此处输入图片描述

梅威瑟:

\documentclass{article}
\usepackage[landscape]{geometry}
\usepackage{url}
\usepackage{multicol}
\usepackage{amsmath}
\usepackage{esint}
\usepackage{amsfonts}
\usepackage{tikz}
\usetikzlibrary{decorations.pathmorphing}
\usepackage{amsmath,amssymb}

\usepackage{colortbl}
\usepackage{xcolor}
\usepackage{mathtools}
\usepackage{amsmath,amssymb}
\usepackage{enumitem}
\makeatletter

\newcommand*\bigcdot{\mathpalette\bigcdot@{.5}}
\newcommand*\bigcdot@[2]{\mathbin{\vcenter{\hbox{\scalebox{#2}{$\m@th#1\bullet$}}}}}
\makeatother

\title{130 Cheat Sheet}
\usepackage[brazilian]{babel}
\usepackage[utf8]{inputenc}

\usepackage{lipsum}

\advance\topmargin-.8in
\advance\textheight3in
\advance\textwidth3in
\advance\oddsidemargin-1.5in
\advance\evensidemargin-1.5in
\parindent0pt
\parskip2pt
\newcommand{\hr}{\centerline{\rule{3.5in}{1pt}}}
%\colorbox[HTML]{e4e4e4}{\makebox[\textwidth-2\fboxsep][l]{texto}
\begin{document}

\begin{center}{\huge{\textbf{130 Final Exam Cheat Sheet}}}\\
Author name, Date
\end{center}
\begin{multicols*}{3}

\tikzstyle{mybox} = [draw=black, fill=white, very thick,
    rectangle, rounded corners, inner sep=10pt, inner ysep=10pt]
\tikzstyle{fancytitle} =[fill=black, text=white, font=\bfseries]


%------------ Box1 ---------------
\begin{tikzpicture}
\node [mybox] (box){%
    \begin{minipage}{0.3\textwidth}
    $\frac{dT}{dt} = -k(T-T_o)$ \\
    $ T_o =$ outside temperature
    \end{minipage}
};
%------------ Box1 Header ---------------------
\node[fancytitle, right=10pt] at (box.north west) {Box 1 Title};
\end{tikzpicture}

%------------ Box2 ---------------
\begin{tikzpicture}
\node [mybox] (box){%
    \begin{minipage}{0.3\textwidth}
    \lipsum[2-4]
    \end{minipage}
};
%------------ Box1 Header ---------------------
\node[fancytitle, right=10pt] at (box.north west) {Box 2 Title};
\end{tikzpicture}

%------------ Box3 ---------------
\begin{tikzpicture}
\node [mybox] (box){%
    \begin{minipage}{0.3\textwidth}
    $\frac{dT}{dt} = -k(T-T_o)$ \\
    $ T_o =$ outside temperature
    $\frac{dT}{dt} = -k(T-T_o)$ \\
    $ T_o =$ outside temperature
    $\frac{dT}{dt} = -k(T-T_o)$ \\
    $ T_o =$ outside temperature
    $\frac{dT}{dt} = -k(T-T_o)$ \\
    $ T_o =$ outside temperature
    \end{minipage}
};
%------------ Box3 Header ---------------------
\node[fancytitle, right=10pt] at (box.north west) {Box 3 Title};
\end{tikzpicture}

%------------ Box4 ---------------
\begin{tikzpicture}
\node [mybox] (box){%
    \begin{minipage}{0.3\textwidth}
    $\frac{dT}{dt} = -k(T-T_o)$ \\
    $ T_o =$ outside temperature
    \end{minipage}
};
%------------ Box4 Header ---------------------
\node[fancytitle, right=10pt] at (box.north west) {Box 4 Title};
\end{tikzpicture}


\end{multicols*}
\end{document}

答案1

在此处输入图片描述

您已加载geometry但尚未使用它,而是使用原始分配来设置布局。 指定的排版块\textheight最终大于\paperheight用于通过\pdfpageheight 增加设置 pdf 媒体大小的排版块\paperheight,从而产生所示的输出。

\documentclass{article}
\usepackage[landscape]{geometry}
\usepackage{url}
\usepackage{multicol}
\usepackage{amsmath}
\usepackage{esint}
\usepackage{amsfonts}
\usepackage{tikz}
\usetikzlibrary{decorations.pathmorphing}
\usepackage{amsmath,amssymb}

\usepackage{colortbl}
\usepackage{xcolor}
\usepackage{mathtools}
\usepackage{amsmath,amssymb}
\usepackage{enumitem}
\makeatletter

\newcommand*\bigcdot{\mathpalette\bigcdot@{.5}}
\newcommand*\bigcdot@[2]{\mathbin{\vcenter{\hbox{\scalebox{#2}{$\m@th#1\bullet$}}}}}
\makeatother

\title{130 Cheat Sheet}
\usepackage[brazilian]{babel}
\usepackage[utf8]{inputenc}

\usepackage{lipsum}

\advance\topmargin-.8in
\advance\textheight3in
\advance\paperheight1.5in

\advance\textwidth3in
\advance\oddsidemargin-1.5in
\advance\evensidemargin-1.5in
\parindent0pt
\parskip2pt 
\newcommand{\hr}{\centerline{\rule{3.5in}{1pt}}}
%\colorbox[HTML]{e4e4e4}{\makebox[\textwidth-2\fboxsep][l]{texto}
\begin{document}

\begin{center}{\huge{\textbf{130 Final Exam Cheat Sheet}}}\\
Author name, Date
\end{center}
\begin{multicols*}{3}

\tikzstyle{mybox} = [draw=black, fill=white, very thick,
    rectangle, rounded corners, inner sep=10pt, inner ysep=10pt]
\tikzstyle{fancytitle} =[fill=black, text=white, font=\bfseries]


%------------ Box1 ---------------
\begin{tikzpicture}
\node [mybox] (box){%
    \begin{minipage}{0.3\textwidth}
    $\frac{dT}{dt} = -k(T-T_o)$ \\
    $ T_o =$ outside temperature
    \end{minipage}
};
%------------ Box1 Header ---------------------
\node[fancytitle, right=10pt] at (box.north west) {Box 1 Title};
\end{tikzpicture}

%------------ Box2 ---------------
\begin{tikzpicture}
\node [mybox] (box){%
    \begin{minipage}{0.3\textwidth}
    \lipsum[2-4]
    \end{minipage}
};
%------------ Box1 Header ---------------------
\node[fancytitle, right=10pt] at (box.north west) {Box 2 Title};
\end{tikzpicture}

%------------ Box3 ---------------
\begin{tikzpicture}
\node [mybox] (box){%
    \begin{minipage}{0.3\textwidth}
    $\frac{dT}{dt} = -k(T-T_o)$ \\
    $ T_o =$ outside temperature
    $\frac{dT}{dt} = -k(T-T_o)$ \\
    $ T_o =$ outside temperature
    $\frac{dT}{dt} = -k(T-T_o)$ \\
    $ T_o =$ outside temperature
    $\frac{dT}{dt} = -k(T-T_o)$ \\
    $ T_o =$ outside temperature
    \end{minipage}
};
%------------ Box3 Header ---------------------
\node[fancytitle, right=10pt] at (box.north west) {Box 3 Title};
\end{tikzpicture}

%------------ Box4 ---------------
\begin{tikzpicture}
\node [mybox] (box){%
    \begin{minipage}{0.3\textwidth}
    $\frac{dT}{dt} = -k(T-T_o)$ \\
    $ T_o =$ outside temperature
    \end{minipage}
};
%------------ Box4 Header ---------------------
\node[fancytitle, right=10pt] at (box.north west) {Box 4 Title};
\end{tikzpicture}


\end{multicols*}
\end{document}

相关内容