tikz中的圖形垂直規則

tikz中的圖形垂直規則

我想要進行設計(類別),我想要有特殊類型的段落,該段落的{左側有字符,並且高度與整個段落的高度完全相同。另外,我想擴展它,任何 tikz 圖片都可以根據段落的長度(高度)進行縮放。

在此輸入影像描述

答案1

這就是我上面評論的,如果用法是在命令中,而不是在環境、形式中。

請注意,scalerel 對「{」符號進行完美縮放,直到寬度達到可選參數的值(在本例中為 1 英吋)。對於大於該值的比例,寬度被限制為 1 英寸,這實際上使其成為超出該點的拉伸,而不是比例。這將防止符號變得太寬。

\documentclass{article}
\usepackage{scalerel}
\usepackage{lipsum}
\newcommand\specpar[1]{%
\begin{flushright}
  \scalerel[1in]{\{}{\parbox{4in}{#1}}%
\end{flushright}
}
\parindent 0in
\parskip 1em
\begin{document}

\lipsum[1]

\specpar{\lipsum[2]}

\lipsum[3]
\end{document}

在此輸入影像描述

答案2

使用 PSTricks。xelatex為了簡單起見,編譯它。

在此輸入影像描述

\documentclass{article}
\usepackage{pstricks-add}
\usepackage{bera}
\begin{document}
Karl's students do not care about dashing patterns. 
Karl's students do not care about arrow tips. 
Karl's students, by the way, do not know what a transformation matrix is.

\begin{center}
\begin{minipage}{0.8\linewidth}
\noindent\rnode{A}{\strut}

\vspace*{-1ex}
Karl's students do not care about dashing patterns. 
Karl's students do not care about arrow tips. 
Karl's students, by the way, do not know what a transformation matrix is.

\vspace*{-2ex}
\noindent\rnode{B}{}
\psbrace[braceWidthInner=3pt,braceWidth=1pt,braceWidthOuter=5pt,linecolor=red](A)(B){}
\end{minipage}
\end{center}

Karl's students do not care about dashing patterns. 
Karl's students do not care about arrow tips. 
Karl's students, by the way, do not know what a transformation matrix is.
\end{document}

相關內容