473,385 Members | 1,492 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

stylesheet for bibliography

Hi all,

I must be re-inventing the wheel, but I can't seem to find a stylesheet
for bibliographies. I'm probably inputting the wrong keywords into
Google... Well, I gave up searching and since I needed an excuse to
try to learn CSS anyway, I gave it a try. But, I'm stuck with one
thing.

With the book and the help pages I've read so far, all of the examples
have to do with making text within a set of tags colored, italics, etc.
Is it possible to use a stylesheet to ADD text? For example:

<atitle>This is some title</atitle>

to become

"This is some title".

Or is the only way to do this is to explicitly put punctuation marks
inside. As in:

<atitle>"This is some title".</atitle>

I would like a style sheet to do it because every title will be
enclosed in quotation marks and end in a period. Is this considered a
"style"?

Thank you in advance!

Ray

Sep 16 '05 #1
8 3019
On 16 Sep 2005 08:08:13 -0700, ra******@gmail.com wrote:
Hi all,

I must be re-inventing the wheel, but I can't seem to find a stylesheet
for bibliographies. I'm probably inputting the wrong keywords into
Google... Well, I gave up searching and since I needed an excuse to
try to learn CSS anyway, I gave it a try. But, I'm stuck with one
thing.

With the book and the help pages I've read so far, all of the examples
have to do with making text within a set of tags colored, italics, etc.
Is it possible to use a stylesheet to ADD text? For example:

<atitle>This is some title</atitle>

to become

"This is some title".

Or is the only way to do this is to explicitly put punctuation marks
inside. As in:

<atitle>"This is some title".</atitle>

I would like a style sheet to do it because every title will be
enclosed in quotation marks and end in a period. Is this considered a
"style"?

Thank you in advance!

Ray


I don't think you can do this with CSS, it seems more the sort of thing to
be done via a scripting language like PHP where it would be very easy.

Or as you say "explicitly put punctuation marks inside". Easy but time
consuming if you have a lot of records.
Sep 16 '05 #2
ra******@gmail.com writes:
Hi all,

I must be re-inventing the wheel, but I can't seem to find a stylesheet
for bibliographies. I'm probably inputting the wrong keywords into
Google... Well, I gave up searching and since I needed an excuse to
try to learn CSS anyway, I gave it a try. But, I'm stuck with one
thing.

With the book and the help pages I've read so far, all of the examples
have to do with making text within a set of tags colored, italics, etc.
Is it possible to use a stylesheet to ADD text? For example:

<atitle>This is some title</atitle>


You cannot invent new elements like that --- you have to stick with
the elements defined by (X)HTML. But you can write

<p class="title">This is some title</p>

to mark a paragraph as being a title with regard to the CSS rules you
write. To have quotation marks added automatically use the :before
and :after pseudo-classes together with the content property:

http://www.w3.org/TR/CSS21/generate.html#content

A stylesheet like this would work in your case:

p.title:before {
content: "“";
}

p.title:after {
content: ".”";
}

It works in some modern browsers, such as Firefox.

--
Martin Geisler GnuPG Key: 0x7E45DD38

PHP EXIF Library | PHP Weather | PHP Shell
http://pel.sf.net/ | http://phpweather.net/ | http://mgeisler.net/
Read/write EXIF data | Show current weather | A shell in a browser

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQBDK/NO6nfwy35F3TgRAhCsAKCBKpk2t1j5KtyQr/jArSDQo8+0WgCgzwkw
Lw1GEPkLzLLYWiv73Mrw7AE=
=58aH
-----END PGP SIGNATURE-----
Sep 17 '05 #3

"Martin Geisler" <mg******@mgeisler.net> wrote in message news:87************@futtelifut.dyndns.org...
On 16 Sep 2005 08:08:13 -0700, ra******@gmail.com wrote:
Hi all,

I must be re-inventing the wheel, but I can't seem to find a stylesheet
for bibliographies. I'm probably inputting the wrong keywords into
Google... Well, I gave up searching and since I needed an excuse to
try to learn CSS anyway, I gave it a try. But, I'm stuck with one
thing.

