[Dspace-tech] Manakin Theme - Heading Font Sizes (XSL)

22 views
Skip to first unread message

Patrick Etienne

unread,
Aug 25, 2015, 1:37:07 PM8/25/15
to dspace-...@lists.sourceforge.net, dspace-tech
DSpace Users,

I'm attempting to modify font sizes for the page headings (ie - <h1/> tags etc). There is a utility programmed into the structural.xsl stylesheet which purports to build these tags at appropriate sizes based on content (see template). 

(code from DSpace 1.5.2)
    <xsl:template match="dri:div/dri:head" priority="3">
        <xsl:variable name="head_count" select="count(ancestor::dri:div)"/>
        <!-- with the help of the font-sizing variable, the font-size of our header text is made continuously variable based on the character count -->
        <xsl:variable name="font-sizing" select="365 - $head_count * 80 - string-length(current())"></xsl:variable>
        <xsl:element name="h{$head_count}">
            <!-- in case the chosen size is less than 120%, don't let it go below. Shrinking stops at 120% -->
            <xsl:choose>
                <xsl:when test="$font-sizing &lt; 120">
                    <xsl:attribute name="style">font-size: 120%;</xsl:attribute>
                </xsl:when>
                <xsl:otherwise>
                    <xsl:attribute name="style">font-size: <xsl:value-of select="$font-sizing"/>%;</xsl:attribute>
                </xsl:otherwise>
            </xsl:choose>
            <xsl:call-template name="standardAttributes">
                <xsl:with-param name="class">ds-div-head</xsl:with-param>
            </xsl:call-template>            
            <xsl:apply-templates />
        </xsl:element>
    </xsl:template>

The problem I'm having is that regardless of edits I do to this template, the font sizes always come out to 252%. The mystifying part is that the resulting html tags contain a "ds-div-head" class and looking this class up in the xsl yields only one result. Specifically the reference contained in the above template. My question is, if the above template is the only source for a ds-div-head class, and the template is commented out altogether, but the style still comes out as a font-size of 252%, from where is this styling directive coming? Or if I've somehow missed the actual source of the 252% font-sizing, where else might it be coming from?

 - Patrick E.

---
Patrick K. Étienne
Systems Analyst
Library and Information Center
Georgia Institute of Technology

"Mediocre Writers BorrowGreat Writers Steal" - T.S. Eliot

Teresa Burón

unread,
Aug 25, 2015, 1:37:13 PM8/25/15
to dspac...@lists.sourceforge.net
Hi Patrick,

Font sizes are also defined in the style.css file. I've also had a problem with the font sizes because there was some "span" labels which didn't close properly.
------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
DSpace-tech mailing list
DSpac...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech

Teresa Burón Álvarez

Servicio de Informática y Comunicaciones
Universidad de León
Correo-e.: teresa...@unileon.es
Tel.: +34 987291901
Fax.: +34 987291158
CRAI-TIC, segunda planta
Campus de Vegazana, S/N
24071 - León

Patrick Etienne

unread,
Aug 25, 2015, 1:37:18 PM8/25/15
to dspace-...@lists.sourceforge.net, dspace-tech
Many Thanks for the references!

 - Patrick E.
---
Patrick K. Étienne
Systems Analyst
Library and Information Center
Georgia Institute of Technology

"Mediocre Writers BorrowGreat Writers Steal" - T.S. Eliot

On Mar 9, 2010, at 1:29 AM, Hilton Gibson wrote:

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________

Arunendra M. Biswas

unread,
Jun 12, 2019, 8:54:56 AM6/12/19
to DSpace Technical Support
I have checked style.css in DSpace 5.9, but there is only color section for h1,h2,h3,h4,h5 headings. Is there no way to explicitly fix the size of the heading?
Reply all
Reply to author
Forward
0 new messages