0

How to generate the following latex fragment through org-mode "#+ATTR_LATEX:" or others:

\begin{figure}[!htbp]
  \centering
  \begin{minipage}[b]{0.6\textwidth}
    \captionstyle{\centering}
    \centering
    \includegraphics[width=4cm]{fig/test1.png}
    \bicaption[fig1]{Where}{Fig}{there is a way.}
  \end{minipage}     
\end{figure}

I have done partially of it by using:

#+ATTR_LATEX: :caption \bicaption[fig1]{Where}{Fig}{there is a way.} :width 10cm
[[file:fig/test1.png]]

However the following no work:

#+ATTR_LATEX: :environment minipage :option [b]{0.6\textwidth} :caption \bicaption[fig1]{Where}{Fig}{there is a way.} :width 10cm
[[file:fig/test1.png]]

I donnot know how to after? The ":environment" and ":option" seems not to work after the try, no "\begin{minipage}[b]{0.6\textwidth}" showed in the out .tex file

I want to generate ODT file meanwhile, so I left the picture as the link format.

Thanks very much.

cwind
  • 369
  • 1
  • 7
  • 1
    Not quite sure what you are trying to do, but you can add a `#+BEGIN_EXPORT latex ... #+END_EXPORT` block and just stick the whole latex blob inside it. That's assuming you are using org 9.x IIRC. The syntax was different earlier: `#+BEGIN_LATEX ... #+END_LATEX`. – NickD Apr 19 '17 at 12:35
  • It really can work. however, it donnot show the image when export to the ODT formats when completely using latex. I want the picture show in the ODT formats. – cwind Apr 19 '17 at 13:03
  • You could add a #+BEGIN_EXPORT odt ... #+END_EXPORT. There is some duplication but c'est la vie... But I saw you posted the question on the org-mode ML, so maybe somebody will come up with a better solution. – NickD Apr 19 '17 at 16:15
  • Haha, this really one solution. If no better one, I will follow your suggestion. Thanks very much – cwind Apr 20 '17 at 02:00

0 Answers0