Automating a document formatting

Discussion in 'Mac Apps and Mac App Store' started by cool11, Jun 28, 2008.

  1. cool11 macrumors 65816


    Sep 3, 2006
    I am having a site and I update it with many texts that came from word documents.

    For many years (pc days and now on mac), I have to manually insert the <p> and </p> html tags in the starting point and the ending point of each paragraph of each document, in order to appear as it should appear in my web page.
    The web page is dynamic, so I have to do this thing all the time , adding these tags in order to have the right interpretation from html parser of the server and the paragraphs to be displayed as separated paragraphs and not an one paragraph text.

    I am searching a way to do this weary task automated.

    Create, somehow, a procedure, of adding <p> tag to the start of each paragraph of the document, and </p> to the end of it.

    Can you please suggest me something?
  2. JNB macrumors 604


    Oct 7, 2004
    In a Hell predominately of my own making
    First, assuming you separate paragraphs with a space between them through the use of two <CR> (or similar), then do a global Search & Replace in the document for: <CR><CR>

    and replace with </p><CR><CR><p>

    Then, you only have to manually place the correct formatting instructions at the beginning of the first paragraph and the end of the last one.

    EDIT: In Word, this is what it looks like, before & after (the CR character is ^p)

    Attached Files:

  3. cool11 thread starter macrumors 65816


    Sep 3, 2006
    I really don't understand what is the <CR>.
    Where is this on word documents?
  4. cool11 thread starter macrumors 65816


    Sep 3, 2006
    How do you write ^ on find-replace box?

    edit: ok, I copied your symbol, not the best way to do it of course.

    It seems to work as you said. It would be nice to save the search-replace string somehow and not to have to write it from the start every time I wanna do these replacements.

    At last, it is one step forward to the desired automation, but I hoped there was a more straightforward procedure.

    Thank you JohnNotBeatle.

    If somebody has a better idea I will try it. Till this momment I will do it the way you write it here. :)

Share This Page