0

I have a org file as follows:

#+NAME: ls:tpolicy-dr
#+CAPTION: xxxxx
#+ATTR_LATEX: :placement [ht!] :options framesep=3mm,xleftmargin=21pt,tabsize=4 
#+BEGIN_SRC json
  [{
     "Authority":"ABC",
     "Formats":[
       {
          "Name":"Event",
          "Trusted Field":{
              "Event-Name":"",
              "Company":"ABC",
              "Date":"+30"
          }
       }
    ]
  }
]
#+END_SRC

Which get exported as follows ignoring my :placement option.

\begin{listing}[htbp]
\begin{minted}[frame=single,framesep=3mm,xleftmargin=21pt,tabsize=4]{json}
  [{
     "Authority":"ABC",
     "Formats":[
       {
          "Name":"Event",
          "Trusted Field":{
              "Event-Name":"",
              "Company":"ABC",
              "Date":"+30"
           }
       }
    ]
  }
]
\end{minted}
\caption{\label{orgf1e588a}
\emph{xxxxx}
\end{listing}

Is there a way to force this placement without adding ATTR_LATEX environment?

EDIT: I found a way by adding the following:

#+LATEX_HEADER: \usepackage{listings}[ht!]
#+LATEX: \setminted{fontsize=\footnotesize,baselinestretch=1}

It works fine. But still it applies to whole file. Not a perfect solution.

Thank you

Your Answer

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

Browse other questions tagged or ask your own question.