PDA

View Full Version : VCE formatting



blake.arnold
06-15-2006, 07:32 AM
I have an .rtf document that I am trying to convert to .vce file. The .vce is a file that is used by a program called visual cert exam. I need help formatting this word document. I assume that I will have to use regex to do this but I don’t think that I will have the know how to do this.

One problem that I notice is that there is allot of white space in my document.

Here is an example of how a question should be laid out in the document.
Q1.
What is 2+2?

A. 3
B. 58
C. 4
D. 1

Answer: C

Explanation:
2+2 = 4

Reference:
(use your fingers moron)

Now of course the questions would be much more complicated than that and they could contain pictures.

This is the format I want all of my questions to take. The problem arises if there's an extra space between answer and explanation. This throws my conversion utility off. This is only one example; there are many problems that may arise. But can I write code that will increment through the document and find each question/answer/explanation/reference and have it format the question appropriately?

Someone please help.:help

fumei
06-15-2006, 08:46 AM
Referance:
(use your fingers moron)...and a spell check may be handy as well!

blake.arnold
06-15-2006, 09:07 AM
Ok is that better?

fumei
06-15-2006, 11:19 AM
Yes, thank you.

I am looking at your file. This document is so badly structured the immediate answer (although I don't really know your question) is No.

Try posting again what you want. The Answer paragraph is set for line spacing of At least 23 pts. Bizarre.

Some paragraphs have paragraph marks in the middle of the paragraph. This will cause huge problems for you.

The answer - such as it is - will be to properly use Styles. Assuming this is actually supposed to be a Word document. Design your Styles and....apply the styles. Then format is be exactly what you want. This is what Styles are for. ALL the format is manually done.

Is this coming from a template?

Why are you thinking RegEx????

blake.arnold
06-15-2006, 12:21 PM
This document was originally a pdf. I used solid pdf converter to convert it to .rtf format. That might be why the formatting is so wired.

I really dont know how to use styles but I am not opposed to learning.

Do you have any recommendations as far as a program to use for converting a pdf to rtf?

fumei
06-15-2006, 07:39 PM
ALL conversions from PDF have structural format errors. I have never seen a truly clean extraction of text from PDF. Ever. I have no recommendations in this regard.

It depends on how often you are going to be doing this, or how much you are going to do this. Is it worth the time to build a template for this? If it IS, then that is definitely the way to go. That way, you get the crappy output (RTF), dump it into the template and clear all format out of it. Then apply the styles (format) you have determined to be what you want.

Q1. - is this the same formatas "Answer: C" ?
What is 2+2? - this the same format as the line above? (not likely)

A. 3 - are these the same format as the question text? Maybe
B. 58
C. 4
D. 1

Answer: C - the document, this is red. Keep that? If so..make it its own style.

Explanation: - same format as Q1???
2+2 = 4 - same format as "What is 2 + 2?"

Reference:
(use your fingers moron)

See what I mean? However, the FIRST priority is to get rid of all those extraneous paragraph marks.

Then - and please, this is NOT a suggestion, this is a demo - create Styles for your format.

Say...............

"Q_ExplainHeading" - whatever, 14 pt Arial, space after 6 pts. Use this for Q1, Explanation, Reference heading paragraphs.

"Q_ExplainBody" - 11 pt Times Roman, space after 12 pts. Use this for "What is 2 + 2", "2 + 2 = 4", "(use your fingers moron)".

"AnswerHeading" - 14 pt Times Roman, Bold, Red font, space after 14 pts. Use this for "Answer: C"

Put the cursor in a paragraph, select the Style...and voila, the format you determined applies. You can use the cursor to make multiple selections ( say, select "What is 2 + 2?", AND "2 + 2 = 4", AND "(use your fingers moron)" and apply the Style to all of them at the same.

The ONLY way to make consistent format is to use Styles. Otherwise there is always the chance you may have missed a chunk (or two). I NEVER have any manual format in my documents. Every single piece of text has an explicit Style attached. Without exception. I NEVER have any of those "extra" Enter key paragraphs - to "make the space between paragraphs". All my paragraphs have a designed Space Before, and Space After, right in the Style.