Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to keep formatting of importing text with style sheets 1

Status
Not open for further replies.

smoke69

Technical User
Sep 17, 2003
1
US
I often am importing highly formatted text (Word documents with lots of bolds and italics) and use style sheets in Quark to keep the text consistent. When you import the styled text and click the style sheet you lose all the bolds and italics. How do you both use style sheets in Quark yet keep the formatting in Word?
 
I have the same question, did you manage to figure this out?
 
Use Xpress tags. The back of the Quark book has a list of the more common tags - they're pretty much like HTML, without the </>. Such as <i>neat<i> would be italic.

Also, setup paragraphs with styles that will be imported when the file is saved as text.

An example would be - my Quark style sheet is named &quot;text&quot; - so at the first instance in my Word doc, I type: &quot;@text:&quot;and the remainder of the paragraph. The bolds, italics, small caps, etc. character styles are applied directly within the paragraph as above. I usually just search through already formatted Word docs for the styles and wrap them in my tags.

If you have several, consecutive paragraphs that are the same style, you only apply the paragraph-level style sheet to the first instance. Quark will read that until it see the next tag - such as a head level &quot;@1h:&quot;.

Special characters such as bullets and em dashes use ascii markup - I've got my own list for my Mac OS that I keep handy - it's hard to find consistency among the various ascii charts.

Many of my clients will code the tags while they are typing the document, saving me much time, but if not - the search method in Word isn't too bad.

Just remember to save the Word document as plain text (.txt) when finished, and when in Quark use File>Get Text and make sure the import style sheets option is checked.

Hope this helps,
Max

 
Is there some general documentation on-line as to what Quark tags are, a style sheet list, how to create a style sheet (am familiar with CSS / MSIE / HTML), where such a style sheet should be stored for Mac users to use it, etc. ... I have an HTML file into which I would like to embed these tags so as to reduce conversion time for our Graphics people who turn the database data into subway signs for NYC Transit.

If the Graphics folks cut / paste the HTML, the italics / bold / formatting is lost, but if they cut from the source code, the b-slash-b, i-slash-i HTML stuff comes right along with it and the font is still wrong. I figure it would be much better to embed the correct Quark tags in this particular output file, plus ... use the file extension Quark would like (and what is that, btw?).

TIA for all clues, refs, etc.

Suzanne (aka Giselle here)
 
I'm not sure of on-line documentation - the basics are in the back of the Quark book, but it uses an ascii format for such things as em dashes, bullets, characters with accent marking.

The basics are the same as HTML for the character encoding. Bold is in <b> except that the closing tag does not use a back slash - so this would be <b>bold<b> and the rest would be whatever the paragraph level style sheet is. You start at the beginning of the paragraph with &quot;@stylesheetname:&quot; right before the text (no spaces between or tabs) and the character level tagging for small caps, bold, italic, etc goes around the emphasized word, letter, phrase.

I'm uploading a chart in pdf form that I have made to use for Quark Mac. Hope it helps. I found that some of the ascii translation charts available online didn't match up.

See the chart at
The file extension for Quark documents is .qxd.

Hope this helps
Max

 
Thanks for that info, Max. I will experiment with file content to see if I can put the stylesheet stuff in effect. However ... I have one more question ... what is 'the Quark book'?? While I am certain that we are using licensed versions of the software, no one seems to have ANY books / manuals in house (or that weren't locked up in a not-working-today person's cube). Which is why I was surprised to not find more on-line RTM-type info for Quark Express -- I can find Oracle Manuals / SQL / MS Access / Java / HTML info out the wazzoo, but little for Quark that's in the search engines, for translating between things (which is what I'm trying to get at).

E.g., I could use Notepad to write a (perhaps simplistic) text document, with proper formatting tags, with an RTF extension, and MS Word would just suck it up, no questions asked -- which to me means, if I can create a PATTERN for that Notepad file, I can generate it at will, with variable info, from a database, via some data manipulation language.

I figured the same thing would be possible with Quark, but that seems to be not so. Worse still, I can't find easy info on the underlying file format. Again, e.g., your ascii codes are nice, but I have no special chars to create (or so I think, these are just English signs, other languages take a different crew, and in any case, start with the English version), nor do I know how to use those tags. Worse, I don't understand why the <b>bold<b> doesn't have a slash and those numbers do ... there's probably a rule, but on the surface, it seems inconsistent. I'm coming at this from not caring at all about Quark / internal Quark workings (my personal / work graphics needs are very humble) ... I just want 'my file' to be text and readable by the Quark software, akin to how an RTF is done -- or I want to be told 'give up, not possible'.

