ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* pretty printers
@ 2019-05-08 19:58 Tomas Hala
  2019-05-08 20:14 ` Wolfgang Schuster
  0 siblings, 1 reply; 7+ messages in thread
From: Tomas Hala @ 2019-05-08 19:58 UTC (permalink / raw)
  To: Mailing list ConTeXt

Hi all,

according to our wiki, there are pretty printers in ConTeXt 
implemented only for TEX, LUA, XML and MP.

I am searching now for PHP pretty printer but I did not find 
anything on the net (only C and Java). I would like to ask 
whether is something for PHP (or for other programming languages)
available.

Best wishes,

Tomáš

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

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

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

* Re: pretty printers
  2019-05-08 19:58 pretty printers Tomas Hala
@ 2019-05-08 20:14 ` Wolfgang Schuster
  2019-05-08 20:42   ` Tomas Hala
  0 siblings, 1 reply; 7+ messages in thread
From: Wolfgang Schuster @ 2019-05-08 20:14 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Tomas Hala

Tomas Hala schrieb am 08.05.2019 um 21:58:
> Hi all,
>
> according to our wiki, there are pretty printers in ConTeXt
> implemented only for TEX, LUA, XML and MP.
>
> I am searching now for PHP pretty printer but I did not find
> anything on the net (only C and Java). I would like to ask
> whether is something for PHP (or for other programming languages)
> available.

1. Use the scite module which provides additional styles (e.g. cpp or 
json) but php is still missing.

2. Use Aditya's vim module which uses vim to highlight source code.

Wolfgang

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

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

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

* Re: pretty printers
  2019-05-08 20:14 ` Wolfgang Schuster
@ 2019-05-08 20:42   ` Tomas Hala
  2019-05-08 20:55     ` Aditya Mahajan
  2019-05-08 20:59     ` Wolfgang Schuster
  0 siblings, 2 replies; 7+ messages in thread
From: Tomas Hala @ 2019-05-08 20:42 UTC (permalink / raw)
  To: Wolfgang Schuster; +Cc: mailing list for ConTeXt users

Wed, May 08, 2019 ve 10:14:45PM +0200 Wolfgang Schuster napsal(a):
# Tomas Hala schrieb am 08.05.2019 um 21:58:
# >Hi all,
# >
# >according to our wiki, there are pretty printers in ConTeXt
# >implemented only for TEX, LUA, XML and MP.
# >
# >I am searching now for PHP pretty printer but I did not find
# >anything on the net (only C and Java). I would like to ask
# >whether is something for PHP (or for other programming languages)
# >available.
# 
# 1. Use the scite module which provides additional styles (e.g. cpp
# or json) but php is still missing.
# 
# 2. Use Aditya's vim module which uses vim to highlight source code.
# 
# Wolfgang

Maybe it is a misunderstanding but how can use these modules
in ConTeXt? I had in mind typesetting the code in ConTeXt
like \startTEX etc.

Tomáš 

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

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

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

* Re: pretty printers
  2019-05-08 20:42   ` Tomas Hala
