15 replies [Last post]
KFC
Offline
newbie
Last seen: 13 years 47 weeks ago
Joined: 2007-10-23
Posts: 7
Points: 0

Hi there,
I am writting a small introduction of mathematics in which I need to show a good number of mathematical symbols (in jpg). Most of the images shown in the same line with the text, in this case, the height of the images are just little bit higher than that of the text. I don't know why, for the paragraph without any images, the line spacing is fine, but for those having images embeded, the spacing will be small, that make the text looks so weird. How can I fix the line spacing no matter if there is image or not?

By the way, sometimes, I need to show the equation in the middle of a row and the equation number if at rightmost position, I am using a table

(1)

Is there any better way to do the same thing without using table?

Thanks a lot

Triumph (not verified)
Anonymous's picture
Guru

My first move would be to

My first move would be to use valid markup and certainly not use tables for layout.

Can you show a link or at least all the code?

KFC
Offline
newbie
Last seen: 13 years 47 weeks ago
Joined: 2007-10-23
Posts: 7
Points: 0

Thanks for replying. Here is

Thanks for replying. Here is the code


I am testing the line spacing. I am testing the line spacing. I am testing the line spacing. I am testing the line spacing. I am testing the line spacing. I am testing the line spacing. I am testing the line spacing. I am testing the line spacing. I am testing the line spacing. I am testing the line spacing. I am testing the line spacing. I am testing the line spacing. I am testing the line spacing. I am testing the line spacing. I am testing the line spacing. I am testing the line spacing. I am testing the line spacing. I am testing the line spacing.

I am testing the line spacing. I am testing the line spacing. I am testing the line spacing.
I am testing the line spacing. I am testing the line spacing. I am testing the line spacing.
I am testing the line spacing.
I am testing the line spacing. I am testing the line spacing. I am testing the line spacing.

I am testing the line spacing. I am testing the line spacing. I am testing the line spacing. I am testing the line spacing. I am testing the line spacing. I am testing the line spacing. I am testing the line spacing.





And the layout.css contains

.Content{margin:0 0 10px 0;padding:0px 6px 5px 0px;} .Content-body{background-repeat: repeat-y; background-position: right;padding:8px 6px 0 20px;overflow:hidden;text-align:left; width:98%; line-height:160%; font-size:14px; }

If you run this code (with any p1.gif and p2.gif) you will see that the seperation of lines is not even.

I found that the problem seems coming from

, I do need to have the width of the content of the passage set to 95%, what should I do?

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 28 weeks 6 days ago
Dallas
Timezone: GMT-6
Joined: 2004-06-25
Posts: 9776
Points: 3858

I think, in this case, it

I think, in this case, it would be very helpful to us to see some of your text and images in action. Can you give us a link?

You should also note that a large number of mathematical and logic symbols are a part of utf-8/unicode and may be entered directly as text, eg. ∅∆∇∈∑∓∗√∝∞∟∯∮∭∬∫∪∩∨∧∢≃⊂⊃⊄⊅⊆⊇⊈⊉⊾⋮⋯⋰⋱

HTML does not really supply the tools for direct formula entry, so I guess you're stuck with images to a large degree. You might also consider using LaTeX markup and outputting a PDF document. PDF is the format of choice for producing hard copies.

cheers,

gary

If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.

KFC
Offline
newbie
Last seen: 13 years 47 weeks ago
Joined: 2007-10-23
Posts: 7
Points: 0

kk5st wrote:I think, in this

kk5st wrote:
I think, in this case, it would be very helpful to us to see some of your text and images in action. Can you give us a link?

You should also note that a large number of mathematical and logic symbols are a part of utf-8/unicode and may be entered directly as text, eg. ∅∆∇∈∑∓∗√∝∞∟∯∮∭∬∫∪∩∨∧∢≃⊂⊃⊄⊅⊆⊇⊈⊉⊾⋮⋯⋰⋱

Well, I need to show something much more complex that symbols. So, I don't think this is good fro me.

Sorry, I didn't publish the webpage on internet yet. I don't know how to show to the effect of my code.

