Documentation Tools

Changeset 185


Ignore:
Timestamp:
06/16/07 03:05:36 (5 years ago)
Author:
kate
Message:

More implementation of tags and a little cleanup. The WPI-specific customisations (so far just the colours) are sketched in place; more to follow later, but this is enough of a start to show how things work.

Location:
trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/Mk/docbook.mk

    r182 r185  
    4242pdf: $(PDFDIR) $(PDFDIR)/$(SOURCE_TEX) 
    4343        # XXX texexec misbehaves unless we cd 
    44         cd $(PDFDIR) && TEXINPUTS=".:$(TEXDIR):$(TEXINPUTS):" $(TEXEXEC) --pdf $(SOURCE_TEX) 
     44        cd $(PDFDIR) && TEXINPUTS=".:$(TEXDIR):$(TEXINPUTS):" $(TEXEXEC) $(SOURCE_TEX) 
    4545 
    4646 
  • trunk/tex/article.tex

    r181 r185  
    99        [page=no] 
    1010 
     11\setuppagenumbering 
     12        [location=footer] 
    1113 
     14% Articles should be short enough (by definition) for numbering to be unneccessary 
     15\setuphead 
     16        [section] 
     17        [number=no] 
     18 
     19 
  • trunk/tex/common.tex

    r183 r185  
    2121% I don't know why it dosen't simply write "---" instead. 
    2222\def\textemdash{---} 
    23  
    24 % TODO for paper mode, make footnotes for the URLs 
    25 \def\WPIulink#1#2{% 
    26         \useURL[dummy][#1][][#2]\from[dummy]} 
    2723 
    2824% TODO only for screen output; it makes no sense to have this for 
     
    5046% closely to Docbook's concepts. 
    5147% 
     48 
     49% TODO for paper mode, make footnotes for the URLs 
     50% TODO should we use \define instead? 
     51% <nickr> although I'd put like an icon in the text to show it as a link 
     52% XXX is there any way we can permit hyphentation inside the hyperlink text? 
     53\def\WPIulink#1#2{% 
     54        \useURL[dummy][#1][][#2]\from[dummy]} 
     55 
     56% For <programlisting> 
     57% TODO how to have these setup by customisation? 
     58% TODO increase the line-height a bit 
     59% about 80% size by default 
     60%\setupframed[background=color,backgroundcolor=green,color=red] 
     61\definestartstop 
     62        [WPIprogramlisting] 
     63        [before=\startlines,style=\tenpoint\tt,after=\stoplines] 
     64 
     65% For <code> 
     66\definestartstop 
     67    [WPIcode] 
     68    [before=\bgroup\tt,after=\egroup] 
    5269 
    5370% For <cmdsynopsis> 
  • trunk/tex/docs.tex

    r182 r185  
    33% $Id$ 
    44 
     5 
     6% #323232 
     7\definecolor[WPIgrey][r=0.20, g=0.20, b=0.20] 
     8 
     9% #73BA25 
     10\definecolor[WPIgreen][r=0.45, g=0.72, b=0.14] 
     11 
     12% #67087B 
     13\definecolor[WPIpurple][r=0.40, g=0.03, b=0.48] 
     14 
     15% #1096CF 
     16\definecolor[WPIblue][r=0.06, g=0.59, b=0.81] 
     17 
     18 
    519% TODO big green things go here 
     20% These are intended to correspond to the WPI CSS for XHTML. 
    621 
     22% TODO for screen mode only: background-color: #fafafa; color #212121; 
     23 
     24% TODO footer: color: #C0C0C0; 
     25\setupinteraction 
     26        [color=WPIblue] 
     27 
     28 
     29% p extra line-height 
     30 
     31% body: font-family: "HelveticaNeue-Light", Verdana, "Lucida Grande", Lucida, Helvetica, Arial, sans-serif; 
     32 
     33% h1, h2, h3 font-family: "Trebuchet MS", Verdana, "Lucida Grande", Lucida, Helvetica, Arial, sans-serif; 
     34% h1, h2, h3, h4, h5, h6 font-weight: normal; 
     35 
     36\setuphead[title][color=WPIgrey] 
     37% font-size: 28pt; 
     38 
     39% font-size: 22pt 
     40\setuphead[chapter][color=WPIgreen] 
     41 
     42% h3 font-size: 16pt 
     43\setuphead[section][color=WPIgreen] 
     44 
     45% ul list-style-type: square; 
     46 
     47% tt color: WPIpurple 
     48% XXX should probably only set this if it's inside <para> 
     49%\def\CodeColour{\color[WPIpurple]} 
     50% XXX \setupbackgrounds[background=color,backgroundcolor=WPIgreen] 
     51\definestartstop 
     52        [WPIprogramlisting] 
     53        [before={\startlines,style=\tenpoint\tt\color[WPIpurple]},after=\stoplines] 
     54 
     55\definestartstop 
     56        [WPIcode] 
     57        [before={\bgroup\tt\color[WPIpurple]},after=\egroup] 
     58 
     59 
     60% pre background-color: #F6F6F6; 
     61% pre border: 1px solid #EFEFEF; 
     62 
     63% background-image: url(logo.png); 
     64 
     65 
     66 
  • trunk/xsl/texml/common.xsl

    r180 r185  
    3939        <xsl:template match="preface"/> <!-- TODO --> 
    4040        <xsl:template match="subtitle"/>        <!-- TODO --> 
     41        <xsl:template match="revhistory"/>      <!-- TODO --> 
     42        <xsl:template match="releaseinfo"/>     <!-- TODO --> 
    4143 
    4244        <!-- TODO common attribute: language to {\language[] }--> 
  • trunk/xsl/texml/common/code.xsl

    r180 r185  
    2020 
    2121        <xsl:template match="programlisting"> 
    22                 <!-- TODO define our own environments here, so they may be 
    23                         setup by customisation --> 
    24                 <!-- TODO we should increase the line-height a bit --> 
    25                 <group> 
    26                         <cmd name="tenpoint" gr="0"/>   <!-- about 80% size by default --> 
    27                         <cmd name="tt" gr="0"/> 
    28                         <env name="lines"> 
    29                         <!-- TODO we also need to preserve whitespace - what to use here? @ws seems to have no effect --> 
    30                                 <TeXML ws="1" emptylines="1"> 
    31                                         <xsl:apply-templates/>  <!-- TODO --> 
    32                                 </TeXML> 
    33                         </env> 
    34                 </group> 
     22                <env name="WPIprogramlisting"> 
     23                        <TeXML ws="1" emptylines="1"> 
     24                                <xsl:apply-templates/>  <!-- TODO --> 
     25                        </TeXML> 
     26                </env> 
    3527        </xsl:template> 
    3628 
     
    4032        </xsl:template> 
    4133 
    42         <xsl:template match="code|literal|envar"> 
    43                 <group> 
    44                         <cmd name="tt" gr="0"/> 
     34        <xsl:template match="code" name="code"> 
     35                <env name="WPIcode"> 
    4536                        <xsl:apply-templates/>  <!-- TODO --> 
    46                 </group> 
     37                </env> 
     38        </xsl:template> 
     39 
     40        <xsl:template match="methodsynopsis">   <!-- TODO --> 
     41                <xsl:apply-templates select="methodname"/> 
     42                <xsl:text>()</xsl:text> 
     43        </xsl:template> 
     44 
     45        <!-- 
     46                Semantic things with no special formatting 
     47        --> 
     48        <xsl:template match="varname|package|literal|envar|classname|methodname"> 
     49                <xsl:call-template name="code"/> 
    4750        </xsl:template> 
    4851 
    4952        <xsl:template match="parameter"/>       <!-- TODO --> 
    5053        <xsl:template match="type"/>    <!-- TODO --> 
    51         <xsl:template match="varname"/> <!-- TODO --> 
    5254        <xsl:template match="function"/>        <!-- TODO --> 
    5355        <xsl:template match="fix"/>     <!-- TODO --> 
    5456        <xsl:template match="constant"/>        <!-- TODO --> 
     57        <xsl:template match="computeroutput"/>  <!-- TODO --> 
     58        <xsl:template match="funcsynopsis"/>    <!-- TODO --> 
    5559 
    5660</xsl:stylesheet> 
  • trunk/xsl/texml/common/command.xsl

    r180 r185  
    1010        xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
    1111        xmlns="http://getfo.sourceforge.net/texml/ns1"> 
     12 
     13        <xsl:template match="application"> 
     14                <!-- TODO attributes --> 
     15                <xsl:apply-templates/>  <!-- TODO --> 
     16        </xsl:template> 
    1217 
    1318        <xsl:template match="command"> 
  • trunk/xsl/texml/common/figure.xsl

    r180 r185  
    1414        <xsl:template match="mediaobject"/>     <!-- TODO --> 
    1515 
     16        <xsl:template match="example"> 
     17                <!-- TODO --> 
     18                <cmd name="placefigure"> 
     19                        <xsl:apply-templates select="title"/> 
     20                        <parm> 
     21                                <xsl:apply-templates select="*[name() != 'title']"/> 
     22                        </parm> 
     23                </cmd> 
     24                <!-- XXX TeXML is confused by two <parm>s --> 
     25        </xsl:template> 
     26 
    1627</xsl:stylesheet> 
    1728 
Note: See TracChangeset for help on using the changeset viewer.