You are here: PSPad forum > English discussion forum > Feature Request: Add Texinfo format

Feature Request: Add Texinfo format

#1 Feature Request: Add Texinfo format

Posted by: human | Date: 2017-04-10 07:06 | IP: IP Logged

This post is "inspired" by recent changes for Tex support.
For the Texinfo manual see www.gnu.org

For a sample texts see www.gnu.org

Options: Reply | Quote | Up ^


#2 Re: Feature Request: Add Texinfo format

Posted by: pspad | Date: 2017-04-10 08:18 | IP: IP Logged

Without description what do you want to changes is it useless for me.
I don't use TeX, so I don't know what is missing, what needs to be improved, ...

Options: Reply | Quote | Up ^


#3 Re: Feature Request: Add Texinfo format

Posted by: human | Date: 2017-04-10 09:39 | IP: IP Logged

Sorry for being not more specific. Texinfo is a *different* format than TeX (similar purpose and *some* parts being similar).

Concerning the syntax highlighting it seems reasonable to copy the necessary parts of the vim syntax highlighting: github.com

For the code explorer have an additional look at the part "chapter structuring" in this file.

Can you add this format, please?

Options: Reply | Quote | Up ^


#4 Re: Feature Request: Add Texinfo format

Posted by: pspad | Date: 2017-04-10 09:50 | IP: IP Logged

How many users use this syntax?
Start to create user highlighter and send me it with description what doesn't work in there.

Options: Reply | Quote | Up ^


#5 Re: Feature Request: Add Texinfo format

Posted by: human | Date: 2017-04-10 10:59 | IP: IP Logged

Here's the first approach:

Quote:
;PSPad user HighLighter definition file

[Settings]
Name=Texinfo
HTMLGroup=0
Vectors=0
Label=0
FileType=.texi
CommentString=
IndentChar=
UnIndentChar=
TabWidth=0
CaseSensitive=1
EscString=0
EscChar=\
KeyWordChars=
CodeExplorer=ftUnknown
DocComment=

[KeyWords]
@acronym=
@b=
@cite=
@code=
@command=
@dfn=
@email=
@emph=
@env=
@file=
@i=
@kbd=
@key=
@option=
@r=
@samp=
@sc=
@strong=
@t=
@url=
@var=
[ReservedWords]
@appendix=
@appendixsec=
@appendixsection=
@appendixsubsec=
@appendixsubsubsec=
@author=
@bye=
@center=
@centerchap=
@chapheading=
@chapter=
@contents=
@detailmenu=
@exampleindent=
@heading=
@headings=
@lowersections=
@majorheading=
@paragraphindent=
@printindex=
@raisesections=
@section=
@setchapternewpage=
@setcontentsaftertitlepage=
@setfilename=
@setshortcontentsaftertitlepage=
@settitle=
@shortcontents=
@shorttitlepage=
@subheading=
@subsection=
@subsubheading=
@subsubsection=
@subtitle=
@summarycontents=
@title=
@titlefont=
@titlepage=
@unnumbered=
@unnumberedsec=
@unnumberedsubsec=
@unnumberedsubsubsec=
@vskip=
\\input=

[KeyWords2]
@anchor=
@asis=
@cartouche=
@cindex=
@columnfractions=
@display=
@enumerate=
@example=
@exdent=
@findex=
@flushleft=
@flushright=
@format=
@ftable=
@inforef=
@item=
@itemize=
@itemx=
@kindex=
@lisp=
@menu=
@multitable=
@node=
@noindent=
@pindex=
@pxref=
@quotation=
@ref=
@smallbook=
@smalldisplay=
@smallexample=
@smallformat=
@smalllisp=
@syncodeindex=
@synindex=
@tab=
@table=
@tindex=
@top=
@uref=
@vindex=
@vtable=
@xref=

[KeyWords3]

Open points (I didn't defined a PSPad highlighter for years so these may be simple to achieve):

* comments:
* single line: starting with@cor@comment(both with a trailing space/tab) or be completely@c
* block: staring with@ignore[code]and ending with[code]@end ignore[code](both markers must start a new line)
* everything after[code]@bye
is a comment [doesn't work in VIM, too]

* preparser: The help file talks about preparser word, which keywords belong to the preparser, how should the keyword groups be used

* code explorer: how to add this for a user highlighter?

Edited 2 time(s). Last edit at 2017-04-24 17:16 by pspad.

Options: Reply | Quote | Up ^


#6 Re: Feature Request: Add Texinfo format

Posted by: human | Date: 2017-04-24 16:35 | IP: IP Logged

friendly ping, sent the user highlighter definition as requested

Options: Reply | Quote | Up ^


#7 Re: Feature Request: Add Texinfo format

Posted by: pspad | Date: 2017-04-24 18:24 | IP: IP Logged

Tested and it works, including comments, bye e.t.c.
I tested this sample:
www.gnu.org
and there is lot of keywords missing in your definition.

The problem is with word pairs as e.g.:
@end quotation
You need to include words like quotation, titlepage e.t.c. into keywords too

It will be available in the next build, include modified highlighter definition

Options: Reply | Quote | Up ^


#8 Re: Feature Request: Add Texinfo format

Posted by: human | Date: 2017-04-25 14:49 | IP: IP Logged

pspad:
Tested and it works, including comments, bye e.t.c.
I tested this sample:
www.gnu.org
and there is lot of keywords missing in your definition.

The problem is with word pairs as e.g.:
@end quotation
You need to include words like quotation, titlepage e.t.c. into keywords too

It will be available in the next build, include modified highlighter definition

Marvellous. The only thing I am confused about is the part "lot of keywords missing in your definition" - is there anything other I should do than waiting for the next build?

Options: Reply | Quote | Up ^


#9 Re: Feature Request: Add Texinfo format

Posted by: pspad | Date: 2017-04-25 16:59 | IP: IP Logged

human:
Marvellous. The only thing I am confused about is the part "lot of keywords missing in your definition" - is there anything other I should do than waiting for the next build?

I used example above with highlighter you gave me. And lot of words starting with @ wasn't highlighted.
You can update missing keywords into highlighter. To be highlighted, add @ into keyword chars field.

Options: Reply | Quote | Up ^






Editor PSPad - freeware editor, © 2001 - 2024 Jan Fiala, Hosted by Webhosting TOJEONO.CZ, design by WebDesign PAY & SOFT, code Petr Dvořák, Privacy policy and GDPR