I'm building a command to mark long texts & class them in other part of my document (with help of Malipivo). I managed to do it with collect, multido & mdframed packages. The excellent advantage of mdframed is that you can easily handle four possible cutting of a text on several pages: single, first, middle or second part. This is extraordinary for automatic commands.
So, now, I have a problem I don't solve alone :
- Following these opportunities, I want to change left lines by curly braces : just old curly braces like in symphonic scores or Diderot's encyclopedia, braces which start from the top of the marked text & coming down… (In truth, I'd use hooks, parens or angle to, like in the Andrew Swann's answer here, and with different levels like in the first Qrrbrbirlbel's answer, but with a more classic brace's style).
Here are two other issues that are less important, but if you find simple solutions… :
- How to work in
mdframed,tikzoption (maybe I don't needtikz), with two side pages ? I'm only using the leftmargin, but I'd rather use the outermargin… Exist a twoside-mode man p.9, but I don't understand how to use. - With
mdframed, I work nether in the real page margin, always in the text width. I'd like to put my lines, mark text, braces & other, outside in the real margin without affecting the text in its width. An idea ?
Here my MWE (For tikz, I use the example 5 of the third document p.5 named : position a specific symbol at line, but maybe I don't need tikz for what I want ?) :
% !TEX encoding = UTF-8 Unicode
% !TEX TS-program = arara
\documentclass{scrbook}
\usepackage{fontspec,collect,multido,lipsum}
\newcounter{extrait}\newcounter{fiche}% for my automatic command
\usepackage[framemethod=tikz,usetwoside]{mdframed}
\usetikzlibrary{calc,arrows}
\tikzset{warningsymbol/.style={rectangle, fill=white, scale=1, overlay}}
% here begin my automatic command using collect, counter, & mdframed
\newcommand\histoire[2]{\addtocounter{fiche}{1}\definecollection{his\thefiche}
\def\histo{\path let \p1=(P), \p2=(O) in ($(\x2,0)+{0.5}*(-1,\y1)$)}% this is my use of TIKZ (\histo is to simplify later)
\mdfsetup{hidealllines=true, leftline=true, leftmargin=0em,innertopmargin=0em, innerbottommargin=0em, innerrightmargin=1.5em, innerleftmargin=0.5em,%
firstextra={\histo node[warningsymbol] {\rotatebox[origin=c]{90}{#1 …}};},%
secondextra={\histo node[warningsymbol] {\rotatebox[origin=c]{90}{… #1}};},%
middleextra={\histo node[warningsymbol] {\rotatebox[origin=c]{90}{… #1 …}};},%
singleextra={\histo node[warningsymbol] {\rotatebox[origin=c]{90}{#1}};}}
\begin{mdframed}
{\begin{collect*}{his\thefiche}{}{}{\minisec{Extrait \addtocounter{extrait}{1}\theextrait : #1}}{}#2\end{collect*}}
\end{mdframed}}% end of my command
\begin{document}
\chapter{Tests}
\histoire{A}{\lipsum[1-3]}\lipsum[4]
\histoire{B}{\lipsum[5-7]}\lipsum[8]
\histoire{C}{\lipsum[9-16]}
\chapter{Restitutions}
\multido{\i=0+1}{\thefiche}{\setcounter{fiche}{1}\addtocounter{fiche}{\i}\includecollection{his\thefiche}}
\end{document}
% arara: xelatex
% arara: xelatex
This is the actual situation (in red, an example what I hope on the page 1, imagine a similar brace, longer, in the second page) :






decorations.textcan draw braces. But I'm not sure if that's what you want.... – cfr Sep 21 '15 at 03:12