Quote:

HTML does not really supply the tools for direct formula entry, so I guess you're stuck with images to a large degree. You might also consider using LaTeX markup and outputting a PDF document. PDF is the format of choice for producing hard copies.

cheers,

gary
Yes. So now I type the mathematical stuff with latex and convert to a gif/jpg.

Triumph (not verified)
Anonymous's picture
Guru

kk5st wrote:... HTML does

kk5st wrote:
... HTML does not really supply the tools for direct formula entry, so I guess you're stuck with images to a large degree. ...

Is MathML a viable option yet?

KFC
Offline
newbie
Last seen: 13 years 47 weeks ago
Joined: 2007-10-23
Posts: 7
Points: 0

Well, for some reasons, I

Well, for some reasons, I don't think MathML is my first choice. I just want to know if any way to keep the line spacing the same even there are images mixed with the text.

Thanks a lot.

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 28 weeks 6 days ago
Dallas
Timezone: GMT-6
Joined: 2004-06-25
Posts: 9776
Points: 3858

I really would like to see

I really would like to see some specimen marked up content with some sample images uploaded to the forum, then.

cheers,

gary

If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.

KFC
Offline
newbie
Last seen: 13 years 47 weeks ago
Joined: 2007-10-23
Posts: 7
Points: 0

kk5st wrote:I really would

kk5st wrote:
I really would like to see some specimen marked up content with some sample images uploaded to the forum, then.

cheers,

gary
I do want to show you a demo, but I can't upload image to the forum, and I have no web space for my pages. Sad

KFC
Offline
newbie
Last seen: 13 years 47 weeks ago
Joined: 2007-10-23
Posts: 7
Points: 0

I create a free space for

I create a free space for demo. Here is the link, you can see that the seperation of lines containing image is smaller than that without images.

http://kfc123.tripod.com/index.html

Triumph (not verified)
Anonymous's picture
Guru

KFC wrote:I create a free

KFC wrote:
I create a free space for demo. Here is the link, you can see that the seperation of lines containing image is smaller than that without images.

http://kfc123.tripod.com/index.html
Get a doctype in there and see if the quirks stop quirkin'.

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 28 weeks 6 days ago
Dallas
Timezone: GMT-6
Joined: 2004-06-25
Posts: 9776
Points: 3858

As T sz, put a DTD in there

As T sz, put a DTD in there and get the code valid. I don't think that's an issue on this problem, but why have errors anyway?

As to your problem, you must be picking some picayune nits. I just don't see any difference in line spacing (height).

cheers,

gary

If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.

Triumph (not verified)
Anonymous's picture
Guru

kk5st wrote:... As to your

kk5st wrote:
... As to your problem, you must be picking some picayune nits. I just don't see any difference in line spacing (height). ...

Neither do I. :shrug:

KFC
Offline
newbie
Last seen: 13 years 47 weeks ago
Joined: 2007-10-23
Posts: 7
Points: 0

kk5st wrote:As T sz, put a

kk5st wrote:
As T sz, put a DTD in there and get the code valid. I don't think that's an issue on this problem, but why have errors anyway?

DTD? Would you give me more specific information? I am really new to web design.

Quote:

As to your problem, you must be picking some picayune nits. I just don't see any difference in line spacing (height).

cheers,

gary
How come! The difference is obvious? See the image (http://kfc123.tripod.com/demo.html) from the screen capture.

Triumph (not verified)
Anonymous's picture
Guru

KFC wrote:How come! The

KFC wrote:
How come! The difference is obvious? See the image (http://kfc123.tripod.com/demo.html) from the screen capture.

I don't know? It doesn't do that on my browser. Doesn't matter anyway until you get a doctype and validate your code. CSS being predictable depends on the markup being valid.

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 28 weeks 6 days ago
Dallas
Timezone: GMT-6
Joined: 2004-06-25
Posts: 9776
Points: 3858

It looks like this for

It looks like this for me:

cheers,

gary

AttachmentSize
line-spacing.png 6.18 KB

If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.