Problems with GeSHi plugin and formatting

Creating and modifying plugins.
Post Reply
jnd
Posts: 1
Joined: Tue Apr 29, 2008 12:51 am
Location: CZ
Contact:

Problems with GeSHi plugin and formatting

Post 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
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Problems with GeSHi plugin and formatting

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
rhacer
Regular
Posts: 17
Joined: Sun Sep 25, 2005 10:23 am

Post 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
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
rhacer
Regular
Posts: 17
Joined: Sun Sep 25, 2005 10:23 am

Post 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.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
rhacer
Regular
Posts: 17
Joined: Sun Sep 25, 2005 10:23 am

Post 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.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
rhacer
Regular
Posts: 17
Joined: Sun Sep 25, 2005 10:23 am

Post 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.
Don Chambers
Regular
Posts: 3657
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Post 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.
=Don=
rhacer
Regular
Posts: 17
Joined: Sun Sep 25, 2005 10:23 am

Post 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.
Post Reply