By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,558 Members | 1,373 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,558 IT Pros & Developers. It's quick & easy.

How do you imitate tabbed whitespace?

P: n/a
gil
I would like to display a Union Collective Agreement in HTML format and
keep it as true as possible to the pdf version.

The document uses Article Numbers such as 1.01, 1.02 which are not
available in list numbering.
but does use sublists with alpha and roman numbering that should be easy
enough to code.

What I want to do, is code to this pattern

<pre>
<--Left Margin------------------------------------------Right Margin-->
------>1st Indent (alpha list or text)
-------------->2nd Indent (roman list or text)
---------------------->3rd Indent (text)

2.02____Lorem ipsum dolor sit amet, consectetuer adipiscing elit,
tincidunt ut laoreet dolore magna aliquam erat volutpat.

2.03____a_____Lorem ipsum dolor sit amet, consectetuer adipiscing elit,
________sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna
________aliquam erat volutpat.

________b_____Lorem ipsum dolor sit amet, consectetuer adipiscing elit.

2.04____a_____i_____Lorem ipsum dolor sit amet, consectetuer adipiscing
______________elit, sed diam nonummy nibh euismod tincidunt ut laoreet
______________dolore magna aliquam erat volutpat.

______________ii____Lorem ipsum dolor sit amet, consectetuer adipiscing
______________elit, sed diam nonummy nibh euismod.

etc
</pre>

How would I keep the article number against the left margin and start
the alpha and roman lists on the same line along with the text. The text
should wrap back to the previous indent.

The problem I have is with the lists wanting to start on the next line
not the same one, and getting the text to wrap back one indent level, no
matter what level it starts at.

Can anyone suggest a method of approach to achieve my goal.
Sep 21 '06 #1
Share this Question
Share on Google+
12 Replies


P: n/a
On Thu, 21 Sep 2006, gil wrote:
I would like to display a Union Collective Agreement in HTML format and
keep it as true as possible to the pdf version.
"I would like to write a book and keep it as true as possible
to the original movie."

Get used to the idea that there are different formats and
that you cannot "keep it as true as possible".

Sep 21 '06 #2

P: n/a
gil
At approximately 2006/09/21 11:49, Andreas Prilop typed these characters:
>On Thu, 21 Sep 2006, gil wrote:
>>I would like to display a Union Collective Agreement in HTML format and
keep it as true as possible to the pdf version.


"I would like to write a book and keep it as true as possible
to the original movie."

Get used to the idea that there are different formats and
that you cannot "keep it as true as possible".
I am willing to concede that some things may not be possible, but until
they are attempted, how can we know for sure?
Sep 21 '06 #3

P: n/a

gil wrote:
I would like to display a Union Collective Agreement in HTML format and
keep it as true as possible to the pdf version.
If it matters, then you've written a contract that is layout sensitive.
Those are legally dubious and create no end of problems, particularly
if accessibiltiy is a legally significant issue for you. Avoid such
things by always wording the text in a presentation-independent manner
and avoiding references to "the adjacent paragraph" etc.
The document uses Article Numbers such as 1.01, 1.02 which are not
available in list numbering.
but does use sublists with alpha and roman numbering that should be easy
enough to code.
Use explicit list numbers, entered directly into the HTML. The list
numbering options in CSS are broad, but very poorly supported -
certainly not usable for contractual purposes.
How would I keep the article number against the left margin and start
the alpha and roman lists on the same line along with the text.
Big left padding and a text-indent with a negative value. Read a
tutorial on "drop capitals"

Sep 21 '06 #4

P: n/a
gil


At approximately 2006/09/21 11:37, gil typed these characters:
I would like to display a Union Collective Agreement in HTML format
and keep it as true as possible to the pdf version.

The document uses Article Numbers such as 1.01, 1.02 which are not
available in list numbering.
but does use sublists with alpha and roman numbering that should be
easy enough to code.

What I want to do, is code to this pattern

<pre>
<--Left Margin------------------------------------------Right Margin-->
------>1st Indent (alpha list or text)
-------------->2nd Indent (roman list or text)
---------------------->3rd Indent (text)

2.02____Lorem ipsum dolor sit amet, consectetuer adipiscing elit,
tincidunt ut laoreet dolore magna aliquam erat volutpat.

2.03____a_____Lorem ipsum dolor sit amet, consectetuer adipiscing elit,
________sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna
________aliquam erat volutpat.

