Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FR] Multi-page support #16

Open
undavide opened this issue Oct 2, 2019 · 2 comments
Open

[FR] Multi-page support #16

undavide opened this issue Oct 2, 2019 · 2 comments

Comments

@undavide
Copy link

undavide commented Oct 2, 2019

Hello,
it would be really nice to have page break support (i.e. awesomeboxes that can span multiple pages and break very much like mdframes do). As I'm almost null at LaTeX, I've clumsily tried to substitute tabular with longtable in the source – to no avail of course.

Thanks for considering this – and for sharing this awesome package :-)

@milouse
Copy link
Collaborator

milouse commented Oct 3, 2019

Thank you for your interest in this package :)

I must admit I never considered multi pages boxes as I always thought them as little advices components. However I may look at it if I got some times for it. I've no idea on how to achieve that for now, thus don't expect a quick answer, but if I found something, I'll let you know.

@undavide
Copy link
Author

undavide commented Oct 3, 2019

Thanks for replying!

If that might be of some help, I've been looking at the following (from the mdframed package, that does support page splitting):

\documentclass{scrbook} 
\usepackage[framemethod=tikz]{mdframed}
\usetikzlibrary{calc}
\usepackage{lipsum}
\usepackage{fontawesome5}
\usepackage{tikz}

\begin{document}

\tikzset{
  warningsymbol/.style={
      rectangle,draw=red,
      fill=white,scale=1,
      overlay}}
\mdfdefinestyle{warning}{%
 hidealllines=true,leftline=true,
 skipabove=12,skipbelow=12pt,
 innertopmargin=0.4em,%
 innerbottommargin=0.4em,%
 innerrightmargin=0.7em,%
 rightmargin=4em,%
 innerleftmargin=1.7em,%
 leftmargin=0.7em,%
 middlelinewidth=.2em,%
 linecolor=red,%
 fontcolor=red,%
 firstextra={\path let \p1=(P), \p2=(O) in ($(\x2,0)+0.5*(0,\y1)$)
                           node[warningsymbol] {\$};},%
}

\lipsum[1-3]

\begin{mdframed}[style=warning] 
\lipsum[2-4]
\end{mdframed}

\huge\faInfoCircle

\end{document}

I get that the symbol stuff belongs to the firstextra, but everything that follows looks very much like Chinese algebra to me. In my tests, I was able to inject in the node[] thing a fontawesome icon, but apparently I'm not able to replicate my findings anymore (too many undo/redo...) – anyway, I was still failing with the positioning, the tikz manual is +1200 pages long and definitely way over my head.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants