Quantcast
Channel: UNIX and Linux Forums
Viewing all articles
Browse latest Browse all 16232

TexInfo, word formatting?

$
0
0
Heyas

While thinking how to rewrite my docs, figured i might want to make it GNU, so i started with TexInfo.
It took a while to figure about @sections, and such, but the main gaol is to get a manpage-like output, as html.

So i took a raw example, and try to generate that for all the commands i provide.

Code:

#!/bin/bash
#
#        Generate the node items
#
        [ -z "$1" ] && echo "Usage: $0 \"SECTION\"" && exit 1
        section="$1" ; shift
        for item in $(awk '/^\*/ {print $2}' $0)
        do        cat <<-SCREEN
                @node $item
                @chapter $item
                @pindex $section
                @include $item.texi
               
                SCREEN
                # ! ------------------------------ ! #
                cat > $item.texi <<-EOF
                Syntax: @example
                        $item [options] [arguments]
                @end example
               
                Where options are:
                @example
                        -h|--help        Helpscreen
                        ...
                @end example
               
                Description: @*
                Descriptional text
                @b bold
                @i italic
                @sc small caps
                @slanted slanted
                @t typewriter

               
                Examples:
                @example
                        $item
                @end example
                EOF
        done
        tui-yesno "Create page now?" && makeinfo --html --force tui-new

        exit
#
#        Paste the menu code here
#
* tui-printf ::
* tui-echo ::
* tui-title ::
* tui-header ::
* tui-status ::
* tui-progress ::
* tui-list ::
* tui-cat ::

While the creation of all the files themself works, the content is of question...
After creating the html page, i get (manualy applied non-existing markups (bold,italic,underline, etc):
Code:

Description:
Descriptional text bold italic small caps slanted typewriter

Expected:
Code:

Description:
Descriptional text bold italic small caps slanted typewriter

Not sure what i should or could expect from the colored parts, but sure thing no regular text from 'small caps'.

Any idea what i miss?
Basicly i just care about bold, italic and possible underline atm...

tia

Viewing all articles
Browse latest Browse all 16232

Trending Articles