@ 2019-05-08 20:55     ` Aditya Mahajan
  2019-05-08 21:05       ` Tomas Hala
  2019-05-08 20:59     ` Wolfgang Schuster
  1 sibling, 1 reply; 7+ messages in thread
From: Aditya Mahajan @ 2019-05-08 20:55 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Wed, 8 May 2019, Tomas Hala wrote:

> Wed, May 08, 2019 ve 10:14:45PM +0200 Wolfgang Schuster napsal(a):
> # Tomas Hala schrieb am 08.05.2019 um 21:58:
> # >Hi all,
> # >
> # >according to our wiki, there are pretty printers in ConTeXt
> # >implemented only for TEX, LUA, XML and MP.
> # >
> # >I am searching now for PHP pretty printer but I did not find
> # >anything on the net (only C and Java). I would like to ask
> # >whether is something for PHP (or for other programming languages)
> # >available.
> # 
> # 1. Use the scite module which provides additional styles (e.g. cpp
> # or json) but php is still missing.
> # 
> # 2. Use Aditya's vim module which uses vim to highlight source code.
> # 
> # Wolfgang
>
> Maybe it is a misunderstanding but how can use these modules
> in ConTeXt? I had in mind typesetting the code in ConTeXt
> like \startTEX etc.

Here is an example with the vim module:

\usemodule[vim]
\definevimtyping[HTML][syntax=html]
\definevimtyping[PHP] [syntax=php]

\starttext

\startHTML
<html>
    <head>
       <title>Hello World</title>
    </head>

    <body>
       <?php echo "Hello, World!";?>
    </body>
</html>
\stopHTML

\startPHP
<?php
    $a = 3;
    $b = 4;
    $c = sqrt($a**2 + $b**2)
?>
\stopPHP

\stoptext

See https://github.com/adityam/filter/blob/master/vim-README.md for more 
details.

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

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

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

* Re: pretty printers
  2019-05-08 20:42   ` Tomas Hala
  2019-05-08 20:55     ` Aditya Mahajan
@ 2019-05-08 20:59     ` Wolfgang Schuster
  2019-05-08 21:08       ` Tomas Hala
  1 sibling, 1 reply; 7+ messages in thread
From: Wolfgang Schuster @ 2019-05-08 20:59 UTC (permalink / raw)
  To: Tomas Hala; +Cc: NTG-Context ConTeXt users



Tomas Hala schrieb am 08.05.2019 um 22:42:
> Wed, May 08, 2019 ve 10:14:45PM +0200 Wolfgang Schuster napsal(a):
> # Tomas Hala schrieb am 08.05.2019 um 21:58:
> # >Hi all,
> # >
> # >according to our wiki, there are pretty printers in ConTeXt
> # >implemented only for TEX, LUA, XML and MP.
> # >
> # >I am searching now for PHP pretty printer but I did not find
> # >anything on the net (only C and Java). I would like to ask
> # >whether is something for PHP (or for other programming languages)
> # >available.
> #
> # 1. Use the scite module which provides additional styles (e.g. cpp
> # or json) but php is still missing.
> #
> # 2. Use Aditya's vim module which uses vim to highlight source code.
> #
> # Wolfgang
>
> Maybe it is a misunderstanding but how can use these modules
> in ConTeXt? I had in mind typesetting the code in ConTeXt
> like \startTEX etc.

1. Scite module

\usemodule [scite]

\starttext

\startCPP
#include<iostream>

using namespace std;

int main()
{
     cout << "Hello World\n";
     return 0;
}
\stopCPP

\stoptext


2. Vim module

See Aditya's mail.


Wolfgang

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

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

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

* Re: pretty printers
  2019-05-08 20:55     ` Aditya Mahajan
