Inline graphics problem

P

Paul

Hi,

I'm having a problem with inline graphics - can anyone help?

An example of the problem can be seen at

http://www.all-the-johnsons.co.uk/nodoid/bddt.html

Ignoring the text (unless you enjoy reading some very strange and complex
chemistry), you can see the problem part of the way down whereby any of
the graphics in use are not kept inline.

How can I ensure the formulae use are kept on the same line as the text
either on the page or from within CSS?

TIA

TTFN

Paul
 
J

Jim Higson

Paul said:
Hi,

I'm having a problem with inline graphics - can anyone help?

An example of the problem can be seen at

http://www.all-the-johnsons.co.uk/nodoid/bddt.html

Ignoring the text (unless you enjoy reading some very strange and complex
chemistry), you can see the problem part of the way down whereby any of
the graphics in use are not kept inline.

How can I ensure the formulae use are kept on the same line as the text
either on the page or from within CSS?

Since there are no compex nested brackets, as far as I can see, all the
formule on that page are expressable as html+css, without using images.

Try getting a unicode expression of a forumla and running through Perl's
HTML::Entities (or something similar) to get a pure html, entity referenced
version.
 
P

Paul

Hi,

Try getting a unicode expression of a forumla and running through Perl's
HTML::Entities (or something similar) to get a pure html, entity referenced
version.

I've not used HTML::Entities before or the unicode expression of any
formulae - can you recommend any websites which cover the matter?

TTFN

Paul
 
N

Neal

Hi,

I'm having a problem with inline graphics - can anyone help?

An example of the problem can be seen at

http://www.all-the-johnsons.co.uk/nodoid/bddt.html

Ignoring the text (unless you enjoy reading some very strange and complex
chemistry), you can see the problem part of the way down whereby any of
the graphics in use are not kept inline.

How can I ensure the formulae use are kept on the same line as the text
either on the page or from within CSS?

In my fortune cookie it said: "Mix images with text result in heartache".

Most of these can be done in the markup. See
http://www.w3.org/TR/html401/sgml/entities for the special characters, see
http://www.w3.org/TR/html401/index/elements.html for links to the sub and
sup elements. Here <i> and <b> are arguably correct. A good chance to use
the lonely little <var> element too.

Those few formulae and diagrams which cannot be expressed in HTML, do them
as images, but not inline. Maybe some work inline. But you'll never ever
get the sizes to match, it's really impossible.
 
J

Jukka K. Korpela

Paul said:
I'm having a problem with inline graphics - can anyone help?

An example of the problem can be seen at

http://www.all-the-johnsons.co.uk/nodoid/bddt.html

I agree with others who have commented that you don't need graphics -
just some extra markup, including character references (or entity
references). I would even say that the first graphic, presumably
implemented as a background image, should be dropped too. If you keep
using graphics for special symbols and formulas, at least use meaningful
alt texts - alt="equation" is hardly useful to a person who does not see
the equation. (Naming, or at least numbering, the equations in the alt
texts would make them somewhat more useful, but what an alt text for an
equation should be, whenever possible, is a verbal presentation of the
relationship expressed by the equation.)

In addition to other resources suggested, I'd like to mention my fairly
extensive "Math in HTML (and CSS)",
http://www.cs.tut.fi/~jkorpela/math/

You seem to need basically just Greek letters (or symbols derived from
them), superscripts, subscripts, and italics. Oh, and horizontal ellipsis
(three dots), which is … or &hellip;.

More hints:
- use heading markup for headings
- don't use Verdana
- don't reduce copy text size (it's especially bad for text containing
difficult words and special symbols).
 
J

Jim Higson

Paul said:
Hi,



I've not used HTML::Entities before or the unicode expression of any
formulae - can you recommend any websites which cover the matter?

HTML::Entities is a Perl module for encoding special chars as HTML entities,
you just give it a string containing unsafe chars and it returns it with
them replaced by character entities.

I use it in my CGI scripts, becuase I work on a few international sites.

Perl isn't too difficult if all you want to do is something simple like
this. It is a programming language though, so don't expect a nice GUI
interface to just appear and ask for a formula!

Something like:

use HTML::Entities;
use open ':utf8';

# read a line from stdin and print the entity-referenced equivalent:
print( encode_entities( <STDIN> );

Is about as simple as I can make it. Just about any Unix box will have Perl,
and it can be used on Windows without too much fuss. To find out about this
specific module, just look at it's perldoc page.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Small CSS problem 10
css problem 2
Inline style problem 3
Unable to validate some code & IE CSS problem 7
Dratted IE! 16
Inline list width problem in Firefox 5
Resizing problem 1
[SUMMARY] Turtle Graphics (#104) 2

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top