我正在尝试制作一张 A3 页面贴在我们办公室的墙上,我们有一台咖啡机,每个胶囊都有不同的选择。我想要做的是让一组minipage
s 均匀分布在里面multicol
。
我已附上Bitbuck 回购您可以看到代码(和图标),我不知道我做得是否正确,所以请对我的选择提出建议和批评。
\documentclass[12pt, landscape]{article}
\errorcontextlines 10000
%
%All the data is downloaded with Kasper Langers
%gist: https://gist.github.com/kasperlanger/fd28cb49c2535c0f5cdb
%
%
\title{Coffee Cheat Sheet}
\author{Xamarin Test Cloud}
%paper size
\usepackage[a3paper]{geometry}
\usepackage{framed}
%colums package
\usepackage{multicol}
\usepackage[space]{grffile}
\usepackage{float}
\usepackage{graphicx}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\newcommand{\coffee}[5]{
\begin{minipage}{3 cm}
\begin{figure}[H]
\includegraphics[width=2.5cm]{images/#1.png}
\end{figure}
\end{minipage}
\begin{minipage}{5cm}
\textbf{{#1}}
Intensity {#2}
\includegraphics{icons/Ristretto}{#3} ml
\includegraphics{icons/Espresso}{#4} ml
\includegraphics{icons/Lungo}{#5} ml
\\
\end{minipage}
}
\begin{document}
\begin{framed}
To select the perfect brew you have to look for your nespresso capsule and turn the dial for the right amount of water
\begin{multicols}{2}
\includegraphics[width=2cm]{icons/espressoCup.png}
The left dial have the following options:
\begin{enumerate}
\item{25 ml}
\item{30 ml}
\item{40 ml}
\item{50 ml}
\item{60 ml}
\end{enumerate}
\includegraphics[width=2cm]{icons/lungoCup.png}
The right dial have the following options:
\begin{enumerate}
\item{70 ml}
\item{90 ml}
\item{110 ml}
\item{130 ml}
\item{150 ml}
\end{enumerate}
\end{multicols}
\end{framed}
\begin{multicols}{3}
\coffee{Dharkan}{11}{25}{40}{}
\coffee{Kazaar}{12}{25}{40}{}
\coffee{Ristretto}{10}{25}{40}{}
\coffee{Arpeggio}{9}{25}{40}{}
\coffee{Roma}{8}{25}{40}{}
\coffee{Livanto}{6}{}{40}{}
\coffee{Capriccio}{5}{}{40}{}
\coffee{Volluto}{4}{}{40}{}
\coffee{Cosi}{3}{}{40}{}
\coffee{Indriya from India}{10}{25}{40}{}
\coffee{Rosabaya de Colombia}{6}{}{40}{}
\coffee{Dulsao do Brasil}{4}{}{40}{}
\coffee{Fortissio Lungo}{7}{}{}{110}
\coffee{Vivalto Lungo}{4}{}{}{110}
\coffee{Linizio Lungo}{4}{}{}{110}
\coffee{Decaffeinato Intenso}{7}{}{40}{}
\coffee{Decaffeinato Lungo}{3}{}{}{110}
\coffee{Decaffeinato}{2}{}{40}{}
\coffee{Ciocattino}{6}{}{40}{}
\coffee{Vanilio}{6}{}{40}{}
\coffee{Caramelito}{6}{}{40}{}
\end{multicols}
\end{document}
答案1
以下布局怎么样(在单张纵向 A3 纸上):
\documentclass[12pt]{article}
\usepackage[a3paper,margin=2cm]{geometry}
\usepackage{multicol,array,pifont}
\usepackage[space]{grffile}
\usepackage[export]{adjustbox}
\pagestyle{empty}
\setlength{\parindent}{0pt}
\newcommand{\coffee}[5]{%
\begin{tabular}{*{2}{p{\dimexpr.16\textwidth-1.5\tabcolsep}}}
\hfill\smash{\raisebox{-\height}{%
\includegraphics[width=2.5cm]{images/#1.png}}} &
\raggedright\textbf{#1}\arraybackslash \\
& Intensity~#2 \\
& \includegraphics{icons/Ristretto} \makebox[3em][r]{#3 \if$#3$\else ml\fi} \\
& \includegraphics{icons/Espresso} \makebox[3em][r]{#4 \if$#4$\else ml\fi} \\
& \includegraphics{icons/Lungo} \makebox[3em][r]{#5 \if$#5$\else ml\fi} \\
\null
\end{tabular}%
}
\begin{document}
\null\vfill
\begin{tabular}{*{2}{p{\dimexpr.5\textwidth-1.5\tabcolsep}}}
\centering
From the left dial, select: &
\centering
From the right dial, select:\arraybackslash \\
\includegraphics[height=5\normalbaselineskip,valign=c]{icons/espressoCup.png} \quad
\centering
\begin{tabular}{l}
\ding{172}~25 ml \\ \ding{173}~30 ml \\ \ding{174}~40 ml \\ \ding{175}~50 ml \\ \ding{176}~60 ml% http://tex.stackexchange.com/a/8473/5764
\end{tabular} &
\centering
\includegraphics[height=5\normalbaselineskip,valign=c]{icons/lungoCup.png} \quad
\begin{tabular}{l}
\ding{172}~\phantom{0}70 ml \\ \ding{173}~\phantom{0}90 ml \\ \ding{174}~110 ml \\ \ding{175}~130 ml \\ \ding{176}~150 ml% http://tex.stackexchange.com/a/8473/5764
\end{tabular}\arraybackslash
\end{tabular}
\vfill
\hrulefill
\vfill\vfill
\coffee{Dharkan}{11}{25}{40}{}
\coffee{Kazaar}{12}{25}{40}{}
\coffee{Ristretto}{10}{25}{40}{}
\coffee{Arpeggio}{9}{25}{40}{}
\coffee{Roma}{8}{25}{40}{}
\coffee{Livanto}{6}{}{40}{}
\coffee{Capriccio}{5}{}{40}{}
\coffee{Volluto}{4}{}{40}{}
\coffee{Cosi}{3}{}{40}{}
\coffee{Indriya from India}{10}{25}{40}{}
\coffee{Rosabaya de Colombia}{6}{}{40}{}
\coffee{Dulsao do Brasil}{4}{}{40}{}
\coffee{Fortissio Lungo}{7}{}{}{110}
\coffee{Vivalto Lungo}{4}{}{}{110}
\coffee{Linizio Lungo}{4}{}{}{110}
\coffee{Decaffeinato Intenso}{7}{}{40}{}
\coffee{Decaffeinato Lungo}{3}{}{}{110}
\coffee{Decaffeinato}{2}{}{40}{}
\coffee{Ciocattino}{6}{}{40}{}
\coffee{Vanilio}{6}{}{40}{}
\coffee{Caramelito}{6}{}{40}{}
\vfill\null
\end{document}
我已经删除了ml
不存在的选择的指示。