Then again ... Xerox told me it was 'not possible' to generate their INI file for the networked printer / fax machine of theirs, that we have. It would have to be done manually, or within THEIR database (which was not sharable across users). I kept poking until I found the right Xerox tech, who sent me the INI file description. So ... now we keep all the data in 'my' database, gen the INI file at runtime in the proper format, with the appropriate users / fax numbers, and the users get their output report at the same time (also from 'my' database, a shared Oracle deal), pick the fax-printer, and presto, their desired list is right there, no manual typing involved. Xerox grumbled.

SO ... am trying to get close with Quark, because it reduces the conversion burden on the graphics / marketing staff.

Again, thanks for your time.

Suzanne
 
I believe that the reason the special character ascii code uses the slash is it is only input once - not to surround the character.

So, to have a paragraph that uses a stylesheet named &quot;Text&quot;, in my Word or Notepad document I would code as follows:
Code:
@Text:The paragraph has a font of Times (or whatever) that is 10 pt on 12 pt leading, black, left justified with a -2 track. This stylesheet will be defined when the text (.txt) document is imported into Quark with the Import Style Sheets checkbox checked. And this <i>word<i> will be italic because it is a character-level stylesheet (meaning that the paragraph-level sheet maintains fonts, leading, color, jusitification, track, etc.) and to use a special character, I could use something like an en-dash between consecutive numbers like dates, such as 1965<\#208>1968.

I hope that made some sense. The last example shows that the tag does not surround the element, but IS the element.

As for the Quark book, it comes with the purchase of the software. Perhaps try your local public library if it cannot be found around the office. The Xpress tags I said could be found there give more of a basic example as to where to start. Just photocopy the appendix containing these for help.

I don't pretend to be an expert, but an experimenter. Try not to think too much about the why, and just accept the &quot;it works.&quot; It has saved me much sleep.

HTH,
Max

 
Yes, Max, thanks again! It helps a lot. And I understand about not asking 'why' it works... but if one is the interface builder, one needs to know that the prongs on the plug on an appliance must be of metal and connected to a wire which goes into the appliance to the thing that does whatever the appliance is supposed to do. If the prongs are plastic, when plugged into a wall socket, nothing happens. IOW, I don't have to know how electricity works, just the rules for using it without blowing myself up or starting a fire.

So ... next & I hope final question ... your paragraph, from @text to 1968 ... is THAT the document to be imported (akin to the doc I'm talking about constructing), and should hence have a QXD extension ... and the @text part calls to something in some stylesheet structure elsewhere? (perhaps in the TXT extension'd file your mention?) Would I be correct in assuming that the @text style is applied until the next style is called, e.g., the @head or @title or @foot style?

You probably already know this, this is just to finish the thot process ... An HTML doc can have a whole stylesheet embedded in it ... or, if you'd rather reference an external stylesheet, there's an HTML command to do the referencing, which includes the location of the stylesheet. Having made the ref to the stylesheet, one then finishes the original HTML doc. Then one edits or creates the stylesheet (typically a CSS filetype), which follows rather different rules than the HTML doc -- except that both are text files (tho' neither with TXT extension). When you read the HTML doc with MS IE browser, it sees the reference, reads the stylesheet & applies the style to the presented VIEW of the HTML doc (it does nothing TO the doc -- it is a virtual not actual merge) -- which turns out to be rather clever, but for ideal use requires forethought by the HTML doc designer (I suppose there is whizbang software that does this, but our needs are simple (we gen the HTML from the data via procedure, and the CSS file is static, in a static location), so we keep it to what we can easily do / understand via Notepad).

In Netscape, the stylesheet file is useless (stylesheets, to my knowledge, are not implemented in Netscape) and thus ignored (it's also ignored by MSIE if the ref'd file can't be found) -- different formatting rules apply. The 'why' there is up to the browser purveyor. But ... if I want my HTML doc to be successfully read by both browser types, I must somehow take both into account (I don't know how, Netscape is not my cup of tea, but I know it is beloved by many).

So, again, I very much appreciate your time.

Suzanne (aka Giselle)
 
Yes to paragraph two - that is the import - but it should have a .txt extension. And yes, the style remains until another is applied - so if you have six consecutive paragraphs use the stylesheet &quot;Text&quot; and then one using &quot;Head1&quot; you would set that as &quot;@Head1:&quot; until the next new style sheet is needed.

As for the CSS problem - I believe that NS prior to v6x had that problem, so you would have your &quot;<link href=&quot;stylesheetname.css&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot;> and a &quot;@import rule to prevent NS 4.x from loading.

Max

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top