Search Results

Search found 242 results on 10 pages for 'paragraphs'.

Page 1/10 | 1 2 3 4 5 6 7 8 9 10  | Next Page >

  • Find/Replace Paragraph End (^13) in Microsoft Word 2007 Merges Paragraphs

    - by Mike Blyth
    I need to replace a target at the beginning of lines with something else. Without wildcards, I can say to replace "^pTarget" with "^pReplacement". With wildcards enabled, I use replace "^13Target" with "^13Replacement". The replacement is successful except that the paragraph is now merged with the previous one in a strange way: The end-paragraph mark is still in place and the paragraph begins on a new line, but Triple clicking to select paragraph selects both the changed paragraph and the one above In a macro, starting in the paragraph above and extending the selection to the end of paragraph causes both paragraphs to be selected. Inter-paragraph spacing disappears between the changed paragraph and the one above. In essence, the paragraph boundary has been removed although the end-paragraph mark is still shown. To duplicate this problem, make a new document Line 1 Line 2 Line 3 (separate paragraphs). Find and replace (with wildcards on) "^13" with "^13". If your result is the same as mine, you will see the problems listed above. I can work around this in the usual way of replacing ^p with something else first, e.g. "^p" = "$", then "$target" = "$replacement", but I'm curious about what's going on. (This is using Word 2007 on Windows 7) I don't know Word XML, but the XML output seems to correspond with the above. Replacing ^13 with ^13 moves the paragraphs together in almost the same way as replacing end-paragraph with end-line (^p = ^l). Here is the relevant XML of the original "Line 1, Line 2, Line 3" in separate paragraphs: <w:p w:rsidR="00BB3032" w:rsidRDefault="00027252"> <w:r><w:t>Line 1</w:t></w:r> </w:p> <w:p w:rsidR="00027252" w:rsidRDefault="00027252"> <w:r><w:t>Line 2</w:t></w:r> </w:p> <w:p w:rsidR="00027252" w:rsidRDefault="00027252"> <w:r><w:t>Line 3</w:t></w:r> </w:p> Now after replacing ^13 with ^13: <w:p w:rsidR="00027252" w:rsidRDefault="00027252"> <w:r><w:t>Line 1</w:t></w:r> <w:r w:rsidR="00C57863"><w:cr/></w:r> <w:r><w:t>Line 2</w:t></w:r> <w:r w:rsidR="00C57863"><w:cr/></w:r> <w:r><w:t>Line 3</w:t></w:r> <w:r w:rsidR="00C57863"><w:cr/></w:r> </w:p> Now original after replacement of ^p with ^l (convert end-paragraph to end-line) <w:p w:rsidR="00027252" w:rsidRDefault="00027252"> <w:r><w:t>Line 1</w:t></w:r> <w:r w:rsidR="00AC7B51"><w:br/></w:r> <w:r><w:t>Line 2</w:t></w:r> <w:r w:rsidR="00AC7B51"><w:br/></w:r> <w:r><w:t>Line 3</w:t></w:r> <w:r w:rsidR="00AC7B51"><w:br/></w:r> </w:p>

    Read the article

  • Merging and re-formatting paragraphs in Microsoft Word 2007

    - by thkala
    After a copy/paste mishap in Microsoft Word 2007, I ended up with text looking like this: This line breaks up here continues here, and so on here, when it should all be in a single line without all the random whitespace. I confirmed that there are paragraph separators and extra whitespace between each line - probably due to hard-coded newlines in the original source. Is there a (preferrably easy) way to merge paragraphs in Microsoft Word? Is there a way to re-format a paragraph so that extraneous whitespace is removed? I can change the flush style, but the whitespace remains. I (obviously?) do not have any experience with Word, being more of a TeX person, but I have been searching Google and crawling the menus for a few hours and I have yet to find a solution...

    Read the article

  • Expandable paragraphs with HTML and CSS

    - by user3704175
    I was wondering if anyone here would be as so kind as to help me out a bit. I am looking to make expandable paragraphs for my client's website. They would like to keep all of the content from their site, which is pretty massive, and they want a total overhaul of the design. They mainly wan tot keep it for SEO purposes. Anyhow, I thought it would be helpful for the both of use if there is some way to use expandable paragraphs, you know, with a "read more..." link after a certain line of text. I know that there are some JQuery and Java solutions for this, but we really would like to stay away from those options, if at all possible. When would like HTML and CSS, if we can. Here is kind of an example: HEADING HERE Paragraph with a bunch of text. I would like this to appear in a pre-determined line. For example, maybe the start of the paragraph goes on for, let's say, three lines and then we have the [read more...] When the visitor clicks "read more", we would like the rest of the content to just expand to reveal the article in its entirety. I would like for the content to already be on the page, so it just expands. I don't want it to be called in from another file or anything, if that makes sense. Thank you in advance for any and all help. It will be greatly appreciated! Testudo

    Read the article

  • How can I count paragraphs in text file using Perl?

    - by robjez
    I need to create Perl code which allows counting paragraphs in text files. I tried this and doesn't work: open(READFILE, "<$filename") or die "could not open file \"$filename\":$!"; $paragraphs = 0; my($c); while($c = getc(READFILE)) { if($C ne"\n") { $paragraphs++; } } close(READFILE); print("Paragraphs: $paragraphs\n");

    Read the article

  • counting paragraphs in text file

    - by robjez
    I need to create perl code which allows counting paragraphs in text files. I tried this and doesn't work: open(READFILE, "<$filename") or die "could not open file \"$filename\":$!"; $paragraphs = 0; my($c); while($c = getc(READFILE)) { if($C ne"\n") { $paragraphs++; } } close(READFILE); print("Paragraphs: $paragraphs\n");

    Read the article

  • placing h2 and h3 tags around words in paragraphs

    - by sam
    if i have a page like with an H1 heading and then just a long paragraph wraped in p tags, is it ok to write the paragraph as bellow (with the h tags mixed into the paragraph) and just style it so it looks all the same so that i get the benefit of using h2 and h3 tags ? Im aware this is not the 'proper' use of the H tags as their meant to be headings but can i use them like this as the site isnt built using mulitple headings on the same page (please ignore over optimization this is just for illitrative purposes) <h1>Red shoes</h1> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus id dui id mi consectetur tincidunt. Mauris at sem non urna congue eleifend sed quis nulla. Aenean nisl porta eget auctor vel, semper eget massa.</p> <h2>Red shoes</h2> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus id dui id mi consectetur tincidunt. Mauris at sem non urna congue eleifend sed quis nulla. Aenean nisl porta eget auctor vel, semper eget massa.</p> <h3>red shoes</h3> <p>Lorem ipsum.</p>

    Read the article

  • Switch Text Paragraphs in OpenOfficeOrg Writer mailmerge

    - by Glen S. Dalton
    I am using mailmerge to write the same letter with minor differenes to many peolpe. I experienced that switching text paragraphs depending on database values was not easy for me. I ended up putting huge text paragraphs into the database becaus switching did not really work for me. Actually I dont' understand how writer does it and maybe the boolean evaluation is buggy? There is some possibility making paragraphs invisible depending on database fields, but it was frustrating. After marking a paragraph as invisible (depending on a condition) it went invisible in the main document and did not come back, I lost the content. An example in pseudocode of what I want in my mailmerge document: {if [[balance]] 10} We owe you money. Please can you send your bank details. {end if} {if [[balance]] < -10} Please transfer the remaining amount to our banc account 123... {end if} Maybe this could be done with makros? But how to combine makros with mailmerge? Can you tell me what are the pitfalls and how to master them? I once did this with ms word, it was a lot easier. The normal mailmerge (including database fields in the letters) works fine for me in OpenOffice writer.

    Read the article

  • Nokogiri find text in paragraphs

    - by astropanic
    I want to replace the inner_text in all paragraphs in my XHTML document. I know I can get all text with Nokogiri like this doc.xpath("//text()") But I want only operate on text in paragraphs, how I can select all text in paragraphs without affecting eventually existent anchor texts in links ? #For example : <p>some text <a href="/">This should not be changed</a> another one</a>

    Read the article

  • OpenOffice - alternative paragraphs (two PDFs, one source)

    - by RedGrittyBrick
    I use OpenOffice to produce a document in PDF format. This document is occasionally revised and reissued. I now need to produce a variant of this document with a small number of paragraphs replaced by other paragraphs. I would prefer to avoid maintaining two separate documents where 95% of the text is the same. In other words, from one ODT file I would like to be able to produce two PDFs with slighly differing content. Are there some OpenOffice features I could use that would help with this?

    Read the article

  • Merging paragraphs in MS Word 2007

    - by Rajneesh Jain
    My name is Rajneesh Jain from New Delhi, India. I saw your code on merging and re-formatting paragraphs in MS Word 2007. I am facing problem of text overflow. The code I used is: Sub FixParagraph() ' ' FixParagraph Macro ' ' Dim selectedText As String Dim textLength As Integer selectedText = Selection.Text ' If no text is selected, this prevents this subroutine from typing another ' copy of the character following the cursor into the document If Len(selectedText) <= 1 Then Exit Sub End If ' Replace all carriage returns and line feeds in the selected text with spaces selectedText = Replace(selectedText, vbCr, " ") selectedText = Replace(selectedText, vbLf, " ") ' Get rid of repeated spaces Do textLength = Len(selectedText) selectedText = Replace(selectedText, " ", " ") Loop While textLength <> Len(selectedText) ' Replace the selected text in the document with the modified text Selection.TypeText (selectedText) End Sub

    Read the article

  • Numbered paragraphs in Word 2007

    - by Kit
    I have the following styles defined in Word 2007. They all have outline levels 1-6. They also correctly show up in the Table of Contents (not all, I only set the TOC up to Level 3). 1 Heading 1 1.1 Heading 2 1.1.1 Heading 3 1.1.1.1 Heading 4 1.1.1.1.1 Heading 5 1.1.1.1.1.1 Heading 6 This is what I want 1 Heading 1 1.1 Body text under Heading Level 1 1.2 Body text under Heading Level 1 2 Heading 1 2.1 Heading 2 2.1.1 Body text under Heading Level 2 2.1.2 Body text under Heading Level 2 2.1.3 Body text under Heading Level 2 2.2 Heading 2 2.2.1 Body text under Heading Level 2 2.2.2 Body text under Heading Level 2 How do I make two list sequences link to each other? Here's a {fill in the blanks} illustration: {section number} Heading 1 {section number}.{clause number} Body text under Heading Level 1 {section number}.{clause number} Body text under Heading Level 1 The example above should expand to: 1 Heading 1 1.1 Body text under Heading Level 1 1.2 Body text under Heading Level 1 Another example: {section number} Heading 1 {section number}.{subsection number} Heading 2 {section number}.{subsection number}.{clause number} Body text under Heading Level 2 {section number}.{subsection number}.{clause number} Body text under Heading Level 2 should expand to: 2 Heading 1 2.1 Heading 2 2.1.1 Body text under Heading Level 2 2.1.2 Body text under Heading Level 2 2.1.3 Body text under Heading Level 2 The numbered body text paragraphs shouldn't show up the Table of Contents. I couldn't find the right way to do that, whether in multilevel lists, fields, styles, etc. How do I do it right?

    Read the article

  • Extract paragraphs from Wikipedia API using PHP cURL

    - by Kane
    Here's what I'm trying to do using the Wikipedia (MediaWiki) API - http://en.wikipedia.org/w/api.php Do a GET on http://en.wikipedia.org/w/api.php?format=xml&action=opensearch&search=[keyword] to retrieve a list of suggested pages for the keyword Loop through each suggested page using a GET on http://en.wikipedia.org/w/api.php?format=json&action=query&export&titles=[page title] Extract any paragraphs found on the page into an array Do something with the array I'm stuck on #3. I can see a bunch of JSON data that includes "\n\n" between paragraphs, but for some reason the PHP explode() function doesn't work. Essentially I just want to grab the "meat" of each Wikipedia page (not titles or any formatting, just the content) and break it by paragraph into an array. Any ideas? Thanks!

    Read the article

  • Issues Converting Plain Text Into Microsoft Word Bulleted Lists

    - by user787832
    I'm a programmer. I hate status reports. I found a way to live with it. While I am working in my IDE ( Visual Slickedit ) I keep a plain text file open in one of the file/buffer tabs. As I finish things I just jot down a quick note into that file. At the end of the week that becomes my weekly status report. Example entries: The Datatables.net plugin runs very slowly in IE 8 with more than 2,000 records. I changed the way I did the server side code to process the data to make less work for the plugin to get decent performance for the IE 8 users. I made a class to wrap data from the new data collection objects into the legacy data holder objects. This will let the new database code be backward compatible with the legacy code until we can replace it. I found the bug reported by Jane. The software is fine. The database we use for the test site has data that is corrupted in a way it wouldn't be for production site At the end of the month I go back to each weekly *.txt file and paste all of the entries into a MS Word file for a monthly report. I give the monthly report to a liason to the contracting company who has to compile everyone's monthly reports into a single MS Word 2007 document. His problem, soon to be my problem, comes when he highlights my paragraphs like the ones above to put bullets in front of my paragraphs. When he highlights my notes to put bullets in front of them with MS Word 2007, Word rearranges the text a bit and the new line chars/carriage returns stagger the text so the text is no longer in neat chunks. This: I found the bug reported by Jane. The software is fine. The database we use for the test site has data that is corrupted in a way it wouldn't be for production site Becomes This: I found the bug reported by Jane. The software is fine. The database we use for the test site has data that is corrupted in a way it wouldn't be for production site I tried turning word wrap on in my IDE for the text files I put my status notes in. It just puts some kind of newline character in anyway. Searching/Replacing those chars in the text files has the result of destroying the paragraphs. Once my notes are pasted into MS Word, Word automatically translates them into paragraph breaks. Searching/Replacing them there has similar results. Blank lines separating the notes disappears. One big mess. What I would like is to be able to keep adding my status notes to a text file as I am now, but do something different when I paste the notes into MS Word such that my liason can select the text, hit the bulleting command and NOT have the staggered text as shown above. Any ideas? Thanks much in advance Steve

    Read the article

  • Displaying paragraphs in HTML

    - by Roy
    Hi all, I'm writing a web application which needs to bring the stored paragraphs into the front web. The text come from excel work sheet and contains control characters like indent. I want to show the text in the exactly manner as it was in excel. How can I do that then? Thanks in advance.

    Read the article

  • Turn a collection of headings, paragraphs and lists into one hyperlink

    - by Moak
    Is there a valid non js way to turn a collection of headings, paragraphs and lists into one url? (like in advertisements?) <a href="http://www.example.com" class="allclickable"> <h2>Fresh Bread</h2> <p>Delivered to your door</p> <ul> <li>Daily</li> <li>Fresh</li> <li>Bread</li> </ul> </a> This does not validate and I do want the href to be display as block element (so also the space around the text is clickable). Cheers

    Read the article

  • split html text in 2 paragraphs

    - by Luca Romagnoli
    hi i have a html text like this: aaa dafjsld dslajfk òsal asfòljd <a href="ciao.com">aa aa</a> adsfsadfsadfs i want to split it in 2 paragraphs. but i don't want to generate this situation: <p>aaa dafjsld dslajfk òsal asfòljd <a href="ciao.com">aa</p><p> aa</a> adsfsadfsadfs</p> how can i check if the split involves any tags and avoid it? thanks

    Read the article

  • How can I work with paragraphs in Wordpress?

    - by Steven
    Wordpress has a filter that automatically add paragraphs to posts. I can remove this by adding the followin code: // Remove the <p> tags which WP automatically inserts in psots. remove_filter ('the_content', 'wpautop'); The problem is that i removes <br /> tags as well. So I'm not removing this filter at the moment. My problem is that inside a DIV box, I get extra space above and below the text (at the start / end of text). I could manipulate the <p> tag in css, but again, that will affect all <p> tags throughout the post content. Any suggestions to what I should do?

    Read the article

  • Hide long text except the first two paragraphs

    - by Barbara
    I have a very long text and I need to hide everything except the first two paragraphs. For various reasons I'd rather not use jquery for this site. Can this be done with css only? I know nth-child most likely will do the trick but I'm having troubles coming up with a specific rule. <div class="text"> <p>display<p> <p>display</p> <p>hide from this point</p> <p>...</p> </div>

    Read the article

  • OpenOffice with C# iterate throught all paragraphs and read text

    - by Darius Kucinskas
    How to iterate through all paragraphs in OpenOffice Writer document and output text. I have Java examples, but don't know how to convert code to C#. Java example could be found here: http://wiki.services.openoffice.org/wiki/API/Samples/Java/Writer/TextDocumentStructure My C# code: InitOpenOfficeEnvironment(); XMultiServiceFactory multiServiceFactory = connect(); XComponentLoader componentLoader = XComponentLoader)multiServiceFactory.createInstance("com.sun.star.frame.Desktop"); //set the property PropertyValue[] propertyValue = new PropertyValue[1]; PropertyValue aProperty = new PropertyValue(); aProperty.Name = "Hidden"; aProperty.Value = new uno.Any(false); propertyValue[0] = aProperty; XComponent xComponent = componentLoader.loadComponentFromURL( @"file:///C:/code/test3.doc", "_blank", 0, propertyValue); XEnumerationAccess xEnumerationAccess = (XEnumerationAccess)xComponent; XEnumeration xParagraphEnumeration = xEnumerationAccess.createEnumeration(); while ( xParagraphEnumeration.hasMoreElements() ) { // ??? // The problem is here nextElement() returns uno.Any but // I some how should get XTextContent???? uno.Any textElement = xParagraphEnumeration.nextElement(); // create another enumeration to get all text portions of //the paragraph XEnumeration xParaEnumerationAccess = textElement.createEnumeration(); //step 3 Through the Text portions Enumeration, //get interface to each individual text portion } xComponent.dispose(); xComponent = null;

    Read the article

  • OpenOffice with .NET: how to iterate throught all paragraphs and read text

    - by Darius Kucinskas
    How to iterate through all paragraphs in OpenOffice Writer document and output text. I have Java examples, but don't know how to convert code to C#. Java example could be found here: http://wiki.services.openoffice.org/wiki/API/Samples/Java/Writer/TextDocumentStructure My C# code: InitOpenOfficeEnvironment(); XMultiServiceFactory multiServiceFactory = connect(); XComponentLoader componentLoader = XComponentLoader)multiServiceFactory.createInstance("com.sun.star.frame.Desktop"); //set the property PropertyValue[] propertyValue = new PropertyValue[1]; PropertyValue aProperty = new PropertyValue(); aProperty.Name = "Hidden"; aProperty.Value = new uno.Any(false); propertyValue[0] = aProperty; XComponent xComponent = componentLoader.loadComponentFromURL( @"file:///C:/code/test3.doc", "_blank", 0, propertyValue); XEnumerationAccess xEnumerationAccess = (XEnumerationAccess)xComponent; XEnumeration xParagraphEnumeration = xEnumerationAccess.createEnumeration(); while ( xParagraphEnumeration.hasMoreElements() ) { // ??? // The problem is here nextElement() returns uno.Any but // I some how should get XTextContent???? uno.Any textElement = xParagraphEnumeration.nextElement(); // create another enumeration to get all text portions of //the paragraph XEnumeration xParaEnumerationAccess = textElement.createEnumeration(); //step 3 Through the Text portions Enumeration, //get interface to each individual text portion } xComponent.dispose(); xComponent = null;

    Read the article

  • Textarea to paragraphs

    - by zaf
    When I have to render textarea content to the front end I usually pass it thru a function that converts newlines to <br/> tags and double newlines signal paragraph tags so blocks of text get surrounded by <p> and </p> tags. To save time I usually use a ready made PHP function from the wordpress codebase. You can get the link from the man himself: http://ma.tt/scripts/autop/ If you check it out you'll see it does some heavy lifting with about 20 regular expressions. I know I could use a wysiwyg editor (like TinyMCE or CKEditor) that can format the data on the client and then send it to the server (most of them add <p>..</p> tags by default) but I want to know the experience of others in handling raw textarea input and then displaying it on the front end.

    Read the article

  • How to extract paragraphs instead of whole texts only for XWPFWordExtractor (POI Library) Java

    - by Mr CooL
    Hello, I know the following code could extract whole texts of the docx document, however, I need to extract paragraph instead. Is there are possible way?? public static String extractText(InputStream in) throws Exception { JOptionPane.showMessageDialog(null, "Start extracting docx"); XWPFDocument doc = new XWPFDocument(in); XWPFWordExtractor ex = new XWPFWordExtractor(doc); String text = ex.getText(); return text; } Any helps would much appreciated. I need this so urgently.

    Read the article

  • jQuery display text nested in paragraphs inside a div

    - by user961627
    I have HTML that looks something like this: <div class='textbox' data-title='Sometitle'> <div class='textareaedit'> <p><strong>Test sample text</strong></p> </div> </div> I'm sometimes going to have a few different <p> tags inside the textareaedit divs, and sometimes strong tags around the text inside the <p> (as in this example), and sometimes a span tag, and sometimes it's going to be without further tags inside the <p>. I want to iterate through each textbox on my page, grab its title and also the text nested inside <p> tags in textareaedit. I'm giving the output via console for testing. This is my jQuery code, but I get no output for the second console.log() line: $('.textbox').each(function() { $this = $(this); console.log($this.attr('data-title')+ ":\n"); $this.children('textareadit').children('p').each(function(){ console.log($(this).html()); // not giving any output, it's blank }); }); I tried $(this).text() as well, but no difference. You may think this example has the sample text inside <strong> tags within the <p>, but I've also tried the same example without the strong, where the text was the direct child of <p>, but it didn't make a difference. How can I capture the text?

    Read the article

  • How to normalize a word document?

    - by AngryHacker
    I was too cheap to hire someone to retype a really, really long scanned document full of legalese. So I OCRed it using OmniPage. But the OCR output was kind of disappointing. I got a word doc that has multiple line spacings. The before and after paragraph heights are different all over the place. This would be easy, if the entire document had the same paragraph settings, but it does not. There are probably a half dozen different styles going on. What is the easiest way to normalize the document? For instance, if one paragraph has a line spacing of 20.4 pt and another one has a spacing of 20.9 pt, then I'd like to consider them the same style and set them to a single value? Or really, any suggestion is welcome at this point.

    Read the article

1 2 3 4 5 6 7 8 9 10  | Next Page >