Best way to copy range of paragraphs

I'm getting all the changebars in the files of a book, and copying them out into a separate, single change document. Once I find the Pgf with the changebar, what would be the best way to copy the info out to the change doc? I want to copy the entire section that contains the changebar.
I figured I would move backwards and find the most recent section heading and set the beginning of a TextRange there at the beginning of that Pgf. Then I move forward and find the following heading pagagraph, and move back one pgf from that and set that as the end of the range.
At that point should I use copy and paste into the new document?
Thanks, Mark

Hi Mark,
Glad you are making progress. About the Pgfs in tables: yes, they are in a world of their own. Each table is a more or less closed object anchored to a paragraph in the document. You can step through all Pgfs in a document (including the ones in your text flows as well as the ones in table cells) using one single linked list, but that list does not care about the order in which the paragraphs appear in your document, and also includes paragraphs on your master and reference pages. This is not what you want to have.
You mentioned you wanted to copy not just the paragraph with changebars but the section that contains at least one paragraph with changebars. One strategy is finding a paragraph with changebars and then tracking back to the previous heading and forward to the next heading, so that you can determine which section to copy to your changes document. With the requirement of checking paragraphs in tables added into the equation, this becomes a complex matter. Even if you know that a paragraph in a table cell has a changebar set, you should track back to the table anchor, then to the paragraph in which the anchor is located, and then back to the section that you need to copy. And if the section also contains a paragraph with changebars outside a table, you do not want to copy it again.
This might require a completely different approach to the problem. Build an array with paragraph identifiers of all headings in your document, and create an array of booleans all set to false that has the same number of entries. Then find all paragraphs with changebars and, for each found paragraph, walk back to the nearest heading, find the heading identifier in the headings array and set the corresponding entry in the boolean array to true. Then do the same thing with paragraphs with changebars in tables. In this case, you track the paragraph in the table back to its table anchor, then to the paragraph containing the table anchor and from there walk back to the nearest heading.
In the end you will have an array of heading paragraph identifiers and a matching array of booleans telling you which sections to copy to the changes document. Doing the copying is dead easy, as you already have the start and end paragraph identifier for each section. Just create a TextLoc pointing at the first heading Pgf with offset 0 and a TextLoc pointing at the next heading Pgf with offset 0 and copy this range.
I hope this makes sense to you. If things get too complicated, throw me an email (you will find my mail address in my profile) with a sample file and I will have a look at it. If I think it will take me more than a couple of hours to write, I will make you a decent offer.
Kind regards
Jang

Similar Messages

  • What is the best way to copy aperture library on to external hard drive? I am getting a message that say's "There was an error opening the database. The library could not be opened because the file system of the library's volume is unsupported".

    What is the best way to copy aperture library on to external hard drive? I am getting a message that say's "There was an error opening the database. The library could not be opened because the file system of the library's volume is unsupported". What does that mean? I am trying to drag libraries (with metadata) to external HD...wondering what the best way to do that is?

    Kirby Krieger wrote:
    Hi Shane.  Not much in the way of thoughts - - but fwiw:
    How is the drive attached?
    Can you open large files on the drive with other programs?
    Are you running any drive compression or acceleration programs (some drives arrive with these installed)?
    Can you reformat the drive and try again?
    Hi Kirby,
    I attached the UltraMax Plus with a USB cable. The UltraMax powers the cable so power is not an issue. I can open other files. Also, there is 500GB of files on the drive so I cannot re-format it. Although, I noted I could import the entire Aperture Library. However, I do not want to create a duplicate on my machine because that would be defeating the purpose of the external drive.
    Thanks,
    Shane

  • I'm buying a new Macbook Pro this week and am wondering what is the best way to copy over the software I have from my existing Macbook Pro to the new one? eg. Photoshop and Office etc. I no longer have the CDs.

    I'm buying a new Macbook Pro this week and am wondering what is the best way to copy over the software I have from my existing Macbook Pro to the new one? eg. Photoshop and Office etc. I no longer have the CDs.

    Ya know what I'm on a brand new MBP just about 24 hours old and you know whats been working amazingly for me. I have a 27inch iMac as well and i've just connected it to my network and been dragging files and apps across the network onto my new MBP. Its really working fast and its flawless. You could always do that option, Just go into sharing options and turn them on for both Macs. Then just click and drag. Of course they have to both be on the same network for this to be possible.
    Look at my network.
    Shared is what your looking at.  I click on there see all my computers files and then drag the ones i want form its folder to my MBP folders.  Hope that helps if your looking for a very simple way on a wireless network.

  • What is the best way to copy a DVD i made from iMovie?  It was HD720 and I don't want to lose any quality in the copies.

    What is the best way to copy a DVD I made from iMovie?  It was HD720 and I don't want to lose any quality in the copies.  I need to distribute it to about 20 people. It's 42 minutes long.

    You will need to save it as a video to the camera roll.
    Import it into windows as you would a photo.
    Then purchase DVD authoring software, and create a DVD.

  • What is the best way to copy data....

    Hello friends,
    What could you think is the best way to copy this data ? :
    - I have two identical databases (Oracle 9i)
    - I want to migrate the data of 90 tables (all tables begin with the same string, i.e. 'TAB') from Database1 to database2.
    - There are integrity constraints, referentials, etc.
    I'd like to generate a script to automate/accelerate the process.
    So, I'm thinking on the following:
    - Disable all the constraints in Database2.
    - Connect to Database 1 and generate a script with the 'inserts' using TOAD (or another similar application)
    - In a Database 2 session, execute the script...
    Of course if I use TOAD I can't generate an unique script to do this process in one step so...
    Any better idea? (Using export/import, ... or some script you have...)
    Thanks.
    Jose.

    Use exp and imp. It works... seriously! And you don't need to drop the user/schema. But don't take my word, run an example...
    On Database 1
    First let's create a couple of tables with referential integrity to each other to make sure exp/imp can handle it...
    SQL> create table t1 (t1_id number constraint pk_t1 primary key, t2_id number);
    Table created.
    SQL> create table t2 (t2_id number constraint pk_t2 primary key, t1_id number);
    Table created.
    SQL> alter table t1 add constraint fk_t1_t2 foreign key (t2_id) references t2 (t2_id);
    Table altered.
    SQL> alter table t2 add constraint fk_t2_t1 foreign key (t1_id) references t1 (t1_id);
    Table altered.
    SQL> insert into t1 (t1_id, t2_id) values (1, null);
    1 row created.
    SQL> insert into t2 (t2_id, t1_id) values (2, 1);
    1 row created.
    SQL> update t1 set t2_id = 2 where t2_id is null;
    1 row updated.
    SQL> commit;
    Commit complete.
    SQL> select * from t1;
         T1_ID      T2_ID
             1          2
    SQL> select * from t2;
         T2_ID      T1_ID
             2          1
    SQL> select table_name, constraint_name, constraint_type, r_constraint_name from user_constraints
      2  where table_name in ('T1','T2');
    TABLE_NAME                     CONSTRAINT_NAME                C R_CONSTRAINT_NAME
    T1                             PK_T1                          P
    T1                             FK_T1_T2                       R PK_T2
    T2                             PK_T2                          P
    T2                             FK_T2_T1                       R PK_T1
    SQL>
    Now let's export those tables. You can build a parfile manually or even spool it from a sql script with the names of all tables you need to export...
    $ cat parfile.txt
    tables=(\
    t1,\
    t2
    $ exp rc/pwd parfile=parfile.txt file=db1.dmp log=db1.log
    Export: Release 10.1.0.3.0 - Production on Mon Jan 9 20:49:17 2006
    Copyright (c) 1982, 2004, Oracle.  All rights reserved.
    Connected to: Oracle Database 10g Enterprise Edition Release 10.1.0.3.0 - Production
    With the Partitioning, OLAP and Data Mining options
    Export done in UTF8 character set and UTF8 NCHAR character set
    About to export specified tables via Conventional Path ...
    . . exporting table                             T1          1 rows exported
    . . exporting table                             T2          1 rows exported
    Export terminated successfully without warnings.
    On Database 2
    Copy your .dmp file to Database 2
    Import
    $ imp rc/pwd full=y file=db1.dmp log=db1_imp.log
    Import: Release 10.1.0.3.0 - Production on Mon Jan 9 20:51:15 2006
    Copyright (c) 1982, 2004, Oracle.  All rights reserved.
    Connected to: Oracle Database 10g Enterprise Edition Release 10.1.0.3.0 - Production
    With the Partitioning, OLAP and Data Mining options
    Export file created by EXPORT:V10.01.00 via conventional path
    import done in UTF8 character set and UTF8 NCHAR character set
    . importing RC's objects into RC
    . . importing table                           "T1"          1 rows imported
    . . importing table                           "T2"          1 rows imported
    About to enable constraints...
    Import terminated successfully without warnings.
    All data is there...
    SQL> select * from t1;
         T1_ID      T2_ID
             1          2
    SQL> select * from t2;
         T2_ID      T1_ID
             2          1 All constraints are there...
    SQL> select table_name, constraint_name, constraint_type, r_constraint_name from user_constraints
      2  where table_name in ('T1','T2');
    TABLE_NAME                     CONSTRAINT_NAME                C R_CONSTRAINT_NAME
    T1                             PK_T1                          P
    T1                             FK_T1_T2                       R PK_T2
    T2                             PK_T2                          P
    T2                             FK_T2_T1                       R PK_T1It does work!

  • What is the best way to copy 700 local folders full of email to a new computer?

    I am moving my wife from and old computer (Thunderbird, Win XP) to a new one (Thunderbird Win 7). She has about 700 local folders with thousands of email messages in them. What is the best way to copy them to the new computer?

    The easiest way is just copy the whole profile.
    Help menu > troubleshooting information
    Close Thunderbird
    In windows explorer select all and copy.
    paste everything onto a thumb or other read/write portable media (not CD or DVD)
    on the new Machine repeat the troubleshooting and close steps to get the current profile folder
    This time paste everything from the portable media into the profile replacing what is there
    Open Thunderbird, your done mail contacts add-ons everything

  • Best way to copy total start up HD to a new HD to be used as the new start up disc

    Have installed two new internal 2 TB HD's. I wish to copy the entire contents of the CURRENT (older) start up HD to one of these new HD's and then use that as the new start up HD. What is the best way to copy the entire start up disk so that it can be used as the new start up disk (hard drive)?
    Thanks for any advice.

    Disk Utility => Restore (and use the Help menu)
    Programs that clone are essential.
    SuperDuper

  • Best Way to copy audio books

    Hi
    What is the best way to copy Audio Books. I just bought all the Harry potter on CD's. I have a 30g 5th gen IPOD had it for 2 month. Upgraded ipod to 1.2 and iTunes 7.0.1.
    Everything is running fine.
    Thanks,
      Windows XP Pro  

    Hello again,
      I went and checked PDF document properties. The document was created by an application called (3B2 Total Publishing). It's the application that the printing press used to creat the PDF file. Unfortunately I don't have the source document and the printing press claim they don't have any source files but used in-house applicatin to create the PDF book.
    I checked fonts used in the PDF file and I found 17 fonts named T1 to T17 and all (Type 3) fonts. I'm seasoned IT engineer but no experience in publishing. So, no idea whether or not this information is usefull to find a way to publish these books in epub.
    Cheers,
    Abdul

  • Best way to copy large VM files from one drive to another?

    Hi all, I am wondering what the best and fastest way there is to copy a large VM file from one drive to another (external drive to internal drive). Should the .pvm folder (in my case with Parallels) be zipped first? The files I need to copy range from 50 to 70gb. thx for any insight! ps. Even Bombich admits it's difficult for CCC to do...not clear why, but it does slow a full clone down to a crawl. I also have Chronosync at my disposal, but suspect the same is true there as well. Cheers!
    coocoo

    I don't think it matters much which way you do the job. I use Parallels to compress by drives on a regular basis. If you want to copy a dynamic VM, which can grow to just about any size as required, to another drive you will use about the same amount of time zipping the VM - transfering the VM - unzipping the VM, as you would just moving the VM.
    I've moved my VM files to a second partition that does not get cloned to my bootable backup that I create with SuperDuper. I've excluded my entire VM folder from Time Machine and just make zipped backups for each system after any large Service Pack Updates from Microsoft, or any intricate program installations. These get copied to a second partition on my Time Machine drive manually.
    My VM's sizes are kept under control by using common Documents-Movies-Music folders for the Mac and the VM's. My VM's do not have the data files the programs use, they are on my Mac and get backed up every hour with Time Machine.
    Reinstalling a VM just means deleting the broken copy, unzipping my latest backup, and putting into the same folder that Parallels knows to use. The data files are always accessible, even if they were created after my latest VM backup.

  • What is the Best way To Copy and paste data from 1 book to another

     I have 18 sheets in 5 different books that I want to extract data from specific cells.  What is the best way to do this?  Example:  1 sheet is called Numbers E-O1 data in 13:WXYZ. The data updates and moves up 1 row every time I enter
    a new number. So let's say I enter the number 12. Through a lot of calculations the output goes in 13:WXYZ. To what I call a counter which is a 4 digit number.  Anyways, how can I send that 4 digit number to a totally different sheet?  To bullet
    what I'm talking about
    data in cells Row 13:WXYZ in book called Numbers sheet E-O1
    send data to book called "Vortex Numbers" Sheet E-O row 2001:CDEF
    What formula or Macro can I use to make this work?
    thank you!

    Hello Larbec,
    Syntax:
    '[BookName]SheetName'!Range
    Enter in cell  2001:CDEF:
    ='[Numbers]E-O1'!13:WXYZ
    This assumes that the file is open in Excel. Otherwise you need to add the path:
    'ThePath[BookName]SheetName'!Range
    Best regards George

  • What's the best way to copy a big poster and print it out?

    I'm doing a big art project (around 5ft by 5ft), where I'm going to draw stuff out by hand, and would like to make a copy of that project by scanning it into the computer, or taking high-res photos of the project and compiling them together in the computer, and then printing the image out at that size, or bigger. So, I will have the original, 5x5ft, and a printed copy. 
    What's the best way of doing this?
    I hear that vector images are ideal for this, so is Illustrator recommended for this?
    I know it's a vector graphics program, but is there any way I can take a bitmap image from a scan or photo, and somehow turn it into a vector? If this is not possible, what recommendations would you have?
    I have Illustrator CS2.

    Take the photo in one shot by a camera with 24MP, e.g.
    http://www.kenrockwell.com/nikon/d3x.htm
    This should be sufficient for a poster reproduction 5ft square
    as a raster image.
    For vectorizing one doesn't need high resolution (it's often
    recommended to blur the source image).
    Perspective and lens corrections can be applied by Photoshop,
    but the lighting should be well balanced.
    Barrel distortion by wide angle lens is really no problem.
    Plenty examples:
    All photos here were taken without tripod by a 170 Euro camera.
    http://www.fho-emden.de/~hoffmann/andalusien13032010.pdf
    Especially see p.20, a photo (with flash) of an exhibition photo,
    viewing direction not orthogonal to the object, then perspectively
    and lens-distortion corrected.
    (The PDF shows the photos heavily downsampled).
    Best regards --Gernot Hoffmann

  • Best way to copy ALL DATA from song to song?

    Hello everyone,
    I'm in the middle of scoring a film and have ran into what seems to be a corrupted song, and want to attempt to transfer all data from this song into a new file.
    I'm running multiple global tracks with changes in tempos and time sigs all over, multiple audio tracks, and various Virtual instruments. I also have an extensive environment in which I use instrument tracks to access my exs instruments, as well as multi-instrument tracks for kontakt 2. Of course I have this saved as a template, but as you know as projects progress, the current song rarely looks like your autoload. So simply copying and pasting will not work, as I have many new instruments and audio files in different places in my arrange page. Thus when I try to copy and paste, logic sees that the current tracks are not "correct" and asks to "create new instruments" which seems to randomly throw all the instruments to the bottom of my arrange page, making it all out of whack!
    With some help from the audio config window and some manual editing of the arrange page, I was able to get my song pretty much back to normal, but for future reference, what is the best way to transfer all of my data to another song, while still keeping the look and functionality of the song intact?
    Thanks in advance for your help! If it helps to see what I'm talking about, I'm willing to post my song file for reference, just ask.

    I'd LOVE to somehow avoid #4 if possible. As I stated
    above, my projects always change from the templates
    due to extra audio tracks, audio instruments, etc, so
    a simple "copy and paste" does not seem to work.
    Is there something I'm missing?
    Yup, I was missing something really simple. If you choose NOT to copy instruments, it will ask you to keep the instrument or create a new track. If you keep the instrument (since my instruments names remained the same as the template) logic will connect the tracks with the instruments and only put the additional tracks (i.e. extra audio tracks etc) on the bottom. WAY COOL!
    Now my process is a little easier, however if you have any other tips so share please feel free to post.

  • What is the best way to copy database from overseas?

    Hello All,
    As customer need to migrate their databases(200 databases) to our data center, at this moment, we usually ask customer to send full backup by HDD and then send trn files via FTP, then we restore full backup and apply latest trn files until cutover. However
    FTP is not stable, trn files are always broken.
    The databases size are 3GB~150GB, trn file size are 1MB to 5GB, especially the big trn files are failed every time, we have set transfer mode to Binary in FTP client, but it still fails.
    I have VPN access to their database server, so in this case is there a better way to copy/migrate their databases to our server?
    Customer using Windows 2003 + SqlServer 2008
    We using Windows 2012 R2 + SqlServer 2014
    Appreciate your suggestions/advises.
    Thanks,
    Albert

    You are doing it the best way. I would also ship the tlogs via courier if time permits. Note that the tlogs get very large during maintenance operations. You may find that if you continually ship the tlogs via log shipping and stagger the cutover you may
    be able to do this in waves.
    With this many databases this sort of migration is difficult without downtime.
    looking for a book on SQL Server 2008 Administration?
    http://www.amazon.com/Microsoft-Server-2008-Management-Administration/dp/067233044X looking for a book on SQL Server 2008 Full-Text Search?
    http://www.amazon.com/Pro-Full-Text-Search-Server-2008/dp/1430215941

  • Best Way to Copy Large Files

    In copying files to a USB memory stick, is there a particular file size limit above which simple drag and drop using the Finder does not work consistently? In general can we assume that if it appears to copy OK, then the files are in good shape? For example, if I'm copying a Documents folder with 5 GB of data onto an 8 GB USB stick would it be appropriate to use drag and drop? What are the alternative ways to copy large blocks of data? Is there a way to use Disk Utility for this?
    I should mention one of the reasons I'm asking. I've occasionally noticed large copying procedures sometimes cause the Finder to "hang."
    I do have SuperDuper which I use to clone my internal HD to a peripheral HD on a regular basis. Would that software provide a way to copy single files or folders containing lots of files to my USB memory stick?
    Thanks,
    Steve M.
    Message was edited by: Steve M.

    Drag and drop is fine. There's really no good reason to do it a different way.
    The only file limit is if the USB stick is formatted FAT32. Then 4GB minus 1 byte is the largest file size it can hold. If you format the stick as Mac OS Extended (HFS+), there's no limit to the file size, just the capacity of the drive itself.
    If you need to share between Mac and Windows, then formatting the stick as ExFAT is best. The only catch is that versions of OS X earlier than Snow Leopard will not be able to read the drive. Windows XP, Vista and Win 7 can read ExFAT. There is also essentially no file size limit with ExFAT.
    As far as the hanging, that may be the OS stalling on a file larger than 4 GB if the USB stick is formatted as FAT32.

  • Best way to copy large folders to external drive?

    What is the best way to transfer large folders across to external drives?
    I'm trying to clean up my internal hard drive and want to copy a folder (including its sub folders) of approx 10GB of video files to an external firewire drive.
    I've tried drag and drop in finder (both copy and move) and it gets stuck on a particular file and then aborts the whole process.
    1. Surely it should copy everything it can, and simply not copy the problem file.
    2. Is there a way I can do copy and verify, a bit like when I burn a disk so I can be sure the video files have transferred safely before I delete them from my internal drive?
    Many thanks in advance for any advice.

    What you are trying to do makes perfect sense to me and I have done the same prior to getting myself a Time Machine system in place.
    1. Surely it should copy everything it can, and simply not copy the problem file.
    The fact that it is getting stuck on a particular file suggests that there is a problem with it. Try to identify which one it is and deal with that file on it's own. It could be that there is a disk error where that file is stored.
    2. Is there a way I can do copy and verify....
    The copy process you are using does that implicitly as I understand it.
    Chris

Maybe you are looking for

  • Email crash  10.5.7

    Recently received a huge email. Every time I open mail to try and delete it, it crashes. I can pick up my mail on my server, and have permanently deleted offending message there. Searched discussions, created new user account. Still crashes. How do I

  • Siren sound on iMac

    Hi. I have an iMac with 2,66GHz Intel Core i5 processor and from somedays a siren sound is play randomly theough speakers (it desapears if I mute speakers). I've searched for information about it on Internet, but I haven't find something. The siren s

  • How to disable Toptip.ca

    In the (now closed) thread: https://support.mozilla.org/en-US/questions/814310#answer-174482 It recommends: "Go into the options and untick the double click to translate box" for "Google Dictionary and Translate 2.5 add-on" ... but does not explain h

  • Printing delivery notes upon picking confirmation

    We wish to only print delivery notes once picking is confirmed and goods ready to go.  We can achieve this in VL02n via amendment to routine 35 in V/27 however generation of output does not appear to apply when picking is confirmed via transaction VL

  • Does multicam end up saving any space in the end?

    i have a project that was shot with 2 cameras. cam1 was left alone and the footage is basically continuous. cam2 moved around a bit and during some of the moves the recording was paused so there are timecode gaps. on my first pass i put cam1 in v1 an