svn commit: samba-docs r636 - in trunk: . smbdotconf xslt xslt/latex

jelmer at samba.org jelmer at samba.org
Mon Jun 13 20:25:32 GMT 2005


Author: jelmer
Date: 2005-06-13 20:25:32 +0000 (Mon, 13 Jun 2005)
New Revision: 636

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba-docs&rev=636

Log:
Fix image quality

Modified:
   trunk/Makefile
   trunk/smbdotconf/generate-file-list.sh
   trunk/xslt/expand-sambadoc.xsl
   trunk/xslt/latex/sambadoc.cls


Changeset:
Modified: trunk/Makefile
===================================================================
--- trunk/Makefile	2005-06-13 19:06:20 UTC (rev 635)
+++ trunk/Makefile	2005-06-13 20:25:32 UTC (rev 636)
@@ -75,7 +75,7 @@
 #
 $(DOCBOOKDIR)/%.xml: %/index.xml xslt/expand-sambadoc.xsl
 	mkdir -p $(@D)
-	$(XSLTPROC) --stringparam noreference 1 --xinclude --output $@ xslt/expand-sambadoc.xsl $<
+	$(XSLTPROC) --stringparam latex.imagebasedir "$*/" --stringparam noreference 1 --xinclude --output $@ xslt/expand-sambadoc.xsl $<
 
 $(DOCBOOKDIR)/manpages-3/%.xml: $(MANPAGEDIR3)/%.xml xslt/expand-sambadoc.xsl
 	mkdir -p $(@D)
@@ -140,9 +140,11 @@
 		--stringparam txtbasedir "$(TXTDIR)/$*/" \
 		--stringparam target "$*" \
 		-o $@ xslt/generate-dependencies.xsl $<
-	@echo "$*-images-latex-png: \$$(addsuffix .png, \$$($*-images-latex))" >> $@
-	@echo >> $@
+	@echo "$*-images-latex-dia = \$$(wildcard \$$(addsuffix .dia, \$$($*-images-latex)))" >> $@
 	@echo "$*-images-latex-eps: \$$(addsuffix .eps, \$$($*-images-latex))" >> $@
+	@echo "$*-images-latex-pdf: \$$(patsubst %.dia, %.pdf, \$$($*-images-latex-dia))" >> $@
+	@echo "$*-images-latex-png: \$$(filter-out \$$(patsubst %.dia,%.png,\$$($*-images-latex-dia)), \$$(addsuffix .png, \$$($*-images-latex)))" >> $@
+
 	@echo >> $@
 	@echo "\$$(HTMLDIR)/%: $*/%" >> $@
 	@echo "	mkdir -p \$$(@D)" >> $@
@@ -167,7 +169,7 @@
 endif
 
 # Adobe PDF files
-%.pdf: %.tex %.ind latexfigures %-images-latex-png
+%.pdf: %.tex %.ind latexfigures %-images-latex-png %-images-latex-pdf
 	-$(PDFLATEX) $<
 	$(THUMBPDF) --quiet $*.pdf
 	-$(PDFLATEX) $<
@@ -180,9 +182,12 @@
 %.dvi: %.tex %.idx %-images-latex-eps
 	-$(LATEX) $< 
 
-%.png: %.dia
-	$(DIA) -e $@ $<
+%.eps: %.dia
+	$(DIA) -t eps-builtin -e $@ $<
 
+%.pdf: %.eps
+	$(EPSTOPDF) $<
+
 %.eps: %.png
 	$(PNGTOPNM) $< | $(PNMTOPS) > $@
 
@@ -191,9 +196,6 @@
 	mkdir -p $(@D)
 	$(DVIPS) -o $@ $<
 
-xslt/figures/%.pdf: xslt/figures/%.eps
-	$(EPSTOPDF) $<
-
 # Fo
 $(FODIR)/%.fo: $(DOCBOOKDIR)/%.xml
 	mkdir -p $(@D)
