Sponsored Content
Top Forums Web Development Wrap one line paragraphs in string with h tags Post 302561731 by LukasB on Wednesday 5th of October 2011 05:04:33 AM
Old 10-05-2011
Ah, OK, there may be a more complicated situation, e.g. - there is no empty line between paragraphs. There are several paragraphs and several headlines etc. I have a code now, where it splits all paragraphs and when a paragraph is shorter then given number of letters, it makes a h2 from it...
 

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

search string in a file and retrieve 10 lines including string line

Hi Guys, I am trying to write a perl script to search a string "Name" in the file "FILE" and also want to create a new file and push the searched string Name line along with 10 lines following the same. can anyone of you please let me know how to go about it ? (8 Replies)
Discussion started by: sukrish
8 Replies

2. Solaris

Line too long error Replace string with new line line character

I get a file which has all its content in a single row. The file contains xml data containing 3000 records, but all in a single row, making it difficult for Unix to Process the file. I decided to insert a new line character at all occurrences of a particular string in this file (say replacing... (4 Replies)
Discussion started by: ducati
4 Replies

3. UNIX for Dummies Questions & Answers

line wrap in sed

I tried line wrap in sed by sed -l 20 ' n' and as far as i understand each long line would be split into lenght of 20 characters in each. but thats not happening.wats going wrong:confused: (5 Replies)
Discussion started by: mithun1!
5 Replies

4. Shell Programming and Scripting

Need help with sorting in paragraphs

I am very new to shell scripting, current try to do a sorting of a text file in paragraphs with ksh script. example: File content: A1100001 line 1 = "testing" line 2 = something, line 3 = 100 D1200003 line 1 = "testing" line 2 = something, line 3 = 100 B1200003 line 1 =... (3 Replies)
Discussion started by: gavin_L
3 Replies

5. Shell Programming and Scripting

Search a string in a text file and add another string at the particular position of a line

I am having a text file which is having more than 200 lines. EX: 001010122 12000 BIB 12000 11200 1200003 001010122 2000 AND 12000 11200 1200003 001010122 12000 KVB 12000 11200 1200003 In the above file i want to search for string KVB and add/replace... (1 Reply)
Discussion started by: suryanarayana
1 Replies

6. Shell Programming and Scripting

Search a string in a text file and add another string at the end of line

Dear All I am having a text file which is having more than 200 lines. EX: 001010122 12000 BIB 12000 11200 1200003 001010122 2000 AND 12000 11200 1200003 001010122 12000 KVB 12000 11200 1200003 In the above file i want to search for string KVB... (5 Replies)
Discussion started by: suryanarayana
5 Replies

7. Red Hat

How to add a new string at the end of line by searching a string on the same line?

Hi, I have a file which is an extract of jil codes of all autosys jobs in our server. Sample jil code: ************************** permission:gx,wx date_conditions:yes days_of_week:all start_times:"05:00" condition: notrunning(appDev#box#ProductLoad)... (1 Reply)
Discussion started by: raghavendra
1 Replies

8. Shell Programming and Scripting

awk print in one line after reading textfile with paragraphs

Hello everybody I have a text file which has the following format: nmm "text20140601.033954text" "text" "text" "text" , ... , "text" "text" , ... , Lat 36.3247 Lon 16.0588 Depth 8 "text", ... , "text" "text", ..., CovXX 1.65 CovYY 2.32 CovZZ 1.2 "text" , ..., "text nmm ... (6 Replies)
Discussion started by: phaethon
6 Replies
wml::des::typography(3) 					     EN Tools						   wml::des::typography(3)

NAME
wml::des::typography - Typography SYNOPSIS
#use wml::des::typography [face_shortcuts] # paragraph whitespace <ps [height]> (<ds [height]>) <pi [width]> (<ein [width]>) # paragraph text rendering <big X> <sc [complete]>...</sc> <csc>...</csc> <spaced [interchar=N] [interline=N]>...</spaced> <verbcode>...</verbcode> # headlines <headline [name]>...</headline> (<ue [name]>...</ue>) <subheadline [name]>...</subheadline> (<zwue [name]>...</zwue>) # unsorted lists <tul [ps=N] [pi=N]> <tli [pshape=dash|box] [pcolor=#rrggbb]>...</tli> ... </tul> DESCRIPTION
This include file provides tags for more typographically strong layouting then HTML per default provides. The following tags are provided: Typographical Paragraph Skip "<ps "[height]">" This is the typographical way to insert a blank line between two paragraphs. It is not as high as the one generated by HTML's "<p>" tag. Default is 4 pixels for height. Optically and functionally "<ps>" is between "<br>" and "<p>". In german this is called "Durchschuss", so you can also use the alterntive name "<ds>" for this tag. ...The last line of the previous paragraph. <ps> The new line of the following paragraph... Typographical Paragraph Indention "<pi "[width]">" This is the typographical way to glue paragraphs which should become one optical block. A complete blank line between them would be ugly and without any inserts the reader cannot distinguish between the two paragraphs. The typographical solution here is to indent the second paragraph by width pixels. The default is 40 pixels. Optically "<pi>" also includes the effect of "<ps>". In german this is called `Einrueckung', so you can also use the alterntive name "<ein>" for this tag. Example: ...The last line of the previous paragraph. <pi>The new line of the following paragraph... Big Paragraph Starting Letter "<big "X">" This is the typographical way to mark the beginning of a more important paragraph by rendering the first letter of the first word of this paragraph in huge font. Optically this letter then is approximately three times bigger then the normal text font. Additionally the alt attribute of the used "<img>" tag is set to the letter, so text-based browsers correctly show the first word. Because such a paragraph should also be introduced by more whitespace, one usually uses the standard "<p>" tag in front of "<big>" to achieve the correct optical effect. Example: ...The last line of the previous paragraph. <p> <big T>he new line of the following paragraph... Small Caps Text "<sc "[complete]">"..."</sc>" This container tag renders its body with small caps, i.e. all lower case letters are changed to upper case while lowered optically via font size. In german typography this is also known as `Kapitaelchen'. Optionally when adding the attribute complete, all words are forced to begin with an upper case letter, too. If you have support for i18n (internationalization) you may also convert case of non-ASCII characters. See your local documentation locale(7) for details or ask your system administrator. Spaced Text "<spaced "[interchar=N] [interline=N]">"..."</spaced>" This container tag renders its body as spaced text, i.e. text with spaces between the lines and characters. In typpgraphy this is usually used to emphasize the text by the use of whitespace. Per default interchar and interline are 0, i.e. no spacing. The spacing is achieved by inserting as much "&nbsp;" entities as interchar specifies and 1pt-images of height 14+interline every fifth word. In german typography this is also known as `Gesperrt'. Headline "<headline "[name]">"..."</headline>" This container tag creates a typographically better headline as the standard HTML "<h1>" does, i.e. it renders the text in Helvetica and used better whitespaces around it. Actually it does not create any whitespace above it, but the correct one below it. This way you can create the leading whitespace your own (which is usually different according to the context) but get nice trailing whitespace (which has to be chosen carefully to make the headline and the following paragraph one unit). In german this is called `Ueberschrift' hence the alias "<ue>". Example: ...The last line of the previous paragraph. <p> <ue>The headline</ue> The new line of the following paragraph... Sub-Headline "<subheadline "[name]">"..."</subheadline>" This container tag creates a typographically better sub-headline as the standard HTML "<h2>" does, i.e. it renders the text in Helvetica and used better whitespaces around it. Actually it does not create any whitespace above it, but the correct one below it. This way you can create the leading whitespace your own (which is usually different according to the context) but get nice trailing whitespace (which has to be chosen carefully to make the headline and the following paragraph one unit). In german this is called `Zwischenueberschrift' hence the alias "<zwue>". Example: ...The last line of the previous paragraph. <p> <zwue>The headline</zwue> The new line of the following paragraph... Verbatim Code "<verbcode>"..."</verbcode>" This container tag renders its body mostly verbatim, i.e. treats it like plain (source) code. Internally this just is an indented "<verbatim>" container from wml::fmt::verbatim(3) which itself is an enhanced "<pre>" container. Unnumbered Lists "<tul "[ps=N] [pi=N]">"..."</tul>" This container tag displays unnumbered lists in a more typographically strong layout, rendered via HTML tables for indentation. "<tli "[pshape=box|dash] [pcolor=#rrggbb]">"..."</tli>" Items are prefixed by a box or a dash, depending on the pshape attribute, and its color may be defined. AUTHOR
Ralf S. Engelschall rse@engelschall.com www.engelschall.com REQUIRES
Internal: P1, P2, P3, P8 SEE ALSO
HTML "<font>" and "<br>" tags. EN Tools 2014-04-16 wml::des::typography(3)
All times are GMT -4. The time now is 04:30 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy