Oh, and I'm looking to do this in jsx. Since I don't know any scripting, I might as well learn something more generally useful than Actionscript!
Could you show a before/after indesign file? It is kind of hard to follow all that text description, but from what I understand from it, the answer is yes, it should be possible and it should be a nice beginner-level project to get you started with jsx.
Thanks for responding Vamitul. See if this image with explanation helps you see what I'm talking about.
1st script action: Each Question/Answer unit needs to be scripted to convert to a table, one table for each of 50 Question/Answer units.
2nd script action: Each row with green correct-answer text needs to move to the row location within it's current table that matches the standardized answer key.
Examples: (see image below right): Green text table row in question 1 needs to move to become the 5th table row within it's 6-row table (it doesn't matter what order the other answer rows are in).
Green text table row in question 2 needs to move to become the 3rd table row within it's 4-row table. (In this case, the answer rows would trade places.)
Please note that the table is to have no rules around or within it at all (the blue just shows where the rules would be if there were any). The table has a style, but the table width and the height of the last (empty) row will have to be scripted.
Some of the questions only have two answers (True/False).
The last row serves as the spacing between the separate Question/Answers tables (empty row was created from the return at the end of the last question in a Question/Answer unit when the table was made).
Three Paragraph Styles involved: Exam Question (bold), Exam Answer, Exam Correct Answer (green).
Potential challenges I see:
- Creating each table turns the last return between Question/Answer units into an empty row. That works for using that row as spacing, but I'm thinking it causes a problem with locating the next question because there is no longer a return between the table and the next question. I wanted to use locating the style to start the next table. When I get to the point of targeting each table to reorder the rows, will I even be able to do that without returns between them?
Note: I cannot add a return between tables because that causes the automatic numbering to
add in an extra number for that return.
- I will need to script it so that the tables don't break between columns and pages. I think I've seen reference to doing this elsewhere in this forum.
- I will then have to script to style the entire table units so that they don't indent within the text frame (as it does in the last example above).
Shoot, the explanation is still really long, but thanks for looking at it!