0

How to use minted in pullquote?

\documentclass{article}
\usepackage[a4paper,margin=2cm]{geometry}
\usepackage[indonesian]{babel}
\usepackage{lipsum,xcolor,warna} % http://latexcolor.com/
\usepackage{minted}
\usepackage{erewhon}
\usepackage{tikz}
\usepackage{pullquote}
\usetikzlibrary{angles}
\def\busur
{%
\begin{tikzpicture}[line join=round]
\coordinate(O) at (0,0) coordinate (A) at (0:6) coordinate (B) at (-22.5:6) ;
\pic[draw=orange,thick,angle radius=16mm,pic text=$22.5^\circ$,pic text options={rotate=-10}, font=\footnotesize,angle eccentricity=.75] {angle={B--O--A}};
\draw[very thick] (A) arc(0:-22.5:6)--(O)--cycle ;
  \end{tikzpicture}%
}

\begin{document}

\section*{Bermain dengan Busur}

\begin{pullquote}{object=\busur} \lipsum[1-3] \usemintedstyle{perldoc} \begin{minted}[bgcolor=gray-asparagus!20,numbersep=2pt, frame=single, linenos=true, autogobble=true, %frame=lines, framerule=1pt, framesep=5pt, rulecolor=\color{wenge} ]{latex} \documentclass[border=3pt]{standalone} \usepackage{qrcode} \begin{document} \qrcode[height=5cm]{SMK 2 Sumbawa Besar} \end{document} \end{minted} \end{pullquote}

\end{document}

And I got

! Argument of \FV@BeginScanning has an extra }.

\par l.38 \end{pullquote}

kalakay
  • 2,469

1 Answers1

1

The syntax for pullquotes is wrong: as far as I can see, there is no pullquote environment.

I'm not sure what you expect the output to be, though.

You can save the minted output in a box, and feed the box to \pullquote.

\documentclass{article}
\usepackage[a4paper,margin=2cm]{geometry}
\usepackage[indonesian]{babel}
\usepackage{lipsum,xcolor} % http://latexcolor.com/
\usepackage{minted}
\usepackage{erewhon}
\usepackage{tikz}
\usepackage{pullquote}
\usetikzlibrary{angles}

\colorlet{gray-asparagus}{gray} \colorlet{wenge}{green!60}

\newcommand{\busur}{% \begin{tikzpicture}[line join=round] \coordinate(O) at (0,0) coordinate (A) at (0:6) coordinate (B) at (-22.5:6); \pic[ draw=orange, thick, angle radius=16mm, pic text=$22.5^\circ$, pic text options={rotate=-10}, font=\footnotesize, angle eccentricity=.75, ] {angle={B--O--A}}; \draw[very thick] (A) arc(0:-22.5:6)--(O)--cycle; \end{tikzpicture}% }

\newsavebox{\saveminted}

\begin{document}

\section*{Bermain dengan Busur}

\begin{lrbox}{\saveminted} \begin{minipage}{0.3\textwidth} \usemintedstyle{perldoc} \begin{minted}[ bgcolor=gray-asparagus!20, numbersep=2pt, frame=single, linenos=true, autogobble=true, %frame=lines, framerule=1pt, framesep=5pt, rulecolor=\color{wenge}, breaklines, breakanywhere, ]{latex} \documentclass[border=3pt]{standalone} \usepackage{qrcode} \begin{document} \qrcode[height=5cm]{SMK 2 Sumbawa Besar} \end{document} \end{minted} \end{minipage} \end{lrbox}

\pullquote{% \lipsum[1-2]

\vspace{10ex}

\noindent\usebox{\saveminted} }{\busur}

\end{document}

enter image description here

egreg
  • 1,121,712