4

I would like to make design (class), where I would like to have special type of paragraph that will have { character on left and will have height exactly same as height of whole paragraph. Also, I would like to extend it that any tikz picture could be scaled based on length (height) of paragraph.

enter image description here

percusse
  • 157,807
Tomas
  • 151
  • 1
    this sounds a lot like Adding a large brace next to a body of text which is where tikzmark made its first appearance- please let us know if your question is different, and if so, how :) – cmhughes Apr 04 '13 at 21:22
  • Yep, that tikzmark looks as possible way to go, but in that question they are applying it to list and I need it in paragraph. pstricks-add.sty solution does exactly what I need except I need it with tikz because my actual image more complicated design. thanks, a lot for that link – Tomas Apr 04 '13 at 22:36
  • What exactly are you planning to use instead of the brace? Notice that decorations have some restrictions, depending on what can be used to decorate. – Gonzalo Medina Apr 05 '13 at 01:22
  • The scalerel package can produce a symbol of your choice to the exact size of a target object. In this case, though, I think the paragraph material would have to be stuffed into a box (e.g., a \parbox), before scalerel could match it. Whether that approach would work for you, I'm not sure. Might depend on whether you invoke this special kind of paragraph as a command (yes it would work) or as an environment (maybe it could work). – Steven B. Segletes Apr 05 '13 at 11:08
  • I want to have several types of paragraphs, special command for each. This brace, and [this type of circle paragraphs] (http://i.imgur.com/7lc3GUl.png) and many others. That is why I am asking for general tikz solution. Now I have something like this \tikz[baseline=(char.base)]{ \node[shape=circle,draw,inner sep=1pt] (char) {#1}; \draw[-] (char) -- +(0,-1); } , but that is scaled only 1 unit, I need some variable of paragraph height. Ideally I would like to have ability to scale it also through page breaks. – Tomas Apr 05 '13 at 11:26

2 Answers2

4

This is what I commented on above, if usage is in command, rather than environment, form.

Note that scalerel does a perfect scale of the "{" symbol, until the width reaches the value of the optional argument (in this case 1in). For scales larger then that, the width is constrained to 1in, effectively making it a stretch, rather than a scale, beyond that point. This will prevent the symbol from growing too wide.

\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}

enter image description here

2

With PSTricks. Compile it with xelatex for the sake of simplicity.

enter image description here

\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}