With the book and the help pages I've read so far, all of the examples
have to do with making text within a set of tags colored, italics, etc.
Is it possible to use a stylesheet to ADD text? For example:

<atitle>This is some title</atitle>
You cannot invent new elements like that --- you have to stick with
the elements defined by (X)HTML.


well, actually you can, but they won't be necessarily rendered by agents ;-)
http://www.cs.tut.fi/~jkorpela/html/own-dtd.html
But you can write

<p class="title">This is some title</p>

to mark a paragraph as being a title with regard to the CSS rules you
write. To have quotation marks added automatically use the :before
and :after pseudo-classes together with the content property:

http://www.w3.org/TR/CSS21/generate.html#content

A stylesheet like this would work in your case:

p.title:before {
content: "“"; ^^^ que??? }

p.title:after {
content: ".”"; ^^^ huh??? }

It works in some modern browsers, such as Firefox.


what's that in the before/after content? (after the period)

Sep 17 '05 #4
"Robi" <me@privacy.net> writes:
[...] --- you have to stick with the elements defined by (X)HTML.


well, actually you can, but they won't be necessarily rendered by
agents ;-) http://www.cs.tut.fi/~jkorpela/html/own-dtd.html


Hmm, yes, of course :-)
A stylesheet like this would work in your case:

p.title:before {
content: "“";

^^^ que???
}

p.title:after {
content: "”.";

^^^ huh???
}

It works in some modern browsers, such as Firefox.


what's that in the before/after content? (after the period)


It was curly quotes, UTF-8 encoded as far as I know: U+201C and
U+201D. I hope my Gnus encoded them correctly, but I'm not sending
UTF-8 encoded news that often so it might have failed.

--
Martin Geisler GnuPG Key: 0x7E45DD38

PHP EXIF Library | PHP Weather | PHP Shell
http://pel.sf.net/ | http://phpweather.net/ | http://mgeisler.net/
Read/write EXIF data | Show current weather | A shell in a browser

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQBDLEWr6nfwy35F3TgRAmpWAKChS9JVodsb1H9dm/9LngNQ0GVYAgCeLf6R
kuziD+8MoOmRQeNdtlo6IbU=
=Ukm+
-----END PGP SIGNATURE-----
Sep 17 '05 #5
Hi all,

Thank you for your replies! Adding that to the p tag wasn't what I had
in mind, but I did give it a try and it seemed to work. I then played
around and tried this:

atitle:before {
content: """;
}

atitle:after {
content: "."";
}

This worked...in Firefox...but I presume it isn't supported by other
browsers? I was trying to replicate something like what LaTeX's bibtex
does (or even Endnote). But, perhaps Rincewind has a better
idea...that is to use php. Perhaps keeping my bibliography entries in
a flat file and letting php loop through it might be a better idea...

Thank you for your help!

Ray

Sep 18 '05 #6
in comp.infosystems.www.authoring.stylesheets, ra******@gmail.com wrote:
Hi all,

Thank you for your replies! Adding that to the p tag wasn't what I had
in mind, but I did give it a try and it seemed to work. I then played
around and tried this:

atitle:before {
content: """;
}

atitle:after {
content: "."";
}

This worked...in Firefox...but I presume it isn't supported by other
browsers?
Unless I am mistaken, it shoudl not work, you need to escape " or use
curly one in right encoding. If you did escape those quotes, then it
should work on Opera 6+ as well, but not in IE. (URL would be much more
useful than code here...)
Perhaps keeping my bibliography entries in
a flat file and letting php loop through it might be a better idea...


Yes, you could also change your own xml to (x)html in process.

--
Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>
Sep 18 '05 #7

On Sat, 17 Sep 2005, Martin Geisler wrote:
"Robi" <me@privacy.net> writes:
[...] --- you have to stick with the elements defined by (X)HTML.


well, actually you can, but they won't be necessarily rendered by
agents ;-) http://www.cs.tut.fi/~jkorpela/html/own-dtd.html


Hmm, yes, of course :-)
A stylesheet like this would work in your case:

p.title:before {
content: "“";

^^^ que???
}

p.title:after {
content: "”.";

^^^ huh???
}

It works in some modern browsers, such as Firefox.


what's that in the before/after content? (after the period)


