I like the `tree` command in a bloc, as I can regenerate it at every
directory modification.

But in the export, all the special chars disappears. It only keep the
files and directories names.

It must be a problem with LaTeX, as the special chars are present in the
.tex file generated by Org-mode.



Jean Louis <bugs@gnu.support> writes:

> * Sébastien Gendre <s...@k-7.ch> [2025-03-28 13:48]:
>> Hello,
>> 
>> I am writing a big document with Org-mode and I plan to export it to
>> LaTeX then PDF.
>> 
>> I need to represent the tree of a directory content. What is the best way to 
>> do
>> it and keep it readable in the exported PDF ?
>
> #+begin_src dot :file dir-tree.png :exports results
> digraph G {
>   rankdir=LR;
>   node [shape=box];
>   "project/" -> "src/";
>   "project/" -> "test/";
>   "project/" -> "pom.xml";
>   "project/" -> "README.md";
>   "src/" -> "main/";
>   "src/" -> "resources/";
>   "main/" -> "java/";
>   "java/" -> "com/";
>   "com/" -> "mycompany/";
>   "mycompany/" -> "App.java";
>   "resources/" -> "config.properties";
>   "test/" -> "java/";
>   "java/" -> "com/";
>   "com/" -> "mycompany/";
>   "mycompany/" -> "AppTest.java";
> }
> #+end_src
>
> I have just got nice picture with it.
>
> And this works too:
>
> #+begin_src sh :results output :exports both
> tree -L 3 --noreport /tmp
> #+end_src

Attachment: signature.asc
Description: PGP signature

Reply via email to