@ 2019-05-08 21:05       ` Tomas Hala
  0 siblings, 0 replies; 7+ messages in thread
From: Tomas Hala @ 2019-05-08 21:05 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Wed, May 08, 2019 ve 04:55:41PM -0400 Aditya Mahajan napsal(a):
# On Wed, 8 May 2019, Tomas Hala wrote:
# 
# >Wed, May 08, 2019 ve 10:14:45PM +0200 Wolfgang Schuster napsal(a):
# ># Tomas Hala schrieb am 08.05.2019 um 21:58:
# ># >Hi all,
# ># >
# ># >according to our wiki, there are pretty printers in ConTeXt
# ># >implemented only for TEX, LUA, XML and MP.
# ># >
# ># >I am searching now for PHP pretty printer but I did not find
# ># >anything on the net (only C and Java). I would like to ask
# ># >whether is something for PHP (or for other programming languages)
# ># >available.
# ># # 1. Use the scite module which provides additional styles (e.g.
# >cpp
# ># or json) but php is still missing.
# ># # 2. Use Aditya's vim module which uses vim to highlight source
# >code.
# ># # Wolfgang
# >
# >Maybe it is a misunderstanding but how can use these modules
# >in ConTeXt? I had in mind typesetting the code in ConTeXt
# >like \startTEX etc.
# 
# Here is an example with the vim module:
# 
# \usemodule[vim]
# \definevimtyping[HTML][syntax=html]
# \definevimtyping[PHP] [syntax=php]
# 
# \starttext
# 
# \startHTML
# <html>
#    <head>
#       <title>Hello World</title>
#    </head>
# 
#    <body>
#       <?php echo "Hello, World!";?>
#    </body>
# </html>
# \stopHTML
# 
# \startPHP
# <?php
#    $a = 3;
#    $b = 4;
#    $c = sqrt($a**2 + $b**2)
# ?>
# \stopPHP
# 
# \stoptext
# 
# See https://github.com/adityam/filter/blob/master/vim-README.md for
# more details.


Oh, this is new dimension for me, now I understand what Wolgang wrote.

Thank you both very much.

The best,

Tomáš 
 
# Aditya
# ___________________________________________________________________________________
# If your question is of interest to others as well, please add an entry to the Wiki!
# 
# maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
# webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
# archive  : https://bitbucket.org/phg/context-mirror/commits/
# wiki     : http://contextgarden.net
# ___________________________________________________________________________________

                                         Tomáš Hála
--------------------------------------------------------------------
Mendelova univerzita, Provozně ekonomická fakulta, ústav informatiky
Zemědělská 1, CZ-613 00 Brno,  tel. +420 545 13 22 28
--------------------------------------------------------------------
http://akela.mendelu.cz/~thala
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

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

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

* Re: pretty printers
  2019-05-08 20:59     ` Wolfgang Schuster
@ 2019-05-08 21:08       ` Tomas Hala
  0 siblings, 0 replies; 7+ messages in thread
From: Tomas Hala @ 2019-05-08 21:08 UTC (permalink / raw)
  To: Wolfgang Schuster; +Cc: NTG-Context ConTeXt users

Wed, May 08, 2019 ve 10:59:18PM +0200 Wolfgang Schuster napsal(a):
# 
# 
# Tomas Hala schrieb am 08.05.2019 um 22:42:
# >Wed, May 08, 2019 ve 10:14:45PM +0200 Wolfgang Schuster napsal(a):
# ># Tomas Hala schrieb am 08.05.2019 um 21:58:
# ># >Hi all,
# ># >
# ># >according to our wiki, there are pretty printers in ConTeXt
# ># >implemented only for TEX, LUA, XML and MP.
# ># >
# ># >I am searching now for PHP pretty printer but I did not find
# ># >anything on the net (only C and Java). I would like to ask
# ># >whether is something for PHP (or for other programming languages)
# ># >available.
# >#
# ># 1. Use the scite module which provides additional styles (e.g. cpp
# ># or json) but php is still missing.
# >#
# ># 2. Use Aditya's vim module which uses vim to highlight source code.
# >#
# ># Wolfgang
# >
# >Maybe it is a misunderstanding but how can use these modules
# >in ConTeXt? I had in mind typesetting the code in ConTeXt
# >like \startTEX etc.
# 
# 1. Scite module
# 
# \usemodule [scite]
# 
# \starttext
# 
# \startCPP
# #include<iostream>
# 
# using namespace std;
# 
# int main()
# {
#     cout << "Hello World\n";
#     return 0;
# }
# \stopCPP
# 
# \stoptext
# 
# 
# 2. Vim module
# 
# See Aditya's mail.
#  
# Wolfgang

Thank you once more.

Tomáš

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

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

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

end of thread, other threads:[~2019-05-08 21:08 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-08 19:58 pretty printers Tomas Hala
2019-05-08 20:14 ` Wolfgang Schuster
2019-05-08 20:42   ` Tomas Hala
2019-05-08 20:55     ` Aditya Mahajan
2019-05-08 21:05       ` Tomas Hala
2019-05-08 20:59     ` Wolfgang Schuster
2019-05-08 21:08       ` Tomas Hala

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).