________b_____Lorem ipsum dolor sit amet, consectetuer adipiscing elit.

2.04____a_____i_____Lorem ipsum dolor sit amet, consectetuer adipiscing
______________elit, sed diam nonummy nibh euismod tincidunt ut laoreet
______________dolore magna aliquam erat volutpat.

______________ii____Lorem ipsum dolor sit amet, consectetuer adipiscing
______________elit, sed diam nonummy nibh euismod.

etc
</pre>

How would I keep the article number against the left margin and start
the alpha and roman lists on the same line along with the text. The
text should wrap back to the previous indent.

The problem I have is with the lists wanting to start on the next line
not the same one, and getting the text to wrap back one indent level,
no matter what level it starts at.

Can anyone suggest a method of approach to achieve my goal.
Additional.
If the article number was in an HTML list number standard, or if the
article number was not present, achieving the desired format with CSS
should be easy. But, the article number is NON-standard, and must be
hand coded. Trying to get the rest of the line to indent properly while
staying on the same line seems to be a problem. Although this number
does not appear on every line, space must be left for it, as if it were
there.
Sep 21 '06 #5

P: n/a
gil


At approximately 2006/09/21 12:27, Andy Dingley typed these characters:
>gil wrote:
>>I would like to display a Union Collective Agreement in HTML format and
keep it as true as possible to the pdf version.


If it matters, then you've written a contract that is layout sensitive.
Those are legally dubious and create no end of problems, particularly
if accessibiltiy is a legally significant issue for you. Avoid such
things by always wording the text in a presentation-independent manner
and avoiding references to "the adjacent paragraph" etc.
>>The document uses Article Numbers such as 1.01, 1.02 which are not
available in list numbering.
but does use sublists with alpha and roman numbering that should be easy
enough to code.


Use explicit list numbers, entered directly into the HTML. The list
numbering options in CSS are broad, but very poorly supported -
certainly not usable for contractual purposes.
>>How would I keep the article number against the left margin and start
the alpha and roman lists on the same line along with the text.


Big left padding and a text-indent with a negative value. Read a
tutorial on "drop capitals"
I am not writing a new contract, I am trying to create an HTML version
of an existing PDF document which could incorporate hyperlinks to assist
in navigation. I was hoping to maintain the same basic layout as found
in the PDF version, (fonts, spacings, page contents, etc.) so that they
would look the same, if viewed simultaneously.
Sep 21 '06 #6

P: n/a
On Thu, 21 Sep 2006, gil wrote:
I am trying to create an HTML version of an existing PDF document
That won't work! HTML is a markup language, which is supposed
to represent a logical structure. PDF is pure graphic.
which could incorporate hyperlinks to assist in navigation.
PDF can also incorporate hyperlinks - even Word documents can!

Sep 21 '06 #7

P: n/a
gil wrote:
I would like to display a Union Collective Agreement in HTML format
and keep it as true as possible to the pdf version.
I wonder whether that's useful for some purpose, but using CSS one _can_
actually imitate the appearance of printed or PDF documents relatively well,
with the usual caveats of course.
The document uses Article Numbers such as 1.01, 1.02 which are not
available in list numbering.
Right. We cannot effectively generate such numbers, with CSS as currently
implemented.
but does use sublists with alpha and roman numbering that should be
easy enough to code.
If you have to use another approach for 1.01 etc., basically making the
numbers page content proper rather than generated content, I'd do the same
for other numbering in the same context, for simplicity and consistence.
What I want to do, is code to this pattern

<pre>
Don't use <pre>.
2.02____Lorem ipsum dolor sit amet, consectetuer adipiscing elit,
tincidunt ut laoreet dolore magna aliquam erat volutpat.
I knew that union collective agreements are pig Latin, but I always took
that more symbolically than seems to be the reality.

Anyway, I'd set up a table with the numbers in one column, text in another.
2.03____a_____Lorem ipsum dolor sit amet, consectetuer adipiscing
elit, ________sed diam nonummy nibh euismod tincidunt ut laoreet
dolore magna ________aliquam erat volutpat.
And apparently with a column for the letters between them.

This should be relatively straightforward and give a reasonable appearance
even without CSS, though you can then use CSS to affect the widths of the
columns, probably setting the widths of the columns for numbers in em units
and leaving the width of the text column unspecified, so that it'll take the
rest of the available width.