@@ -289,6 +291,9 @@
 
 clean: 
 	rm -rf $(OUTPUTDIR)/* $(DOCBOOKDIR)
+	rm -f $(patsubst %.dia,%.png,$(foreach DOC,$(MAIN_DOCS),$($(DOC)-images-latex-dia))) \
+			$(patsubst %.dia,%.pdf,$(foreach DOC,$(MAIN_DOCS),$($(DOC)-images-latex-dia))) \
+			$(patsubst %.dia,%.eps,$(foreach DOC,$(MAIN_DOCS),$($(DOC)-images-latex-dia)))
 	rm -f *.xml *.d *.tpt *.tex *.loc *.toc *.lof *.glo *.idx *.aux
 	rm -f *-images-html*
 	rm -f *-images-latex-* latexfigures

Modified: trunk/smbdotconf/generate-file-list.sh
===================================================================
--- trunk/smbdotconf/generate-file-list.sh	2005-06-13 19:06:20 UTC (rev 635)
+++ trunk/smbdotconf/generate-file-list.sh	2005-06-13 20:25:32 UTC (rev 636)
@@ -9,7 +9,7 @@
 cd $DIR
 
 echo "<variablelist xmlns:xi=\"http://www.w3.org/2003/XInclude\">"
-for I in `find -mindepth 2 . -type f -name '*.xml' | sort -t/ -k3 | xargs`
+for I in `find . -mindepth 2 -type f -name '*.xml' | sort -t/ -k3 | xargs`
 do 
 	echo "<xi:include href='$I' parse='xml'/>"
 done

Modified: trunk/xslt/expand-sambadoc.xsl
===================================================================
--- trunk/xslt/expand-sambadoc.xsl	2005-06-13 19:06:20 UTC (rev 635)
+++ trunk/xslt/expand-sambadoc.xsl	2005-06-13 20:25:32 UTC (rev 636)
@@ -149,6 +149,14 @@
 					<xsl:attribute name="scalefit"><xsl:text>1</xsl:text></xsl:attribute>
 				</xsl:element>
 			</xsl:element>
+			<xsl:element name="imageobject">
+				<xsl:attribute name="role"><xsl:text>latex</xsl:text></xsl:attribute>
+				<xsl:element name="imagedata">
+					<xsl:attribute name="fileref">
+						<xsl:value-of select="$latex.imagebasedir"/><xsl:text>images/</xsl:text><xsl:value-of select="text()"/></xsl:attribute>
+				</xsl:element>
+			</xsl:element>
+
 		</xsl:element>
 	</xsl:template>
 </xsl:stylesheet>

Modified: trunk/xslt/latex/sambadoc.cls
===================================================================
--- trunk/xslt/latex/sambadoc.cls	2005-06-13 19:06:20 UTC (rev 635)
+++ trunk/xslt/latex/sambadoc.cls	2005-06-13 20:25:32 UTC (rev 636)
@@ -18,14 +18,12 @@
 %================================================================================
 % 1. Page layout dimensions
 % 3. Define new fonts for headings
-% 4. Define LaTeX logos (usually not needed)
-% 5. Redefines the way "figure" amd "table" are formated in a \caption
-% 6. Defines a \capt macro which defines (1) \captwidth, (2) \captsize
+% 4. Redefines the way "figure" amd "table" are formated in a \caption
+% 5. Defines a \capt macro which defines (1) \captwidth, (2) \captsize
 %    and \beforetableskip.
-% 7. New Environemnts:  Eqnarray, reflist, exerlist
-% 8. Defines and modifies FANCYHDS.STY for headers and foots
-% 9. Change sectioning headings to bold sans serif fonts
-%10. Turn off leader dots in Table of Contents
+% 6. Defines and modifies FANCYHDS.STY for headers and foots
+% 7. Change sectioning headings to bold sans serif fonts
+% 8. Turn off leader dots in Table of Contents
 %======================================================================
 
 %====================== Page Layout
@@ -115,43 +113,6 @@
 \def\theequation{\thechapter.\arabic{equation}}
 \@addtoreset{equation}{chapter}
 
-
-%===================== New Environments
-
-%------ Reference List Macro
-\newenvironment{reflist}{\begin{list}{}{\leftmargin 1em \labelwidth 0in
-\labelsep 0in \itemsep 0ex  \rightmargin 0in}}{\end{list}}
-\newcommand{\refitem}{\item \hspace*{-1em}}   %--- item for ref list
-\newcommand{\SC}{\scriptsize}  %--- small capitals for reference lists
-
-
-%------ New environment for better spacing in Eqnarray
-\def\eqnarray{%
-   \stepcounter{equation}%
-   \def\@currentlabel{\p at equation\theequation}%
-   \global\@eqnswtrue
-   \m at th
-   \global\@eqcnt\z@
-   \tabskip\@centering
-   \let\\\@eqncr
-   $$\everycr{}\halign to\displaywidth\bgroup
-       \hskip\@centering$\displaystyle\tabskip\z at skip{##}$\@eqnsel
-      &\global\@eqcnt\@ne\hskip \arraycolsep \hfil${##}$\hfil
-      &\global\@eqcnt\tw@ \hskip \arraycolsep
-         $\displaystyle{##}$\hfil\tabskip\@centering
-      &\global\@eqcnt\thr@@ \hb at xt@\z@\bgroup\hss##\egroup
-         \tabskip\z at skip
-      \cr
-}
-
-% The hangitem environment -- like description, but text lines up with 
-%    the item descriptor.  You give an additional argument containing text
-%    of the width that you want indentations.
-%
-\def\hangitem#1{\list{}{\settowidth\labelwidth{#1}
-        \leftmargin\labelwidth\advance\leftmargin\labelsep }}
-\let\endhangitem\endlist
-
 \RequirePackage{fancyhdr}
 
 %------------------- Modify Headers for Prentice-Hall Book Style
@@ -184,8 +145,6 @@
 \def\chaptersmark#1{\markboth{#1}{#1}}
 
 
-
-
 %===================== Change Section Heads to Bold Sans Serif
 % Create bolds sans serif sectioning headings.  Also the headings have
 % been reduced in size with less space before and after the heading.
@@ -380,5 +339,3 @@
 \renewcommand{\textfraction}{0.1}
 \renewcommand{\topfraction}{1.0}
 \renewcommand{\bottomfraction}{1.0}
-
-%



More information about the samba-cvs mailing list