3

In this text, the note is on the right side of a number of lines with curly braces and the text written vertically.

litany

How can this be achieved? I am using paracol and xelatex but I am open to suggestions.

  • Please don't add an answer into the question. If you find yourself an answer to your question post it an answer using the "Your Answer" field below! – Schweinebacke Nov 7 '17 at 9:34
  • 1
    In a day or so you can accept your answer. I doubt that will give you any points, but it will remove the question from the unanswerrd list. – John Kormylo Nov 8 '17 at 5:39
3

Solved the problem.

\documentclass{scrbook}
\usepackage{paracol}

\usepackage{lipsum,marginnote}
\usepackage{changepage}\strictpagecheck
\usepackage[many]{tcolorbox}
\usepackage{tikz}
\usetikzlibrary{arrows,decorations.pathreplacing,tikzmark}
\tikzset{remember picture}

\newtcolorbox{leftcol}[1]{%\begin{tcbdecor}{<note>}<text>\end{tcbdecor}
colback=white, boxrule=0pt, colframe=white,  arc=0pt,  outer arc=0pt,  
top=0pt,  bottom=0pt,%
check odd page,breakable,enhanced jigsaw,oversize,%
overlay={\ifoddpage\draw[decoration={brace},decorate] (frame.north east) -- 
node[rotate=-90,above=4pt] {#1} (frame.south east);%
\else\draw[decoration={brace},decorate] (frame.north east) -- 
node[rotate=-90,above=4pt] {#1} (frame.south east);\fi}}  

\newtcolorbox{rightcol}[1]{%\begin{tcbdecor}{<note>}<text>\end{tcbdecor}
colback=white, boxrule=0pt, colframe=white,  arc=0pt,  outer arc=0pt,  
top=0pt,  bottom=0pt,%
check odd page,breakable,enhanced jigsaw,oversize,%
overlay={\ifoddpage\draw[decoration={brace},decorate] (frame.north west) -- 
node[rotate=-90,above=4pt] {#1} (frame.south west);%
\else\draw[decoration={brace},decorate] (frame.north east) -- 
node[rotate=-90,above=4pt] {#1} (frame.south east);\fi}}

\begin{document}
\NewDocumentEnvironment{hangparacol}{mo}
{\IfNoValueTF{#2} {\begin{paracol}{#1}}{\begin{paracol}{#1}[#2]}%
\raggedright
\parindent=3em \leftskip=3em}
{\end{paracol}}
\columnratio{0.5}
\setlength{\columnsep}{50pt}

\begin{paracol}{2}
\begin{leftcol}{I don't like TikZ decorates}
\lipsum[1]\end{leftcol}
\switchcolumn
\begin{rightcol}{I don't like TikZ decorates}
\lipsum[1]\end{rightcol}
\end{paracol}

\end{document}

img

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.