If the document is long, you may wish to consider using table-layout: fixed
for the table. Just remember then to set the widths for the cells in the
_first_ row.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

Sep 21 '06 #8

P: n/a
gil wrote:
I am not writing a new contract, I am trying to create an HTML version
of an existing PDF document which could incorporate hyperlinks to assist
in navigation. I was hoping to maintain the same basic layout as found
in the PDF version, (fonts, spacings, page contents, etc.) so that they
would look the same, if viewed simultaneously.
I take it you don't realize that PDFs can contain hyperlinks?
Sep 22 '06 #9

P: n/a
gil


At approximately 2006/09/22 01:43, Harlan Messinger typed these characters:
gil wrote:
>I am not writing a new contract, I am trying to create an HTML
version of an existing PDF document which could incorporate
hyperlinks to assist in navigation. I was hoping to maintain the same
basic layout as found in the PDF version, (fonts, spacings, page
contents, etc.) so that they would look the same, if viewed
simultaneously.


I take it you don't realize that PDFs can contain hyperlinks?

Problem 1. Present pdf document does not use any links.
Problem 2. Can't afford Acrobat, so can't create a linked pdf version.
Problem 3. Trying to 'make do' with HTML and CSS.
Sep 22 '06 #10

P: n/a
gil wrote:
Problem 1. Present pdf document does not use any links.
Problem 2. Can't afford Acrobat, so can't create a linked pdf version.
What is the source form of the document? Is it MS-Word or something
similar? In that case use Open Office (which is free) to open the Word
file, put the links in there (if they aren't already) and then export to
PDF. You will then have a proper PDF with links.
Problem 3. Trying to 'make do' with HTML and CSS.
As others have pointed out, HTML and CSS are not designed for what you
are trying to do. PDF is designed for what you are trying to do.

-j

--
Jeffrey Goldberg http://www.goldmark.org/jeff/
I rarely read top-posted, over-quoted or HTML posts
My Reply-To address is valid.
Sep 23 '06 #11

P: n/a
Thu, 21 Sep 2006 15:43:54 GMT from gil
<gi***********@ns.sxympatico.ca>:
I am not writing a new contract, I am trying to create an HTML version
of an existing PDF document which could incorporate hyperlinks to assist
in navigation.
Ah -- if that's your motivation, why don't you just create hyperlinks
within PDF? I see such documents all the time, so it can't be
difficult.

--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/
HTML 4.01 spec: http://www.w3.org/TR/html401/
validator: http://validator.w3.org/
CSS 2.1 spec: http://www.w3.org/TR/CSS21/
validator: http://jigsaw.w3.org/css-validator/
Why We Won't Help You:
http://diveintomark.org/archives/200..._wont_help_you
Sep 23 '06 #12

P: n/a
gil <gi***********@ns.sxympatico.cawrote in
news:_q*******************@ursa-nb00s0.nbnet.nb.ca:
>

At approximately 2006/09/21 12:27, Andy Dingley typed these
characters:
>>gil wrote:
>>>I would like to display a Union Collective Agreement in HTML format
and keep it as true as possible to the pdf version.
I am not writing a new contract, I am trying to create an HTML
version of an existing PDF document which could incorporate
hyperlinks to assist in navigation. I was hoping to maintain the
same basic layout as found in the PDF version, (fonts, spacings,
page contents, etc.) so that they would look the same, if viewed
simultaneously.
The problem with your idea is the purposes of the document types are
completely different. PDF is good for printing while HTML is not a
print medium but a medium for reading material on the web. You cannot
create an HTML document to PDF perfection. You can as Andy wrote, set
margins and first line properties with CSS to get close. Another
problem you will run into is where to wrap lines. With HTML, the lines
should wrap at the right margin whatever the window size is. Don't be
tempted to set width in pixels or to use a bunch of <br>s to break
lines where YOU want to. With larger window sizes, your content will
all be to one side or centered leaving much of the window unused. This
annoys users.

--
Stan McCann, RETIRED!!, "Uncle Pirate" http://stanmccann.us/
Implementing negative score for googlegroup postings, see
http://blinkynet.net/comp/uip5.html
A zest for living must include a willingness to die. - R.A. Heinlein
Sep 23 '06 #13

This discussion thread is closed

Replies have been disabled for this discussion.