update docs

This commit is contained in:
2024-03-05 11:07:57 +01:00
parent 52815c9fe4
commit 94dd0e848e
6 changed files with 2346 additions and 6 deletions

View File

@@ -430,7 +430,7 @@ print(result)
#+CAPTION: svg figure
#+ATTR_ORG: :width 100
#+ATTR_LATEX: :width 1cm
[[/usr/share/icons/hicolor/scalable/apps/emacs.svg]]
[[file:img/emacs.svg]]
See figure ref:fig-svg-import as a reference.
*** file png
@@ -438,10 +438,14 @@ See figure ref:fig-svg-import as a reference.
#+CAPTION: png figure
#+ATTR_ORG: :width 100
#+ATTR_LATEX: :width 1cm
[[/usr/share/icons/hicolor/128x128/apps/emacs.png]]
[[file:img/emacs.png]]
*** latex using tikz with data file
#+HEADER: :file (tpl-file "test-tikz")
file path to data file need to be an absolute path, bacause the
compilation is done in a tmp directory (~/tmp/babel-XXXXXX/~).
#+HEADER: :file (tpl-file "img/figure-tikz")
#+HEADER: :results (tpl-results)
#+BEGIN_src latex :exports results :wrap figure
\begin{tikzpicture}
@@ -468,8 +472,8 @@ See figure ref:fig-svg-import as a reference.
%yticklabel style={/pgf/number format/.cd,fixed,fixed zerofill,precision=2},
%ytick={-1,0,...,3.5},
]
\addplot[red, thick, mark=x] table[x index=0, y index=1] {/absolute/path/to/data.dat}; \label{tpl:y1}
\addplot[blue, thick, mark=x] table[x index=0, y index=2] {/absolute/path/to/data.dat}; \label{tpl:y2}
\addplot[red, thick, mark=x] table[x index=0, y index=1] {$HOME/repos/emacs-conf/lisp/my/img/figure-tikz.dat}; \label{tpl:y1}
\addplot[blue, thick, mark=x] table[x index=0, y index=2] {$HOME/repos/emacs-conf/lisp/my/img/figure-tikz.dat}; \label{tpl:y2}
\end{axis}
\end{tikzpicture}
#+END_src
@@ -477,7 +481,7 @@ See figure ref:fig-svg-import as a reference.
#+ATTR_LATEX: :options [H] :caption \caption[Caption in ToC]{Caption at place with ref to \(y_{1}\) \ref{tpl:y1} and \(y_{2}\) \ref{tpl:y2}}
#+RESULTS:
#+begin_figure
[[file:test-tikz.svg]]
[[file:img/figure-tikz.svg]]
#+end_figure
*** python using matplotlib