Re: [NTG-context] How to display these characters

2022-08-10 Thread Aditya Mahajan via ntg-context
On Tue, 9 Aug 2022, Henning Hraban Ramm via ntg-context wrote:

> Am 09.08.22 um 18:57 schrieb Wolfgang Schuster via ntg-context:
> > Henning Hraban Ramm via ntg-context schrieb am 09.08.2022 um 16:51:
> >> I actually never really looked into the nodes module, but I guess that 
> >> would work.
> > 
> > There is a simple LaTeX / plain TeX package [1] for this but I don't 
> > know if the plain TeX version works with ConTeXt.
> > [1] https://www.ctan.org/pkg/dirtree
> 
> That is advertised as “like Windows Explorer”, so I expected folder and 
> file icons, but it makes quite ugly lines with square nodes.

Looking at the documentation, it appears that the size of the square node is 
configurable. So, if you set the size to be the same as line width, the square 
will be invisible. 

> Line drawing glyphs look better IMO, and the MP nodes module is probably 
> even better, but I need to try...

It should be relatively easy to write a function that draws such trees without 
using any module as well.

Aditya___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] How to display these characters

2022-08-09 Thread Henning Hraban Ramm via ntg-context

Am 09.08.22 um 18:57 schrieb Wolfgang Schuster via ntg-context:

Henning Hraban Ramm via ntg-context schrieb am 09.08.2022 um 16:51:
I actually never really looked into the nodes module, but I guess that 
would work.


There is a simple LaTeX / plain TeX package [1] for this but I don't 
know if the plain TeX version works with ConTeXt.

[1] https://www.ctan.org/pkg/dirtree


That is advertised as “like Windows Explorer”, so I expected folder and 
file icons, but it makes quite ugly lines with square nodes.
Line drawing glyphs look better IMO, and the MP nodes module is probably 
even better, but I need to try...


Hraban
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] How to display these characters

2022-08-09 Thread Wolfgang Schuster via ntg-context

Henning Hraban Ramm via ntg-context schrieb am 09.08.2022 um 16:51:

Am 08.08.22 um 08:01 schrieb Alan Braslau:

On 05/08/22 05/08/22, 12:13, Henning Hraban Ramm via ntg-context wrote:


I recently had the same problem and was wondering if there isn’t a 
Metapost module for directory trees?


There is a Metapost/Context module for drawing flow charts that 
should handle this nicely.


If that’s still the same module that I know, then I don’t think it’s 
suitable (too much fixed on a grid).


There is also a Metapost module for drawing relational charts 
("nodes") that could be another approach.


I actually never really looked into the nodes module, but I guess that 
would work.


There is a simple LaTeX / plain TeX package [1] for this but I don't 
know if the plain TeX version works with ConTeXt.


[1] https://www.ctan.org/pkg/dirtree

Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] How to display these characters

2022-08-09 Thread Henning Hraban Ramm via ntg-context

Am 08.08.22 um 08:01 schrieb Alan Braslau:

On 05/08/22 05/08/22, 12:13, Henning Hraban Ramm via ntg-context wrote:


I recently had the same problem and was wondering if there isn’t a 
Metapost module for directory trees?


There is a Metapost/Context module for drawing flow charts that should 
handle this nicely.


If that’s still the same module that I know, then I don’t think it’s 
suitable (too much fixed on a grid).


There is also a Metapost module for drawing relational charts ("nodes") 
that could be another approach.


I actually never really looked into the nodes module, but I guess that 
would work.


Hraban

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] How to display these characters

2022-08-08 Thread Alan Braslau via ntg-context

On 05/08/22 05/08/22, 12:13, Henning Hraban Ramm via ntg-context wrote:


I recently had the same problem and was wondering if there isn’t a 
Metapost module for directory trees?


There is a Metapost/Context module for drawing flow charts that should 
handle this nicely.


There is also a Metapost module for drawing relational charts ("nodes") 
that could be another approach.


--
Alan
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] How to display these characters

2022-08-05 Thread Henning Hraban Ramm via ntg-context

Am 05.08.22 um 20:07 schrieb Wolfgang Schuster via ntg-context:

juh+ntg-context--- via ntg-context schrieb am 05.08.2022 um 19:04:

\starttyping
foo
└── bar
    ├── baz
    │   └── index.html
    └── index.html

\stoptyping

The source code is generated with the linux command "tree".


I guess that I could define a fallbackfont. Do anyone know the unicode 
range that should be covered and the font that has these characters?


You need box drawing [1] characters.

When you need fonts with a wide range of character the Noto [2] family 
is a good choice.


Yes, also e.g. Segoe UI Symbols, Apple Symbols, Symbola, Droid Sans 
Fallback.


I recently had the same problem and was wondering if there isn’t a 
Metapost module for directory trees?


Hraban

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] How to display these characters

2022-08-05 Thread Wolfgang Schuster via ntg-context

juh+ntg-context--- via ntg-context schrieb am 05.08.2022 um 19:04:

Dear all,

I have this:


\starttext

\starttyping
foo
└── bar
    ├── baz
    │   └── index.html
    └── index.html

\stoptyping

\stoptext

The source code is generated with the linux command "tree".

The special characters which indicate the folder depth are not displayed.

I guess that I could define a fallbackfont. Do anyone know the unicode 
range that should be covered and the font that has these characters?


You need box drawing [1] characters.

When you need fonts with a wide range of character the Noto [2] family 
is a good choice.


 begin example
\definefontfamily [noto] [rm] [Noto Serif]
\definefontfamily [noto] [ss] [Noto Sans]
\definefontfamily [noto] [tt] [Noto Sans Mono]
\definetypeface   [noto] [mm] [math] [pagella] [default]

\setupbodyfont [noto]

\starttext

\starttyping
foo
└── bar
    ├── baz
    │   └── index.html
    └── index.html
\stoptyping

\stoptext
 end example

[1] https://unicode.org/charts/PDF/U2500.pdf
[2] https://github.com/notofonts/noto-fonts

Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


[NTG-context] How to display these characters

2022-08-05 Thread juh+ntg-context--- via ntg-context


Dear all,

I have this:


\starttext

\starttyping
foo
└── bar
├── baz
│   └── index.html
└── index.html

\stoptyping

\stoptext

The source code is generated with the linux command "tree".

The special characters which indicate the folder depth are not displayed.

I guess that I could define a fallbackfont. Do anyone know the unicode 
range that should be covered and the font that has these characters?


TIA
juh
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___