From per at bothner.com Tue Feb 1 17:47:33 2005
From: per at bothner.com (Per Bothner)
Date: Tue, 01 Feb 2005 09:47:33 -0800
Subject: [docbook-css] better biblioentry styling
Message-ID: <41FFC0B5.3070703@bothner.com>
This is a multi-part message in MIME format.
--------------070404070309090508080308
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Attached a patch to tweak biblioentry/abbrev and biblioentry/title.
Punctuation is still missing, but fixing that is probably not
practical with css. I should probably use bibliomixed.
It might be worth considering displaying:
as:
[entry]
but that would be weird for other xrefs.
One solution might be to use a role attribute:
Of course it would be nice to make the xref a clickable
link to the biblioentry; I haven't tried the patch you
patched to the mailing list (which I'm not subscribed to).
The patch and discussion above should probably apply to
bibliomixed as well as biblioentry, but I haven't tried
using bibliomixed yet.
--
--Per Bothner
per@bothner.com http://per.bothner.com/
--------------070404070309090508080308
Content-Type: text/plain;
name="styles.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="styles.patch"
--- styles.css~ 2004-11-22 04:11:27.000000000 -0800
+++ styles.css 2005-02-01 09:18:07.908173315 -0800
@@ -101,8 +101,10 @@
margin-left:10%;
}
-biblioentry > title {
+biblioentry>title {
display: inline;
+ font-style: italic;
+ font-weight: normal;
}
/* Give vertical spacing between compoments of the document */
@@ -344,6 +346,13 @@
content: "]";
}
+biblioentry>abbrev:before {
+ content: "[";
+}
+biblioentry>abbrev:after {
+ content: "]";
+}
+
xref:after {
/* simple symbol - content: "#" attr(linkend);*/
/* 'section' symbol */
--------------070404070309090508080308--
From dave at badgers-in-foil.co.uk Wed Feb 2 02:40:29 2005
From: dave at badgers-in-foil.co.uk (David Holroyd)
Date: Wed, 2 Feb 2005 02:40:29 +0000
Subject: [docbook-css] better biblioentry styling
In-Reply-To: <41FFC0B5.3070703@bothner.com>
References: <41FFC0B5.3070703@bothner.com>
Message-ID: <20050202024029.GA15693@vhost.badgers-in-foil.co.uk>
Hi there,
On Tue, Feb 01, 2005 at 09:47:33AM -0800, Per Bothner wrote:
> Attached a patch to tweak biblioentry/abbrev and biblioentry/title.
> Punctuation is still missing, but fixing that is probably not
> practical with css. I should probably use bibliomixed.
I'm not particularly familiar with the punctuation expected within
bibliographies, so I've just been looking at the results of db2pdf on
this example:
http://docbook.sourceforge.net/testdocs/bibliography.001.xml
I've previously played around with tricks like the following to generate
punctuation between items using CSS2:
authorgroup > author+author:before {
content: ", ";
}
The problem with that is that whitespace between elements will set apart
an item from its trailing comma. For example, with the above CSS, this:
Alfred Aho
Ravi Sethi
gives:
Alfred Aho , Ravi Sethi
I've just had a go at using shiny new CSS3 syntax, we can do a lot
better now -- putting the comma after elements, rather than
before them:
authorgroup > author:not(:last-child):after {
content: ", ";
}
gives, for the same example XML:
Alfred Aho, Ravi Sethi
Much better, as long as one has a recent Gecko browser.
> It might be worth considering displaying:
>
> as:
> [entry]
> but that would be weird for other xrefs.
> One solution might be to use a role attribute:
>
I didn't manage to reconcile content generated by the CSS with content
generated by XUL (they both ended up appearing), so I just reduced the
content CSS generates for down to a 'section symbol'.
Changing presentation based on a role attribute could be implemented in
a customisation layer. Making one should be as simple as:
----8<----
@import "docbook-css-0.4/driver.css"
xref[role=citation]:before {
content: "[";
}
xref[role=citation]:after {
content: "]";
}
---->8----
(I'm presuming this use of role is not already widespread?)
> Of course it would be nice to make the xref a clickable
> link to the biblioentry; I haven't tried the patch you
> patched to the mailing list (which I'm not subscribed to).
Iy you want to try it, the clickability of s works well;
generating content based on the referenced element does not.
> biblioentry > title {
> display: inline;
> + font-style: italic;
> + font-weight: normal;
> }
I've done this, for both and , and also
changed the selector from 'parent' to just 'ancestor' to catch
within a too:
biblioentry title, bibliomixed title {
display: inline;
font-style: italic;
font-weight: inherit;
}
> +biblioentry>abbrev:before {
> + content: "[";
> +}
> +biblioentry>abbrev:after {
> + content: "]";
> +}
I've added that in.
Also, to try and match the presentaion in the PDF I'm looking at, I
added the following:
biblioentry, bibliomixed {
text-indent: -2em;
}
biblioentry > *+*, bibliomixed > *+* {
text-indent: 0;
}
Bibliographies still need a lot more work though (as do many other areas
of the stylesheet).
Thanks for your suggestions! I'm quite tired, so I hope that was
coherent.
dave
--
http://david.holroyd.me.uk/
From dave at badgers-in-foil.co.uk Thu Feb 3 00:45:56 2005
From: dave at badgers-in-foil.co.uk (David Holroyd)
Date: Thu, 3 Feb 2005 00:45:56 +0000
Subject: [docbook-css] New core.css
Message-ID: <20050203004556.GA3455@vhost.badgers-in-foil.co.uk>
--NzB8fVQJ5HfG6fxh
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
I attach an updated version of the file 'core.css' that will be included
in the next DocBook-CSS release. This version is generated from a more
recent version of 'DocBook: The Definative Guide'. I've now gone to the
effort to ensure that it includes a CSS 'display' specification for
every element (fingers crossed).
I've also change the format of the file so that each element is listed
on a seperate line, as this makes for easier revision control.
dave
--
http://david.holroyd.me.uk/
--NzB8fVQJ5HfG6fxh
Content-Type: text/css; charset=us-ascii
Content-Disposition: attachment; filename="core.css"
/*
* core.css
*
* Copyright (c) 2004 David Holroyd, and contributors
* See the file 'COPYING' for terms of use
*
* Part of the Docbook-CSS stylesheet
* http://www.badgers-in-foil.co.uk/projects/docbook-css/
*/
/* Generated 2005-01-23 */
abbrev,
accel,
acronym,
action,
application,
artpagenums,
authorinitials,
bibliocoverage,
biblioid,
bibliomisc,
bibliomset,
bibliorelation,
biblioset,
bibliosource,
citation,
citebiblioid,
citerefentry,
citetitle,
city,
classname,
co,
command,
computeroutput,
constant,
coref,
country,
database,
date,
email,
emphasis,
envar,
errorcode,
errorname,
errortext,
errortype,
exceptionname,
fax,
filename,
firstname,
firstterm,
funcdef,
funcparams,
function,
group,
guibutton,
guiicon,
guilabel,
guimenu,
guimenuitem,
guisubmenu,
hardware,
honorific,
imagedata,
initializer,
inlineequation,
inlinegraphic,
inlinemediaobject,
interface,
interfacename,
invpartnumber,
isbn,
issn,
keycap,
keycode,
keycombo,
keysym,
lineage,
lineannotation,
link,
literal,
markup,
medialabel,
member,
menuchoice,
methodname,
methodparam,
modifier,
mousebutton,
olink,
ooclass,
ooexception,
oointerface,
option,
optional,
orgdiv,
orgname,
otheraddr,
othername,
pagenums,
paramdef,
parameter,
phone,
phrase,
pob,
postcode,
productname,
productnumber,
prompt,
property,
pubdate,
pubsnumber,
quote,
refpurpose,
replaceable,
returnvalue,
revnumber,
seriesvolnums,
sgmltag,
shortcut,
state,
street,
structfield,
structname,
subscript,
superscript,
surname,
symbol,
systemitem,
token,
trademark,
type,
ulink,
userinput,
varname,
volumenum,
wordasword,
year {
display:inline;
}
abstract,
ackno,
address,
answer,
appendix,
article,
attribution,
authorblurb,
bibliodiv,
biblioentry,
bibliography,
bibliomixed,
blockquote,
book,
callout,
calloutlist,
caption,
caution,
chapter,
cmdsynopsis,
colophon,
constraintdef,
dedication,
epigraph,
equation,
example,
figure,
formalpara,
glossary,
glossdef,
glossdiv,
glossentry,
glosslist,
graphic,
graphicco,
highlights,
imageobjectco,
important,
index,
indexdiv,
indexentry,
informalequation,
informalexample,
informalfigure,
informaltable,
itemizedlist,
legalnotice,
listitem,
lot,
lotentry,
mediaobject,
mediaobjectco,
msg,
msgentry,
msgexplan,
msgmain,
msgset,
note,
orderedlist,
para,
part,
partintro,
personblurb,
preface,
primaryie,
printhistory,
procedure,
productionset,
programlistingco,
qandadiv,
qandaentry,
qandaset,
question,
refentry,
refentrytitle,
reference,
refnamediv,
refsect1,
refsect2,
refsect3,
refsection,
refsynopsisdiv,
screenco,
screenshot,
secondaryie,
sect2,
sect3,
sect4,
sect5,
section,
seealsoie,
seeie,
set,
setindex,
sidebar,
simpara,
simplemsgentry,
simplesect,
step,
substeps,
subtitle,
synopfragment,
synopfragmentref,
table,
term,
tertiaryie,
tip,
title,
toc,
tocback,
tocchap,
tocentry,
tocfront,
toclevel1,
toclevel2,
toclevel3,
toclevel4,
toclevel5,
tocpart,
variablelist,
varlistentry,
warning,
sect1 {
display:block;
}
appendixinfo,
area,
areaset,
areaspec,
articleinfo,
bibliographyinfo,
blockinfo,
bookinfo,
chapterinfo,
colspec,
glossaryinfo,
indexinfo,
indexterm,
itermset,
modespec,
objectinfo,
partinfo,
prefaceinfo,
primary,
refentryinfo,
referenceinfo,
refmeta,
refsect1info,
refsect2info,
refsect3info,
refsectioninfo,
refsynopsisdivinfo,
revhistory,
screeninfo,
secondary,
sect1info,
sect2info,
sect3info,
sect4info,
sect5info,
sectioninfo,
see,
seealso,
setindexinfo,
setinfo,
sidebarinfo,
spanspec,
tertiary,
titleabbrev {
display:none;
}
classsynopsisinfo,
funcsynopsisinfo,
literallayout,
programlisting,
screen,
synopsis {
white-space:pre;
font-family:monospace;
display:block;
}
--NzB8fVQJ5HfG6fxh--
From per at bothner.com Thu Feb 3 05:46:25 2005
From: per at bothner.com (Per Bothner)
Date: Wed, 02 Feb 2005 21:46:25 -0800
Subject: [docbook-css] better biblioentry styling
In-Reply-To: <20050202024029.GA15693@vhost.badgers-in-foil.co.uk>
References: <41FFC0B5.3070703@bothner.com> <20050202024029.GA15693@vhost.badgers-in-foil.co.uk>
Message-ID: <4201BAB1.4030703@bothner.com>
David Holroyd wrote:
> Changing presentation based on a role attribute could be implemented in
> a customisation layer. Making one should be as simple as:
>
> ----8<----
> @import "docbook-css-0.4/driver.css"
>
> xref[role=citation]:before {
> content: "[";
> }
> xref[role=citation]:after {
> content: "]";
> }
> ---->8----
>
> (I'm presuming this use of role is not already widespread?)
Not as far as I know. It seems a reasonable convention,
but it would be nice to (semi-)standardize it.
> Bibliographies still need a lot more work though (as do many other areas
> of the stylesheet).
Yes. I don't see it worth tremendous effort, since for real
persentation I use the docbook-xsl stylesheets. The most
important use I think is it might allow (near-)wysiwyg-editing
of docbook using an xml/html editor.
This is the document I'm currently working on:
http://www.gnu.org/software/kawa/internals.xml (source - now
directly viewable using stdocbook-css!)
http://www.gnu.org/software/kawa/internals.html (generated
using docbook-xsl)
[I'm actually working a web-site redesign, but that's not
up yet.]
--
--Per Bothner
per@bothner.com http://per.bothner.com/