Skip to content

Commit 03a2fe7

Browse files
committedMay 15, 2011
Added fancy pdf generation from t2t docs
1 parent 27e3a8f commit 03a2fe7

File tree

7 files changed

+77
-9
lines changed

7 files changed

+77
-9
lines changed
 

‎.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,7 @@ ms-windows/untgz/
3030
scripts/astyle.exe
3131
# vim temporary files
3232
.*.swp
33+
*.aux
34+
*.out
35+
*.tex
36+
*.toc

‎cmake/Txt2Tags.cmake

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,14 @@ MACRO(ADD_TXT2TAGS_FILES _sources)
4646
COMMENT "Building ${_out}.html from ${_in}"
4747
)
4848

49+
ADD_CUSTOM_COMMAND(
50+
OUTPUT ${_out}.tex
51+
COMMAND ${TXT2TAGS_EXECUTABLE}
52+
ARGS -o${_out}.tex -t tex ${_in}
53+
DEPENDS ${_in}
54+
COMMENT "Building ${_out}.tex from ${_in}"
55+
)
56+
4957
SET(${_sources} ${${_sources}} ${_out} ${_out}.html)
5058
ENDFOREACH (_current_FILE)
5159
ENDMACRO(ADD_TXT2TAGS_FILES)

‎doc/CODING.t2t

Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,37 @@ Developers guide for QGIS
1212
%! PostProc(txt): '(?i)(\t)' ' '
1313
%! encoding: iso-8859-1
1414

15+
%
16+
% Tex processing
17+
%
18+
% Make sure this is first
19+
%! PostProc(tex): '\\includegraphics' '\\includegraphics[width=100mm]'
20+
% scartcl is from the koma script document class (apt-get install texlive-latex-recommended ttf-komatuna)
21+
% setlength parindent suppresses first line of paragraph idents
22+
% parskip puts blank space between paragraphs
23+
% title pic stuff used to put a logo on the front page
24+
%! PostProc(tex): '\\documentclass{article}' '\\documentclass{scrartcl}\n\\setlength{\\parindent}{0pt}\n\\setlength{\\parskip}{2ex}'
25+
% use the color table and table packages so we can pimp the tables a little
26+
%! PostProc(tex): '\\usepackage{style.css} % user defined' '\\usepackage{fancyvrb}\n\\usepackage{colortbl} \n\\usepackage [table]{xcolor}\n\\definecolor{tableShade}{HTML}{cecece}\n\\definecolor{qgis-green}{HTML}{0E7300}\n\\usepackage{wallpaper}\n\\LRCornerWallPaper{1}{WALLPAPER-IMAGE}\n\\usepackage{hyperref}\n\\hypersetup{linkcolor=qgis-green,urlcolor=qgis-green}\\renewcommand\\thesection{\\color{qgis-green}\\thechapter\\arabic{section}}'
27+
% Make the header row of tables have a dark background. light text
28+
%! PostProc(tex): '\\hline \\textbf' '\\hline \\rowcolor[rgb]{0,0,0} \\color{white} \\textbf'
29+
%! PostProc(tex): '& \\textbf' '& \\color{white} \\textbf'
30+
% Make verbatim text a little smaller and use fancyvrb package to draw it in a box
31+
% Note Verbatim with capital V for fancyvrb to work
32+
%! PostProc(tex): '\\begin{verbatim}' '{\\scriptsize\\begin{Verbatim}[frame=single,rulecolor=\\color{qgis-green}, framesep=4mm, label=\\fbox{\\small\\emph{Listing}}]'
33+
%! PostProc(tex): '\\end{verbatim}' '\\end{Verbatim}\n}'
34+
%! PostProc(tex): '\\section' '\\newpage\\section'
35+
%! PostProc(tex): 'section{' 'section{\\color{qgis-green}'
36+
%! PostProc(tex): NEWPAGE '\\newpage'
37+
% Give alternating table rows different colours and use a smaller font in tables (\tiny)
38+
%! PostProc(tex): '\\begin{tabular}' '\\rowcolors{2}{tableShade}{white} \n\\tiny\\begin{tabular}'
39+
%! encoding: iso-8859-1
1540

41+
%! PostProc(tex): WALLPAPER-IMAGE 'qgis-footer.png'
1642
% These are comments and will not be generated in any output
1743
% -------------------
1844

19-
%This document is in text2tags format. You can generate html, plain text and
45+
%This document is in txt2tags format. You can generate html, plain text and
2046
%moinmoin formatted documentation by running txt2tags on this document. See the
2147
%txt2tags home page for more details. Please insert manual line breaks in this
2248
%document as it makes diffing for changes much easier. To do this in vim
@@ -26,12 +52,13 @@ Developers guide for QGIS
2652

