Split elements at paragraph breaks

Using FM 8.0p277 on Windows XP.
I have a structured document with some content copied from unstructured documents and pasted into the structure. Inside some elements, there are paragraph breaks that do not coincide with the end of an element, for example:
<ul>
<li>First item</li>
<li>Second item¶
Third item</li>
</ul>
What I need to do is find every instance and split the elements at the ¶. While the latter part is easy (typing Esc, E, s), is there a way to find elements containing a paragraph break?
Thanks in advance for any helpful advice,
Johannes

Johannes,
It would be possible to create a program finding those instances, but it is not an easy task, because the ElementBegin and ElementEnd information is inside a paragraph. Well, maybe it would be enough to check whether the last string segment in a paragraph ends at the position of the paragraph end... unfortunately I have no time for experiments.
If you show Text Symbols and Element Boundaries (using the View menu), those paragraph breaks ¶ are rather easy to spot, because all others have one or more ] in front of them. Of course, if you have thousands of them...
- Michael

Similar Messages

  • Importing a XML file in my INDD template. I get lots of unwanted paragraph breaks

    Hi,
    I am importing a XML file in my INDD template. I get lots of unwanted paragraph breaks where the closing xml tags for elements appear.
    Can someone guide me please to rectify the problem?
    Regards,
    ~shibu

    Here is the screen shot from INDD: Though I manage to get rid 0f them when i close up the XML tag manually, I want a sure-shot solution. Thanks for helping me out.
    and here is the screen shot of the XML coding:
    <para aid:pstyle="4 body text">Another common alkali is potassium hydroxide, KOH.</para>
    <equation><mathphrase>KOH(aq) &#x2192; K<superscript>+</superscript>(aq) + OH<superscript>&#x2013;</superscript>(aq)</mathphrase></equation>
    <qandaset>
    <title aid:pstyle="7 Questions heading"><emphasis role="underline">Questions A</emphasis></title><qandadiv><qandaentry><question><orderedlist numeration="arabic" startingnumber="1">
    <listitem><para aid:pstyle="7 Question text">Two solutions are tested with universal indicator paper. Solution A has a pH of 8 and solution B has a pH of 14. What does this tell you about the two solutions?</para></listitem>
    <listitem><para aid:pstyle="7 Question text">Methyl orange is added to a solution and the solution turns pink. What does this tell you about the solution?</para></listitem><listitem><para aid:pstyle="7 Question text">What does the &#x2018;basicity&#x2019; of an acid refer to?</para></listitem>
    <listitem><para aid:pstyle="7 Question text">Calcium oxide is an example of a base. How do you know this?</para></listitem>
    </orderedlist>
    </question>
    </qandaentry>
    </qandadiv>
    </qandaset>
    </sect1>
    <sect1>
    <title aid:pstyle="3 Heading">What are salts?</title>
    <para aid:pstyle="4 body text">Previously, it was explained that acids contain <emphasis role="bold" aid:cstyle="4 body bold">replaceable hydrogen atoms</emphasis>, and that when <emphasis role="bold" aid:cstyle="4 body bold">metal atoms</emphasis> take their place, a compound called a salt is formed. The names of salts have two parts, as shown:</para>
    <!-- <equation><mediaobject><textobject><figure href="file:///D:/images/reaction2.tif"><title/><para/></figure></textobject></mediaobject></equation> -->
    <para aid:pstyle="4 body text">The table shows the four most common acids and their salt names.</para>

  • Change the height of a paragraph break while using a 12pt baseline grid

    Hey all,
    I am laying out a newsletter – and I want to tighten up the layout a bit. Currently the body text is 9pt on 12pt leading as the baseline grid is 12pt. I think the gap between the paragraphs is too much, and I want to reduce the height.(This will save me some space!)  (See image)
    One solution although it's not really practical is to manually change the leading of the paragraph break to 4pt which reduces the gap to the desired size. But this is a longish newsletter and that would be a nightmare... (Hopefully this example gives you an idea of what I am looking to do)
    Another thing I tried was to take out the paragraph breaks and put a 1mm space after each paragraph. This works, until there is a different amount of paragraphs in a column causing the overall column lengths to be different heights. Not ideal.
    I don't really know what to call what I am looking for – so if anyone has any ideas for this, that would be great.
    Thanks in advance,
    Will

    Yeah so I do usually use Space Before or Space After values – but on a baseline grid I am getting uneven columns if I have say 3 paragraphs in one column, and 4 in the other.
    But that's a good point – expecting the baseline grid to absorb the difference in paragraph spacings isn't realistic. I guess I will just have to enjoy large gaps between paragraphs!
    Thanks for the quick reply though Peter!

  • How to get rid of paragraph breaks in a lengthy text instead of manually

    I have imported a large piece of text - it is very narrow and has many paragraph breaks I guess you call it - or return breaks. I started doing it manually but it is a nightmare. Is there an easier way to do it? I snooped around and tried a few things but cannot seem to get this to work. I have a lot more work to do. Thanks again.

    Position the mouse pointer after the last printed character of a paragraph. Press the mouse button and hold it while you drag down over several of the empty lines. Release the mouse button. Simultaneously press command+C keys (then release) to copy the selection to the clipboard. Simultaneously press command+F keys (then release) to open the Find&Replace dialog. Click once in the "Find:" window, then press command+V keys (then release) to paste the contents of the clipboard there. Click in the "Replace:" window then press "Return" to enter a single carriage return. Click on the "Replace & Find' button.

  • Find/Change Inserting paragraph break

    Hello
    I am trying to insert a paragraph mark between two lines of text using find/change
    The first line has a heading style and I want to insert an empty line (Paragraph) after it and before the next line (without changing any formatting)
    I am able to use enter the correct parameters in find but can't figure out what parameter to use in 'Change to"
    Forced line break doesn't produce what I want. Neither does standard carriage return (not sure what that is)
    I have tried both Text and Grep dialogs without success. Yes I read the help files.
    This will be simple for you guys but is stumping me.
    Any ideas oh brilliant ones?
    As usual Thanks much in advance

    Err, a paragraph mark? You mean a paragraph break?
    Anyhow, if you insist on Doing it Wrong, you can use ^p ("End of Paragraph") in the change field. So you might
    change ^p to ^p^p to insert a blank paragraph between each paragraph. For instance. But again, it is the wrong answer.
    Yes-a paragraph break.' Sorry for the imperfect terminology
    The first line is a heading style which I was advised in this forum to make into a 'list style' due to TOC issues
    The 'doing it wrong' paragraph is going to be used to anchor a graphic and then converted to a very small paragraph mark (nearly invisible) as advised in another article
    I did use the
    change ^p to ^p^p
    but it creating another list style as the paragraph break. Its ok. I went ahead and did it anyway and then manually changed all of those entries into a regular paragraph 'break'
    With 300 graphics I would like to automate this but.....
    Thanks for your reply

  • How to insert a character and paragraph break at the beginning of a paragraph using Grep

    Dear Community!
    I am stucked...
    I have several books in indesign, which I want to export into epub. I have a standardized procedure, to be able to assign the task to students.
    My problem i I have a paragraph style 'heading2' and I would like to insert a paragraph break before which is styled 'new page'.
    Here is the theory I have thought about:
    -with find and change find the style 'heading2'
    -insert a special character + paragraph break before the first character of the paragraph
    -with a second find and change find the special character
    -replace with nothing and style with 'new page'
    My question is how to insert with grep (?) before the first character anything.
    Please help me!
    Thanks in advance
    ND

    Look in the flyout panel of your Paragraph panel.
    (Or in the Online Help -- a resource a lot of people seem to overlook... It's even *called* "Keep Options". ...
    >I have a problem along these lines that I have not found the answer to by searching, and neither have I been able to start a new discussion on this. (These forums are kind of hard to figure out)
    ... on the top right of THIS web page I can see a heading "Actions", with below it the text "Start a discussion" ...)

  • How to identify line and paragraph breaks on word enumeration

    Hi,
    I am using PDWordFinder to extract text from the PDF document and then enumerate each word.
    I need to identify the line breaks and replace them with white space
    and paragraph breaks should be replaced with "/r".
    I use the following to identify the line breaks
    (PDWordGetAttrEx(docWord, 0) & WXE_LAST_WORD_ON_LINE)
    Is there any way to identify paragraph breaks?
    Thanks in advance
    Vatspal

    Is the PDF tagged/structured or not?   If so, then you have all the
    paragraph information you need by using the PDSEdit APIs.  If not, then
    you will need to do MUCH MORE heuristic analysis of the content to
    determine paragraphs.

  • [ID5] Find line without paragraph break

    Hello,
    I want to Find lines containing a specific character style. But when that line is at the end of a paragraph, it also selects the paragraph break. Which GREP do I have to use to select the line without the break?
    Regards, Sjoerd

    Almost forgot.
    Neither Find Text nor Character Styles have anything to do with lines. "Find Text" never selects an entire 'line'. Not even GREP can do this. (The Online Help for GREP contains the word "line" a couple of times [*] but it shouldn't, except in the negated sense of "GREP cannot distinguish a separate line".)
    [*] From memory. I tried to verify this, but the Online Help failed to appear. Again.
    ... Adding Insult to Injury: a pop-up offering this:
    Would you like to add Community Help search on Adobe® InDesign™ to your browser's list of search engines?
    Well, I don't think so.

  • Paragraph Style to control paragraph breaks?

    Hi All,
    How do you add paragraph breaks using Paragraph Styles?  I'm sure the answer is pretty obvious, but I don't have the vocabulary that comes with a layout/print background so I'm probably looking at the setting but not knowing it.
    What I'd like to do is create a paragraph style that inserts an extra paragraph break (return) at the end of a paragraph so that instead of something like this:
    Voluptat vitis dolorro to molupta tempos autet etum alis res int re voloriorest maio. Ulpa as debit prae vellaut ommoloratur susdamus endandit, qui sandesci corerspiet quis essequid evenis periorp oriberspidit illab in cum hit poratem porpore periam ipic to totaess imintiam quia alicid ullabo.
    Erspernate nostiis dolorem re in poria ipsum volum none nus.
    Upti aut aut pore as mod qui cusaera estiatest voloreni re num alignatio. Et poremped qui nemquossunte ducilignatem fugiand untionsendia aut ut quodis endant.
    Pici doluptam et re sandebis impelit asitate voluptate parum ilibustrume non resequo diciur?
    ....the paragraphs look like this:
    Voluptat vitis dolorro to molupta tempos autet etum alis res int re voloriorest maio. Ulpa as debit prae vellaut ommoloratur susdamus endandit, qui sandesci corerspiet quis essequid evenis periorp oriberspidit illab in cum hit poratem porpore periam ipic to totaess imintiam quia alicid ullabo.
    Erspernate nostiis dolorem re in poria ipsum volum none nus.
    Upti aut aut pore as mod qui cusaera estiatest voloreni re num alignatio. Et poremped qui nemquossunte ducilignatem fugiand untionsendia aut ut quodis endant.
    Pici doluptam et re sandebis impelit asitate voluptate parum ilibustrume non resequo diciur?
    Thanks!

    What you want is to have the space before and/or the space after set to add that space.
    The amounts I use depend on the baseline grid (if used) so that the amounts of space before/after add up to the baseline grid amount.
    Mike
    Message was edited by: MW Design
    Added screen shot

  • InDesign CS5.5 - can't make paragraph break...

    Whether I'm converting a (book chapter) file from InDesign CS5 to InDesign CS5.5, or whether I start with a fresh CS5.5 document page and place text into it, I can't make a paragraph break. The usual way I've done this, which works just fine in CS5, is to place the cursor where I want the break, and then hit "enter." In CS5.5, when I do this, nothing happens! Using the space bar to put space between words works fine. Selecting and deleting works fine. "Control Z" to undo doesn't work at all. Are these known bugs? Is there a fix? Truly aggravating. Thanks in advance to anyone who has a fix.

    Hi Peter,
    I did look for the other folder, found "InDesign SavedData" file, renamed it. Didn't help.
    No, I have not adjusted the font size in windows' customizations (Win7). This is a pretty new computer - about 3 months old. Are you saying I should change the font setting from the factory setting? That idea makes me really nervous.
    Sorry for the various threads. Not easy to find the thread to join when the search window in Forums turns up "no results."
    Any more ideas?
    Thanks.

  • How to remove paragraph breaks from table cells?

    I need to remove paragraph breaks from selection of cells in my table and replace them with a space and a dot.
    Tried this and it did not work:
    =SUBSTITUTE(AH2,CHAR(10)," .")
    I also tried to use find and replace, but it didn't work either.
    Any ideas?

    Berbato wrote:
    I need to remove paragraph breaks from selection of cells in my table and replace them with a space and a dot.
    Tried this and it did not work:
    =SUBSTITUTE(AH2,CHAR(10)," .")
    Did you read the error message returned by the app ?
    I also tried to use find and replace, but it didn't work either.
    I'm sure that you didn't inserted the correct value in the "Find/Search" field but I can't guess what was the one which you inserted ? .
    I selected the character to replace, Copy it then pasted it in the Find/Search field.
    Yvan KOENIG (VALLAURIS, France) jeudi 27 janvier 2011 17:46:44

  • Hard return paragraph breaks at top of text frames

    I'm learning how to do book layouts in InDesign CS4 and I have a problem I can't figure out how to solve. I'm autoflowing huge chunks of pasted text into linked text frames and when a paragraph breaks (with a double hard return) at the same place as a new page/column, there is a blank line on the top of the text frame like so:
    Is there a way to automatically make that paragraph break line go away when it comes at the top of a new text frame? My document is 400+ pages with many, many paragraphs. I don't want to get rid of the hard return spaces between all of them, just the ones that come at the top of text frames.

    To expand slightly, space before and after are ignored at the top of a column or frame, but the empty paragraph is not.
    You might want to try out the "Find/Change by List" sample script which fixes multiple returns along with leading and trailing whitespace and double space after a period (among other common problems). It's really just a chained set of Find/Change operations that can speed up the cleanup of new text.

  • Setting paragraph break spacing

    Hi,
    I'm exporting a file I created in InDesign CS4 to Kindle and finding that the last line of every paragraph has more spacing above it than the rest of the paragraph. I've found that adding a line break (Shift+return) will solve the problem but this means that I can't add paragraph styles to the text. Is there a place where I can specify the leading for paragraph breaks?
    Thanks in advance!

    joymiki wrote:
     …the last line of every paragraph has more spacing above it than the rest of the paragraph.
    Do you mean that, or is there more space below the last line of the paragraph? If you mean below, I'd say to check the space-after paragraph attribute. If you really do have space above the last line of a paragraph, you probably have some keystrokes within that last line set with a different leading as a local override. A pure paragraph style wouldn't do that, because there is only one leading amount for a paragraph without using local overrides. The first place I'd check is the paragraph return. If you select just the return (double-click after the final punctuation mark, or place the cursor at the beginning of the next paragraph and hit the left arrow while holding the shift key), you can see if the return character has a different leading than the rest of the paragraph.
    Another possibility is baseline shift, that that's far less likely.

  • Why does my paragraph break before and after a subscript?

    RH 9.0.2.271, Word 2010, Windows 7, 64-bit PC
    This is an intermittent problem occurring in the Word output. The WebHelp is fine. In the following image you can see that the subscripts worked in the early part of the paragraph, but then split.
    Here is the html:
    <p>where <span class="EQN_Char">q</span><sub><span class="EquationText">tot</span></sub>
    is the total rate of heat transfer (which you supply), <span class="EQN_Char">k</span><sub><span
      class="EQN_Char">c</span></sub> is the laminar thermal conductivity
    of the primary fluid in the cell, <span class="EQN_Char">ρ<sub>c</sub></span>
    is the density of the primary fluid in the cell, <span class="EQN_Char">C<sub>Pc</sub></span>
    is the specific heat capacity of the primary fluid in the cell, <span
      class="EQN_Emphasis">V<sub>c</sub></span> is the volume of the cell,
    <img src="HX_EQ2a.jpg" alt="" style="border: none;" border="0" /> is the
    magnitude of velocity in the cell, <span class="EQN_Emphasis">T</span><sub><span
      class="EquationText">ref</span></sub> is the reference temperature
    for the heat exchanger, and <span class="EQN_Emphasis">T</span><sub><span
      class="EquationText">c</span></sub> is the temperature in the cell.
    The summation in the denominator of equation 1 is carried out over all
    the cells in the heat exchanger. Thus, it can be seen that the sum of
    the weights for all the cells always add up to 1, so that the distribution
    scheme ensures that the sum of heat transferred to all the cells in

    Peter's not available at the moment, but perhaps Rick can do that.
    I've just run your HTML through the Word output with RoboHelp 11/Word 2013 and it worked perfectly there. Now that doesn't help, but perhaps you can try the following: instead of adding <span> tags in the <sub> tags, apply the classed directly to the <sub> element. (Don't forget to update your CSS as well.) Perhaps this will let RoboHelp correctly create the output.
    |f that doesn't help, check the Word document. Which style is assigned to the separate elements in the Word documents? Perhaps we can find something in there.
    Kind regards,
    Willam

  • Split and Merge Paragraphs

    When I split and merge a paragraph a line break is inserted.  Does anyone know a way around this. (Simply deleting the last character seems inelegant and, more importantly, prone to failure).  Here's the code:
    var textFlow:TextFlow = TextConverter.importToFlow(
                        "Hello World",
                        TextConverter.PLAIN_TEXT_FORMAT);
    textFlow.interactionManager = new EditManager();
    var textFlow2:TextFlow = textFlow.splitAtPosition(5) as TextFlow;
    textFlow2.interactionManager = new EditManager();
    textFlow.mxmlChildren = textFlow.mxmlChildren.concat(textFlow2.mxmlChildren);
    trace(textFlow.getText()); // returns "Hello\n World"
    - Daniel Freiman

    If you are asking how to split and merge a paragraph this works.
                var textFlow:TextFlow = TextConverter.importToFlow("Hello World",TextConverter.PLAIN_TEXT_FORMAT);
                // find the paragraph
                var para:ParagraphElement = textFlow.findLeaf(5).getParagraph();    // same as textFlow.getChildAt(0)
                // split paragraph at position five
                var newPara:ParagraphElement = para.splitAtPosition(5) as ParagraphElement;
                trace(textFlow.getText());
                // now the merge
                // remove newPara its being discarded
                newPara.parent.removeChild(newPara);
                // move the children
                while(newPara.numChildren)
                    para.addChild(newPara.getChildAt(0));
                trace(textFlow.getText());
    This is using pure model level calls.  In your original code you added an EditManager- it can be done that way too.  TLF is layered - the EditManager manipulates the model with model level calls.  It provides APIs connected to events that create operations do to that.
    Hope that helps,
    Richard

Maybe you are looking for

  • Elements 8 & 64-bit windows 7--editor shows a bandaid for healing brush; how do I get the circle?

    Previous versions of elements would show brush sizes with a circle. Using brackets, you could see the size increase/decrease. Elements 8 only shows a bandaid for the healing brush, no indication on photo of the brush size. Also, if I set text size to

  • How do I run a script at shut down?

    Hi folks, I wrote a script that runs at login that gets my dynamic IP and creates a simple web page with a link to my local computer address for Personal Web Sharing, and then uploads that web page with the link to my ISP homepage server. I wrote ano

  • BUG:generate accessors not doing anything on abstract class

    I can't get a source file (abstract class) to generate accessors. I am using 10.1.3.0.0 production release. Concrete classes generate accessors fine. Here is how to reproduce the problem: Create an interface MyInterface with getMyThing() and setMyThi

  • 2011 Camry Bluetooth Phonebook Transfer

    I just got a new Camry and my iPhone 4 works with the hands free Bluetooth calling. It also works with the iPod USB connection as well and allows multitasking in case you want to run a navigation app in the foreground. The problem I am having is gett

  • Urgent and typical issue- Please help!!

    Dear All, I have a BOM material(say M) which is made up of 3 components(say A, B and C). I procure component A from 3 different countries(T1, T2 andT3), component B from 2 different countries(T4 and T5) and component C from 4 different countries(T6,