![Adjustbox 吃掉了我的换行符](https://linux22.com/image/259279/Adjustbox%20%E5%90%83%E6%8E%89%E4%BA%86%E6%88%91%E7%9A%84%E6%8D%A2%E8%A1%8C%E7%AC%A6.png)
抱歉,MWE 太长了。想了解我在这里做错了什么。试图将其缩短为制作一些幻灯片的更长时间练习的一部分。(这是网站其他地方引用的图形的图例)。adjustbox 为什么这样做?我该如何阻止它。
\documentclass[10pt,landscape]{article}
%\usepackage{preamble}
\usepackage[left=0.5in,right=1in,top=2in,bottom=1.5in]{geometry}
\usepackage{tikz}
\usepackage{textpos}
\usepackage{adjustbox}
\usepackage{marvosym}
\usepackage{anyfontsize}
\usepackage{xcolor}
\PassOptionsToPackage{table}{xcolor}
\PassOptionsToPackage{kernelfbox}{xcolor}
\usetikzlibrary{positioning,shapes.geometric,shapes,arrows,chains,mindmap,trees,backgrounds}
\setlength{\TPHorizModule}{1in}\setlength{\TPVertModule}{1in}
\definecolor{ablue1}{RGB}{0,79,182}
\definecolor{agrey1}{RGB}{164,174,181}
\definecolor{ablue2}{RGB}{0,169,224}
\definecolor{agrey2}{RGB}{81,98,111}
\definecolor{ablue3}{RGB}{114,199,231}
\definecolor{agreen1}{RGB}{89,179,55}
\definecolor{ayellow1}{RGB}{255,184,28}
\definecolor{agreen2}{RGB}{39,89,55}
\definecolor{ablue4}{RGB}{194,222,234}
\definecolor{agreen3}{RGB}{0,121,52}
\definecolor{agreen4}{RGB}{169,220,146}
\definecolor{aorange}{RGB}{229,114,0}
\definecolor{ayellow2}{RGB}{248,234,142}
\def\Mgt{\textcolor{agrey2}{\Gentsroom}}
\def\Inveq{\textcolor{ayellow1}{\Gentsroom}}
\def\Invfi{\textcolor{ayellow2}{\Gentsroom}}
\def\Rel{\textcolor{agreen1}{\Gentsroom}}
\def\Rem{\textcolor{ablue2}{\Gentsroom}}
\def\Adm{\textcolor{aorange}{\Gentsroom}}
\def\Rsk{\textcolor{agrey1}{\Gentsroom}}
\def\Bzd{\textcolor{ablue4}{\Gentsroom}}
\def\Sup{\textcolor{agreen3}{\Gentsroom}}
\usepackage{helvet}
\renewcommand{\familydefault}{\sfdefault}
\begin{document}
\begin{textblock}{2}[0,0](0,-2)
\begin{minipage}[r][0.5\textheight][b]{0.25\paperwidth}
\adjustbox{scale={0.75}}{
{\Mgt} {\scriptsize Msldfk} \par
{\Bzd} {\scriptsize Bsadlfsj} \newline
{\Rsk} {\scriptsize Rwelj} \tabularnewline
{\Rem} {\scriptsize Rweld} \\
{\Adm} {\scriptsize Afddsf} \\
{\Rel} {\scriptsize Refsdfd} \\
{\Invfi} {\scriptsize Fikjlkjklj} \\
{\Inveq} {\scriptsize Ejknsdfd}\\
{\Sup} {\scriptsize Support}\\
}
\end{minipage}
\end{textblock}
\end{document}
答案1
我无法回答为什么它会忽略换行命令(一定有充分的理由!)但我可以告诉你如何以避免这种情况。
给出adjustbox
选择minipage
。编辑在这种情况下,您可以省略使用的 outer minipage
,并将所有选项提供给adjustbox
option。在您的示例中:
\begin{textblock}{2}[0,0](0,-2)
\noindent\adjustbox{minipage=[r][0.5\textheight][b]{0.25\paperwidth},scale={0.75}}{
{\Mgt} {\scriptsize Msldfk} \\
{\Bzd} {\scriptsize Bsadlfsj} \\
{\Rsk} {\scriptsize Rwelj} \\
{\Rem} {\scriptsize Rweld} \\
{\Adm} {\scriptsize Afddsf} \\
{\Rel} {\scriptsize Refsdfd} \\
{\Invfi} {\scriptsize Fikjlkjklj} \\
{\Inveq} {\scriptsize Ejknsdfd}\\
{\Sup} {\scriptsize Support}
}
\end{textblock}