2753
% To generate the text version of this document:
2854
% txt2tags -t txt -o CODING CODING.t2t
29-
% To generate the moinmoin version of this document:
30-
% txt2tags -t moin -o CODING.moin CODING.t2t
55+
% To generate the mediawiki version of this document:
56+
% txt2tags -t wiki --no-enum-title -o CODING.wiki CODING.t2t
3157
% To generate the html version of this document:
3258
% txt2tags -t html -o CODING.html CODING.t2t
3359
% To generate the LaTeX version of this document:
34-
% txt2tags -t tex -o CODING.tex CODING.t2t
60+
% txt2tags -t tex -o CODING.tex CODING.t2t; pdflatex CODING.tex
61+
3562
%
3663
% End of comments
3764
% -------------------

‎doc/INSTALL.t2t

Lines changed: 31 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
Quantum GIS (QGIS)
2-
32
Building QGIS from source - step by step
4-
3+
%%date(%A %B %d, %Y)
54

65
%! target : html
76
%! style : style.css
@@ -12,6 +11,33 @@ Building QGIS from source - step by step
1211
% Next line will replace tabs with 2 spaces in txt generated outputs
1312
%! PostProc(txt): '(?i)(\t)' ' '
1413
%! encoding: iso-8859-1
14+
%
15+
% Tex processing
16+
%
17+
% Make sure this is first
18+
%! PostProc(tex): '\\includegraphics' '\\includegraphics[width=100mm]'
19+
% scartcl is from the koma script document class (apt-get install texlive-latex-recommended ttf-komatuna)
20+
% setlength parindent suppresses first line of paragraph idents
21+
% parskip puts blank space between paragraphs
22+
% title pic stuff used to put a logo on the front page
23+
%! PostProc(tex): '\\documentclass{article}' '\\documentclass{scrartcl}\n\\setlength{\\parindent}{0pt}\n\\setlength{\\parskip}{2ex}'
24+
% use the color table and table packages so we can pimp the tables a little
25+
%! PostProc(tex): '\\usepackage{style.css} % user defined' '\\usepackage{fancyvrb}\n\\usepackage{colortbl} \n\\usepackage [table]{xcolor}\n\\definecolor{tableShade}{HTML}{cecece}\n\\definecolor{qgis-green}{HTML}{0E7300}\n\\usepackage{wallpaper}\n\\LRCornerWallPaper{1}{WALLPAPER-IMAGE}\n\\usepackage{hyperref}\n\\hypersetup{linkcolor=qgis-green,urlcolor=qgis-green}\\renewcommand\\thesection{\\color{qgis-green}\\thechapter\\arabic{section}}'
26+
% Make the header row of tables have a dark background. light text
27+
%! PostProc(tex): '\\hline \\textbf' '\\hline \\rowcolor[rgb]{0,0,0} \\color{white} \\textbf'
28+
%! PostProc(tex): '& \\textbf' '& \\color{white} \\textbf'
29+
% Make verbatim text a little smaller and use fancyvrb package to draw it in a box
30+
% Note Verbatim with capital V for fancyvrb to work
31+
%! PostProc(tex): '\\begin{verbatim}' '{\\scriptsize\\begin{Verbatim}[frame=single,rulecolor=\\color{qgis-green}, framesep=4mm, label=\\fbox{\\small\\emph{Listing}}]'
32+
%! PostProc(tex): '\\end{verbatim}' '\\end{Verbatim}\n}'
33+
%! PostProc(tex): '\\section' '\\newpage\\section'
34+
%! PostProc(tex): 'section{' 'section{\\color{qgis-green}'
35+
%! PostProc(tex): NEWPAGE '\\newpage'
36+
% Give alternating table rows different colours and use a smaller font in tables (\tiny)
37+
%! PostProc(tex): '\\begin{tabular}' '\\rowcolors{2}{tableShade}{white} \n\\tiny\\begin{tabular}'
38+
%! encoding: iso-8859-1
39+
40+
%! PostProc(tex): WALLPAPER-IMAGE 'qgis-footer.png'
1541
% These are comments and will not be generated in any output
1642
% -------------------
1743

@@ -30,13 +56,13 @@ Building QGIS from source - step by step
3056
% To generate the html version of this document:
3157
% txt2tags -t html -o INSTALL.html INSTALL.t2t
3258
% To generate the LaTeX version of this document:
33-
% txt2tags -t tex -o INSTALL.tex INSTALL.t2t
59+
% txt2tags -t tex -o INSTALL.tex INSTALL.t2t; pdflatex INSTALL.tex
3460

3561
% End of comments
3662
% -------------------
3763

38-
Last update: %%date
39-
Last change: %%mtime
64+
Last Updated: %%date(%A %B %d, %Y)
65+
Last Change : %%mtime(%A %B %d, %Y)
4066

4167
%%toc
4268

‎doc/iauthors.t2t

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,6 @@ The following people have contributed to this document:
2626
- GNU/Linux Section
2727
- Tim Sutton 2006
2828
- Debian package section: Juergen Fischer 2008
29+
30+
- Latex Generator
31+
- Tim Sutton 2011

‎doc/qgis-footer.png

109 KB
Loading

‎doc/qgis-footer.xcf

308 KB
Binary file not shown.

0 commit comments

Comments
 (0)
Please sign in to comment.