Page 1 of 1

Problems with GeSHi plugin and formatting

Posted: Tue Apr 29, 2008 1:04 am
by jnd
Hi, I just installed Serendipity yesterday and I am trying to get working the geshi plugin. I read readme, searched for some solution, tried many things but I have still problems. In geshi I successfully created new highlighting file for AVR assembly, the coloring works good but the output is not what I expected:

-when I turn on line numbering, the numbers are on separated lines between code lines. The result looks somewhat broken.

-when I turn off line numbering, I get non-monospaced output.

I have default line numbers on, the geshi event is second before nl2br and others. I tried to disable some markup plugins or change position but I still have the problem.

Here is the test page:
http://blog.8b.cz/archives/2-Test-of-Ge ... hting.html

Maybe I am expecting something else than it should do so tell me what can be the problem, thanks.

jnd

Re: Problems with GeSHi plugin and formatting

Posted: Tue Apr 29, 2008 10:44 am
by garvinhicking
Hi!

The proble is with the current template you use, because it has this CSS:

Code: Select all

/* style for lists */
li {
	list-style-position: inside; }
This is usually a good thing for inline listings because in the template they have cleaner distinction. For your case, you would better assign a new CSS rule like this, inside your style.css (or as inline styles, whatever you prefer):

Code: Select all

.avrasm li {
 list-style-position: outside;
}
HTH,
Garvin

Posted: Tue Aug 26, 2008 11:35 pm
by rhacer
I have a very similar problem to this, but cannot find the above mentioned css entry in my style.

Forgive me as I'm not fabulous with HTML or CSS so I may be missing something completely obvious.

Here is the test entry. I went to NO line numbers for that entry because line numbers were getting jumbled up and not matching code when line numbers were turned on.

http://www.craigelachie.org/standingfas ... utton.html

Posted: Wed Aug 27, 2008 10:34 am
by garvinhicking
Hi!

So did you insert the .avrasm li code stuff into your CSS file? If you did, the linenumbering in your template should work, I think...

Regards,
Garvin

Posted: Wed Aug 27, 2008 6:10 pm
by rhacer
garvinhicking wrote:Hi!

So did you insert the .avrasm li code stuff into your CSS file? If you did, the linenumbering in your template should work, I think...

Regards,
Garvin
Yes, I have that code in, but it is a bare "li" with no .avrasm prefix as .avrasm looked to be specific to the other problem.

The link above still works, with line numbering now on. As you (hopefully can see) the counting problems start at line 7 and get weirder as things go down the page.

Posted: Wed Aug 27, 2008 8:33 pm
by garvinhicking
Hi!

Hhhm...this in fact is a problem I've not seen before. If I changed "list-position" from "outside" as it is currently to "inside", the padding and everything else gets mixed up. I don't understand why the browser indents it like this...the HTML structure looks fine to me ?!?

Regards,
Garvin

Posted: Wed Aug 27, 2008 8:46 pm
by rhacer
garvinhicking wrote:Hi!

Hhhm...this in fact is a problem I've not seen before. If I changed "list-position" from "outside" as it is currently to "inside", the padding and everything else gets mixed up. I don't understand why the browser indents it like this...the HTML structure looks fine to me ?!?

Regards,
Garvin
I would be completely cool with it IF I could get fixed-width font without the line-numbers.

Posted: Wed Aug 27, 2008 9:41 pm
by garvinhicking
hi!

Hm, when you disable line numbers, you should be able to use

Code: Select all

.python {
 font-family: Courier;
}
for example?

Regards,
Garvin

Posted: Wed Aug 27, 2008 10:42 pm
by rhacer
garvinhicking wrote:hi!

Hm, when you disable line numbers, you should be able to use

Code: Select all

.python {
 font-family: Courier;
}
for example?

Regards,
Garvin
I have tried that. It looks like it's not having any effect which puzzles me. I'm likely doing something stupid (as I said I not at all proficient in css) but I just downloaded a bunch of Firefox AddOns to help me diagnose the problem and it SEEMS that I'm doing it right, but obviously I'm not.

So this is messed up. I had a friend look at it and he said "What're you talking about, it's fixed width." I loaded it in Safari on my PowerBook and low-and-behold it's fixed width in Safari too. So this is something of a weird Firefox on OSX kinda thing I guess.

Posted: Wed Aug 27, 2008 11:47 pm
by Don Chambers
You might want to address your validation issues first - make sure those are all cleared up because any one of them could be producing unexpected display problems.

Posted: Fri Aug 29, 2008 4:15 am
by rhacer
Don Chambers wrote:You might want to address your validation issues first - make sure those are all cleared up because any one of them could be producing unexpected display problems.
Well I figured out what was wrong and it's incredibly embarrassing. At some point in the past I'd set Firefox to use it's own fonts, not a sites fonts.