2

I am using tikz to put braces around an enumerated list as mentioned here. I have two curly braces with multiple comments as shown below

enter image description here

The problem is I am not able to get the braces at the right place when my list is at a page end. The braces appear on the next page at weird positions. Interestingly if I move my list to some other position away from the page end, I get it at the right place. Here is the code

 \documentclass[sunil1]{sunil}

  \usepackage{lmodern,calc,tikz,textcomp}
  \usetikzlibrary{tikzmark,decorations.pathreplacing}
  \usetikzlibrary{calc}

\begin{document}
\newcommand\insm{%
  $\left.\rule{0pt}{1.6\baselineskip}\right\}$\parbox{\textwidth-2ex}{%
  \setlist[1]{itemsep=-5pt}
  \begin{itemize}
   \item[] (\textit{a} to \textit{b})
   \item[]Deformations 
   \item[] (\textit{b} to \textit{c})
  \end{itemize}}
 }    
\newcommand\wnsm{%
  $\left.\rule{0pt}{1.6\baselineskip}\right\}$\parbox{\textwidth-1ex}{%
  \setlist[1]{itemsep=-2pt}
  \begin{itemize}
   \item[] 
   \item[]Rigid-Body Motion
   \item[] (\textit{c} to \textit{d})
  \end{itemize}}
}

\begin{enumerate}
  \item A change in size (extension or contraction)\tikzmark{S}
  \item A change in shape (shear or distortion) \tikzmark{E}
  \item A rigid-body translation\tikzmark{W}
  \item A rigid-body rotation \tikzmark{N}
\end{enumerate}

 \tikz[remember picture, overlay]{%
   \node [shift={(1ex,.6ex)},text width=5.5cm,anchor=west] at ($(pic cs:S)!.5!(pic cs:E)$){\insm};}
 \tikz[remember picture, overlay]{%
   \node [shift={(1ex,.6ex)},text width=5.5cm,anchor=west] at ($(pic cs:W)!.5!(pic cs:N)$){\wnsm};}
\end{document}
Qrrbrbirlbel
  • 119,821
  • Where do you want to put braces if items are on different pages? – Paul Gaborit Mar 19 '16 at 13:51
  • No, the items should be on the same page. Just that I want to put the them at ending of a page, but when I do that, the braces appear on the next page at weird positions, floating around inside the text. I want them to be exactly as in the picture. – Vishal Minhas Mar 19 '16 at 14:00
  • Don't put a paragraph break before the \tikz commands. You may also need to put them before the end of the enumerate environment. The point is you need them to be processed before the page is shipped out. – cfr Mar 19 '16 at 14:03
  • @cfr Thanks but that doesn't help. – Vishal Minhas Mar 19 '16 at 14:14
  • Can you reproduce the problem with a standard class? If so, edit your example accordingly. If not, presumably something in the class is implicated and you'd need to provide a link. – cfr Mar 19 '16 at 22:04
  • Please don't ask the same question twice. It clutters up the site and duplicates effort to no purpose whatsoever. You can always edit a question to add additional information. – cfr Mar 19 '16 at 22:30
  • @cfr I have deleted the previous question now. Thanks. The class file I am using can be found here https://cyberaide.googlecode.com/svn/trunk/papers/11-greenit-bookch/sunil.cls – Vishal Minhas Mar 20 '16 at 07:17
  • If it helps, the braces and the accompanying text are moving exactly one page further to the next page if I place this code towards a page end. – Vishal Minhas Mar 21 '16 at 15:01

0 Answers0