ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Re: type and typing comments for TeX and Lua
@ 2017-12-21 16:04 Christoph Reller
  2017-12-21 20:16 ` Pablo Rodriguez
  0 siblings, 1 reply; 22+ messages in thread
From: Christoph Reller @ 2017-12-21 16:04 UTC (permalink / raw)
  To: ntg-context

On Tue, Mon, 18 Dec 2017 23:50:09 +0100, Pablo Rodriguez <oinos@gmx.es> wrote:
> I have the following sample:
>
>     \definetype[context][option=tex]
>     \definetype[lua][option=lua]
>     \starttext
>     \startTEXpage[offset=2em]
>
>     a \TEX\ inline comment: \context{ag%befe}
>
>     \Lua\ inline comment: \lua{agb --efe}
>
>     \startTEX
>     This is text. % a comment, not \comment
>     \stopTEX
>
>     \startXML
>     <p>This is text.<!--and this is a comment--></p>
>     \stopXML
>
>     \startLUA
>     if code=="code" then --this is a comment
>     \stopLUA
>     \stopTEXpage
>     \stoptext
>
> Would it be possible that all comments in type and typing (at least, for
> Lua, XML and TeX) would have the same formatting for the whole comment
> contents, including the comment signs?

Dear Pablo,

At least for XML you could use my module highlight-xml:

\usemodule[highlight-xml]
\definetype[xml][option=xml]
\starttext
\startTEXpage[offset=2em]
  \xml{attr="value"}\crlf
  \xml{<p>This is text.<!--and this is a comment--></p>}
  \startXML
    <p>This is text.<!--and this is a comment--></p>
  \stopXML
\stopTEXpage
\stoptext

Note that even partial XML is highlighted correctly.

Cheers,

Christoph
___________________________________________________________________________________
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] 22+ messages in thread
* Re: type and typing comments for TeX and Lua
@ 2017-12-28  7:38 Christoph Reller
  0 siblings, 0 replies; 22+ messages in thread
From: Christoph Reller @ 2017-12-28  7:38 UTC (permalink / raw)
  To: ntg-context

On Wed, 27 Dec 2017 19:53:58 +0100, Pablo Rodriguez <oinos@gmx.es> wrote:
> could you enable issues in your Bitbucket repository?

Issues are enabled now.
Cheers,
Christoph
___________________________________________________________________________________
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] 22+ messages in thread
* Re: type and typing comments for TeX and Lua
@ 2017-12-21 21:16 Christoph Reller
  2017-12-26 18:07 ` Pablo Rodriguez
  2017-12-27 18:53 ` Pablo Rodriguez
  0 siblings, 2 replies; 22+ messages in thread
From: Christoph Reller @ 2017-12-21 21:16 UTC (permalink / raw)
  To: ntg-context

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

On Thu, 21 Dec 2017 21:16:45 +0100,  Pablo Rodriguez <oinos@gmx.es> wrote:
> On 12/21/2017 05:04 PM, Christoph Reller wrote:
>> Dear Pablo,
>>
>> At least for XML you could use my module highlight-xml:
>>
>> \usemodule[highlight-xml]
>> \definetype[xml][option=xml]
>> [...]
>> Note that even partial XML is highlighted correctly.
>
> It is really a pity that it lacks TeX, since I’m focused on ConTeXt yet
> (after all, it would be a Spanish introduction to ConTeXt ;-)). XML will
> come later.

Maybe, if I find the time, I will add TeX and Lua to my module some time.

> I’m afraid that XML comments are colored the same way with your module
> and with standard ConTeXt.

That should not be the case. Could it be, that the highlight-xml
module fails to load? Please check your log file for a "module not
found" entry. I have attached the result of my earlier sample.

My module does not come in standard context. You have to download it
from https://bitbucket.org/philexander/context-highlight. If general
interest is high enough I can ask <whoever is responsible for this> to
add it.

Kind regards,

Christoph

[-- Attachment #2: highlight-xml.png --]
[-- Type: image/png, Size: 12361 bytes --]

[-- Attachment #3: Type: text/plain, Size: 492 bytes --]

___________________________________________________________________________________
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] 22+ messages in thread
* type and typing comments for TeX and Lua
@ 2017-12-18 22:50 Pablo Rodriguez
  2017-12-19 19:26 ` Aditya Mahajan
  2017-12-20 11:53 ` Hans Hagen
  0 siblings, 2 replies; 22+ messages in thread
From: Pablo Rodriguez @ 2017-12-18 22:50 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hans,

sorry for insisting, but I really need this.

I have the following sample:

    \definetype[context][option=tex]
    \definetype[lua][option=lua]
    \starttext
    \startTEXpage[offset=2em]

    a \TEX\ inline comment: \context{ag%befe}

    \Lua\ inline comment: \lua{agb --efe}

    \startTEX
    This is text. % a comment, not \comment
    \stopTEX

    \startXML
    <p>This is text.<!--and this is a comment--></p>
    \stopXML

    \startLUA
    if code=="code" then --this is a comment
    \stopLUA
    \stopTEXpage
    \stoptext

Would it be possible that all comments in type and typing (at least, for
Lua, XML and TeX) would have the same formatting for the whole comment
contents, including the comment signs?

Sorry, but with the current output, it is hard to see (for total
newbies) what is part of the comment and what not. And the text editor
will display something different.

I’m afraid that the scite module isn’t an option for me.

Many thanks for your help,

Pablo
-- 
http://www.ousia.tk
___________________________________________________________________________________
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] 22+ messages in thread

end of thread, other threads:[~2017-12-28  7:38 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-21 16:04 type and typing comments for TeX and Lua Christoph Reller
2017-12-21 20:16 ` Pablo Rodriguez
2017-12-27  1:14   ` SteamedFish
2017-12-27 18:44     ` Pablo Rodriguez
  -- strict thread matches above, loose matches on Subject: below --
2017-12-28  7:38 Christoph Reller
2017-12-21 21:16 Christoph Reller
2017-12-26 18:07 ` Pablo Rodriguez
2017-12-27 18:53 ` Pablo Rodriguez
2017-12-18 22:50 Pablo Rodriguez
2017-12-19 19:26 ` Aditya Mahajan
2017-12-19 21:29   ` Pablo Rodriguez
2017-12-19 23:20     ` Aditya Mahajan
2017-12-21 18:54       ` Pablo Rodriguez
2017-12-21 19:05         ` Aditya Mahajan
2017-12-21 20:49           ` Pablo Rodriguez
2017-12-21 21:53             ` Aditya Mahajan
2017-12-26 18:36               ` Pablo Rodriguez
2017-12-27 22:32                 ` Aditya Mahajan
2017-12-20 11:53 ` Hans Hagen
2017-12-20 19:45   ` Pablo Rodriguez
2017-12-20 21:18     ` Hans Hagen
2017-12-21 19:53       ` Pablo Rodriguez

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