Want to take part in these discussions? Sign in if you have an account, or apply for one below
Vanilla 1.1.10 is a product of Lussumo. More Information: Documentation, Community Support.
Here is some code
.
Here is more code
.
And yet more:
code
Edit: I should have made it clear when I sent people to look at this what it should be. Here is the Markdown source:
Here is some <code>code</code>.
Here is more `code`.
And yet more:
code
And here is the resulting HTML:
<p>Here is some <code>code</code>.</p>
<p>Here is more <code>code</code>.</p>
<p>And yet more:</p>
<pre><code>code
</code></pre>
So it seems obvious to me that the first two blocks of code-formatted text should appear inline, while only the last block should appear separate.
Edit: Here, the point is that the latter list should be numbered (although not the former). Again, that's what the HTML says; it's just a question of how the stylesheet says to render that.
Finally, here is a link.
Edit: The text ‘link’ should look somehow special, else how will you recognise that there's a link to follow?
The stylesheet on MathOverflow makes this work fine
To do multiline code, do
backtick and then separate lines by single returns as follows:
a
a
a
a
a
a
but not
`a
a
a
a
a
a`
Interesting. Using my stylesheet, your first example there is all one one line! Furthermore, that seems to me to be the only sensible way for a stylesheet to interpret the HTML, which has no linebreaks in it. (Well, it has linebreaks in the sense of ASCII Ctrl-J, but it has no <br>
or <p>
tags.)
(And yes, the code ‘<br>’ and ‘<p>’ above should all appear on the same line as the surrounding text. Why would a stylesheet want to pull it out???)
Another way to get multiline code —and this way uses HTML that presents multiline code, rather than a stylesheet hack— is by placing four spaces at the front of each line:
no space
one space
two spaces
three spaces
four spaces
five spaces
six spaces
seven spaces
…
(For the record again, ‘my stylesheet’ is the last of the four called ‘default’ on the styelsheet settings page. It has trouble with columns but does code and lists sensibly.)
Actually, the story of line-breaks and code is a little complicated. As well as the code tag, there's the pre tag. I think (have to look to check) that Markdown automatically wraps 'code' tags in 'pre' as well. It's the 'pre' that decides how the line breaks work. One can also tell pre to wrap long lines as well as respecting end-of-line characters, so with judicious use of CSS one can get quite a variety of styles.
If there's something weird about one of the stylesheets here that is clearly wrong, then I'm quite happy to modify it. For example, the default stylesheet seems to insist on putting any code on a separate line (display: block), which can be very annoying. My choice of stylesheet (can't remember which off the top of my head) fixes this but doesn't distinguish links (except on mouseover).
When I set up this forum, I just downloaded a load of stylesheets that looked vaguely okay. I seem to remember that I tweaked one of them once and I think it was to do with the ordered vs numbered lists. Also, since this forum started, there will no doubt have been new stylesheets devised. If you follow the link (click on the word "vanilla" somewhere on this page) then you should be taken to a page where you can find more stylesheets. I'm more than happy to install more than we have (and I know that several are just called "default" so I should probably also sort out the names!). If some want a stylesheet tweaked and others don't then it's easy enough to fork one.
Look at the HTML source of this page; there's no <pre>
tag in this comment. Yet the word ‘<pre>’ shows up on a separate line in almost every stylesheet. (Mardown does treat text between backticks something like LaTeX's \verb
command, just as HTML's <pre>
does. But it doesn't actually put <pre>
into the HTML.)
For example, the default stylesheet seems to insist on putting any code on a separate line
That's the thing: they all do that, with three exceptions (my choice of stylesheet, your choice cloud6, and vaneablack). That's why the choices are kind of limited.
If some want a stylesheet tweaked and others don't then it's easy enough to fork one.
I would like vanilla (the one at the top of the list) if you copy its handling of <code>
from vaneablack or the last one named ‘default’. (Perhaps these could be named ‘default0’ through ‘default3’?)
Where do you keep the CSS files? I can't find them by poking around with URIs.
The stylesheets are:
~stacey/Vanilla/nForum/themes/vanilla/styles/X/vanilla.css
where X is the name of the stylesheet. The names are:
(there are a few other files, images and minor stylesheets, but the 'vanilla.css' is the main one)
That folder list doesn't really match the list of options (each of which does produce a different style when I try it). One of the options (sky) doesn't actually do anything (so it looks very ugly, thanks to the header and sidebar), although its name does match one of the 9 in the file folder. I'd most like to see the one called ‘vanilla’ in the options, but that name doesn't match anything in your file folder.
Over on the test forum I've modified the names of the styles slightly. It seems that the extension that presents the list of styles picks up everything that looks like a style in a certain folder. The problem is that styling the forum takes place at two levels. There are "themes" (which only I can change) and then "styles" which apply to themes. It is easily possible that a certain style can be reasonably applied to more than one theme, but the idea is that the hierarchy is obeyed. I downloaded a variety of themes when I originally set this up, but stuck with the default one in the end. However, the default styles that come with each of those themes persists.
I've just realised that the test forum was the wrong place to modify those names! The problem being that I didn't install the extra themes in the test forum so those extra stylesheets just aren't there. However, as the software saves a list of the styles, it hasn't noticed that they aren't there! Bother.
The one called "vanilla" is the original default style and is located in the folder "default".
Okay, I've changed the names on this forum as well.
Yes, that was a "naughty style". Technically, that style is meant to be associated with a particular theme. Since we don't use that theme, the stylesheet may or may not fit too well with our theme. Many of the elements across the themes will be the same so some styles may well work with different themes, but there's no guarantee.
(There are plenty more themes and styles over at the main vanilla website. I'm quite happy to install more styles. I don't know if it's possible to install different themes for use by different users.)
OK, so default(tabled) is the one that I use. As I said, it has some problems with columns (basically, there's a glitch that comes in when the sidebar on the left ends), but it's the only one that handles code, lists, and links well (and actually styles things) IMO.
I don't know why it didn't work for David. Because of the column glitch, it doesn't quite match the picture for me either, but I still see something sensible.
Hey Andrew, I see that default (tabled) now no longer has the column glitch. (Now the worst that I can find to criticise about is the small font size.) Did you edit it?
I did edit it slightly. I altered the theme slightly and that made all the different stylesheets break so I did the minimum to fix them. In doing so, I had to actually look at them and did what I had to do to make them look reasonable. That included fixing the column glitch as it looked horrible! I think I also fixed the boldface mathematics as well: . However, that was just “bug fixes”. I haven’t done the Major Work that I intend to do on the CSS.
Well, it looks much better! Although please take a look at http://www.math.ntnu.no/~stacey/Vanilla/nForum/comments.php?DiscussionID=1121&page=2#Item_19 and tell me if that comment is deleted (hidden), because I can’t see the difference.
Something’s gone wrong with the javascript that deletes (hides) comments. I managed to delete one of your comments by calling the correct URL directly, but for some reason the javascript that is meant to do it is failing dismally. Bleugh.
Fixed (obscure or what! It was down to a
that the system didn’t like in its new “strict” mode). And I deleted your comments as you seemed to want.
Did someone edit the font size of the nLab? It appears bigger now. Not uncomfortably bigger, but noticeable. Just curious.
Yes, me (who else?).
Actually, it’s (probably) a completely different font. If you have the STIX fonts installed then you’re seeing those. I wanted to see if having a uniform choice of font for mathematics and text worked better. So that when you write something like: “let be the horizontal co-ordinate and the vertical, then the radius of the circle can be written as ” then the text and mathematics look well together. I haven’t had the opportunity to decide whether or not it works, though.
Oh, oops. You said “nLab”. I misread that.
Not me, then. Jacques sometimes tweaks the CSS in the source, but I don’t know if he did this time.
I think the n-Forum looks great. The math and text render together nicely. I didn’t feel there was a problem with the nLab before though. Maybe it is just that I became accustomed to it, but I think I liked the nLab better before.
Yeah, I knew you were tweaking the CSS here and it looks great, so asked my question here thinking maybe you also changed the nLab :)
Thanks, Andrew, and that makes me notice another bug (since I was on another computer and not logged in when I first check this): If you follow a link to a comment that is hidden from you, then you get an error message. It might be better to go to the right page and just get to the part where the comment would be but isn’t; that can be debated. What is undeniable, however, is that the error message does not validate as XHTML. (Possibly it is just missing a <p>
tag.)
My only complaint about the forum font change is that, at least in my browser (maybe I need to change a setting?), the tabs I’m not on (notices, etc.) are in white and very difficult to see.
Do you mean the lettering of those tabs?
@Andrew:
Yeah, meanwhile, is there any way to use better mathML fonts on the lab itself? For some reason, stuff here renders much better for me for some reason. If you saw the fonts that were in that mathjax preview that Anton linked over on MO, output as MathML, they looked surprisingly good. I wonder if that's mathjax actually manually making things look nicer, or if they were just using very good fonts.
In a nutshell, that’s the point of MathML! I, as tech-support for the nForum and nLab, can make a suggestion as to which fonts you use but you can choose to completely ignore that suggestion and use whatsoever you like. Of course, I would like to make the best suggestion that I can.
At the moment, on the nForum, I am “suggesting” that you use:
STIXSize5, ’Trebuchet MS’, Verdana, Tahoma, Arial, sans-serif
but what I am actually using are:
STIXGeneral, DejaVu Serif, DejaVu Sans, Cambria, Cambria Math, Times, Lucida Sans Unicode, OpenSymbol, Standard Symbols L, serif
on the nLab, I am “suggesting” that you use:
Verdana, Arial, Helvetica, sans-serif
but what I am actually using are:
STIXGeneral, DejaVu Serif, DejaVu Sans, Cambria, Cambria Math, Times, Lucida Sans Unicode, OpenSymbol, Standard Symbols L, serif
meanwhile, Anton (or whoever set up that MathJax beta) is making no “suggestions” at all, with the result that I am using:
STIXGeneral, DejaVu Serif, DejaVu Sans, Cambria, Cambria Math, Times, Lucida Sans Unicode, OpenSymbol, Standard Symbols L, serif
(These are all for MathML, not text; and the way these lists work are that the browser starts with the first and goes through looking for a font with the right character.)
So as far as MathML is concerned, my “suggestions” are getting completely ignored!
For comparison, here’s the first part of the MathML on that beta page essentially just copied over (one minor edit to make it validate):
Here we go with typesetting that as itex
Okay, rant over! Seriously, I would like to make the best suggestion that I can, but clearly trying to figure that out using my browser is pointless! I’ll take a look at those sites using Opera when I get a moment.
Wait, how did you set it up to use those fonts? By the way, opera respects the font choices, so if you change them on the nLab, everything will look much nicer for us.
Firefox also respects font choices, by default. However, if you explicitly tell it to use certain fonts for certain things, then it respects your choices and gives them priority. I suspect that Opera is exactly the same, just that you haven’t explicitly told Opera to use certain fonts. In firefox, you go to ’about:config’ (click on the “Yes, I know that this voids the warranty” button) and search for (or create) the key “font.mathfont-family” then the fonts you list there are the defaults used for mathematics. I would guess that Opera has some similar facility, but I only use Opera about once a month so don’t have much familiarity with its configuration.
a
b
c
d
e
f
a
b
c
d
e
f
a
b
c
d
e
f
Some code a
b
c
d
e
f
is nice.
a b c d e f
a
b
c
d
e
f
1 to 34 of 34