Latex:Space 在 parboxes 之间删除
Latex: Space remove between parboxes
我尝试删除文本框之间的垂直 space。但是,由于我每次都使用打开新 tikzpicture 的新命令,我想我不能使用 setspace ?
还有其他想法吗?
\documentclass[10pt,a5paper]{article}
\usepackage[left=10mm, right=10mm, bottom=15mm, top=10mm, footskip=5mm]{geometry}
\usepackage{xcolor}
\xdefinecolor{links}{RGB}{251,212,180}
\xdefinecolor{rechts}{RGB}{214,227,188}
\xdefinecolor{mitte}{RGB}{218,216,215}
\usepackage{tikz}
\usepackage{varwidth}
\usetikzlibrary{shapes}
\tikzstyle{sms} = [rectangle callout, draw,very thick, rounded corners, minimum height=20pt]
\newcommand{\smsr}[1]{\begin{flushright}
\begin{tikzpicture}
\node [sms, align=right,callout relative pointer={(0.5,0)}, fill=rechts] {\begin{varwidth}{0.7\textwidth}{#1}\end{varwidth}};
\end{tikzpicture}\end{flushright}}
\newcommand{\smsl}[1]{\begin{flushleft}
\begin{tikzpicture}
\node[sms, align=left,callout relative pointer={(-0.5,0)}, fill=links] {\begin{varwidth}{0.7\textwidth}{#1}\end{varwidth}};
\end{tikzpicture}\end{flushleft} }
\newcommand{\datum}[1]{\begin{center} \begin{tikzpicture}
\node[rectangle, very thick, text width=0.4\textwidth, rounded corners, draw,align=center, fill=mitte] {#1};
\end{tikzpicture} \end{center}}
\begin{document}
\small
\datum{Saturday, 22.July}
\smsl{Send Hallo}
\smsr{Answer Bye. Very long line to show the function of automatic line-breaking.}
\smsr{Still awake?}
\end{document}
在另一个环境中插入每个 tikzpicture
可能会插入不需要的垂直间距。也许不要使用它们:
\documentclass[10pt,a5paper]{article}
\usepackage[left=10mm, right=10mm, bottom=15mm, top=10mm, footskip=5mm]{geometry}
\usepackage{xcolor}
\xdefinecolor{links}{RGB}{251,212,180}
\xdefinecolor{rechts}{RGB}{214,227,188}
\xdefinecolor{mitte}{RGB}{218,216,215}
\usepackage{tikz}
\usepackage{varwidth}
\usetikzlibrary{shapes}
\tikzstyle{sms} = [rectangle callout, draw,very thick, rounded corners, minimum height=20pt]
\newcommand{\smsr}[1]{\hfill
\begin{tikzpicture}
\node [sms, align=right,callout relative pointer={(0.5,0)}, fill=rechts] {\begin{varwidth}{0.7\textwidth}{#1}\end{varwidth}};
\end{tikzpicture}
\par}
\newcommand{\smsl}[1]{%
\begin{tikzpicture}
\node[sms, align=left,callout relative pointer={(-0.5,0)}, fill=links] {\begin{varwidth}{0.7\textwidth}{#1}\end{varwidth}};
\end{tikzpicture}
\par}
\newcommand{\datum}[1]{%
\begin{center}
\begin{tikzpicture}
\node[rectangle, very thick, text width=0.4\textwidth, rounded corners, draw,align=center, fill=mitte] {#1};
\end{tikzpicture}
\end{center}}
\setlength{\parindent}{0pt}
\begin{document}
\small
\datum{Saturday, 22 July}
\smsl{Send Hallo}
\smsr{Answer Bye. Very long line to show the function of automatic line-breaking.}
\smsr{Still awake?}
\end{document}
我还删除了任何段落缩进,但保留了标题集,并在以下文本气泡之间留有一定距离(使用 center
)。
如果您计划将 \smsl
、\smsr
和 \datum
用于 everything,则可以使用\raggedright
、\raggedleft
和 \centering
(而不是 \smsl
的 \hfill
和 datum
的 center
)。
我尝试删除文本框之间的垂直 space。但是,由于我每次都使用打开新 tikzpicture 的新命令,我想我不能使用 setspace ? 还有其他想法吗?
\documentclass[10pt,a5paper]{article}
\usepackage[left=10mm, right=10mm, bottom=15mm, top=10mm, footskip=5mm]{geometry}
\usepackage{xcolor}
\xdefinecolor{links}{RGB}{251,212,180}
\xdefinecolor{rechts}{RGB}{214,227,188}
\xdefinecolor{mitte}{RGB}{218,216,215}
\usepackage{tikz}
\usepackage{varwidth}
\usetikzlibrary{shapes}
\tikzstyle{sms} = [rectangle callout, draw,very thick, rounded corners, minimum height=20pt]
\newcommand{\smsr}[1]{\begin{flushright}
\begin{tikzpicture}
\node [sms, align=right,callout relative pointer={(0.5,0)}, fill=rechts] {\begin{varwidth}{0.7\textwidth}{#1}\end{varwidth}};
\end{tikzpicture}\end{flushright}}
\newcommand{\smsl}[1]{\begin{flushleft}
\begin{tikzpicture}
\node[sms, align=left,callout relative pointer={(-0.5,0)}, fill=links] {\begin{varwidth}{0.7\textwidth}{#1}\end{varwidth}};
\end{tikzpicture}\end{flushleft} }
\newcommand{\datum}[1]{\begin{center} \begin{tikzpicture}
\node[rectangle, very thick, text width=0.4\textwidth, rounded corners, draw,align=center, fill=mitte] {#1};
\end{tikzpicture} \end{center}}
\begin{document}
\small
\datum{Saturday, 22.July}
\smsl{Send Hallo}
\smsr{Answer Bye. Very long line to show the function of automatic line-breaking.}
\smsr{Still awake?}
\end{document}
在另一个环境中插入每个 tikzpicture
可能会插入不需要的垂直间距。也许不要使用它们:
\documentclass[10pt,a5paper]{article}
\usepackage[left=10mm, right=10mm, bottom=15mm, top=10mm, footskip=5mm]{geometry}
\usepackage{xcolor}
\xdefinecolor{links}{RGB}{251,212,180}
\xdefinecolor{rechts}{RGB}{214,227,188}
\xdefinecolor{mitte}{RGB}{218,216,215}
\usepackage{tikz}
\usepackage{varwidth}
\usetikzlibrary{shapes}
\tikzstyle{sms} = [rectangle callout, draw,very thick, rounded corners, minimum height=20pt]
\newcommand{\smsr}[1]{\hfill
\begin{tikzpicture}
\node [sms, align=right,callout relative pointer={(0.5,0)}, fill=rechts] {\begin{varwidth}{0.7\textwidth}{#1}\end{varwidth}};
\end{tikzpicture}
\par}
\newcommand{\smsl}[1]{%
\begin{tikzpicture}
\node[sms, align=left,callout relative pointer={(-0.5,0)}, fill=links] {\begin{varwidth}{0.7\textwidth}{#1}\end{varwidth}};
\end{tikzpicture}
\par}
\newcommand{\datum}[1]{%
\begin{center}
\begin{tikzpicture}
\node[rectangle, very thick, text width=0.4\textwidth, rounded corners, draw,align=center, fill=mitte] {#1};
\end{tikzpicture}
\end{center}}
\setlength{\parindent}{0pt}
\begin{document}
\small
\datum{Saturday, 22 July}
\smsl{Send Hallo}
\smsr{Answer Bye. Very long line to show the function of automatic line-breaking.}
\smsr{Still awake?}
\end{document}
我还删除了任何段落缩进,但保留了标题集,并在以下文本气泡之间留有一定距离(使用 center
)。
如果您计划将 \smsl
、\smsr
和 \datum
用于 everything,则可以使用\raggedright
、\raggedleft
和 \centering
(而不是 \smsl
的 \hfill
和 datum
的 center
)。