It was curly quotes, UTF-8 encoded as far as I know: U+201C and
U+201D. I hope my Gnus encoded them correctly, but I'm not sending
UTF-8 encoded news that often so it might have failed.


In Pine[1], I saw hex E2 80 9C and E2 80 9D which are indeed the UTF-8
encodings for U+201C and U+201D.

[1] Using a DOS-based terminal emulator with this VGA font:
http://www.chebucto.ns.ca/~af380/ctl1252.gif
so all characters can be uniquely and easily identified.
A copy of the VGA font can be downloaded here:
http://www.chebucto.ns.ca/~af380/ctl1252.zip
The font editor and font loader used are from the freeware FPMAN220
VGA character font and color palette editor package from the Simtel
Archives at (if the 404 Fairy hasn't been busy) one of these places:
ftp://planetmirror.com/pub/simtelnet...a/fpman220.zip
ftp://ftp.bu.edu/pub/mirrors/simteln...a/fpman220.zip
ftp://ftp.telusplanet.net/pub/simtel...a/fpman220.zip
ftp://ftpl.tu-chemnitz.de/pub/simtel...a/fpman220.zip
ftp://ftp.demon.co.uk/pub/simtelnet/...a/fpman220.zip
http://simtel.easynet.net/pub/simtel...a/fpman220.zip
--
"> Is there anything Spamazon DOESN'T sell?
Clues. The market's too small to justify the effort."
-- Stuart Lamble in the scary devil monastery, Fri, 13 May 2005
Sep 18 '05 #8
Hi,

Lauri Raittila wrote:
in comp.infosystems.www.authoring.stylesheets, ra******@gmail.com wrote:
This worked...in Firefox...but I presume it isn't supported by other
browsers?

Unless I am mistaken, it shoudl not work, you need to escape " or use
curly one in right encoding. If you did escape those quotes, then it
should work on Opera 6+ as well, but not in IE. (URL would be much more
useful than code here...)


Ah! Sorry, but I'm just playing around locally on my home computer. I
haven't gotten as far as actually putting it on-line. I probably won't
go that far...feels like php is the right way to go.
Perhaps keeping my bibliography entries in
a flat file and letting php loop through it might be a better idea...

Yes, you could also change your own xml to (x)html in process.


Another reason to go the php route... Thank you all for your help! :)

Ray

Sep 19 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Sarah Haskins | last post by:
I have a few questions about this problem I'm having involving XML, DTD, and XSL. I'm working with this DTD which defines a stylesheet, as such... <?xml version="1.0" encoding="UTF-8"?>...
1
by: Steven An | last post by:
I'm gonna describe the situation I'm dealing with..but if you're not interested, just skip to the last line where I bluntly ask my question :) Here's my scenario: I've got a huge website that...
5
by: David Trimboli | last post by:
I'm writing HTML 4.01 and CSS 2 pages that include a CSS-driven pop-up menu. What I'm trying to do is create a screen style that uses the menu, links, etc. normally, and a print style that removes...
7
by: pintihar | last post by:
Hi, As a follow on from an earlier post I have another question about xslt. Is it possible to create the stylsheet programatically? Is this sensible? In the first phase I needed to map element...
0
by: barney.b | last post by:
Hi, I'm trying to pre-process an XSL stylesheet with another stylesheet, before using the result to transform an XML document. i.e.: stylesheet(xsl) --> preprocessor(xsl) --> temp(xsl)...
3
by: gdelfino | last post by:
I have an XML file which I transform into XHTML using stylesheetA.xsl. I also have stylesheetB.xsl which transforms my XML file into an Excel XML document. As both Excel and most new browsers...
2
by: mito19651996 | last post by:
Hello, I need to write a program that creates a bibliography from a text file indicating where words were in line #. I need to use the file I/O functions. Thanks Mito
1
by: ed.taekema | last post by:
To celebrate jython's recent progress I've updated my Jython Bibliography to include new resources I've tripped over in the last little while. Its available here: ...
1
by: Dave Rado | last post by:
Hi A while ago I discovered a way of creating css pseudo-frames, that offer users the important benefits of real frames (i.e. the navigation remains visible when you scroll down the page), but...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.