Sponsored Content
Full Discussion: TexInfo, word formatting?
Top Forums UNIX for Advanced & Expert Users TexInfo, word formatting? Post 302947251 by sea on Tuesday 16th of June 2015 05:12:44 PM
Old 06-16-2015
TexInfo, word formatting?

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
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Can a shell script pull the first word (or nth word) off each line of a text file?

Greetings. I am struggling with a shell script to make my life simpler, with a number of practical ways in which it could be used. I want to take a standard text file, and pull the 'n'th word from each line such as the first word from a text file. I'm struggling to see how each line can be... (5 Replies)
Discussion started by: tricky
5 Replies

2. UNIX for Dummies Questions & Answers

regular expression for replacing the fist word with a last word in line

I have a File with the below contents File1 I have no prior experience in unix. I have just started to work in unix. My experience in unix is 0. My Total It exp is 3 yrs. I need to replace the first word in each line with the last word for example unix have no prior experience in... (2 Replies)
Discussion started by: kri_swami
2 Replies

3. Shell Programming and Scripting

To read data word by word from given file & storing in variables

File having data in following format : file name : file.txt -------------------- 111111;name1 222222;name2 333333;name3 I want to read this file so that I can split these into two paramaters i.e. 111111 & name1 into two different variables(say value1 & value2). i.e val1=11111 &... (2 Replies)
Discussion started by: sjoshi98
2 Replies

4. UNIX for Dummies Questions & Answers

Find EXACT word in files, just the word: no prefix, no suffix, no 'similar', just the word

I have a file that has the words I want to find in other files (but lets say I just want to find my words in a single file). Those words are IDs, so if my word is ZZZ4, outputs like aaZZZ4, ZZZ4bb, aaZZZ4bb, ZZ4, ZZZ, ZyZ4, ZZZ4.8 (or anything like that) WON'T BE USEFUL. I need the whole word... (6 Replies)
Discussion started by: chicchan
6 Replies

5. Shell Programming and Scripting

Search for the word and exporting 35 characters after that word using shell script?

I have a file input.txt which have loads of weird characters, html tags and useful materials. I want to display 35 characters after the word description excluding weird characters like $$#$#@$#@***$# and without html tags in the new file output.txt. Help me. Thanx in advance. My final goal is to... (11 Replies)
Discussion started by: sachit adhikari
11 Replies

6. Shell Programming and Scripting

Search for the word and exporting 35 characters after that word using shell script

I have a file input.txt which have loads of weird characters, html tags and useful materials. I want to display 35 characters after the word "description" excluding weird characters like $&lmp and without html tags in the new file output.txt. Help me. Thanx in advance. I have attached the input... (4 Replies)
Discussion started by: sachit adhikari
4 Replies

7. Shell Programming and Scripting

Fetch entries in front of specific word till next word

Hi all I have following file which I have to edit for research purpose file:///tmp/moz-screenshot.png body, div, table, thead, tbody, tfoot, tr, th, td, p { font-family: &quot;Liberation Sans&quot;; font-size: x-small; } Drug: KRP-104 QD Drug: Placebo Drug: Metformin|Drug:... (15 Replies)
Discussion started by: Priyanka Chopra
15 Replies

8. Shell Programming and Scripting

Find a word and increment the number in the word & save into new files

Hi All, I am looking for a perl/awk/sed command to auto-increment the numbers line in file, P1.tcl: run_build_model sparc_ifu_dec run_drc set_faults -model path_delay -atpg_effectiveness -fault_coverage add_delay_paths P1 set_atpg -abort_limit 1000 run_atpg -ndetects 1000 I would like... (6 Replies)
Discussion started by: jypark22
6 Replies

9. UNIX for Beginners Questions & Answers

UNIX script to check word count of each word in file

I am trying to figure out to find word count of each word from my file sample file hi how are you hi are you ok sample out put hi 1 how 1 are 1 you 1 hi 1 are 1 you 1 ok 1 wc -l filename is not helping , i think we will have to split the lines and count and then print and also... (4 Replies)
Discussion started by: mirwasim
4 Replies

10. UNIX for Beginners Questions & Answers

How to search for a word in column header that fully matches the word not partially in awk?

I have a multicolumn text file with header in the first row like this The headers are stored in an array called . which contains I want to search for each elements of this array from that multicolumn text file. And I am using this awk approach for ii in ${hdr} do gawk -vcol="$ii" -F... (1 Reply)
Discussion started by: Atta
1 Replies
mshowfat(1)						      General Commands Manual						       mshowfat(1)

Name
       mshowfat - shows FAT clusters allocated to file

Note of warning
       This  manpage  has been automatically generated from mtools's texinfo documentation, and may not be entirely accurate or complete.  See the
       end of this man page for details.

Description
       The mshowfat command is used to display the FAT entries for a file.  Syntax:

       $ mshowfat files

See Also
       Mtools' texinfo doc

Viewing the texi doc
       This manpage has been automatically generated from mtools's texinfo documentation. However, this process is only  approximative,  and  some
       items, such as crossreferences, footnotes and indices are lost in this translation process.  Indeed, these items have no appropriate repre-
       sentation in the manpage format.  Moreover, not all information has been translated into the manpage version.  Thus I strongly  advise  you
       to use the original texinfo doc.  See the end of this manpage for instructions how to view the texinfo doc.

       *      To generate a printable copy from the texinfo doc, run the following commands:

		     ./configure; make dvi; dvips mtools.dvi

       *      To generate a html copy,	run:

		     ./configure; make html

       A premade html can be found at `http://www.gnu.org/software/mtools/manual/mtools.html'

       *      To generate an info copy (browsable using emacs' info mode), run:

		     ./configure; make info

       The  texinfo  doc looks most pretty when printed or as html.  Indeed, in the info version certain examples are difficult to read due to the
       quoting conventions used in info.

mtools-4.0.13							      28Feb10							       mshowfat(1)
All times are GMT -4. The time now is 12:17 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy