ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* How to display these characters
@ 2022-08-05 17:04 juh+ntg-context--- via ntg-context
  2022-08-05 18:07 ` Wolfgang Schuster via ntg-context
  0 siblings, 1 reply; 8+ messages in thread
From: juh+ntg-context--- via ntg-context @ 2022-08-05 17:04 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: juh+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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: How to display these characters
  2022-08-05 17:04 How to display these characters juh+ntg-context--- via ntg-context
@ 2022-08-05 18:07 ` Wolfgang Schuster via ntg-context
  2022-08-05 18:13   ` Henning Hraban Ramm via ntg-context
  0 siblings, 1 reply; 8+ messages in thread
From: Wolfgang Schuster via ntg-context @ 2022-08-05 18:07 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Wolfgang Schuster

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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: How to display these characters
  2022-08-05 18:07 ` Wolfgang Schuster via ntg-context
@ 2022-08-05 18:13   ` Henning Hraban Ramm via ntg-context
  2022-08-08  6:01     ` Alan Braslau via ntg-context
  0 siblings, 1 reply; 8+ messages in thread
From: Henning Hraban Ramm via ntg-context @ 2022-08-05 18:13 UTC (permalink / raw)
  To: ntg-context; +Cc: Henning Hraban Ramm

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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: How to display these characters
  2022-08-05 18:13   ` Henning Hraban Ramm via ntg-context
@ 2022-08-08  6:01     ` Alan Braslau via ntg-context
  2022-08-09 14:51       ` Henning Hraban Ramm via ntg-context
  0 siblings, 1 reply; 8+ messages in thread
From: Alan Braslau via ntg-context @ 2022-08-08  6:01 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: 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.

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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: How to display these characters
  2022-08-08  6:01     ` Alan Braslau via ntg-context
@ 2022-08-09 14:51       ` Henning Hraban Ramm via ntg-context
  2022-08-09 16:57         ` Wolfgang Schuster via ntg-context
  0 siblings, 1 reply; 8+ messages in thread
From: Henning Hraban Ramm via ntg-context @ 2022-08-09 14:51 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Henning Hraban Ramm

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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: How to display these characters
  2022-08-09 14:51       ` Henning Hraban Ramm via ntg-context
@ 2022-08-09 16:57         ` Wolfgang Schuster via ntg-context
  2022-08-09 17:56           ` Henning Hraban Ramm via ntg-context
  0 siblings, 1 reply; 8+ messages in thread
From: Wolfgang Schuster via ntg-context @ 2022-08-09 16:57 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Wolfgang Schuster

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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: How to display these characters
  2022-08-09 16:57         ` Wolfgang Schuster via ntg-context
@ 2022-08-09 17:56           ` Henning Hraban Ramm via ntg-context
  2022-08-10 21:42             ` Aditya Mahajan via ntg-context
  0 siblings, 1 reply; 8+ messages in thread
From: Henning Hraban Ramm via ntg-context @ 2022-08-09 17:56 UTC (permalink / raw)
  To: Wolfgang Schuster via ntg-context; +Cc: Henning Hraban Ramm

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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: How to display these characters
  2022-08-09 17:56           ` Henning Hraban Ramm via ntg-context
@ 2022-08-10 21:42             ` Aditya Mahajan via ntg-context
  0 siblings, 0 replies; 8+ messages in thread
From: Aditya Mahajan via ntg-context @ 2022-08-10 21:42 UTC (permalink / raw)
  To: Henning Hraban Ramm via ntg-context; +Cc: Aditya Mahajan

[-- Attachment #1: Type: text/plain, Size: 1039 bytes --]

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

[-- Attachment #2: Type: text/plain, Size: 496 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-08-10 21:42 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-05 17:04 How to display these characters juh+ntg-context--- via ntg-context
2022-08-05 18:07 ` Wolfgang Schuster via ntg-context
2022-08-05 18:13   ` Henning Hraban Ramm via ntg-context
2022-08-08  6:01     ` Alan Braslau via ntg-context
2022-08-09 14:51       ` Henning Hraban Ramm via ntg-context
2022-08-09 16:57         ` Wolfgang Schuster via ntg-context
2022-08-09 17:56           ` Henning Hraban Ramm via ntg-context
2022-08-10 21:42             ` Aditya Mahajan via ntg-context

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).