defs.yo (2396B)
1 COMMENT( 2 3 Local Yodl Macros 4 ================= 5 6 Here's a sample "local config" file that gets installed into 7 /usr/e/share/yodl. You can use this as an example to cook your 8 own. E.g., you'll want to a use different affiliation, mailto, and so 9 on. 10 11 Also, the shown latexlayoutcmds() probably won't be what you like to 12 see... Good luck! 13 -- [KK 2004-11-17] 14 15 ) 16 17 COMMENT(General document modifiers) 18 htmlstylesheet(http://www.e-tunity.com/css/yodl.css) 19 affiliation(e-tunity) 20 mailto(info@e-tunity.com) 21 latexlayoutcmds( 22 \usepackage{a4wide} 23 \usepackage{fancyhdr} 24 \usepackage{graphicx} 25 \usepackage{moreverb} 26 \usepackage{palatino} 27 \setlength{\textheight}{21cm} 28 \setlength{\parindent}{0pt} 29 \setlength{\parskip}{1ex plus 0.5ex minus 0.2ex} 30 \renewcommand{\headrulewidth}{.6pt} 31 \renewcommand{\footrulewidth}{.6pt} 32 \fancypagestyle{plain}{ 33 \fancyhf{} 34 \fancyhead[LE,RO]{} 35 \fancyhead[LO]{\small\slshape \leftmark} 36 \fancyhead[RE]{\small\slshape \rightmark} 37 \fancyfoot[LE,RO]{\small\thepage} 38 %\fancyfoot[RE,LO]{\small\textbf{e-tunity}} 39 } 40 \AtBeginDocument{\pagestyle{plain}}) 41 setfigureext(.png) 42 sethtmlfigureext(.png) 43 44 COMMENT(pngfig (basename-without-extension) (caption) (label) 45 A-la figure() but includes the true png. We can do that 46 because we use pdflatex.) 47 48 redef(pngfig)(3)(\ 49 whenhtml(figure(ARG1)(ARG2)(ARG3))\ 50 whenlatex(\ 51 latexcommand(\begin{figure}[htbp])\ 52 latexcommand(\centerline{)\ 53 latexcommand(\includegraphics[scale=.5]{)\ 54 ARG1.png+\ 55 latexcommand(}})\ 56 latexcommand(\caption{\small )ARG2+latexcommand(})\ 57 latexcommand(\label{)ARG3+latexcommand(})\ 58 latexcommand(\end{figure})) 59 whenman(verb( 60 ===================================================== 61 Insert figure ARG1 about here 62 ARG2 63 =====================================================)\ 64 label(ARG3))) 65 66 COMMENT(listing(text) 67 A-la verb() but nicely formatted in LaTeX.) 68 69 redef(listing)(1)(\ 70 whenhtml(verb(ARG1))\ 71 whenlatex(\ 72 PUSHCHARTABLE() 73 latexcommand(\begin{listing}{1})\ 74 XXnl()\ 75 NOEXPAND(ARG1)\ 76 XXnl()\ 77 latexcommand(\end{listing}) 78 POPCHARTABLE())\ 79 whenman(\ 80 XXroffcmd(.nf)()()()\ 81 INTERNALINDEX(verb on)\ 82 NOEXPAND(ARG1)\ 83 INTERNALINDEX(verb off)\ 84 XXroffcmd(.fi)()()()))