It is often useful in mathematics to produce a well formatted set of theorems with proofs. The [[AMS LaTeX|http://www.stat.umn.edu/~charlie/amslatex.html]] Style is useful here. Also, there other formatting advantages using [[AMS LaTeX|http://www.stat.umn.edu/~charlie/amslatex.html]].\nOne adds to the preamble the following:\n{{{\n\susepackage{amsmath,amsthm}\n\snewtheorem{proposition}{Proposition}\n\snewtheorem{theorem}{Theorem}\n}}}\nThese lines call the AMS packages and define the form for Proposition and Theroem. Then one can enter a Theorem as\n{{{\n\sbegin{theorem}\nIf $f$ is continuous on $[a,b],$ then,\n\sbegin{equation}\n\sint_a^b f(x)\s, dx = F(b)-F(a)\n\send{equation}\nwhere $F$ is any antiderivative of $f$; i.e.,\n$\sfrac{dF}{dx}=f(x)$.\n\send{theorem}\n}}}\n\nOne can bypass the AMS Style by defining the theorem and other environments by entering the folowing in the preamble:\n{{{\n\snewtheorem{theorem}{Theorem}[section]\n\snewtheorem{lemma}[theorem]{Lemma}\n\snewtheorem{proposition}[theorem]{Proposition}\n\snewtheorem{corollary}[theorem]{Corollary}\n\n\snewenvironment{proof}[1][Proof]{\sbegin{trivlist}\n\sitem[\shskip \slabelsep {\sbfseries #1}]}{\send{trivlist}}\n\snewenvironment{definition}[1][Definition]{\sbegin{trivlist}\n\sitem[\shskip \slabelsep {\sbfseries #1}]}{\send{trivlist}}\n\snewenvironment{example}[1][Example]{\sbegin{trivlist}\n\sitem[\shskip \slabelsep {\sbfseries #1}]}{\send{trivlist}}\n\snewenvironment{remark}[1][Remark]{\sbegin{trivlist}\n\sitem[\shskip \slabelsep {\sbfseries #1}]}{\send{trivlist}}\n\n\snewcommand{\sqed}{\snobreak \sifvmode \srelax \selse\n \sifdim\slastskip<1.5em \shskip-\slastskip\n \shskip1.5em plus0em minus0.5em \sfi \snobreak\n \svrule height0.75em width0.5em depth0.25em\sfi}\n}}}\nThen one can enter the theorem as \n{{{\n\sbegin{theorem}\n\semph{(Lagrange's Theorem)}\n\slabel{Lagrange}\nLet $G$ be a finite group, and let $H$ be a subgroup\nof $G$. Then the order of $H$ divides the order of $G$.\n\send{theorem}\n}}}
All papers should have an abstract. The abstract should be short and provide a clear summary of what the reader will find out in your paper. It should state the problem and any major conlcusions or results. \n\nThis paragraph is enetered in the abstract command after the maketitle command. It takes the form\n{{{\n\sabstract{ Enter your abstract here.}\n}}}\n\nThe inserted abstract with the rest of your code isshown below.\n{{{\n\sdocumentclass{article}\n\stitle{This is My First Article}\n\sauthor{Your Name}\n\sdate{ }\n\n\sbegin{document}\n\smaketitle\n\n\sabstract{ Enter your abstract here.}\n\n\send{document}\n}}}
'' Advanced Editing''\n*[[Tables]]\n*[[Figures]]\n*[[Bibliography]]\n*[[AMS Style]] - Useful for theorem environments.\n*[[LaTeX Slides]] and [[Prosper]] or [[Prosper2]]\n*[[Conversions]]\n\nYou can test your expressions using [[Online LaTeX Viewers]].
Another LaTeX presentation style used by professionals is Beamer. This style provides presentations that might be considered a little slicker and look less like ~PowerPoint then some of the [[Prosper]] styles. However, some find it takes a little more effort to learn some of the fancier features. It is really not too difficult as you can see from the examples in [[Beamer2]].\n!Beamer Websites\n*[[Beamer LaTeX Class|http://latex-beamer.sourceforge.net/]]\n*[[Tutorial|http://heather.cs.ucdavis.edu/%7Ematloff/beamer.html]]\n*[[Beamer Guide and Examplesz|https://www.maths.uwa.edu.au/computing/help/software/latex/beamer/]]\n*[[Beamer Guide|http://us.share.geocities.com/kijoo2000/beamer_guide.pdf]] at [[Ki-Joo's LaTeX Site|http://us.share.geocities.com/kijoo2000/]] and [[Beamer 3.0 Slides|http://faq.ktug.or.kr/wiki/uploads/beamer_guide.pdf]]\n*[[Beamer by Example|http://iacweb.ethz.ch/en/various/Mittelbau/download/latex_beamer.pdf]]\n!Examples\n*[[PDF Example|http://www.scs.fsu.edu/~burkardt/pdf/beamer_example.pdf]] from http://www.scs.fsu.edu/~burkardt/latex/beamer_example/beamer_example.html \n*[[Simple Examples|http://www.informatik.uni-freiburg.de/~frank/ENG/latex-course/latex-course-3/latex-course-3_en.html]]\n*[[Example with Instructions|http://math.arizona.edu/~swig/documentation/powerwhat/beamer-example.pdf]] with [[Source code|http://math.arizona.edu/~swig/documentation/powerwhat/]]\n*[[TU/e Example|http://www.win.tue.nl/latex/documentation/tuebeamer/]] - Beware of movie pages!\n*[[Another Simple Example|http://www.maths.dundee.ac.uk/~dfg/talks/icms06/beamer-movie.pdf]] describing commands\n*[[Beamer Demo|http://www.math.hmc.edu/math198/beamer-demo.pdf]] and [[source|http://www.math.hmc.edu/math198/]]\n*Beamer Themes Sites [[1|http://mike.depalatis.net/beamerthemes/]], [[2|http://www.poirrier.be/~jean-etienne/info/latexbeamer/]], [[3|http://mike.depalatis.net/beamerthemes/]]\n\n\n
Here is an example for doing a presentation in [[Beamer]]. The related files are:\n* PDF file [[beamerex2.pdf|beamerex2.pdf]] \n* LaTeX File [[beamerex2.tex|beamerex2.tex]] \n* Image files \n**[[sine1.eps|sine1.eps]]\n**[[sine2.eps|sine2.eps]]\n**[[sine3.eps|sine3.eps]]\n**[[sine4.eps|sine4.eps]]\n**[[sine5.eps|sine5.eps]]\n**[[myplot.eps|myplot.eps]]\n*Another example: [[beamerex.pdf|beamerex.pdf]] , [[beamerex.tex|beamerex.tex]] \nA description of the lines in the files is given below. Note that for !TexnicCenter to work, you need to choose the called routines as ~LaTeX => PS => PDF. \nA similar example in [[Prosper]] is in [[Prosper2]].
There are several ways to produce a bibliography. One is shown below.\n{{{\n\sbegin{thebibliography}{9}\n\n\sbibitem{KarpMas1} Karpman V I and Maslov E M 1977 A Perturbation Theory for the\nKorteweg-deVries Equation {\sit Phys. Lett.} {\sbf 60A} p 307-308.\n\n\sbibitem{KaupNew} Kaup D J and Newell A C 1978 Solitons as Particles, Oscillators, and\nin Slowly Changing Media: A Singular Perturbation Theory {\sit\nProc. Roy. Soc. Lond.} {\sbf A361}) p 413-446.\n\send{thebibliography}\n}}}\n\nYou can cite the works in the body of the paper by using the reference label:\n{{{\n\scite{KarpMas1,KaupNew}\n}}}\nThe style used should be an accepted journal style determined in consultation with your thesis advisor.
There are two types of citations. First, one can reference an equation, figure, table, section, etc. In this case you provide a label in the numbered equation, figure, etc. \n{{{\n\slabel{mylabel}\n}}} Each entry (mylabel) needs to be unique.Then you can refer to the item using \sref{mylabel}, such as \n{{{\nIn Equation (\sref{mylabel}) ...\n}}}\n\nAnother type of citation is a bibliographic citation. First set up a bibliography at the end of your paper. For example \n{{{\n\sbegin{thebibliography}{99}\n\sbibitem{BH} D. Boneh and J. Horwitz, `` Generating a Product of Three Primes With an Unknown Factorization,'' unpublished manuscript.\n\sbibitem{SW} S. Wagstaff, Jr., ``Cryptanalysis of Number Theoretic Ciphers,'' Chapman and Hall/ CRC, pp.221-288. 2003.\n\sbibitem{MB} S. Miller and R. Takloo-Bighash, ``An invitation to Modern Number Theory,'' Princeton University, pp. 4-20. 2006.\n\sbibitem{MS} M. R. Schroeder, ``Number Theory in Science and Communication,'' Springer-Verlag, pp.110-139. 1984.\n\sbibitem{BS}E. Bach and J. Shallit, ``Algorithmic Number Theory,'' The MIT Press, pp.101-120, 155-157. 1997.\n\sbibitem{CMR} C. Cid, S. Murphy and M. Robshaw, ``Algebraic Aspects of the Advanced Encryption Standard,'' Springer, pp.5-45. 2006.\n\send{thebibliography}\n}}}\n\nNow you can refer to one of the papers in your paper.\n{{{\nIn 2003 Wagstaff \scite{SW} said ...\n}}}\n\nWhile referring to referencing and citation, we also mention that you can add footnotes. For example,\n{{{\nJust insert the footnote\sfootnote{This is an example of a footnote.} where you want it.\n}}}
<<tabs tabsClass\nLayout "Layout Templates" SystemLayout\nSystem "System Tiddlers" SystemTiddlers\nStyle "StyleSheets" StyleSheets\n"Side Bar" "Side Bar Elements" SystemSideBars\nShadows "Hidden System Pages" ShadowPages\n>>\n\nThis page is a slightly modied version of [[Jack Parke's configuration|http://jackparke.googlepages.com/jtw.html#Config]]. Another one is at [[Julian Knight's site|http://knighjm.googlepages.com/knightnet-default-tw.html#Configuration]]. You can view the code. You will need to create several new tiddlers and add the corresponding code: SystemLayout, SystemTiddlers, StyleSheets, SystemSideBars,
*From Maple to LaTeX&nbsp;\n** [[by H. Boas|http://www.math.tamu.edu/~Harold.Boas/courses/math696/converting-Maple-code-into-LaTeX.html]]\n*From Word to LaTeX\n**[[TexSoftware| http://www.math.pku.edu.cn/teachers/dengmh/TexSoftware/word2tex/]]\n**[[Word2TeX|http://word2tex.com/]] - $45 - converts equations and pictures!\n*Putting LaTeX on the Web\n** [[by H. Boas|http://www.math.tamu.edu/~Harold.Boas/courses/math696/putting-LaTeX-on-the-Web.html]] \n*[[Converters between LaTeX and PC Wordprocessors|http://www.kfa-juelich.de/isr/1/texconv/texcnv.html]]\n*[[LaTeX\n to PDF|http://ciips.ee.uwa.edu.au/~chandra/LaTeX2PDF/LaTeX2PDF.html]] \n*[[Word2Tex|http://www.chikrii.com/products/tex2word/dl/]]\n*[[Open Office to LaTeX|http://www.hj-gym.dk/~hj/writer2latex/]]
LaTeX
<html><iframe src="http://www.emerson.emory.edu/services/latex/latex_toc.html" style="width:100%;height:400px"></iframe></html>\n{{{http://www.emerson.emory.edu/services/latex/latex_toc.html}}}
<html><iframe src="GeneralLaTeXExample.txt" style="width:100%;height:400px"></iframe></html>\nYou may copy and past this example into your editor or download it from [[here|http://people.uncw.edu/hermanr/LaTeX/GeneralLaTeXExample.tex]]. {{{http://people.uncw.edu/hermanr/LaTeX/GeneralLaTeXExample.tex}}}
One of the challenges to writing a paper in LaTeX is the insertion of figures into the document. \n\nThe typical format is to use encapsulated postscript (EPS). The document is then compiled into a postscript document (PS) using dvips and may then be sent to PDF. Using Matalb, one can use convertToEPS.m to convert many file formats to EPS format. See Wkipedia for information about [[Graphics file formats|http://en.wikipedia.org/wiki/Graphics_file_format]]. Also, you can use Ghostview, which comes with ~MikTeX, to view EPS and PS files.\n\nOther graphics, such as JPG or JPEG, can be used but one needs to process the LaTeX file using pdflatex. The images will not show in the DVI file. There are also other ways to insert graphics using the PSTRICKS package. \n\n!Assorted Links on Graphics\n*[[Including graphics in a LaTeX document|http://amath.colorado.edu/documentation/LaTeX/reference/figures.html]]\n*[[LaTeX Tricks - Figures|http://www.iam.ubc.ca/~newbury/tex/figures.html]]\n*[[More LaTeX Tricks|http://www.iam.ubc.ca/~newbury/tex/title.html]]\n*[[LaTeX Tricks for Figures|http://dcwww.camd.dtu.dk/~schiotz/comp/LatexTips/LatexTips.html]]\n*[[Graphics (EPS, JPEG, GIF) |http://www.eng.cam.ac.uk/help/tpl/textprocessing/latex_maths+pix/node24.html]] - Cambridge University/Engineering\n*[[PSTricks Examples|http://tug.org/PSTricks/main.cgi?file=examples]]\n!Creating and Editing Figures\n*[[convertToEPS.m|http://www.cs.cmu.edu/~jkubica/code/matlabToEPS.html]] - Convert images to eps format in Matlab\n*[[Online Converter|http://www.tlhiv.org/rast2vec/]] JPEG/PNG to EPS/PDF \n*[[GIMP|http://www.gimp.org/]] - Open Source Image Editor\n*[[LaTexDraw Project|http://latexdraw.sourceforge.net/]] - Free PSTricks drawing tool\n*[[Dia|http://live.gnome.org/Dia]] Diagram creation program\n*[[Inkscape|http://www.inkscape.org/]] Vector graphics editor\n*[[ArtRage|http://www.ambientdesign.com/artrage.html]] Painting program.\n*[[OpenDX|http://opendx.org/]], [[MayaVi|http://mayavi.sourceforge.net/]] Data Visualization tools\n*[[Blender|http://www.blender.org/]] 3D content creation\n*[[PSTricks Users Guide|http://www.tex.uniyar.ac.ru/doc/pst_ug.pdf]]\n*[[Postscript file conversions|http://mintaka.sdsu.edu/GF/bibliog/latex/PSconv.html]]\n*[[PSTOEDIT|http://www.geocities.com/SiliconValley/Network/1958/pstoedit/pstoedit.htm]]\n*[[AutoTrace|http://autotrace.sourceforge.net/]] and [[Potrace|http://potrace.sourceforge.net/]] Convert bitmap to vector graphics\n*[[Rotating Figures|http://ee.tamu.edu/~tex/manual/node37.html]]\n*Positioning figures - [[Afterpage and centering|afterpage.txt]]\n!!Sample files for inserting figures\n*EPS - compile with dvi2ps and ps2pdf\n** download [[signals.eps|eps/signals.eps]], [[EpsDemo.tex|eps/EpsDemo.tex]]\n** results [[EpsDemo.dvi|eps/EpsDemo.dvi]], [[EpsDemo.pdf|eps/EpsDemo.pdf]]\n*JPEG - compile using pdflatex\n** download [[signals.jpg|jpg/signals.jpg]], [[JpgDemo.tex|jpg/JpgDemo.tex]]\n** download [[JpgDemo.pdf|jpg/JpgDemo.pdf]]\n*PNG - compile using pdflatex\n** download [[signals.png|jpg/signals.png]], [[PngDemo.tex|jpg/PngDemo.tex]]\n** download [[PngDemo.pdf|jpg/PngDemo.pdf]]\n*PDF - compile using pdflatex\n** download [[signals.pdf|jpg/signals.pdf]], [[PdfDemo.tex|jpg/PdfDemo.tex]]\n** download [[PdfDemo.pdf|jpg/PdfDemo.pdf]]\n*BMP - only with DVI output\n** download [[graph01.bmp|Graphix/graph01.bmp]], [[graphdemo.tex|Graphix/GraphDemo.tex]]\n** results [[graphdemo.dvi|Graphix/GraphDemo.dvi]], [[graphdemo.pdf|Graphix/graphjpg.pdf]]\n*WMF - only with DVI output\n** downloads [[graph01.wmf|Picins/graph01.wmf]], [[graph.tex|Picins/GRAPH.TEX]]\n** results [[graph.dvi|Picins/GRAPH.dvi]], [[graph.pdf|Picins/graph2.pdf]]\n** style file [[tfw2.sty|Picins/TFW2.STY]]\nIt is possible to have your document produce both PDF and DVI files with the image included. Take your EPS and save it as PDF or convert to JPEG. Then when calling up the image, give the filename without the extension. Here is an example.\n* download [[signals.eps|eps/signals.eps]], [[EpsDemo.tex|eps/EpsPdfDemo.tex]]\n* results [[EpsDemo.dvi|eps/EpsPdfDemo.dvi]], [[EpsDemo.pdf|eps/EpsPdfDemo.pdf]]
[[LaTeX Symbols]]\n[[LaTeX Math Symbols]]\n[[Hypertext Help on LaTeX]]\n[[Emory Help]]\n[[Online LaTeX Viewers]]\n\n!!External Links\n[[A Simplified Intro|http://www-math.cudenver.edu/~hgreenbe/booksEtc/SimplifiedIntro.html]]\n[[Getting Started with LaTeX|http://www.maths.tcd.ie/~dwilkins/LaTeXPrimer/Index.html]] - by David R Wilkins\n[[Document Preparation with LaTeX|http://ubista.ubi.pt/~dfis-wg/sgml/tex/lc5/guide.html]]\n[[The Not So Short Introduction to LaTeX2e|http://osiris.sunderland.ac.uk/~cs0pdu/pub/mat118/lshort2e/index.html]], [[PDF|ftp://ctan.unsw.edu.au/tex-archive/info/lshort/english/lshort.pdf]]\n[[Links and documentation related to LaTeX, TeX and MikTeX|http://members.tripod.com/~upem/miktex.html]]\n[[Writing Paters in LaTeX|http://online.redwoods.cc.ca.us/instruct/darnold/linalg/latex/project_latex.pdf]] - A PDF Slide Presentation by David Arnold\n[[Essential LaTeX|http://web.mit.edu/olh/Latex/ess-toc.html]] at MIT\n\n!!LaTeX Sites\n[[CTAN|http://www.ctan.org/]] - the Comprehensive TeX Archive Network\n[[LaTeX(2e) Resources|http://www.cs.tu-berlin.de/usr/TeX/doc/LaTeX.html]]\n[[LaTeX Project site|http://www.latex-project.org/]]\n[[All styles files available on CTAN|http://www-sop.inria.fr/miaou/latex/styles-eng.html]]
<html><iframe src="http://www.giss.nasa.gov/tools/latex/ltx-2.html" style="width:100%;height:400px"></iframe></html>\n{{{http://www.giss.nasa.gov/tools/latex/ltx-2.html}}}
<<importTiddlers inline>>
/***\n''Import Tiddlers Plugin for TiddlyWiki version 1.2.x, 2.0 and 2.1beta''\n^^author: Eric Shulman - ELS Design Studios\nsource: http://www.TiddlyTools.com/#ImportTiddlersPlugin\nlicense: [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]^^\n\nWhen many people share and edit copies of the same TiddlyWiki document, the ability to quickly collect all these changes back into a single, updated document that can then be redistributed to the entire group is very important. It can also be very extremely helpful when moving your own tiddlers from document to document (e.g., when upgrading to the latest version of TiddlyWiki, or 'pre-loading' your favorite stylesheets into a new 'empty' TiddlyWiki document.)\n\nThis plugin lets you selectively combine tiddlers from any two TiddlyWiki documents. An interactive control panel lets you pick a document to import from, and then select which tiddlers to import, with prompting for skip, rename, merge or replace actions when importing tiddlers that match existing titles. Automatically add tags to imported tiddlers so they are easy to find later on. Generates a detailed report of import 'history' in ImportedTiddlers.\n!!!!!Interactive interface\n<<<\n{{{<<importTiddlers>>}}}\ncreates "import tiddlers" link. click to show/hide import control panel\n\n{{{<<importTiddlers inline>>}}}\ncreates import control panel directly in tiddler content\n\n<<importTiddlers inline>>\n\nPress ''[browse]'' to select a TiddlyWiki document file to import. You can also type in the path/filename or a remote document URL (starting with http://)and press ''[open]''. //Note: There may be some delay to permit the browser time to access and load the document before updating the listbox with the titles of all tiddlers that are available to be imported.//\n\nSelect one or more titles from the listbox (hold CTRL or SHIFT while clicking to add/remove the highlight from individual list items). You can press ''[select all]'' to quickly highlight all tiddler titles in the list. Use the ''[-]'', ''[+]'', or ''[=]'' links to adjust the listbox size so you can view more (or less) tiddler titles at one time. When you have chosen the tiddlers you want to import and entered any extra tags, press ''[import]'' to begin copying them to the current TiddlyWiki document.\n\n''select: all, new, changes, or differences''\n\nYou can click on ''all'', ''new'', ''changes'', or ''differences'' to automatically select a subset of tiddlers from the list. This makes it very quick and easy to find and import just the updated tiddlers you are interested in:\n>''"all"'' selects ALL tiddlers from the import source document, even if they have not been changed.\n>''"new"'' selects only tiddlers that are found in the import source document, but do not yet exist in the destination document\n>''"changes"'' selects only tiddlers that exist in both documents but that are newer in the source document\n>''"differences"'' selects all new and existing tiddlers that are different from the destination document (even if destination tiddler is newer)\n\n''Import Tagging:''\n\nTiddlers that have been imported can be automatically tagged, so they will be easier to find later on, after they have been added to your document. New tags are entered into the "add tags" input field, and then //added// to the existing tags for each tiddler as it is imported.\n\n''Skip, Rename, Merge, or Replace:''\n\nWhen importing a tiddler whose title is identical to one that already exists, the import process pauses and the tiddler title is displayed in an input field, along with four push buttons: ''[skip]'', ''[rename]'', ''[merge]'' and ''[replace]''.\n\nTo bypass importing this tiddler, press ''[skip]''. To import the tiddler with a different name (so that both the tiddlers will exist when the import is done), enter a new title in the input field and then press ''[rename]''. Press ''[merge]'' to combine the content from both tiddlers into a single tiddler. Press ''[replace]'' to overwrite the existing tiddler with the imported one, discarding the previous tiddler content.\n\n//Note: if both the title ''and'' modification date/////time match, the imported tiddler is assumed to be identical to the existing one, and will be automatically skipped (i.e., not imported) without asking.//\n\n''Import Report History''\n\nWhen tiddlers are imported, a report is generated into ImportedTiddlers, indicating when the latest import was performed, the number of tiddlers successfully imported, from what location, and by whom. It also includes a list with the title, date and author of each tiddler that was imported.\n\nWhen the import process is completed, the ImportedTiddlers report is automatically displayed for your review. If more tiddlers are subsequently imported, a new report is //added// to ImportedTiddlers, above the previous report (i.e., at the top of the tiddler), so that a reverse-chronological history of imports is maintained.\n\nIf a cumulative record is not desired, the ImportedTiddlers report may be deleted at any time. A new ImportedTiddlers report will be created the next time tiddlers are imported.\n\nNote: You can prevent the ImportedTiddlers report from being generated for any given import activity by clearing the "create a report" checkbox before beginning the import processing.\n\n<<<\n!!!!!non-interactive 'load tiddlers' macro\n<<<\nUseful for automated installation/update of plugins and other tiddler content.\n\n{{{<<loadTiddlers "label:load tiddlers from %0" http://www.tiddlytools.com/example.html confirm>>}}}\n<<loadTiddlers "label:load tiddlers from %0" http://www.tiddlytools.com/example.html confirm>>\n\nSyntax:\n{{{<<loadTiddlers label:text prompt:text filter source quiet confirm>>}}}\n\n''label:text'' and ''prompt:text''\n>defines link text and tooltip (prompt) that can be clicked to trigger the load tiddler processing. If a label is NOT provided, then no link is created and loadTiddlers() is executed whenever the containing tiddler is rendered.\n''filter'' (optional) determines which tiddlers will be automatically selected for importing. Use one of the following keywords:\n>''"all"'' retrieves ALL tiddlers from the import source document, even if they have not been changed.\n>''"new"'' retrieves only tiddlers that are found in the import source document, but do not yet exist in the destination document\n>''"changes"'' retrieves only tiddlers that exist in both documents for which the import source tiddler is newer than the existing tiddler\n>''"updates"'' retrieves both ''new'' and ''changed'' tiddlers (this is the default action when none is specified)\n>''"tiddler:~TiddlerName"'' retrieves only the specific tiddler named in the parameter.\n>''"tag:text"'' retrieves only the tiddlers tagged with the indicated text.\n''source'' (required) is the location of the imported document. It can be either a local document path/filename in whatever format your system requires, or a remote web location (starting with "http://" or "https://")\n>use the keyword ''ask'' to prompt for a source location whenever the macro is invoked\n''"quiet"'' (optional)\n>supresses all status message during the import processing (e.g., "opening local file...", "found NN tiddlers..." etc). Note that if ANY tiddlers are actualy imported, a final information message will still be displayed (along with the ImportedTiddlers report), even when 'quiet' is specified. This ensures that changes to your document cannot occur without any visible indication at all.\n''"confirm"'' (optional)\n>adds interactive confirmation. A browser message box (OK/Cancel) is displayed for each tiddler that will be imported, so that you can manually bypass any tiddlers that you do not want to import.\n<<<\n!!!!!Installation\n<<<\ncopy/paste the following tiddlers into your document:\n''ImportTiddlersPlugin'' (tagged with <<tag systemConfig>>)\n\ncreate/edit ''SideBarOptions'': (sidebar menu items) \n^^Add "< < ImportTiddlers > >" macro^^\n\n''Quick Installation Tip #1:''\nIf you are using an unmodified version of TiddlyWiki (core release version <<version>>), you can get a new, empty TiddlyWiki with the Import Tiddlers plugin pre-installed (''[[download from here|TW+ImportExport.html]]''), and then simply import all your content from your old document into this new, empty document.\n<<<\n!!!!!Revision History\n<<<\n''2006.08.16 [3.0.6]'' Use higher-level store.saveTiddler() instead of store.addTiddler() to avoid conflicts with ZW and other adaptations that hijack low-level tiddler handling. Also, in CreateImportPanel(), no longer register notify to "refresh listbox after every tiddler change" (left over from old 'auto-filtered' list handling). Thanks to Bob McElrath for report/solution.\n''2006.07.29 [3.0.5]'' added noChangeMsg to loadTiddlers processing. if not 'quiet' mode, reports skipped tiddlers.\n''2006.04.18 [3.0.4]'' in loadTiddlers.handler, fixed parsing of "prompt:" param. Also, corrected parameters mismatch in loadTiddlers() callback function definition (order of params was wrong, resulting in filters NOT being applied)\n''2006.04.12 [3.0.3]'' moved many display messages to macro properties for easier L10N translations via 'lingo' definitions.\n''2006.04.12 [3.0.2]'' additional refactoring of 'core candidate' code. Proposed API now defines "loadRemoteFile()" for XMLHttpRequest processing with built in fallback for handling local filesystem access, and readTiddlersFromHTML() to process the resulting source HTML content.\n''2006.04.04 [3.0.1]'' in refreshImportList(), when using [by tags], tiddlers without tags are now included in a new "untagged" psuedo-tag list section\n''2006.04.04 [3.0.0]'' Separate non-interactive {{{<<importTiddlers...>>}}} macro functionality for incorporation into TW2.1 core and renamed as {{{<<loadTiddlers>>}}} macro. New parameters for loadTiddlers: ''label:text'' and ''prompt:text'' for link creation, ''ask'' for filename/URL, ''tag:text'' for filtering, "confirm" for accept/reject of individual inbound tiddlers. Also, ImportedTiddlers report generator output has been simplified and "importReplace/importPublic" tags and associated "force" param (which were rarely, if ever, used) has been dropped.\n''2006.03.30 [2.9.1]'' when extracting store area from remote URL, look for "</body>" instead of "</body>\sn</html>" so it will match even if the "\sn" is absent from the source.\n''2006.03.30 [2.9.0]'' added optional 'force' macro param. When present, autoImportTiddlers() bypasses the checks for importPublic and importReplace. Based on a request from Tom Otvos.\n''2006.03.28 [2.8.1]'' in loadImportFile(), added checks to see if 'netscape' and 'x.overrideMimeType()' are defined (IE does *not* define these values, so we bypass this code)\nAlso, when extracting store area from remote URL, explicitly look for "</body>\sn</html>" to exclude any extra content that may have been added to the end of the file by hosting environments such as GeoCities. Thanks to Tom Otvos for finding these bugs and suggesting some fixes.\n''2006.02.21 [2.8.0]'' added support for "tiddler:TiddlerName" filtering parameter in auto-import processing\n''2006.02.21 [2.7.1]'' Clean up layout problems with IE. (Use tables for alignment instead of SPANs styled with float:left and float:right)\n''2006.02.21 [2.7.0]'' Added "local file" and "web server" radio buttons for selecting dynamic import source controls in ImportPanel. Default file control is replaced with URL text input field when "web server" is selected. Default remote document URL is defined in SiteURL tiddler. Also, added option for prepending SiteProxy URL as prefix to remote URL to mask cross-domain document access (requires compatible server-side script)\n''2006.02.17 [2.6.0]'' Removed "differences only" listbox display mode, replaced with selection filter 'presets': all/new/changes/differences. Also fixed initialization handling for "add new tags" so that checkbox state is correctly tracked when panel is first displayed.\n''2006.02.16 [2.5.4]'' added checkbox options to control "import remote tags" and "keep existing tags" behavior, in addition to existing "add new tags" functionality.\n''2006.02.14 [2.5.3]'' FF1501 corrected unintended global 't' (loop index) in importReport() and autoImportTiddlers()\n''2006.02.10 [2.5.2]'' corrected unintended global variable in importReport().\n''2006.02.05 [2.5.1]'' moved globals from window.* to config.macros.importTiddlers.* to avoid FireFox 1.5.0.1 crash bug when referencing globals\n''2006.01.18 [2.5.0]'' added checkbox for "create a report". Default is to create/update the ImportedTiddlers report. Clear the checkbox to skip this step.\n''2006.01.15 [2.4.1]'' added "importPublic" tag and inverted default so that auto sharing is NOT done unless tagged with importPublic\n''2006.01.15 [2.4.0]'' Added support for tagging individual tiddlers with importSkip, importReplace, and/or importPrivate to control which tiddlers can be overwritten or shared with others when using auto-import macro syntax. Defaults are to SKIP overwriting existing tiddlers with imported tiddlers, and ALLOW your tiddlers to be auto-imported by others.\n''2006.01.15 [2.3.2]'' Added "ask" parameter to confirm each tiddler before importing (for use with auto-importing)\n''2006.01.15 [2.3.1]'' Strip TW core scripts from import source content and load just the storeArea into the hidden IFRAME. Makes loading more efficient by reducing the document size and by preventing the import document from executing its TW initialization (including plugins). Seems to resolve the "Found 0 tiddlers" problem. Also, when importing local documents, use convertUTF8ToUnicode() to convert the file contents so support international characters sets.\n''2006.01.12 [2.3.0]'' Reorganized code to use callback function for loading import files to support event-driven I/O via an ASYNCHRONOUS XMLHttpRequest. Let's processing continue while waiting for remote hosts to respond to URL requests. Added non-interactive 'batch' macro mode, using parameters to specify which tiddlers to import, and from what document source. Improved error messages and diagnostics, plus an optional 'quiet' switch for batch mode to eliminate //most// feedback.\n''2006.01.11 [2.2.0]'' Added "[by tags]" to list of tiddlers, based on code submitted by BradleyMeck\n''2006.01.09 [2.1.1]'' When a URL is typed in, and then the "open" button is pressed, it generates both an onChange event for the file input and a click event for open button. This results in multiple XMLHttpRequest()'s which seem to jam things up quite a bit. I removed the onChange handling for file input field. To open a file (local or URL), you must now explicitly press the "open" button in the control panel.\n''2006.01.08 [2.1.0]'' IMPORT FROM ANYWHERE!!! re-write getImportedTiddlers() logic to either read a local file (using local I/O), OR... read a remote file, using a combination of XML and an iframe to permit cross-domain reading of DOM elements. Adapted from example code and techniques courtesy of Jonny LeRoy.\n''2006.01.06 [2.0.2]'' When refreshing list contents, fixed check for tiddlerExists() when "show differences only" is selected, so that imported tiddlers that don't exist in the current file will be recognized as differences and included in the list.\n''2006.01.04 [2.0.1]'' When "show differences only" is NOT checked, import all tiddlers that have been selected even when they have a matching title and date.\n''2005.12.27 [2.0.0]'' Update for TW2.0\nDefer initial panel creation and only register a notification function when panel first is created\n''2005.12.22 [1.3.1]'' tweak formatting in importReport() and add 'discard report' link to output\n''2005.12.03 [1.3.0]'' Dynamically create/remove importPanel as needed to ensure only one instance of interface elements exists, even if there are multiple instances of macro embedding. Also, dynamically create/recreate importFrame each time an external TW document is loaded for importation (reduces DOM overhead and ensures a 'fresh' frame for each document)\n''2005.11.29 [1.2.1]'' fixed formatting of 'detail info' in importReport()\n''2005.11.11 [1.2.0]'' added 'inline' param to embed controls in a tiddler\n''2005.11.09 [1.1.0]'' only load HTML and CSS the first time the macro handler is called. Allows for redundant placement of the macro without creating multiple instances of controls with the same ID's.\n''2005.10.25 [1.0.5]'' fixed typo in importReport() that prevented reports from being generated\n''2005.10.09 [1.0.4]'' combined documentation with plugin code instead of using separate tiddlers\n''2005.08.05 [1.0.3]'' moved CSS and HTML definitions into plugin code instead of using separate tiddlers\n''2005.07.27 [1.0.2]'' core update 1.2.29: custom overlayStyleSheet() replaced with new core setStylesheet()\n''2005.07.23 [1.0.1]'' added parameter checks and corrected addNotification() usage\n''2005.07.20 [1.0.0]'' Initial Release\n<<<\n!!!!!Credits\n<<<\nThis feature was developed by EricShulman from [[ELS Design Studios|http:/www.elsdesign.com]]\n<<<\n!!!!!Code\n***/\n// // ''MACRO DEFINITION''\n//{{{\n// Version\nversion.extensions.importTiddlers = {major: 3, minor: 0, revision: 6, date: new Date(2006,8,16)};\n\n// IE needs explicit global scoping for functions/vars called from browser events\nwindow.onClickImportButton=onClickImportButton;\nwindow.refreshImportList=refreshImportList;\n\n// default cookie/option values\nif (!config.options.chkImportReport) config.options.chkImportReport=true;\n\nconfig.macros.importTiddlers = { };\nconfig.macros.importTiddlers = {\n label: "import tiddlers",\n prompt: "Copy tiddlers from another document",\n foundMsg: "Found %0 tiddlers in %1",\n countMsg: "%0 tiddlers selected for import",\n importedMsg: "Imported %0 of %1 tiddlers from %2",\n src: "", // path/filename or URL of document to import (retrieved from SiteUrl tiddler)\n proxy: "", // URL for remote proxy script (retrieved from SiteProxy tiddler)\n useProxy: false, // use specific proxy script in front of remote URL\n inbound: null, // hash-indexed array of tiddlers from other document\n newTags: "", // text of tags added to imported tiddlers\n addTags: true, // add new tags to imported tiddlers\n listsize: 8, // # of lines to show in imported tiddler list\n importTags: true, // include tags from remote source document when importing a tiddler\n keepTags: true, // retain existing tags when replacing a tiddler\n index: 0, // current processing index in import list\n sort: "" // sort order for imported tiddler listbox\n};\n\nconfig.macros.importTiddlers.handler = function(place,macroName,params) {\n if (!config.macros.loadTiddlers.handler)\n { alert("importTiddlers error: this plugin requires LoadTiddlersPlugin or TiddlyWiki 2.1+"); return; }\n if (!params[0]) // LINK TO FLOATING PANEL\n createTiddlyButton(place,this.label,this.prompt,onClickImportMenu);\n else if (params[0]=="inline") {// // INLINE TIDDLER CONTENT\n createImportPanel(place);\n document.getElementById("importPanel").style.position="static";\n document.getElementById("importPanel").style.display="block";\n }\n else config.macros.loadTiddlers.handler(place,macroName,params); // FALLBACK: PASS TO LOADTIDDLERS\n}\n//}}}\n\n// // ''INTERFACE DEFINITION''\n\n// // Handle link click to create/show/hide control panel\n//{{{\nfunction onClickImportMenu(e)\n{\n if (!e) var e = window.event;\n var parent=resolveTarget(e).parentNode;\n var panel = document.getElementById("importPanel");\n if (panel==undefined || panel.parentNode!=parent)\n panel=createImportPanel(parent);\n var isOpen = panel.style.display=="block";\n if(config.options.chkAnimate)\n anim.startAnimating(new Slider(panel,!isOpen,e.shiftKey || e.altKey,"none"));\n else\n panel.style.display = isOpen ? "none" : "block" ;\n e.cancelBubble = true;\n if (e.stopPropagation) e.stopPropagation();\n return(false);\n}\n//}}}\n\n// // Create control panel: HTML, CSS\n//{{{\nfunction createImportPanel(place) {\n var panel=document.getElementById("importPanel");\n if (panel) { panel.parentNode.removeChild(panel); }\n setStylesheet(config.macros.importTiddlers.css,"importTiddlers");\n panel=createTiddlyElement(place,"span","importPanel",null,null)\n panel.innerHTML=config.macros.importTiddlers.html;\n refreshImportList();\n var siteURL=store.getTiddlerText("SiteUrl"); if (!siteURL) siteURL="";\n document.getElementById("importSourceURL").value=siteURL;\n config.macros.importTiddlers.src=siteURL;\n var siteProxy=store.getTiddlerText("SiteProxy"); if (!siteProxy) siteProxy="SiteProxy";\n document.getElementById("importSiteProxy").value=siteProxy;\n config.macros.importTiddlers.proxy=siteProxy;\n return panel;\n}\n//}}}\n\n// // CSS\n//{{{\nconfig.macros.importTiddlers.css = '\s\n#importPanel {\s\n display: none; position:absolute; z-index:11; width:35em; right:105%; top:3em;\s\n background-color: #eee; color:#000; font-size: 8pt; line-height:110%;\s\n border:1px solid black; border-bottom-width: 3px; border-right-width: 3px;\s\n padding: 0.5em; margin:0em; -moz-border-radius:1em;\s\n}\s\n#importPanel a, #importPanel td a { color:#009; display:inline; margin:0px; padding:1px; }\s\n#importPanel table { width:100%; border:0px; padding:0px; margin:0px; font-size:8pt; line-height:110%; background:transparent; }\s\n#importPanel tr { border:0px;padding:0px;margin:0px; background:transparent; }\s\n#importPanel td { color:#000; border:0px;padding:0px;margin:0px; background:transparent; }\s\n#importPanel select { width:98%;margin:0px;font-size:8pt;line-height:110%;}\s\n#importPanel input { width:98%;padding:0px;margin:0px;font-size:8pt;line-height:110%}\s\n#importPanel .box { border:1px solid black; padding:3px; margin-bottom:5px; background:#f8f8f8; -moz-border-radius:5px;}\s\n#importPanel .topline { border-top:2px solid black; padding-top:3px; margin-bottom:5px; }\s\n#importPanel .rad { width:auto; }\s\n#importPanel .chk { width:auto; margin:1px;border:0; }\s\n#importPanel .btn { width:auto; }\s\n#importPanel .btn1 { width:98%; }\s\n#importPanel .btn2 { width:48%; }\s\n#importPanel .btn3 { width:32%; }\s\n#importPanel .btn4 { width:24%; }\s\n#importPanel .btn5 { width:19%; }\s\n#importPanel .importButton { padding: 0em; margin: 0px; font-size:8pt; }\s\n#importPanel .importListButton { padding:0em 0.25em 0em 0.25em; color: #000000; display:inline }\s\n#importCollisionPanel { display:none; margin:0.5em 0em 0em 0em; }\s\n';\n//}}}\n\n// // HTML \n//{{{\nconfig.macros.importTiddlers.html = '\s\n<!-- source and report -->\s\n<table><tr><td align=left>\s\n import from\s\n <input type="radio" class="rad" name="importFrom" value="file" CHECKED\s\n onClick="document.getElementById(\s'importLocalPanel\s').style.display=this.checked?\s'block\s':\s'none\s';\s\n document.getElementById(\s'importHTTPPanel\s').style.display=!this.checked?\s'block\s':\s'none\s'"> local file\s\n <input type="radio" class="rad" name="importFrom" value="http"\s\n onClick="document.getElementById(\s'importLocalPanel\s').style.display=!this.checked?\s'block\s':\s'none\s';\s\n document.getElementById(\s'importHTTPPanel\s').style.display=this.checked?\s'block\s':\s'none\s'"> web server\s\n</td><td align=right>\s\n <input type=checkbox class="chk" id="chkImportReport" checked\s\n onClick="config.options[\s'chkImportReport\s']=this.checked;"> create a report\s\n</td></tr></table>\s\n<!-- import from local file -->\s\n<div id="importLocalPanel" style="display:block;margin-bottom:5px;margin-top:5px;padding-top:3px;border-top:1px solid #999">\s\nlocal document path/filename:<br>\s\n<input type="file" id="fileImportSource" size=57 style="width:100%"\s\n onKeyUp="config.macros.importTiddlers.src=this.value"\s\n onChange="config.macros.importTiddlers.src=this.value;">\s\n</div><!--panel-->\s\n\s\n<!-- import from http server -->\s\n<div id="importHTTPPanel" style="display:none;margin-bottom:5px;margin-top:5px;padding-top:3px;border-top:1px solid #999">\s\n<table><tr><td align=left>\s\n remote document URL:<br>\s\n</td><td align=right>\s\n <input type="checkbox" class="chk" id="importUseProxy"\s\n onClick="config.macros.importTiddlers.useProxy=this.checked;\s\n document.getElementById(\s'importSiteProxy\s').style.display=this.checked?\s'block\s':\s'none\s'"> use a proxy script\s\n</td></tr></table>\s\n<input type="text" id="importSiteProxy" style="display:none;margin-bottom:1px" onfocus="this.select()" value="SiteProxy"\s\n onKeyUp="config.macros.importTiddlers.proxy=this.value"\s\n onChange="config.macros.importTiddlers.proxy=this.value;">\s\n<input type="text" id="importSourceURL" onfocus="this.select()" value="SiteUrl"\s\n onKeyUp="config.macros.importTiddlers.src=this.value"\s\n onChange="config.macros.importTiddlers.src=this.value;">\s\n</div><!--panel-->\s\n\s\n<table><tr><td align=left>\s\n select:\s\n <a href="JavaScript:;" id="importSelectAll"\s\n onclick="onClickImportButton(this)" title="select all tiddlers">\s\n &nbsp;all&nbsp;</a>\s\n <a href="JavaScript:;" id="importSelectNew"\s\n onclick="onClickImportButton(this)" title="select tiddlers not already in destination document">\s\n &nbsp;added&nbsp;</a> \s\n <a href="JavaScript:;" id="importSelectChanges"\s\n onclick="onClickImportButton(this)" title="select tiddlers that have been updated in source document">\s\n &nbsp;changes&nbsp;</a> \s\n <a href="JavaScript:;" id="importSelectDifferences"\s\n onclick="onClickImportButton(this)" title="select tiddlers that have been added or are different from existing tiddlers">\s\n &nbsp;differences&nbsp;</a> \s\n <a href="JavaScript:;" id="importToggleFilter"\s\n onclick="onClickImportButton(this)" title="show/hide selection filter">\s\n &nbsp;filter&nbsp;</a> \s\n</td><td align=right>\s\n <a href="JavaScript:;" id="importListSmaller"\s\n onclick="onClickImportButton(this)" title="reduce list size">\s\n &nbsp;&#150;&nbsp;</a>\s\n <a href="JavaScript:;" id="importListLarger"\s\n onclick="onClickImportButton(this)" title="increase list size">\s\n &nbsp;+&nbsp;</a>\s\n <a href="JavaScript:;" id="importListMaximize"\s\n onclick="onClickImportButton(this)" title="maximize/restore list size">\s\n &nbsp;=&nbsp;</a>\s\n</td></tr></table>\s\n<select id="importList" size=8 multiple\s\n onchange="setTimeout(\s'refreshImportList(\s'+this.selectedIndex+\s')\s',1)">\s\n <!-- NOTE: delay refresh so list is updated AFTER onchange event is handled -->\s\n</select>\s\n<input type=checkbox class="chk" id="chkAddTags" checked\s\n onClick="config.macros.importTiddlers.addTags=this.checked;">add new tags &nbsp;\s\n<input type=checkbox class="chk" id="chkImportTags" checked\s\n onClick="config.macros.importTiddlers.importTags=this.checked;">import source tags &nbsp;\s\n<input type=checkbox class="chk" id="chkKeepTags" checked\s\n onClick="config.macros.importTiddlers.keepTags=this.checked;">keep existing tags<br>\s\n<input type=text id="txtNewTags" size=15 onKeyUp="config.macros.importTiddlers.newTags=this.value" autocomplete=off>\s\n<div align=center>\s\n <input type=button id="importOpen" class="importButton" style="width:32%" value="open"\s\n onclick="onClickImportButton(this)">\s\n <input type=button id="importStart" class="importButton" style="width:32%" value="import"\s\n onclick="onClickImportButton(this)">\s\n <input type=button id="importClose" class="importButton" style="width:32%" value="close"\s\n onclick="onClickImportButton(this)">\s\n</div>\s\n<div id="importCollisionPanel">\s\n tiddler already exists:\s\n <input type=text id="importNewTitle" size=15 autocomplete=off">\s\n <div align=center>\s\n <input type=button id="importSkip" class="importButton" style="width:23%" value="skip"\s\n onclick="onClickImportButton(this)">\s\n <input type=button id="importRename" class="importButton" style="width:23%" value="rename"\s\n onclick="onClickImportButton(this)">\s\n <input type=button id="importMerge" class="importButton" style="width:23%" value="merge"\s\n onclick="onClickImportButton(this)">\s\n <input type=button id="importReplace" class="importButton" style="width:23%" value="replace"\s\n onclick="onClickImportButton(this)">\s\n </div>\s\n</div>\s\n';\n//}}}\n\n// // Control interactions\n//{{{\nfunction onClickImportButton(which)\n{\n // DEBUG alert(which.id);\n var theList = document.getElementById('importList');\n if (!theList) return;\n var thePanel = document.getElementById('importPanel');\n var theCollisionPanel = document.getElementById('importCollisionPanel');\n var theNewTitle = document.getElementById('importNewTitle');\n var count=0;\n switch (which.id)\n {\n case 'fileImportSource':\n case 'importOpen': // load import source into hidden frame\n importReport(); // if an import was in progress, generate a report\n config.macros.importTiddlers.inbound=null; // clear the imported tiddler buffer\n refreshImportList(); // reset/resize the listbox\n if (config.macros.importTiddlers.src=="") break;\n // Load document into hidden iframe so we can read it's DOM and fill the list\n loadRemoteFile(config.macros.importTiddlers.src, function(src,txt) {\n var tiddlers = readTiddlersFromHTML(txt);\n var count=tiddlers?tiddlers.length:0;\n displayMessage(config.macros.importTiddlers.foundMsg.format([count,src]));\n config.macros.importTiddlers.inbound=tiddlers;\n window.refreshImportList(0);\n });\n break;\n case 'importSelectAll': // select all tiddler list items (i.e., not headings)\n importReport(); // if an import was in progress, generate a report\n for (var t=0,count=0; t < theList.options.length; t++) {\n if (theList.options[t].value=="") continue;\n theList.options[t].selected=true;\n count++;\n }\n clearMessage(); displayMessage(config.macros.importTiddlers.countMsg.format([count]));\n break;\n case 'importSelectNew': // select tiddlers not in current document\n importReport(); // if an import was in progress, generate a report\n for (var t=0,count=0; t < theList.options.length; t++) {\n theList.options[t].selected=false;\n if (theList.options[t].value=="") continue;\n theList.options[t].selected=!store.tiddlerExists(theList.options[t].value);\n count+=theList.options[t].selected?1:0;\n }\n clearMessage(); displayMessage(config.macros.importTiddlers.countMsg.format([count]));\n break;\n case 'importSelectChanges': // select tiddlers that are updated from existing tiddlers\n importReport(); // if an import was in progress, generate a report\n for (var t=0,count=0; t < theList.options.length; t++) {\n theList.options[t].selected=false;\n if (theList.options[t].value==""||!store.tiddlerExists(theList.options[t].value)) continue;\n for (var i=0; i<config.macros.importTiddlers.inbound.length; i++) // find matching inbound tiddler\n { var inbound=config.macros.importTiddlers.inbound[i]; if (inbound.title==theList.options[t].value) break; }\n theList.options[t].selected=(inbound.modified-store.getTiddler(theList.options[t].value).modified>0); // updated tiddler\n count+=theList.options[t].selected?1:0;\n }\n clearMessage(); displayMessage(config.macros.importTiddlers.countMsg.format([count]));\n break;\n case 'importSelectDifferences': // select tiddlers that are new or different from existing tiddlers\n importReport(); // if an import was in progress, generate a report\n for (var t=0,count=0; t < theList.options.length; t++) {\n theList.options[t].selected=false;\n if (theList.options[t].value=="") continue;\n if (!store.tiddlerExists(theList.options[t].value)) { theList.options[t].selected=true; count++; continue; }\n for (var i=0; i<config.macros.importTiddlers.inbound.length; i++) // find matching inbound tiddler\n { var inbound=config.macros.importTiddlers.inbound[i]; if (inbound.title==theList.options[t].value) break; }\n theList.options[t].selected=(inbound.modified-store.getTiddler(theList.options[t].value).modified!=0); // changed tiddler\n count+=theList.options[t].selected?1:0;\n }\n clearMessage(); displayMessage(config.macros.importTiddlers.countMsg.format([count]));\n break;\n case 'importToggleFilter': // show/hide filter\n case 'importFilter': // apply filter\n alert("coming soon!");\n break;\n case 'importStart': // initiate the import processing\n importReport(); // if an import was in progress, generate a report\n config.macros.importTiddlers.index=0;\n config.macros.importTiddlers.index=importTiddlers(0);\n importStopped();\n break;\n case 'importClose': // unload imported tiddlers or hide the import control panel\n // if imported tiddlers not loaded, close the import control panel\n if (!config.macros.importTiddlers.inbound) { thePanel.style.display='none'; break; }\n importReport(); // if an import was in progress, generate a report\n config.macros.importTiddlers.inbound=null; // clear the imported tiddler buffer\n refreshImportList(); // reset/resize the listbox\n break;\n case 'importSkip': // don't import the tiddler\n var theItem = theList.options[config.macros.importTiddlers.index];\n for (var j=0;j<config.macros.importTiddlers.inbound.length;j++)\n if (config.macros.importTiddlers.inbound[j].title==theItem.value) break;\n var theImported = config.macros.importTiddlers.inbound[j];\n theImported.status='skipped after asking'; // mark item as skipped\n theCollisionPanel.style.display='none';\n config.macros.importTiddlers.index=importTiddlers(config.macros.importTiddlers.index+1); // resume with NEXT item\n importStopped();\n break;\n case 'importRename': // change name of imported tiddler\n var theItem = theList.options[config.macros.importTiddlers.index];\n for (var j=0;j<config.macros.importTiddlers.inbound.length;j++)\n if (config.macros.importTiddlers.inbound[j].title==theItem.value) break;\n var theImported = config.macros.importTiddlers.inbound[j];\n theImported.status = 'renamed from '+theImported.title; // mark item as renamed\n theImported.set(theNewTitle.value,null,null,null,null); // change the tiddler title\n theItem.value = theNewTitle.value; // change the listbox item text\n theItem.text = theNewTitle.value; // change the listbox item text\n theCollisionPanel.style.display='none';\n config.macros.importTiddlers.index=importTiddlers(config.macros.importTiddlers.index); // resume with THIS item\n importStopped();\n break;\n case 'importMerge': // join existing and imported tiddler content\n var theItem = theList.options[config.macros.importTiddlers.index];\n for (var j=0;j<config.macros.importTiddlers.inbound.length;j++)\n if (config.macros.importTiddlers.inbound[j].title==theItem.value) break;\n var theImported = config.macros.importTiddlers.inbound[j];\n var theExisting = store.getTiddler(theItem.value);\n var theText = theExisting.text+'\sn----\sn^^merged from: ';\n theText +='[['+config.macros.importTiddlers.src+'#'+theItem.value+'|'+config.macros.importTiddlers.src+'#'+theItem.value+']]^^\sn';\n theText +='^^'+theImported.modified.toLocaleString()+' by '+theImported.modifier+'^^\sn'+theImported.text;\n var theDate = new Date();\n var theTags = theExisting.getTags()+' '+theImported.getTags();\n theImported.set(null,theText,null,theDate,theTags);\n theImported.status = 'merged with '+theExisting.title; // mark item as merged\n theImported.status += ' - '+theExisting.modified.formatString("MM/DD/YYYY 0hh:0mm:0ss");\n theImported.status += ' by '+theExisting.modifier;\n theCollisionPanel.style.display='none';\n config.macros.importTiddlers.index=importTiddlers(config.macros.importTiddlers.index); // resume with this item\n importStopped();\n break;\n case 'importReplace': // substitute imported tiddler for existing tiddler\n var theItem = theList.options[config.macros.importTiddlers.index];\n for (var j=0;j<config.macros.importTiddlers.inbound.length;j++)\n if (config.macros.importTiddlers.inbound[j].title==theItem.value) break;\n var theImported = config.macros.importTiddlers.inbound[j];\n var theExisting = store.getTiddler(theItem.value);\n theImported.status = 'replaces '+theExisting.title; // mark item for replace\n theImported.status += ' - '+theExisting.modified.formatString("MM/DD/YYYY 0hh:0mm:0ss");\n theImported.status += ' by '+theExisting.modifier;\n theCollisionPanel.style.display='none';\n config.macros.importTiddlers.index=importTiddlers(config.macros.importTiddlers.index); // resume with THIS item\n importStopped();\n break;\n case 'importListSmaller': // decrease current listbox size, minimum=5\n if (theList.options.length==1) break;\n theList.size-=(theList.size>5)?1:0;\n config.macros.importTiddlers.listsize=theList.size;\n break;\n case 'importListLarger': // increase current listbox size, maximum=number of items in list\n if (theList.options.length==1) break;\n theList.size+=(theList.size<theList.options.length)?1:0;\n config.macros.importTiddlers.listsize=theList.size;\n break;\n case 'importListMaximize': // toggle listbox size between current and maximum\n if (theList.options.length==1) break;\n theList.size=(theList.size==theList.options.length)?config.macros.importTiddlers.listsize:theList.options.length;\n break;\n }\n}\n//}}}\n\n// // refresh listbox\n//{{{\nfunction refreshImportList(selectedIndex)\n{\n var theList = document.getElementById("importList");\n if (!theList) return;\n // if nothing to show, reset list content and size\n if (!config.macros.importTiddlers.inbound) \n {\n while (theList.length > 0) { theList.options[0] = null; }\n theList.options[0]=new Option('please open a document...',"",false,false);\n theList.size=config.macros.importTiddlers.listsize;\n return;\n }\n // get the sort order\n if (!selectedIndex) selectedIndex=0;\n if (selectedIndex==0) config.macros.importTiddlers.sort='title'; // heading\n if (selectedIndex==1) config.macros.importTiddlers.sort='title';\n if (selectedIndex==2) config.macros.importTiddlers.sort='modified';\n if (selectedIndex==3) config.macros.importTiddlers.sort='tags';\n if (selectedIndex>3) {\n // display selected tiddler count\n for (var t=0,count=0; t < theList.options.length; t++) count+=(theList.options[t].selected&&theList.options[t].value!="")?1:0;\n clearMessage(); displayMessage(config.macros.importTiddlers.countMsg.format([count]));\n return; // no refresh needed\n }\n\n // get the alphasorted list of tiddlers (optionally, filter out unchanged tiddlers)\n var tiddlers=config.macros.importTiddlers.inbound;\n tiddlers.sort(function (a,b) {if(a['title'] == b['title']) return(0); else return (a['title'] < b['title']) ? -1 : +1; });\n // clear current list contents\n while (theList.length > 0) { theList.options[0] = null; }\n // add heading and control items to list\n var i=0;\n var indent=String.fromCharCode(160)+String.fromCharCode(160);\n theList.options[i++]=new Option(tiddlers.length+' tiddler'+((tiddlers.length!=1)?'s are':' is')+' in the document',"",false,false);\n theList.options[i++]=new Option(((config.macros.importTiddlers.sort=="title" )?">":indent)+' [by title]',"",false,false);\n theList.options[i++]=new Option(((config.macros.importTiddlers.sort=="modified")?">":indent)+' [by date]',"",false,false);\n theList.options[i++]=new Option(((config.macros.importTiddlers.sort=="tags")?">":indent)+' [by tags]',"",false,false);\n // output the tiddler list\n switch(config.macros.importTiddlers.sort)\n {\n case "title":\n for(var t = 0; t < tiddlers.length; t++)\n theList.options[i++] = new Option(tiddlers[t].title,tiddlers[t].title,false,false);\n break;\n case "modified":\n // sort descending for newest date first\n tiddlers.sort(function (a,b) {if(a['modified'] == b['modified']) return(0); else return (a['modified'] > b['modified']) ? -1 : +1; });\n var lastSection = "";\n for(var t = 0; t < tiddlers.length; t++) {\n var tiddler = tiddlers[t];\n var theSection = tiddler.modified.toLocaleDateString();\n if (theSection != lastSection) {\n theList.options[i++] = new Option(theSection,"",false,false);\n lastSection = theSection;\n }\n theList.options[i++] = new Option(indent+indent+tiddler.title,tiddler.title,false,false);\n }\n break;\n case "tags":\n var theTitles = {}; // all tiddler titles, hash indexed by tag value\n var theTags = new Array();\n for(var t=0; t<tiddlers.length; t++) {\n var title=tiddlers[t].title;\n var tags=tiddlers[t].tags;\n if (!tags || !tags.length) {\n if (theTitles["untagged"]==undefined) { theTags.push("untagged"); theTitles["untagged"]=new Array(); }\n theTitles["untagged"].push(title);\n }\n else for(var s=0; s<tags.length; s++) {\n if (theTitles[tags[s]]==undefined) { theTags.push(tags[s]); theTitles[tags[s]]=new Array(); }\n theTitles[tags[s]].push(title);\n }\n }\n theTags.sort();\n for(var tagindex=0; tagindex<theTags.length; tagindex++) {\n var theTag=theTags[tagindex];\n theList.options[i++]=new Option(theTag,"",false,false);\n for(var t=0; t<theTitles[theTag].length; t++)\n theList.options[i++]=new Option(indent+indent+theTitles[theTag][t],theTitles[theTag][t],false,false);\n }\n break;\n }\n theList.selectedIndex=selectedIndex; // select current control item\n if (theList.size<config.macros.importTiddlers.listsize) theList.size=config.macros.importTiddlers.listsize;\n if (theList.size>theList.options.length) theList.size=theList.options.length;\n}\n//}}}\n\n// // re-entrant processing for handling import with interactive collision prompting\n//{{{\nfunction importTiddlers(startIndex)\n{\n if (!config.macros.importTiddlers.inbound) return -1;\n\n var theList = document.getElementById('importList');\n if (!theList) return;\n var t;\n // if starting new import, reset import status flags\n if (startIndex==0)\n for (var t=0;t<config.macros.importTiddlers.inbound.length;t++)\n config.macros.importTiddlers.inbound[t].status="";\n for (var i=startIndex; i<theList.options.length; i++)\n {\n // if list item is not selected or is a heading (i.e., has no value), skip it\n if ((!theList.options[i].selected) || ((t=theList.options[i].value)==""))\n continue;\n for (var j=0;j<config.macros.importTiddlers.inbound.length;j++)\n if (config.macros.importTiddlers.inbound[j].title==t) break;\n var inbound = config.macros.importTiddlers.inbound[j];\n var theExisting = store.getTiddler(inbound.title);\n // avoid redundant import for tiddlers that are listed multiple times (when 'by tags')\n if (inbound.status=="added")\n continue;\n // don't import the "ImportedTiddlers" history from the other document...\n if (inbound.title=='ImportedTiddlers')\n continue;\n // if tiddler exists and import not marked for replace or merge, stop importing\n if (theExisting && (inbound.status.substr(0,7)!="replace") && (inbound.status.substr(0,5)!="merge"))\n return i;\n // assemble tags (remote + existing + added)\n var newTags = "";\n if (config.macros.importTiddlers.importTags)\n newTags+=inbound.getTags() // import remote tags\n if (config.macros.importTiddlers.keepTags && theExisting)\n newTags+=" "+theExisting.getTags(); // keep existing tags\n if (config.macros.importTiddlers.addTags && config.macros.importTiddlers.newTags.trim().length)\n newTags+=" "+config.macros.importTiddlers.newTags; // add new tags\n inbound.set(null,null,null,null,newTags.trim());\n // set the status to 'added' (if not already set by the 'ask the user' UI)\n inbound.status=(inbound.status=="")?'added':inbound.status;\n // do the import!\n // OLD: store.addTiddler(in); store.setDirty(true);\n store.saveTiddler(inbound.title, inbound.title, inbound.text, inbound.modifier, inbound.modified, inbound.tags);\n store.fetchTiddler(inbound.title).created = inbound.created; // force creation date to imported value\n }\n return(-1); // signals that we really finished the entire list\n}\n//}}}\n\n//{{{\nfunction importStopped()\n{\n var theList = document.getElementById('importList');\n var theNewTitle = document.getElementById('importNewTitle');\n if (!theList) return;\n if (config.macros.importTiddlers.index==-1)\n importReport(); // import finished... generate the report\n else\n {\n // DEBUG alert('import stopped at: '+config.macros.importTiddlers.index);\n // import collision... show the collision panel and set the title edit field\n document.getElementById('importCollisionPanel').style.display='block';\n theNewTitle.value=theList.options[config.macros.importTiddlers.index].value;\n }\n}\n//}}}\n\n// // ''REPORT GENERATOR''\n//{{{\nfunction importReport(quiet)\n{\n if (!config.macros.importTiddlers.inbound) return;\n // DEBUG alert('importReport: start');\n\n // if import was not completed, the collision panel will still be open... close it now.\n var panel=document.getElementById('importCollisionPanel'); if (panel) panel.style.display='none';\n\n // get the alphasorted list of tiddlers\n var tiddlers = config.macros.importTiddlers.inbound;\n // gather the statistics\n var count=0;\n for (var t=0; t<tiddlers.length; t++)\n if (tiddlers[t].status && tiddlers[t].status.trim().length && tiddlers[t].status.substr(0,7)!="skipped") count++;\n\n // generate a report\n if (count && config.options.chkImportReport) {\n // get/create the report tiddler\n var theReport = store.getTiddler('ImportedTiddlers');\n if (!theReport) { theReport= new Tiddler(); theReport.title = 'ImportedTiddlers'; theReport.text = ""; }\n // format the report content\n var now = new Date();\n var newText = "On "+now.toLocaleString()+", "+config.options.txtUserName\n newText +=" imported "+count+" tiddler"+(count==1?"":"s")+" from\sn[["+config.macros.importTiddlers.src+"|"+config.macros.importTiddlers.src+"]]:\sn";\n if (config.macros.importTiddlers.addTags && config.macros.importTiddlers.newTags.trim().length)\n newText += "imported tiddlers were tagged with: \s""+config.macros.importTiddlers.newTags+"\s"\sn";\n newText += "<<<\sn";\n for (var t=0; t<tiddlers.length; t++) if (tiddlers[t].status) newText += "#[["+tiddlers[t].title+"]] - "+tiddlers[t].status+"\sn";\n newText += "<<<\sn";\n newText += "<html><input type=\s"button\s" href=\s"javascript:;\s" ";\n newText += "onclick=\s"story.closeTiddler('"+theReport.title+"'); store.deleteTiddler('"+theReport.title+"');\s" ";\n newText += "value=\s"discard report\s"></html>";\n // update the ImportedTiddlers content and show the tiddler\n theReport.text = newText+((theReport.text!="")?'\sn----\sn':"")+theReport.text;\n theReport.modifier = config.options.txtUserName;\n theReport.modified = new Date();\n // OLD: store.addTiddler(theReport);\n store.saveTiddler(theReport.title, theReport.title, theReport.text, theReport.modifier, theReport.modified, theReport.tags);\n if (!quiet) { story.displayTiddler(null,theReport.title,1,null,null,false); story.refreshTiddler(theReport.title,1,true); }\n }\n\n // reset status flags\n for (var t=0; t<config.macros.importTiddlers.inbound.length; t++) config.macros.importTiddlers.inbound[t].status="";\n\n // refresh display if tiddlers have been loaded\n if (count) { store.setDirty(true); store.notifyAll(); }\n\n // always show final message when tiddlers were actually loaded\n if (count) displayMessage(config.macros.importTiddlers.importedMsg.format([count,tiddlers.length,config.macros.importTiddlers.src]));\n}\n//}}}\n\n/***\n!!!!!TW 2.1beta Core Code Candidate\n//The following section is a preliminary 'code candidate' for incorporation of non-interactive 'load tiddlers' functionality into TW2.1beta. //\n***/\n//{{{\n// default cookie/option values\nif (!config.options.chkImportReport) config.options.chkImportReport=true;\n\nconfig.macros.loadTiddlers = {\n label: "",\n prompt: "add/update tiddlers from '%0'",\n askMsg: "Please enter a local path/filename or a remote URL",\n openMsg: "Opening %0",\n openErrMsg: "Could not open %0 - error=%1",\n readMsg: "Read %0 bytes from %1",\n foundMsg: "Found %0 tiddlers in %1",\n nochangeMsg: "'%0' is up-to-date... skipped.",\n loadedMsg: "Loaded %0 of %1 tiddlers from %2"\n};\n\nconfig.macros.loadTiddlers.handler = function(place,macroName,params) {\n var label=(params[0] && params[0].substr(0,6)=='label:')?params.shift().substr(6):this.label;\n var prompt=(params[0] && params[0].substr(0,7)=='prompt:')?params.shift().substr(7):this.prompt;\n var filter="updates";\n if (params[0] && (params[0]=='all' || params[0]=='new' || params[0]=='changes' || params[0]=='updates'\n || params[0].substr(0,8)=='tiddler:' || params[0].substr(0,4)=='tag:'))\n filter=params.shift();\n var src=params.shift(); if (!src || !src.length) return; // filename is required\n var quiet=(params[0]=="quiet"); if (quiet) params.shift();\n var ask=(params[0]=="confirm"); if (ask) params.shift();\n var force=(params[0]=="force"); if (force) params.shift();\n if (label.trim().length) {\n // link triggers load tiddlers from another file/URL and then applies filtering rules to add/replace tiddlers in the store\n createTiddlyButton(place,label.format([src]),prompt.format([src]), function() {\n if (src=="ask") src=prompt(config.macros.loadTiddlers.askMsg);\n loadRemoteFile(src,loadTiddlers,quiet,ask,filter,force);\n })\n }\n else {\n // load tiddlers from another file/URL and then apply filtering rules to add/replace tiddlers in the store\n if (src=="ask") src=prompt(config.macros.loadTiddlers.askMsg);\n loadRemoteFile(src,loadTiddlers,quiet,ask,filter,force);\n }\n}\n\nfunction loadTiddlers(src,html,quiet,ask,filter,force)\n{\n var tiddlers = readTiddlersFromHTML(html);\n var count=tiddlers?tiddlers.length:0;\n if (!quiet) displayMessage(config.macros.loadTiddlers.foundMsg.format([count,src]));\n var count=0;\n if (tiddlers) for (var t=0;t<tiddlers.length;t++) {\n var inbound = tiddlers[t];\n var theExisting = store.getTiddler(inbound.title);\n if (inbound.title=='ImportedTiddlers')\n continue; // skip "ImportedTiddlers" history from the other document...\n\n // apply the all/new/changes/updates filter (if any)\n if (filter && filter!="all") {\n if ((filter=="new") && theExisting) // skip existing tiddlers\n continue;\n if ((filter=="changes") && !theExisting) // skip new tiddlers\n continue;\n if ((filter.substr(0,4)=="tag:") && inbound.tags.find(filter.substr(4))==null) // must match specific tag value\n continue;\n if ((filter.substr(0,8)=="tiddler:") && inbound.title!=filter.substr(8)) // must match specific tiddler name\n continue;\n if (!force && store.tiddlerExists(inbound.title) && ((theExisting.modified.getTime()-inbound.modified.getTime())>=0))\n { if (!quiet) displayMessage(config.macros.loadTiddlers.nochangeMsg.format([inbound.title])); continue; }\n }\n // get confirmation if required\n if (ask && !confirm((theExisting?"Update":"Add")+" tiddler '"+inbound.title+"'\snfrom "+src))\n { tiddlers[t].status="skipped - cancelled by user"; continue; }\n // DO IT!\n // OLD: store.addTiddler(in);\n store.saveTiddler(inbound.title, inbound.title, inbound.text, inbound.modifier, inbound.modified, inbound.tags);\n store.fetchTiddler(inbound.title).created = inbound.created; // force creation date to imported value\n tiddlers[t].status=theExisting?"updated":"added"\n count++;\n }\n if (count) {\n // refresh display\n store.setDirty(true);\n store.notifyAll();\n // generate a report\n if (config.options.chkImportReport) {\n // get/create the report tiddler\n var theReport = store.getTiddler('ImportedTiddlers');\n if (!theReport) { theReport= new Tiddler(); theReport.title = 'ImportedTiddlers'; theReport.text = ""; }\n // format the report content\n var now = new Date();\n var newText = "On "+now.toLocaleString()+", "+config.options.txtUserName+" loaded "+count+" tiddlers from\sn[["+src+"|"+src+"]]:\sn";\n newText += "<<<\sn";\n for (var t=0; t<tiddlers.length; t++) if (tiddlers[t].status) newText += "#[["+tiddlers[t].title+"]] - "+tiddlers[t].status+"\sn";\n newText += "<<<\sn";\n newText += "<html><input type=\s"button\s" href=\s"javascript:;\s" ";\n newText += "onclick=\s"story.closeTiddler('"+theReport.title+"'); store.deleteTiddler('"+theReport.title+"');\s" ";\n newText += "value=\s"discard report\s"></html>";\n // update the ImportedTiddlers content and show the tiddler\n theReport.text = newText+((theReport.text!="")?'\sn----\sn':"")+theReport.text;\n theReport.modifier = config.options.txtUserName;\n theReport.modified = new Date();\n // OLD: store.addTiddler(theReport);\n store.saveTiddler(theReport.title, theReport.title, theReport.text, theReport.modifier, theReport.modified, theReport.tags);\n if (!quiet) { story.displayTiddler(null,theReport.title,1,null,null,false); story.refreshTiddler(theReport.title,1,true); }\n }\n }\n // always show final message when tiddlers were actually loaded\n if (!quiet||count) displayMessage(config.macros.loadTiddlers.loadedMsg.format([count,tiddlers.length,src]));\n}\n\nfunction loadRemoteFile(src,callback,quiet,ask,filter,force) {\n if (src==undefined || !src.length) return null; // filename is required\n if (!quiet) clearMessage();\n if (!quiet) displayMessage(config.macros.loadTiddlers.openMsg.format([src]));\n if (src.substr(0,4)!="http" && src.substr(0,4)!="file") { // if not a URL, fallback to read from local filesystem\n var txt=loadFile(src);\n if ((txt==null)||(txt==false)) // file didn't load\n { if (!quiet) displayMessage(config.macros.loadTiddlers.openErrMsg.format([src,"(unknown)"])); }\n else {\n if (!quiet) displayMessage(config.macros.loadTiddlers.readMsg.format([txt.length,src]));\n if (callback) callback(src,convertUTF8ToUnicode(txt),quiet,ask,filter,force);\n }\n }\n else {\n var x; // get an request object\n try {x = new XMLHttpRequest()} // moz\n catch(e) {\n try {x = new ActiveXObject("Msxml2.XMLHTTP")} // IE 6\n catch (e) {\n try {x = new ActiveXObject("Microsoft.XMLHTTP")} // IE 5\n catch (e) { return }\n }\n }\n // setup callback function to handle server response(s)\n x.onreadystatechange = function() {\n if (x.readyState == 4) {\n if (x.status==0 || x.status == 200) {\n if (!quiet) displayMessage(config.macros.loadTiddlers.readMsg.format([x.responseText.length,src]));\n if (callback) callback(src,x.responseText,quiet,ask,filter,force);\n }\n else {\n if (!quiet) displayMessage(config.macros.loadTiddlers.openErrMsg.format([src,x.status]));\n }\n }\n }\n // get privileges to read another document's DOM via http:// or file:// (moz-only)\n if (typeof(netscape)!="undefined") {\n try { netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead"); }\n catch (e) { if (!quiet) displayMessage(e.description?e.description:e.toString()); }\n }\n // send the HTTP request\n try {\n var url=src+(src.indexOf('?')<0?'?':'&')+'nocache='+Math.random();\n x.open("GET",src,true);\n if (x.overrideMimeType) x.overrideMimeType('text/html');\n x.send(null);\n }\n catch (e) {\n if (!quiet) {\n displayMessage(config.macros.loadTiddlers.openErrMsg.format([src,"(unknown)"]));\n displayMessage(e.description?e.description:e.toString());\n }\n }\n }\n}\n\nfunction readTiddlersFromHTML(html)\n{\n // extract store area from html \n var start=html.indexOf('<div id="storeArea">');\n var end=html.indexOf('</body>',start);\n var sa="<html><body>"+html.substring(start,end)+"</body></html>";\n\n // load html into iframe document\n var f=document.getElementById("loaderFrame"); if (f) document.body.removeChild(f);\n f=document.createElement("iframe"); f.id="loaderFrame";\n f.style.width="0px"; f.style.height="0px"; f.style.border="0px";\n document.body.appendChild(f);\n var d=f.document;\n if (f.contentDocument) d=f.contentDocument; // For NS6\n else if (f.contentWindow) d=f.contentWindow.document; // For IE5.5 and IE6\n d.open(); d.writeln(sa); d.close();\n\n // read tiddler DIVs from storeArea DOM element \n var sa = d.getElementById("storeArea");\n if (!sa) return null;\n sa.normalize();\n var nodes = sa.childNodes;\n if (!nodes || !nodes.length) return null;\n var tiddlers = [];\n for(var t = 0; t < nodes.length; t++) {\n var title = null;\n if(nodes[t].getAttribute)\n title = nodes[t].getAttribute("tiddler");\n if(!title && nodes[t].id && (nodes[t].id.substr(0,5) == "store"))\n title = nodes[t].id.substr(5);\n if(title && title != "")\n tiddlers.push((new Tiddler()).loadFromDiv(nodes[t],title));\n }\n return tiddlers;\n}\n//}}}
On Wednesday, September 20, 2006 7:30:06 AM, Russ Herman imported 1 tiddler from\n[[C:\sWorkFiles\sFall2006\sindex.htm|C:\sWorkFiles\sFall2006\sindex.htm]]:\n<<<\n#[[Mathematics Writing]] - replaces Mathematics Writing - 8/27/2006 12:37:00 by Russ Herman\n<<<\n<html><input type="button" href="javascript:;" onclick="story.closeTiddler('ImportedTiddlers'); store.deleteTiddler('ImportedTiddlers');" value="discard report"></html>\n----\nOn Wednesday, September 20, 2006 7:21:55 AM, Russ Herman imported 1 tiddler from\n[[C:\sWorkFiles\sFall2006\sindex.htm|C:\sWorkFiles\sFall2006\sindex.htm]]:\n<<<\n#[[Mathematics Writing]] - added\n<<<\n<html><input type="button" href="javascript:;" onclick="story.closeTiddler('ImportedTiddlers'); store.deleteTiddler('ImportedTiddlers');" value="discard report"></html>\n----\nOn Sunday, September 10, 2006 10:57:14 PM, Russ Herman imported 1 tiddler from\n[[C:\sWorkFiles\sFall2006\sWiki\sChaosWiki.htm|C:\sWorkFiles\sFall2006\sWiki\sChaosWiki.htm]]:\n<<<\n#[[Plugin: jsMath]] - added\n<<<\n<html><input type="button" href="javascript:;" onclick="story.closeTiddler('ImportedTiddlers'); store.deleteTiddler('ImportedTiddlers');" value="discard report"></html>\n----\nOn Sunday, September 10, 2006 2:54:29 PM, Russ Herman imported 1 tiddler from\n[[C:\sWorkFiles\sFall2006\sindex.htm|C:\sWorkFiles\sFall2006\sindex.htm]]:\n<<<\n#[[LaTeX]] - added\n<<<\n<html><input type="button" href="javascript:;" onclick="story.closeTiddler('ImportedTiddlers'); store.deleteTiddler('ImportedTiddlers');" value="discard report"></html>\n----\nOn Sunday, September 10, 2006 2:34:44 PM, Russ Herman imported 1 tiddler from\n[[C:\sWorkFiles\sFall2006\sWikiNotes\sWikiNotes.html|C:\sWorkFiles\sFall2006\sWikiNotes\sWikiNotes.html]]:\n<<<\n#[[InlineJavascriptPlugin]] - added\n<<<\n<html><input type="button" href="javascript:;" onclick="story.closeTiddler('ImportedTiddlers'); store.deleteTiddler('ImportedTiddlers');" value="discard report"></html>\n----\nOn Sunday, September 10, 2006 2:32:28 PM, Russ Herman imported 7 tiddlers from\n[[C:\sWorkFiles\sFall2006\sWiki\sChaosWiki.htm|C:\sWorkFiles\sFall2006\sWiki\sChaosWiki.htm]]:\n<<<\n#[[Configuration]] - added\n#[[StyleSheet]] - added\n#[[StyleSheets]] - added\n#[[SystemLayout]] - added\n#[[SystemSideBars]] - added\n#[[SystemTiddlers]] - added\n#[[ViewTemplate]] - added\n<<<\n<html><input type="button" href="javascript:;" onclick="story.closeTiddler('ImportedTiddlers'); store.deleteTiddler('ImportedTiddlers');" value="discard report"></html>
/***\n''InlineJavascriptPlugin for ~TiddlyWiki version 1.2.x and 2.0''\n^^author: Eric Shulman - ELS Design Studios\nsource: http://www.TiddlyTools.com/#InlineJavascriptPlugin\nlicense: [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]^^\n\nInsert Javascript executable code directly into your tiddler content. Lets you ''call directly into TW core utility routines, define new functions, calculate values, add dynamically-generated TiddlyWiki-formatted output'' into tiddler content, or perform any other programmatic actions each time the tiddler is rendered.\n!!!!!Usage\n<<<\nWhen installed, this plugin adds new wiki syntax for surrounding tiddler content with {{{<script>}}} and {{{</script>}}} markers, so that it can be treated as embedded javascript and executed each time the tiddler is rendered.\n\n''Deferred execution from an 'onClick' link''\nBy including a label="..." parameter in the initial {{{<script>}}} marker, the plugin will create a link to an 'onclick' script that will only be executed when that specific link is clicked, rather than running the script each time the tiddler is rendered.\n\n''External script source files:''\nYou can also load javascript from an external source URL, by including a src="..." parameter in the initial {{{<script>}}} marker (e.g., {{{<script src="demo.js"></script>}}}). This is particularly useful when incorporating third-party javascript libraries for use in custom extensions and plugins. The 'foreign' javascript code remains isolated in a separate file that can be easily replaced whenever an updated library file becomes available.\n\n''Display script source in tiddler output''\nBy including the keyword parameter "show", in the initial {{{<script>}}} marker, the plugin will include the script source code in the output that it displays in the tiddler.\n\n''Defining javascript functions and libraries:''\nAlthough the external javascript file is loaded while the tiddler content is being rendered, any functions it defines will not be available for use until //after// the rendering has been completed. Thus, you cannot load a library and //immediately// use it's functions within the same tiddler. However, once that tiddler has been loaded, the library functions can be freely used in any tiddler (even the one in which it was initially loaded).\n\nTo ensure that your javascript functions are always available when needed, you should load the libraries from a tiddler that will be rendered as soon as your TiddlyWiki document is opened. For example, you could put your {{{<script src="..."></script>}}} syntax into a tiddler called LoadScripts, and then add {{{<<tiddler LoadScripts>>}}} in your MainMenu tiddler.\n\nSince the MainMenu is always rendered immediately upon opening your document, the library will always be loaded before any other tiddlers that rely upon the functions it defines. Loading an external javascript library does not produce any direct output in the tiddler, so these definitions should have no impact on the appearance of your MainMenu.\n\n''Creating dynamic tiddler content''\nAn important difference between this implementation of embedded scripting and conventional embedded javascript techniques for web pages is the method used to produce output that is dynamically inserted into the document:\n* In a typical web document, you use the document.write() function to output text sequences (often containing HTML tags) that are then rendered when the entire document is first loaded into the browser window.\n* However, in a ~TiddlyWiki document, tiddlers (and other DOM elements) are created, deleted, and rendered "on-the-fly", so writing directly to the global 'document' object does not produce the results you want (i.e., replacing the embedded script within the tiddler content), and completely replaces the entire ~TiddlyWiki document in your browser window.\n* To allow these scripts to work unmodified, the plugin automatically converts all occurences of document.write() so that the output is inserted into the tiddler content instead of replacing the entire ~TiddlyWiki document.\n\nIf your script does not use document.write() to create dynamically embedded content within a tiddler, your javascript can, as an alternative, explicitly return a text value that the plugin can then pass through the wikify() rendering engine to insert into the tiddler display. For example, using {{{return "thistext"}}} will produce the same output as {{{document.write("thistext")}}}.\n\n//Note: your script code is automatically 'wrapped' inside a function, {{{_out()}}}, so that any return value you provide can be correctly handled by the plugin and inserted into the tiddler. To avoid unpredictable results (and possibly fatal execution errors), this function should never be redefined or called from ''within'' your script code.//\n\n''Accessing the ~TiddlyWiki DOM''\nThe plugin provides one pre-defined variable, 'place', that is passed in to your javascript code so that it can have direct access to the containing DOM element into which the tiddler output is currently being rendered.\n\nAccess to this DOM element allows you to create scripts that can:\n* vary their actions based upon the specific location in which they are embedded\n* access 'tiddler-relative' information (use findContainingTiddler(place))\n* perform direct DOM manipulations (when returning wikified text is not enough)\n<<<\n!!!!!Examples\n<<<\nan "alert" message box:\n><script show>\n alert('InlineJavascriptPlugin: this is a demonstration message');\n</script>\ndynamic output:\n><script show>\n return (new Date()).toString();\n</script>\nwikified dynamic output:\n><script show>\n return "link to current user: [["+config.options.txtUserName+"]]";\n</script>\ndynamic output using 'place' to get size information for current tiddler:\n><script show>\n if (!window.story) window.story=window;\n var title=story.findContainingTiddler(place).id.substr(7);\n return title+" is using "+store.getTiddlerText(title).length+" bytes";\n</script>\ncreating an 'onclick' button/link that runs a script:\n><script label="click here" show>\n if (!window.story) window.story=window;\n alert("Hello World!\snlinktext='"+place.firstChild.data+"'\sntiddler='"+story.findContainingTiddler(place).id.substr(7)+"'");\n</script>\nloading a script from a source url:\n>http://www.TiddlyTools.com/demo.js contains:\n>>{{{function demo() { alert('this output is from demo(), defined in demo.js') } }}}\n>>{{{alert('InlineJavascriptPlugin: demo.js has been loaded'); }}}\n><script src="demo.js" show>\n return "loading demo.js..."\n</script>\n><script label="click to execute demo() function" show>\n demo()\n</script>\n<<<\n!!!!!Installation\n<<<\nimport (or copy/paste) the following tiddlers into your document:\n''InlineJavascriptPlugin'' (tagged with <<tag systemConfig>>)\n<<<\n!!!!!Revision History\n<<<\n''2006.06.01 [1.5.1]'' when calling wikify() on script return value, pass hightlightRegExp and tiddler params so macros that rely on these values can render properly\n''2006.04.19 [1.5.0]'' added 'show' parameter to force display of javascript source code in tiddler output\n''2006.01.05 [1.4.0]'' added support 'onclick' scripts. When label="..." param is present, a button/link is created using the indicated label text, and the script is only executed when the button/link is clicked. 'place' value is set to match the clicked button/link element.\n''2005.12.13 [1.3.1]'' when catching eval error in IE, e.description contains the error text, instead of e.toString(). Fixed error reporting so IE shows the correct response text. Based on a suggestion by UdoBorkowski\n''2005.11.09 [1.3.0]'' for 'inline' scripts (i.e., not scripts loaded with src="..."), automatically replace calls to 'document.write()' with 'place.innerHTML+=' so script output is directed into tiddler content. Based on a suggestion by BradleyMeck\n''2005.11.08 [1.2.0]'' handle loading of javascript from an external URL via src="..." syntax\n''2005.11.08 [1.1.0]'' pass 'place' param into scripts to provide direct DOM access \n''2005.11.08 [1.0.0]'' initial release\n<<<\n!!!!!Credits\n<<<\nThis feature was developed by EricShulman from [[ELS Design Studios|http:/www.elsdesign.com]]\n<<<\n!!!!!Code\n***/\n//{{{\nversion.extensions.inlineJavascript= {major: 1, minor: 5, revision: 1, date: new Date(2006,6,1)};\n\nconfig.formatters.push( {\n name: "inlineJavascript",\n match: "\s\s<script",\n lookahead: "\s\s<script(?: src=\s\s\s"((?:.|\s\sn)*?)\s\s\s")?(?: label=\s\s\s"((?:.|\s\sn)*?)\s\s\s")?( show)?\s\s>((?:.|\s\sn)*?)\s\s</script\s\s>",\n\n handler: function(w) {\n var lookaheadRegExp = new RegExp(this.lookahead,"mg");\n lookaheadRegExp.lastIndex = w.matchStart;\n var lookaheadMatch = lookaheadRegExp.exec(w.source)\n if(lookaheadMatch && lookaheadMatch.index == w.matchStart) {\n if (lookaheadMatch[1]) { // load a script library\n // make script tag, set src, add to body to execute, then remove for cleanup\n var script = document.createElement("script"); script.src = lookaheadMatch[1];\n document.body.appendChild(script); document.body.removeChild(script);\n }\n if (lookaheadMatch[4]) { // there is script code\n if (lookaheadMatch[3]) // show inline script code in tiddler output\n wikify("{{{\sn"+lookaheadMatch[0]+"\sn}}}\sn",w.output);\n if (lookaheadMatch[2]) { // create a link to an 'onclick' script\n // add a link, define click handler, save code in link (pass 'place'), set link attributes\n var link=createTiddlyElement(w.output,"a",null,"tiddlyLinkExisting",lookaheadMatch[2]);\n link.onclick=function(){try{return(eval(this.code))}catch(e){alert(e.description?e.description:e.toString())}}\n link.code="function _out(place){"+lookaheadMatch[4]+"};_out(this);"\n link.setAttribute("href","javascript:;"); link.setAttribute("title",""); link.style.cursor="pointer";\n }\n else { // run inline script code\n var code="function _out(place){"+lookaheadMatch[4]+"};_out(w.output);"\n code=code.replace(/document.write\s(/gi,'place.innerHTML+=(');\n try { var out = eval(code); } catch(e) { out = e.description?e.description:e.toString(); }\n if (out && out.length) wikify(out,w.output,w.highlightRegExp,w.tiddler);\n }\n }\n w.nextMatch = lookaheadMatch.index + lookaheadMatch[0].length;\n }\n }\n} )\n//}}}\n
''What is LaTeX?''\n\nLaTeX is a document editing system for producing scientific documents with properly typeset equations. It has been a standard for preparing professional articles and theses in mathematics and physics for several decades. This site was designed for use in both the Mathematics Senior Seminar and for the Graduate Thesis preparation. You will find at this site\n* [[How to Obtain|Software]] LaTeX and Editors for Typing Your Papers\n* How to [[Start a Paper|Starting an Article]]\n* [[Advanced Editing]]\n** Links to LaTeX Commands for [[Special Symbols and Functions|Typing Mathematics]]\n** How to Write Papers with [[Mathematical Expressions|Writing Mathematics]]\n** [[How To Insert Tables, Figures, etc.|Advanced Editing]]\n** How to Produce [[Presentations]] with Mathematics\n**How to fill PDF page with text, [[PDF Layout]]\n*Style Files for UNCW [[Masters Theses|Masters Theses]]\n* Online [[Help and Tutorials]]
<html><iframe src="http://web.ift.uib.no/Fysisk/Teori/KURS/TeX/latex1.html" style="width:100%;height:400px"></iframe></html>\n{{{http://web.ift.uib.no/Fysisk/Teori/KURS/TeX/latex1.html}}}
There are several ways to get mathematics typeset in presentation slides or transparencies. Some of these are covered in the section [[Presentations]]. In this section we will focus on two methods. The first is the simple seminar style and the other gives examples of more interactive presentation slides using [[Prosper]].\n\n!!The Seminar Style\nThis is a simple implementation of the seminar style. Theheader begins with\n{{{\n\sdocumentclass[semrot,portrait,sem-a4]{seminar}\n}}}\nYou can control the global font size by adding\n{{{\n\sslidesmag{4}\n}}}\nThe first page is the title page. We begin with\n{{{\n\sbegin{document}\n\n\sbegin{slide}\n\sbegin{center} \sbegin{large} {\sbf {Sample Seminar Slides}}\send{large} \s\s Russell L. Herman\n\s\s University of North Carolina Wilmington, Wilmington, NC \send{center} \saddvspace{1cm}\n\n\sabstract{We show a simple slide layout using the seminar style.}\n\n\send{slide}\n}}}\nThe next slides show some simple features:\n{{{\n\sbegin{slide}\n\ssection*{Title for Slide 1}\n\n{\sbf Galilean Transformation:}\n\n\sbegin{equation}\nu_t+6uu_x+u_{xxx}=0, \slabel{sKdV}\n\send{equation}\nwhere $u_t = \sfrac{\spartial u}{\spartial t}$\n\n\saddvspace{1cm}\n\n... and more can be said about this.\n\n\send{slide}\n}}}\nYou can list your points using a numbered list.\n{{{\n\sbegin{slide}\n\ssection*{Numbering Your Points}\n\nYou can list your points\n\n\sbegin{enumerate}\n\n\sitem First item\n\n\sitem Second item\n\n\sitem Third item\n\n\sbegin{enumerate}\n\sitem Fourth item\n\n\sitem Fifth item\n\send{enumerate}\n\sitem Sixth item\n\send{enumerate}\n\n\send{slide}\n}}}\nYou may prefer to use bullets.\n{{{\n\sbegin{slide}\n\ssection*{Using Bullets}\n\nYou can itemize your points\n\n\sbegin{itemize}\n\n\sitem First item\n\n\sitem Second item\n\n\sitem Third item\n\sbegin{itemize}\n\sitem Fourth item\n\n\sitem Fifth item\n\n\send{itemize}\n\n\sitem Sixth item\n\send{itemize}\n\n\send{slide}\n}}}\nOf course, you need to end the document with the usual command:\n{{{\n\send{document}\n}}}\n\nThe full file is in [[sample1.tex|sample1.tex]] and a [[PDF Version|sample1.pdf]] is also provided. In order to view your slides, you can create a dvi file and then convert the dvi to pdf. In order to view these slides you need to rotate the pages in the Acrobat reader and view full screen. You can format the files even more. See the [[Seminar FAQ|http://www.tug.org/applications/Seminar/Seminar-FAQ.html]].
<html><iframe src="http://omega.albany.edu:8008/Symbols.html" style="width:100%;height:400px"></iframe></html>\n{{{http://omega.albany.edu:8008/Symbols.html}}}
''Using ~LaTeX''\n[[Starting an Article]]\n[[Typing Mathematics]]\n[[Advanced Editing]]\n-----------------------------\n''Special Resources''\n[[Writing Mathematics]]\n[[Presentations]]\n[[Masters Theses]]\n[[Style Files]]\n[[Software]]\n-----------------------\n''Help''\n[[Help and Tutorials]]\n[[UNCW Contact]]\n-----------------------\n{{small{\n<<search>>\n<<closeAll>>\n<<permaview>>\n<<newTiddler>>\n<<saveChanges>>\n[[Import Tiddlers]]}}}\n-----------------------\n{{smaller{[[by Dr. R. Herman.|http://people.uncw.edu/herman]]}}}
Masters theses in the Department of Mathematics and Statistics at UNC Wilmington are prepared using LaTeX. In order to adhere to University guidelines, a thesis format was formally accepted by the Graduate School in 2001. The files needed are provided here. You will need to download these files and make the appropriate replacements in the preamble and add you own content. Any questions on the thesis format can be directed to Dr. Herman.\n\nYou should begin with the files in the [[UNCW_Thesis.zip|http://people.uncw.edu/hermanr/LaTeX/uncw_thesis/UNCW_Thesis.zip]] file. The sample thesis has comments and serves as an example of how you should begin your thesis document. There may be other files needed depending upon which front end you are using to run LaTeX. It is assumed that you are using LaTeX 2.09e. //Right-click to download to your computer.//\n# UNCW Thesis Style file [[uncw_thesis.cls|http://people.uncw.edu/hermanr/LaTeX/uncw_thesis/uncw_thesis.cls]] - This file was updated Nov 15, 2007.\n# Sample Thesis\n##[[Main Body|http://people.uncw.edu/hermanr/LaTeX/UNCW_Thesis/thesis.tex]].\n##[[Chapter 2|http://people.uncw.edu/hermanr/LaTeX/uncw_thesis/chap2.tex]]\n##[[Bibliography|http://people.uncw.edu/hermanr/LaTeX/uncw_thesis/biblio.tex]]\n##[[Appendix|http://people.uncw.edu/hermanr/LaTeX/uncw_thesis/appendix.tex]]\n# Figures for Sample\n##[[eps file|http://people.uncw.edu/hermanr/LaTeX/uncw_thesis/pics/julia.eps]]\n##[[bmp file|http://people.uncw.edu/hermanr/LaTeX/uncw_thesis/pics/julia.bmp]] \n# Beginning Files - [[UNCW_Thesis.zip|http://people.uncw.edu/hermanr/LaTeX/uncw_thesis/UNCW_Thesis.zip]] - Most of the files you will need are packaged in this file. Save it to your machine and use an unzip utility. Extract the files and make sure you check that paths/folders are kept.\n\nAfter downloading the files, you should explore the content and make the needed changes. Graduate students will learn to use LaTeX in MAT 595. However, more advanced techniques are covered in other sections of this site. Sometimes you may need additional [[Style Files]], or you might need to know how to create special formatting. (See [[Advanced Editing]].) Feel free to contact the experts in the department. In the meantime look over this site for help and how to information on creating your thesis and presentations. Also, you might want to look at the [[Figures]] section for samples. Some of the figure demos are included in the above zip file.\n\n''Note'' When printing PDF files, sometimes the margins are off. Test one page in your document to make sure the printed margins are correct. Often, the print screen has boxes checked which distort the printed pages. Make sure these are unchecked, or you will have problems with the margins when you go to the Graduate School for approval.
Links found but not necessarily inserted into rest of site yet.\n\n*some detailed tex plus instructions http://hkumath.hku.hk/~schung/misc/tex.html\n*Lyx - http://wiki.lyx.org/Windows/WindowsSetup\n*PDF LaTeX by Example http://www.maths.manchester.ac.uk/~kd/latextut/pdfbyex.htm\n*TexPoint – convert eqns to bmps? http://texpoint.necula.org/\n*TeXnicCenter - http://ctan.org/tex-archive/systems/win32/TeXnicCenter/\n*Free Useful Software - http://maths.york.ac.uk/www/UgradComputingDownloads Probably need to put links at dept site\n*http://www.tug.org/protext/ - protext – supposedly a CD version w/o HD install\n*http://stuwww.uvt.nl/~hendri/index.html?/~hendri/Downloads/powerdot.html&mainframeha - HA Prosper\n*[[Seminar @ TUG|http://www.tug.org/applications/Seminar/]]\n*hyperref http://www.tug.org/applications/hyperref/\n*pstricks http://tug.org/PSTricks/main.cgi/\n*http://www.miwie.org/presentations/presentations.html\n*http://www.river-valley.com/download/\n
Here are some links to various online LaTeX viewers which can be used to test blocks of expressions. In some cases, you can capture the images and use them in other documents. For an example, there is a [[YouTube|http://www.youtube.com/]] video showing how to put [[equations in a Google Docs document|http://www.youtube.com/watch?v=SbxQOvELLgQ]].\n\n[[Hamline University Physics Department Latex Equation Editor|http://www.hamline.edu/~arundquist/equationeditor/ ]]\n[[TeXify|http://www.texify.com/]] Create gif images or links for email, web pages PPT or Google docs \n[[Online Equation Editor|http://www.codecogs.com/components/equationeditor/equationeditor.php]] \n[[LaTeX Servlet|http://sciencesoft.at/index.jsp?link=latex&lang=en]] Converts to image files There is also a [[Flash Applet|http://sciencesoft.at/latex/flatex.gsp?lang=en]]\n[[HotEqn The IMGless Equation Viewer Applet|http://www.atp.ruhr-uni-bochum.de/VCLab/software/HotEqn/HotEqn.html]] A Java Applet\n[[LaTeX Editor|http://www.sitmo.com/latex/]] Can save as png file\n[[TeX2Im|http://out.l3s.uni-hannover.de:9080/Equation/]] Edit and convert expressions to jpg \n[[LaTeX Previewer|http://www.tlhiv.org/ltxpreview/]]
Here is an example of how you can make sure the PDF of your paper fills the page. Also, the fontsize is set to 11 pt and an example of a figure is provided for JPEG output. \n\n{{{\n\sdocumentclass[11pt]{article}\n\susepackage{amsmath,amsthm}\n\susepackage{url}\n\susepackage{graphicx}\n\n\spdfpagewidth 8.5in\n\spdfpageheight 11in \n\n\ssetlength\stopmargin{0in}\n\ssetlength\sheadheight{0in}\n\ssetlength\sheadsep{0in}\n\ssetlength\stextheight{7.7in}\n\ssetlength\stextwidth{6.5in}\n\ssetlength\soddsidemargin{0in}\n\ssetlength\sevensidemargin{0in}\n\ssetlength\sparindent{0.25in}\n\ssetlength\sparskip{0.25in} \n\n\stitle{My Title}\n\sauthor{My Name}\n\sdate{April 18, 2009}\n\n\snewtheorem{theorem}{Theorem}\n\snewtheorem{definition}{Definition}\n\n\sbegin{document}\n\smaketitle\n\n\sbegin{abstract}\nHere is where you place abstract\n\send{abstract}\n\n\ssection{First Section}\n\nNow start typing. Note that you can add a url using the url package and then writing the site as \surl{http://people.uncw.edu/hermanr/}. Also, you can add figures. For a JPG you can write the code:\n\n\sbegin{figure}[htb]\n\scentering\n\sincludegraphics[width=2in]{myfig.jpg}\n\scaption{This is a blah ...}\n\slabel{myfig}\n\send{figure}\n\n\send{document}\n}}}
<div class='header'>\n<div class='headerShadow'>\n<span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>&nbsp;\n<span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>\n</div>\n<div class='headerForeground'>\n<span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>&nbsp;\n<span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>\n</div>\n</div>\n<div id='mainMenu' refresh='content' tiddler='MainMenu'></div>\n<div id='sidebar'>\n<div id='sidebarOptions' refresh='content' tiddler='SideBarOptions'></div>\n<div id='sidebarTabs' refresh='content' force='true' tiddler='SideBarTabs'></div>\n</div>\n<div id='displayArea'>\n<div id='messageArea'></div>\n<div id='tiddlerDisplay'></div>\n</div>
/***\n|Name|Plugin: jsMath|\n|Created by|BobMcElrath|\n|Email|my first name at my last name dot org|\n|Location|http://bob.mcelrath.org/tiddlyjsmath-2.0.3.html|\n|Version|1.4|\n|Requires|[[TiddlyWiki|http://www.tiddlywiki.com]] &ge; 2.0.3, [[jsMath|http://www.math.union.edu/~dpvc/jsMath/]] &ge; 3.0|\n!Description\nLaTeX is the world standard for specifying, typesetting, and communicating mathematics among scientists, engineers, and mathematicians. For more information about LaTeX itself, visit the [[LaTeX Project|http://www.latex-project.org/]]. This plugin typesets math using [[jsMath|http://www.math.union.edu/~dpvc/jsMath/]], which is an implementation of the TeX math rules and typesetting in javascript, for your browser. Notice the small button in the lower right corner which opens its control panel.\n!Installation\nIn addition to this plugin, you must also [[install jsMath|http://www.math.union.edu/~dpvc/jsMath/download/jsMath.html]] on the same server as your TiddlyWiki html file. If you're using TiddlyWiki without a web server, then the jsMath directory must be placed in the same location as the TiddlyWiki html file.\n\nI also recommend modifying your StyleSheet use serif fonts that are slightly larger than normal, so that the math matches surrounding text, and \s\ssmall fonts are not unreadable (as in exponents and subscripts).\n{{{\n.viewer {\n line-height: 125%;\n font-family: serif;\n font-size: 10pt;\n}\n}}}\n\nIf you had used a previous version of [[Plugin: jsMath]], it is no longer necessary to edit the main tiddlywiki.html file to add the jsMath <script> tag. [[Plugin: jsMath]] now uses ajax to load jsMath.\n!History\n* 11-Nov-05, version 1.0, Initial release\n* 22-Jan-06, version 1.1, updated for ~TW2.0, tested with jsMath 3.1, editing tiddlywiki.html by hand is no longer necessary.\n* 24-Jan-06, version 1.2, fixes for Safari, Konqueror\n* 27-Jan-06, version 1.3, improved error handling, detect if ajax was already defined (used by ZiddlyWiki)\n* 12-Jul-06, version 1.4, fixed problem with not finding image fonts\n!Examples\n|!Source|!Output|h\n|{{{The variable $x$ is real.}}}|The variable $x$ is real.|\n|{{{The variable \s(y\s) is complex.}}}|The variable \s(y\s) is complex.|\n|{{{This \s[\sint_a^b x = \sfrac{1}{2}(b^2-a^2)\s] is an easy integral.}}}|This \s[\sint_a^b x = \sfrac{1}{2}(b^2-a^2)\s] is an easy integral.|\n|{{{This $$\sint_a^b \ssin x = -(\scos b - \scos a)$$ is another easy integral.}}}|This $$\sint_a^b \ssin x = -(\scos b - \scos a)$$ is another easy integral.|\n|{{{Block formatted equations may also use the 'equation' environment \sbegin{equation} \sint \stan x = -\sln \scos x \send{equation} }}}|Block formatted equations may also use the 'equation' environment \sbegin{equation} \sint \stan x = -\sln \scos x \send{equation}|\n|{{{Equation arrays are also supported \sbegin{eqnarray} a &=& b \s\s c &=& d \send{eqnarray} }}}|Equation arrays are also supported \sbegin{eqnarray} a &=& b \s\s c &=& d \send{eqnarray} |\n|{{{I spent \s$7.38 on lunch.}}}|I spent \s$7.38 on lunch.|\n|{{{I had to insert a backslash (\s\s) into my document}}}|I had to insert a backslash (\s\s) into my document|\n!Code\n***/\n//{{{\n\n// AJAX code adapted from http://timmorgan.org/mini\n// This is already loaded by ziddlywiki...\nif(typeof(window["ajax"]) == "undefined") {\n ajax = {\n x: function(){try{return new ActiveXObject('Msxml2.XMLHTTP')}catch(e){try{return new ActiveXObject('Microsoft.XMLHTTP')}catch(e){return new XMLHttpRequest()}}},\n gets: function(url){var x=ajax.x();x.open('GET',url,false);x.send(null);return x.responseText}\n }\n}\n\n// Load jsMath\njsMath = {\n Setup: {inited: 1}, // don't run jsMath.Setup.Body() yet\n Autoload: {root: new String('../jsMath/')} // URL to jsMath directory, change if necessary\n};\nvar jsMathstr;\ntry {\n jsMathstr = ajax.gets(jsMath.Autoload.root+"jsMath.js");\n} catch(e) {\n alert("jsMath was not found: you must place the 'jsMath' directory in the same place as this file. "\n +"The error was:\sn"+e.name+": "+e.message);\n throw(e); // abort eval\n}\ntry {\n window.eval(jsMathstr);\n} catch(e) {\n alert("jsMath failed to load. The error was:\sn"+e.name + ": " + e.message + " on line " + e.lineNumber);\n}\njsMath.Setup.inited=0; // allow jsMath.Setup.Body() to run again\n\n// Define wikifers for latex\nconfig.formatterHelpers.mathFormatHelper = function(w) {\n var e = document.createElement(this.element);\n e.className = this.className;\n var endRegExp = new RegExp(this.terminator, "mg");\n endRegExp.lastIndex = w.matchStart+w.matchLength;\n var matched = endRegExp.exec(w.source);\n if(matched) {\n var txt = w.source.substr(w.matchStart+w.matchLength, \n matched.index-w.matchStart-w.matchLength);\n if(this.keepdelim) {\n txt = w.source.substr(w.matchStart, matched.index+matched[0].length-w.matchStart);\n }\n e.appendChild(document.createTextNode(txt));\n w.output.appendChild(e);\n w.nextMatch = endRegExp.lastIndex;\n }\n}\n\nconfig.formatters.push({\n name: "displayMath1",\n match: "\s\s\s$\s\s\s$",\n terminator: "\s\s\s$\s\s\s$\s\sn?",\n element: "div",\n className: "math",\n handler: config.formatterHelpers.mathFormatHelper\n});\n\nconfig.formatters.push({\n name: "inlineMath1",\n match: "\s\s\s$", \n terminator: "\s\s\s$",\n element: "span",\n className: "math",\n handler: config.formatterHelpers.mathFormatHelper\n});\n\nvar backslashformatters = new Array(0);\n\nbackslashformatters.push({\n name: "inlineMath2",\n match: "\s\s\s\s\s\s\s(",\n terminator: "\s\s\s\s\s\s\s)",\n element: "span",\n className: "math",\n handler: config.formatterHelpers.mathFormatHelper\n});\n\nbackslashformatters.push({\n name: "displayMath2",\n match: "\s\s\s\s\s\s\s[",\n terminator: "\s\s\s\s\s\s\s]\s\sn?",\n element: "div",\n className: "math",\n handler: config.formatterHelpers.mathFormatHelper\n});\n\nbackslashformatters.push({\n name: "displayMath3",\n match: "\s\s\s\sbegin\s\s{equation\s\s}",\n terminator: "\s\s\s\send\s\s{equation\s\s}\s\sn?",\n element: "div",\n className: "math",\n handler: config.formatterHelpers.mathFormatHelper\n});\n\n// These can be nested. e.g. \sbegin{equation} \sbegin{array}{ccc} \sbegin{array}{ccc} ...\nbackslashformatters.push({\n name: "displayMath4",\n match: "\s\s\s\sbegin\s\s{eqnarray\s\s}",\n terminator: "\s\s\s\send\s\s{eqnarray\s\s}\s\sn?",\n element: "div",\n className: "math",\n keepdelim: true,\n handler: config.formatterHelpers.mathFormatHelper\n});\n\n// The escape must come between backslash formatters and regular ones.\n// So any latex-like \scommands must be added to the beginning of\n// backslashformatters here.\nbackslashformatters.push({\n name: "escape",\n match: "\s\s\s\s.",\n handler: function(w) {\n w.output.appendChild(document.createTextNode(w.source.substr(w.matchStart+1,1)));\n w.nextMatch = w.matchStart+2;\n }\n});\n\nconfig.formatters=backslashformatters.concat(config.formatters);\n\nwindow.wikify = function(source,output,highlightRegExp,tiddler)\n{\n if(source && source != "") {\n var wikifier = new\n Wikifier(source,formatter,highlightRegExp,tiddler);\n wikifier.subWikify(output,null);\n jsMath.ProcessBeforeShowing();\n }\n}\n//}}}
! Choose A Presenter\nThere are many ways to do a mathematics presentation. While this is a LaTeX site, one is often faced with the choice of going with Microsoft ~PowerPoint or pure LaTeX. (See also [[Prosper2]].) Here we describe several methods:\n* ~PowerPoint\n** Using the Equation Editor\n** Using ~TeX4PPT \n* Using LaTeX\n** Seminar Style - orignally for transparencies\n**Other Styles\n*** [[Prosper]] - relatively easy\n*** [[Beamer]] - Seemingly more complicated\n*** Other Styles\n* Other Presentation Platforms\n**[[Impress|http://www.openoffice.org/product/impress.html]] from [[Open Office|http://www.openoffice.org/]]\n*** [[How to insert LaTeX equations|http://brahms.phy.vanderbilt.edu/~rknop/linux/teximpress.html]]\n*** See [[Doing Equations, Formulas, Pi, Etc. in OpenOffice Writer and Calc, and Impress|http://openoffice.blogs.com/openoffice/2008/05/doing-equations.html]]\n! ~PowerPoint\nThe typical format for presentations is Microsoft's ~PowerPoint application. However, inserting mathematical expressions in ~PowerPoint is not always easy and the product if often imperfect. Microsoft Office comes with an ''Equation Editor''. It is not installed by default and one has to set up the ''Equation Editor''.\n!! Equation Editor\nInstalling ''Equation Editor''\n*Go to ''Tools''.\n*Select ''...Customize''.\n*Click on the tab ''Commands''.\n*Under ''Categories'' pick ''Insert''.\n*Scroll through the right list and find ''Equation Editor'' and drag to the Toolbar.\n*Doubleclick the icon for the Equation Editor and enter your equation.\nIn some cases you may need the installation CD to complete this task. \n!! Other Methods\nThere are other methods for putting mathematical expressions into ~PowerPoint. One is to capture images of the equations and put them in as images. This leads to unprofessional looking equations. One could get [[MathType|http://www.dessci.com/en/products/mathtype/]], but this is is not free. There are some [[Online LaTeX Viewers]] that allow capturing images of ~TeXed equations that you can paste into your documents.\n!!~TeX4PPT\nAnother route is to use [[TeX4PPT|http://www.ecs.soton.ac.uk/~srg/softwaretools/presentation/TeX4PPT/]]. This allows one to insert LaTeX commands into ~PowerPoint. However, one needs LaTeX installed on the system. \n!Using LaTeX\nIt is also possible to create slides using LaTeX. The simplest method is to use the seminar style. More sophisticated methods which produce results similar to ~PowerPoint are listed below.\n!!Seminar Style - Old Method\nOne common method for writing slides and transparencies using LaTeX is to use the seminar style. Slides are then either printed, or displayed via a postscript reader or a PDF reader.\n*[[Making Slides in LaTeX|http://astronomy.sussex.ac.uk/~eddie/soft/tutorial.html]]\n*[[Seminar FAQ|http://www.tug.org/applications/Seminar/Seminar-FAQ.html]]\n*[[Quick and Dirty LaTeX Tips|http://www.sci.usq.edu.au/staff/robertsa/LaTeX/ltxfloats.html#Seminar]]\nHere is a simple, but effective way to produce talks and run them full screen in you favorite PDF reader.\n*[[PDF Seminar|http://www.maths.monash.edu.au/~leo/examples/pdfseminar/]] - [[Example|http://www.maths.monash.edu.au/~leo/examples/pdfseminar/manual.pdf]]\nGo to [[LaTeX Slides]] for more help on preparing a presentation using the seminar style.\n!! Using Prosper\nProsper is now included in the recent ~MikTeX installation. Using the Prosper style files is relatively easy an a discussion and an example is provided at the links [[Prosper]] and [[Prosper2]] (a more recent example). Other links are:\n*[[Making Presentations with LaTeX and Prosper|http://freshmeat.net/articles/view/667/]], \n*[[Screenshots|http://prosper.sourceforge.net/screenshots-prosper.html]], \n*[[Tutorial|http://heather.cs.ucdavis.edu/%7Ematloff/prosper.html]]\n*[[PDF Prosper Guide|http://us.share.geocities.com/kijoo2000/beamer_guide.pdf]] at [[Ki-Joo's LaTeX Site|http://us.share.geocities.com/kijoo2000/]]\n!!Other Styles\nHere are a few links with some examples of what can be done using LaTeX plus some additional style files. See [[Beamer]] and [[Beamer2]] for more about one of these styles.\n*[[Beamer LaTeX Class|http://latex-beamer.sourceforge.net/]], [[Tutorial|http://heather.cs.ucdavis.edu/%7Ematloff/beamer.html]]\n*[[TeXPower|http://texpower.sourceforge.net/]]\n*[[More packages|http://www.miwie.org/presentations/presentations.html]]
This is one of two examples at this site for using Prosper. The example below shows some simple slides using bullets and overlays. \nThe LaTeX file for this example is [[tempOverlay.tex|tempOverlay.tex]] and the talk can be viewed as [[tempOverlay.pdf|tempOverlay.pdf]]. [[Another anotated example|Prosper2]] is provided at this site. It shows some other features and the use of figures in Prosper slides. An [[old talk|http://people.uncw.edu/hermanr/documents/searcde06.pdf]] shows Prosper in action.\n!!Prosper Help\nThere are several good sites on using Prosper and displaying some of the standard themes. \n*[[UMBC Tutorial|http://www.math.umbc.edu/~rouben/prosper]]\n*[[Making Presentations with Latex and Prosper|http://freshmeat.net/articles/view/667/]]\n*[[LaTeX prosper class for making LaTeX/PDF slide shows|http://amath.colorado.edu/documentation/LaTeX/prosper/]] \n*[[Quick Tutorial on the Prosper Package|http://heather.cs.ucdavis.edu/%7Ematloff/prosper.html]]\n*http://prosper.sourceforge.net \n*[[Propser Themes|http://wikiprosper.bbclone.de/index.php?pagename=ProsperThemes]] at [[WikiProsper|http://wikiprosper.bbclone.de/index.php?pagename=WikiProsper]]\n!!Using Prosper\nBegin with the documentclass with some simple optionscalling the prosper class. Note that you can replace ''capsules'' with a different style that can be found at the above sites. You may need to download the given class. You can also design your own with enough experience.\n{{{\n\sdocumentclass[capsules,pdf,colorBG,slideColor]{prosper}\n}}}\nThe next line causes the generated pdf to load automatically at full screen.\n{{{\n\shypersetup{pdfpagemode=FullScreen}\n}}}\nAdd your title, subtitle and name to the presentation.\n{{{\n\stitle{Presentation Title}\n\ssubtitle{with a subtitle}\n\sauthor{Dr. R. L. Herman}\n}}}\nYou can have different transitions. The default is just to show the slides without a transition.\n{{{\n%\sDefaultTransition{Wipe} %%% Optional Slide Transition\n}}}\nSlides are then entered under the document body. The title slide is first shown using the maketitle command.\n{{{\n\sbegin{document}\n\smaketitle\n}}}\nOther slides are contained in a {{{\sbegin{slide} }}} - {{{\send{slide} }}} environment. The title of each slide is added as an option in the form {{{\sbegin{slide}{title} }}}. \n{{{\n\sbegin{slide}{Slide 2}\n This is the first non-Title slide.\n\send{slide}\n}}}\nFancy revealing of your points and equations can be done using overlays. First indicate the number of overlays. Using {{{itemstep}}} will list items sequentially.\n{{{\n\soverlays{4}{\n\sbegin{slide}{Slide 3 - Itemized List}\n \sbegin{itemstep}\n \sitem Item 1\n \sitem Item 2\n \sitem Item 3\n \sbegin{itemize}\n \sitem Subitem 1\n \sitem Subitem 2\n \send{itemize}\n \sitem Item 4\n \send{itemstep}\n\send{slide}}\n}}}\nHere is an example in which the first text line changes as each equation is revealed.\n{{{\n\soverlays{3}{\n \sbegin{slide}{Slide 4}\n \sonlySlide*{1}{Consider the integral.}\n \sfromSlide*{2}{Substitute an identity.}\n \sfromSlide{1}{ $$ I = \sint_0^\spi \ssin^2x\s, dx $$ }\n \sfromSlide{2}{ $$\ssin^2x = \sfrac 12 (1-\scos 2x) $$ }\n \sonlySlide{3}{ $$ I = \sfrac 12 \sint_0^\spi (1-\scos 2x)\s, dx $$ }\n\send{slide}}\n}}}\nDo not forget a conlcuding slide!\n{{{\n\sbegin{slide}{Last Slide}\n My conclusions are\n\n\saddvspace{2cm}\n\n ... Thank you for coming!\n\send{slide}\n\n\send{document}\n}}}\n\nCompile your tex file. Convert the dvi to ps in landscape and then convert the ps file to pdf.
Here is an example for doing a presentation in Prosper. The related files are:\n* PDF file [[prosper.pdf|prosper.pdf]] \n* LaTeX File [[prosper.tex|prosper.tex]] \n* Image files \n**[[sine1.eps|sine1.eps]]\n**[[sine2.eps|sine2.eps]]\n**[[sine3.eps|sine3.eps]]\n**[[sine4.eps|sine4.eps]]\n**[[sine5.eps|sine5.eps]]\n**[[myplot.eps|myplot.eps]]\nA description of the lines in the files is given below. Note that for !TexnicCenter to work, you need to choose the called routines as ~LaTeX => PS => PDF. The paper size should be A4 in Landscape in other editors.\nA similar example in [[Beamer]] is in [[Beamer2]].\n!Annotated Example\nFirst, enter the opening line with the theme declared.\n{{{\n\sdocumentclass[autumn,pdf,slideColor,colorBG]{prosper}\n}}}\nYou can check out the other themes at http://wikiprosper.bbclone.de/index.php?pagename=ProsperThemes\nThe next line allows the final pdf to open full screen\n{{{\n\shypersetup{pdfpagemode=FullScreen}\n}}}\nThere are several transiton styles. As these can be distracting, you should not do something too out of hand.\n{{{\n\sDefaultTransition{Wipe}\n}}}\nNow, you can set up the title and author information:\n{{{\n\stitle{Sample Prosper Talk}\n\ssubtitle{how to create a LaTeX talk}\n\sauthor{Russell L. Herman}\n\semail{hermanr@uncw.edu}\n\sinstitution{\n Department of Mathematics \s& Statistics \s\s\n University of North Carolina Wilmington \s\s\n Wilmington, NC, 28401 USA\n}\n}}}\nThe slide caption appears at the bottom of each slide.\n{{{\n\sslideCaption{\stextit{MAT 495 Math Seminar}}\n}}}\n\nNow you can begin the document. Each slide after the title page needs to begin with {{{\sbegin{slide}}}} and finish with {{{\send{slide}}}}.\n{{{\n\sbegin{document}\n\n\smaketitle\n\n\sbegin{slide}{Abstract}\n\sbegin{small}\nYou can put your abstract here.\n\send{small}\n\send{slide}\n}}}\nAll talks need to begin with an outline. Here you can ''enumerate'' the topics to be discussed. These items will show up all at once, showing how the ''enumerate environment'' works.\n\n{{{\n\sbegin{slide}{Outline}\nStart with a summary of the talk\n\n\sbegin{enumerate}\n\n\sitem The Problem\n\n\sitem Some History\n\n\sitem Background Material\n\n\sitem Present Methods\n\n\sitem Results\n\n\sitem Summary\n\n\sitem Conclusion\n\n\send{enumerate}\n\n\send{slide}\n}}}\n\nThose familiar with ~PowerPoint will want to reveal their points, or portions of a slide, in pieces. This is done using ''overlays''. If you know the number of overlays, you can indicate them up front with the {{{\s overlays{5}{% ... }}}} environment. \s\sPlay with the number to get it to work right.\s\s If you do this with items, you can simply use the ''itemstep'' command. \n{{{\n\soverlays{5}{%\n\sbegin{slide}{Outline}\n\sbegin{itemstep}\n\n\sitem Show items one at a time\n\sbegin{itemize}\n\n\sitem and some subitems\n\n\sitem and more\n\n\send{itemize}\n\n\sitem Each revealed item is an overlay\n\n\sitem and that is enough to begin\n\n\sitem Even equations like $x^2+1=0$ will work\n\n\sitem or displayed expressions $$ \sleft(\sbegin{array}{cc}\n 1 & 2 \s\s\n 3 & 4 \s\s\n\send{array}\sright)$$\n\n\send{itemstep}\n\send{slide}\n}\n}}}\n\n{{{\n\soverlays{6}{%\n\sbegin{slide}{Compiling}\nThere are several steps to producing the PDF of your talk: \n\n\sbegin{itemstep}\n\sitem Create tex file\n\n\sitem Run LaTeX and fix errors\n\n\sitem Run dvi2ps\n\n\sbegin{itemstep}\n\sitem Set to Landscape\n\n\sitem Set paper to "-P pdf -t A4"\n\send{itemstep}\n\n\sitem Run ps2pdf\n\n\send{itemstep}\n\send{slide}\n}\n}}}\n\nAdding figures is simple, though you might want to put text on the side and not just above or below the figure. Generally, you need to convert your figures to EPS (Encapsulated Postscript). //Instructions might be given later for doing this directly or converting other figure formats to EPS.//\n\nIn this example you see the command {{{\sincludegraphics[height=25mm]{myplot.eps}}}} for embedding figures. Also, the ''verbatim'' environment is used to produce exactly what appears. (This is useful for displaying programs, etc.)\n\n{{{\n\sbegin{slide}{Adding Figures}\nAdding figure is tricky but worth the effort!\n\nYou need to convert your figures to eps format. Matlab, Maple, and\nother programs can do this with some ease. For other images you\nmight need an image editor like GIMP. Then use\n\n\sbegin{verbatim}\n\sbegin{center}\n\sincludegraphics[height=25mm]{myplot.eps}\n\send{center}\n\send{verbatim}\n\nThis gives\n\sbegin{center}\n\sincludegraphics[height=25mm]{myplot.eps}\n\send{center}\n\n\send{slide}\n}}}\nNow we take the figure and place text on the side using the ''minipage'' environment. Adjust the sizes of the pages to see the efffects.\n{{{\n\sbegin{slide}{Let's Get Fancy}\nOK, you want text and a picture side by side. Can we do that? Yes!\nUse the minipage environment.\n\n\sbegin{minipage}{2in}\n\sbegin{center}\n\sincludegraphics[height=25mm]{myplot.eps}\n\send{center}\n\send{minipage}\n\sbegin{minipage}{2in}\n\sbegin{tabular}{l}\n\s\s\n Add some text in an array \s\s\n and you can create a nice \s\s\n slide.\s\s\n \s\s\n\send{tabular}\n\send{minipage}\n\nHow is that?\n\n\send{slide}\n}}}\nIf you have several figures, you can use the ''minipage'' environment to line up bulleted descriptions. Revealing any text, equation, or figure repolacing others, uses the command {{{\sonlySlide*{#}}}} where {{{#}}} is filled in with the only overlay on which it is used. \n{{{\n\soverlays{5}{\n\sbegin{slide}{Displaying Several Images}\n\sbegin{tabular}{rc}\n\sbegin{minipage}{4cm}\n\sonlySlide*{1}{\sincludegraphics[height=3cm]{sine1.eps}}\n\sonlySlide*{2}{\sincludegraphics[height=3cm]{sine2.eps}}\n\sonlySlide*{3}{\sincludegraphics[height=3cm]{sine3.eps}}\n\sonlySlide*{4}{\sincludegraphics[height=3cm]{sine4.eps}}\n\sonlySlide*{5}{\sincludegraphics[height=3cm]{sine5.eps}}\n\send{minipage} &\n\sbegin{minipage}{6cm}\n\sbegin{itemstep}\n\sitem Consider $f(x)=\ssin x$\n\n\sitem Horizontal Shift $f(x)=\ssin (x+2)$\n\n\sitem Vertical Shift $f(x)=\ssin x+2$\n\n\sitem Reflection $f(x)=-\ssin x$\n\n\sitem Compression \s\s $f(x)=0.5\ssin x$\n\send{itemstep}\n\send{minipage}\n\send{tabular}\n\send{slide}}\n}}}\nDo not forget to end your talk with a summar page, references and (of course) acknowledgements to your advisor or other people important in creating your talk.\n{{{\n\sbegin{slide}{That's All Folks!}\n\nThank you! \svskip 2cm\n\n Acknowledgments\n\n\svskip 2cm\n\n References ...\n\send{slide}\n\send{document}\n}}}\n\nOther ideas can be found at the links and in the example given in [[Prosper]].
You should have some idea as to the layout of the paper. All papers should have and introduction and a conclusion. The introduction introduces the problem, its importance, some relevant discussion of its history and summarize for the reader what you will be doing. The conclusion is a review of what you have said in the rest of the paper and highlight the results and possible future directions of research. \n\nThese sections and the sections making up the body of the paper can be entered using a section command. The structure is typed as \n{{{\n\ssection{Introduction}\n\n\ssection{Topic 1}\n\n\ssection{Topic 2}\n\n\ssection{Topic 3}\n\n\ssection{Conclusion}\n\n}}}\n\nyou can even add subsections and subsubsections:\n\n{{{\n\ssection{Introduction}\n\n\ssection{Topic 1}\n\n\ssubsection{Subtopic a}\n\n\ssubsection{Subtopic b}\n\n\ssubsubsection{Subsubtopic a}\n\n\ssubsubsection{Subsubtopic b}\n\n\ssection{Topic 2}\n\n\ssection{Topic 3}\n\n\ssection{Conclusion}\n\n}}}\n
There are many styles available for producing a mathematical, or physics, paper. The most commonly used style is the article style. Open up your favorite LaTeX editor. Bring up a blank new file and enter\n{{{\n\sdocumentclass{article} \n}}}\n\nThe content of your paper lies between two document statements. Type\n{{{\n\sbegin{document}\n\n\send{document}\n}}}\n\nThere are other parameters that can be entered in the article style, but we will return to them in a later section.
<<list shadowed>>
<<search>><<closeAll>><<permaview>><<newTiddler>><<newJournal 'DD MMM YYYY'>><<saveChanges>><<slider chkSliderOptionsPanel OptionsPanel 'options »' 'Change TiddlyWiki advanced options'>><< ImportTiddlers >>
an introduction for students
LaTeX
!! Recommended Installation at UNCW\nThere are many implementations of LaTeX currently available. LaTeX runs on many operating systems, however we use MS Windows, so we will list different resources for this OS. For additional help see [[Getting Started with TeX, LaTeX, and Friends|http://www.tug.org/begin.html]]. \n\nThere are two pieces. The main packages for running LaTeX are in [[MikTeX|http://www.miktex.org/]]. However, you need an editor in order to compose and create your documents. Here we provide directions for downloading [[MikTeX|http://www.miktex.org/]] and [[TeXnicCenter|http://sourceforge.net/projects/texniccenter]] which are provided on the computers in the Mathematics and Statistics labs.\n#Go to the [[MikTeX|http://www.miktex.org/]] site and navigate to the current release page (~MikTeX 2.7 currently).\n##Scroll down and select either ''Download "Basic ~MiKTeX 2.7" Installer'' or ''Download ~MiKTeX 2.7 Net Installer''. The latter will install a complete set of packages and is fairly large. \n#After [[MikTeX|http://www.miktex.org/]] is installed, go to [[TeXnicCenter|http://sourceforge.net/projects/texniccenter]] to get the editor. Navigate to Downloads and download and install the ''~TeXnicCenter Setup'' from [[SourceForge.net|http://sourceforge.net/]].\n#When you start [[TeXnicCenter|http://sourceforge.net/projects/texniccenter]], you will be asked to find the path for [[MikTeX|http://www.miktex.org/]]. For the current version, you can browse to ''C:/Program Files/~MikTeX 2.7/bin''. An example is provided [[here|http://www.divms.uiowa.edu/help/windows/texniccenter/ ]]. \n!! LaTeX on a Stick\nIt is possible to run LaTeX on a USB memory stick. See the [[instructions|http://www.exomatik.net/LaTeX/USBTeXEnglish]]. This will allow one to carry LaTeX to any computer that does not have it installed. It currently uses an installation of ~MikTeX 2.7 and the editor used is Texmaker 1.8. There is more information [[here|http://eiu.edu/~cfdmb/LocalGuide/index.html]] and more about [[Open Source Mathematics Software|http://people.uncw.edu/hermanr/OpenSourceMath.htm]].\n!!Downloading LaTeX\nThe Standard these days is [[MikTeX|http://www.miktex.org/]]. As of this writing the current version is 2.7. There are two installation packages:\n*''Basic'' - This is a minimal setup meant to be installed on machines with limited space and it downloads from the website quicker. Additional packages may be added when needed.\n*''Complete'' - This recommended setup provides all LaTeX packages though it is huge. \nThere are other installations which provide a version of ~MikTeX and extras, such as editors. \n*[[LyX|http://www.lyx.org/]] - a WYSIWYG word processor with LaTeX in the background. [[Windows version|http://wiki.lyx.org/Windows/Windows]] is available.\n*[[Protext|http://www.tug.org/protext/]] - a LaTeX installation based on ~MikTeX.\n*[[TEXLive|http://www.tug.org/texlive/]] - another LaTeX installation,which includes Protext. Hower the [[Windows Installation|http://tug.org/texlive/doc/texlive-en/live.html#x1-200006]] may be a bit complicated for studetnts.\n!!LaTeX Sites\n[[LaTeX Site|http://www.latex-project.org/]]\n[[MikTeX Site|http://www.miktex.org/]]\n[[The Comprehensive TeX Network (CTAN)|http://www.ctan.org/]]\n!!LaTeX Editors\nThere are several editors that make composing LaTeX documents easier. [[See also ...|http://www.ctan.org/tex-archive/systems/win32/]]\n*[[WinEdt|http://www.winedt.com/]] is a standard ~LaTeX editor. It is not free, but one can get a 30 day trial copy.\n*[[TeXEd|ftp://ftp.tex.ac.uk/tex-archive/systems/win32/texed/]] is an old free editor which has not been updated since 1998. \n**(This is Tex for Windows 3.2 which is in the computer lab - See also the [[CTAN site|http://www.ctan.org/tex-archive/systems/win32/texed/]].)\n*[[TeXnicCenter|http://sourceforge.net/projects/texniccenter]] is another free editor that ties into ~MiKTeX.\n*[[LyX|http://www.lyx.org/]] is a free WYSIWYG word processor supporting the MiKTeX installation.\n*Other Free Editors:\n**[[TeXShell|http://www.projectory.de/texshell/]]\n**[[LaTeXEditor|http://www.ntu.edu.sg/home5/PG03053527/latexeditor/]]\n**[[Crimson Editor|http://www.crimsoneditor.com/]]\n**[[Texmaker|http://www.xm1math.net/texmaker/]]\n**[[AUCTeX|http://www.gnu.org/software/auctex/]]\n[[More Links]]
!!Steps to Producing a Paper\n# Write LaTeX File and save with .tex extension.\n# Compile with LaTeX command to produce a dvi file\n# View dvi file with YAP (Yet Another Previewer)\n# Make corrections and additions and repeat last steps until tex file is error-free.\n# Print dvi file or\n## Convert dvi to PDF and print the PDF (portable document file).\n## Convert dvi to PS and print the PS (postscript) file via Ghostview.\n## Convert dvi to PS, PS to PDF and print PDF. This is sometimes needed with postscript images. \n!! Starting the LaTeX File\nWe will go through the steps for producing the skeleton of an article. Look at this [[Example]] and its [[PDF|GeneralLaTeXExample.pdf]] for a few tips on getting started as you read through these steps. You can view this [[sample]] as well for a different take.\n[[Setting up Documentstyle]]\n[[Title and Author]]\n[[Abstract]]\n[[Sectioning]]\n[[Theorems]]\n[[Citations]]\nA simpler sample is [[here|http://people.uncw.edu/hermanr/latex/samplepaper.tex]], but you need this [[figure|http://people.uncw.edu/hermanr/latex/triangle1.jpg]].\n!!~How-To Produce Scientific Documents\n[[LaTeX by Example|http://pangea.stanford.edu/computerinfo/unix/formatting/latexexample.html]]\n[[sample2e.tex|http://plastex.sourceforge.net/sample2e/sample2e.txt]]\n[[Getting Started with LaTeX|http://www.maths.tcd.ie/~dwilkins/LaTeXPrimer/Index.html]] by David R. Wilkins\n[[Writing Scientific Papers in LateX|http://online.redwoods.cc.ca.us/instruct/darnold/linalg/latex/project_latex.pdf]]
Special formatting commands that are not built into LaTeX may be needed. Here are some common style files. You can download these to your thesis folder. The LaTeX Editor should be able to find them.\n\n[[setspace.sty|StyleFiles/setspace.sty]]\n[[graphics.sty|StyleFiles/graphics.sty]]\n[[graphicx.sty|StyleFiles/graphicx.sty]]\n[[keyval.sty|StyleFiles/keyval.sty]]\n[[trig.sty|StyleFiles/trig.sty]]\n[[ctl3dv2.dll|StyleFiles/ctl3dv2.dll]]
/*{{{*/\n/* Modied Style from Julian Knight JK Version: 2006-04-20 (Simplified) */\n\nbody {position:static;}\n.tagClear {margin-top:1em;clear:both;}\n\nhr {height:0px;border:0;border-top:1px solid silver;}\nh1,h2,h3,h4,h5 {color:#014;background:transparent;border-bottom:1px solid #ddd;padding-left:0;}\n\n.headerShadow {padding:.5em 0em .5em 1em;}\n.headerForeground {padding:.5em 0em .5em 1em;}\n\n#displayArea { /* The bit that contains all tiddlers */\n padding-top:.1em;padding-bottom:.1em;\n margin-top:0;margin-right:15.5em;margin-bottom:0;margin-left:12.5em;-moz-border-radius:1em;}\n\n.tiddler {-moz-border-radius:1em;border-top:1px solid #ccc;border-left:1px solid #ccc;\n border-bottom:3px solid #ccc;border-right:3px solid #ccc;margin:0.5em;background:#fff;padding:0.5em;}\n\n.subtitle { /* Tiddler subtitle */\n font-size:0.9em;text-align:right;}\n\n.viewer pre {padding: 0;margin-left: 0;}\n.viewer hr {border: solid 1px silver;}\n\n.toolbar {visibility:visible;}\n\n.selected .toolbar {visibility:visible;color:#00f;}\n\n.toolbar .button { color:#dee; }\n.selected .toolbar .button { color:#014;}\n\n.tagging, .tagged, .selected .tagging, .selected .tagged {\n font-size:75%; padding:0.3em; background-color:#eee;border-top:1px solid #ccc; border-left:1px solid #ccc;\n border-bottom:3px solid #ccc; border-right:3px solid #ccc;max-width:45%;-moz-border-radius:1em;}\n\n.noBorder,.noBorder td,.noBorder th,.noBorder tr{border:0 !important}\n.evenRow{} .oddRow{}\n\n.headerShadow { visibility: hidden; } \n#sidebar{display:none;}\n#displayArea {margin: 1em 1em 0em 14em;}\n.smaller { font-size:80%; } \n.small { font-size:90%; }\n\n/* Added Color Style*/\n.header {background: #990000;}\n.header {foreground: #000000;}\n.title {color: #990000;}\n.subtitle {color: #990000;}\n.toolbar {color: #990000;}\n/*}}}*/\n\n.viewer {\n line-height: 125%;\n font-family: serif;\n font-size: 10pt;\n}\n
* StyleSheet\n* StyleSheetColors\n* StyleSheetLayout\n* StyleSheetPrint
|>|>|!PageTemplate|\n|>|>|[[SiteTitle]] - [[SiteSubtitle]]|\n|>|>|TopMenu|\n|[[MainMenu]]|[[DefaultTiddlers]]<<br>><<br>>[[ViewTemplate]]<<br>><<br>>[[EditTemplate]]|[[SideBarOptions]]|\n|~|~|[[OptionsPanel]]<<br>>AdvancedOptions|\n|~|~|SideBarTabs|\n|>|>|[[SiteUrl]]|
* SideBarOptions\n* SideBarTabs\n* TabAll\n* TabMore\n* TabMoreMissing\n* TabMoreOrphans\n* TabTags\n* TabTimeline
* DefaultTiddlers\n* MainMenu\n* SiteSubtitle\n* SiteTitle\n* SiteUrl
Tables can be produced several ways. The most common is provided by the following:\n{{{\n\sbegin{table}\n\sbegin{center}\n\sbegin{tabular}{|c|c|c|c|c|c|c|}\n \shline\n % after \s\s: \shline or \scline{col1-col2} \scline{col3-col4} ...\n $p$ & $n=0$ & $n=1$ & $n=2$ & $n=3$ & $n=4$ & $n=5$ \s\s\n \shline\n 1 & 2.405 & 3.832 & 5.135 & 6.379 & 7.586 & 8.780 \s\s\n 2 & 5.520 & 7.016 & 8.147 & 9.760 & 11.064 & 12.339 \s\s\n 3 & 8.654 & 10.173 & 11.620 & 13.017 & 14.373 & 15.700 \s\s\n \shline\n\send{tabular}\n\scaption{The zeros of Bessel Functions} \n\slabel{bjs}\n\send{center}\n\send{table}\n}}}\n\nMore information about formatting tables can be found [[here|http://www.andy-roberts.net/misc/latex/latextutorial4.html]].
Here one can test some LaTeX commands. Click the edit (on local version of this document.) Edit the following:\n\n$$\sint\sfrac{dx}{\ssqrt{1-x^2}}$$
There are several ways to introduce theorems and proofs into your papers. Here is one method:\n{{{\n\sdocumentclass{article}\n\susepackage{amsmath,amssymb}\n\n\snewtheorem{theorem}{Theorem}\n\snewtheorem{definition}{Definition}\n\n\sbegin{document}\n\sbegin{definition}\nLet A be a set. \n\send{definition}\n\n\sbegin{theorem}\nLet A be a set. \n\send{theorem}\n\sbegin{proof}\nNow prove something.\n\send{proof}\n\n\send{document}\n}}}\n\nMore information can be found at the following sites.\n[[AMS-LaTeX|http://www.stat.umn.edu/~charlie/amslatex.html]]\n[[Using the amsthm package|ftp://ftp.ams.org/pub/tex/doc/amscls/amsthdoc.pdf]]
You will next want to set up the title and eneter your name. So far you should have \n{{{\n\sdocumentclass{article} \n\sbegin{document}\n\n\send{document}\n}}}\n\nThe title and author are specified after the documentclass statement and before the \sbegin{document} statement. This area is often referred to as the ''Preamble''. The commands needed are\n{{{\n\stitle{This is My First Article}\n\sauthor{Your Name}\n}}}\n\nIf you were to compile the code, you would get no pages of output. This is because you have not put in an instruction to create the title and author. This is done by typing\n{{{\n\smaketitle\n}}}\n\nin the document section. Thus, you should now have the following:\n{{{\n\sdocumentclass{article} \n\stitle{This is My First Article}\n\sauthor{Your Name}\n\n\sbegin{document}\n\smaketitle\n\send{document}\n}}}\n\nRunning this code will produce one page with the title, author and date. The date provided is the current date. You can change this by adding a date command after the author:\n{{{\n\sdate{September 10, 2006}\n}}}\n\nYou can also suppress the date with\n{{{\n\sdate{ }\n}}}\n\nYou can view your article so far by following the steps:\n# Run LaTeX\n# Run dvi Previewer
Now that you have the pages laid out, you can start typing your paper. The beauty of LaTeX is that you can typset mathematical expressions and equations. When you preview your paper, you will see the difference in using LaTeX vs a regular text editor or MS Word. \n\nMathematical expressions can be entered in a sentence, or displayed alone on a line. Equations can also be numbered. LaTeX automatically does the numbering. So, if you insert a new equation, you will not have to worry about renumbering. \n\nEntering text inline requires that the expression be typed in between two dollar signs like {{{$x^2$}}}. This will produce $x^2$. [''Note:'' All rendering of LaTeX in this LaTeX Introduction is being done using [[jsMath|http://www.math.union.edu/~dpvc/jsMath/]] as a test and might not render exactly as you would see in your papers. Sometimes enlarging the text display makes the page clearer.]\n\nYou can produce the equation x^2+2x-1 = 0 on a separate line by typing {{{$$x^2+2x-1 = 0$$}}}. This produces, $$x^2+2x-1 = 0$$\n\nA numbered equation can be obtained using the equation environment. Type the following into your document and compile it.\n\n{{{\n\sbegin{equation} \nx^2+2x-1 = 0 \n\send{equation}\n}}}\n\nIf you want to reference an equation, then you need to give it a unique label and reference the label:\n\n{{{\n\sbegin{equation} \nx^2+2x-1 = 0 \n\slabel{myEqn}\n\send{equation}\n}}}\n\nThen you can refer to it in your paragraph using the ref command\n\n{{{\n... and we can see in Equation \sref{myEqn} that ...\n}}}\n\nThe one caution you should know about is that you have to run LaTeX two times to get the equation numbers correct. The first time it is compiled LaTeX creates and aux file where equation numbers and other counters are stored. The second time it is run LaTeX reads the aux file to correctly insert all label references. This is especially important if the reference occurs before the label is defined. \n\nNote: You can change the text size of this page to view the rendered expressions if they are not clear.\n\nThere are many commands that you will need to know in order to typset the matematicalexpressions correctly. \nFor example, {{{$\ssin x$}}} produces $\ssin x$. \nAlso fractions are entered as {{{$\sfrac{x^2}{3}$}}} to produce $\sfrac{x^2}{3}$. \nSubscripts are entered as {{{$x_1$}}} to give $x_1$.\n\nOf course, you can produce much fancier expressions: {{{$$\sin_0^{\spi} \sfrac{dx}{\ssqrt{1+x^2}}$$}}} for $$\sint_0^{\spi} \sfrac{dx}{\ssqrt{1+x^2}}$$ and you can type your favorite Greek letters {{{$\salpha$}}}: $\salpha$.\n\nFor more symbols see [[LaTeX Math Symbols]].\n\n!Examples from jsMath\n|!Source|!Output|h\n|{{{The variable $x$ is real.}}}|The variable $x$ is real.|\n|{{{The variable \s(y\s) is complex.}}}|The variable \s(y\s) is complex.|\n|{{{This \s[\sint_a^b x = \sfrac{1}{2}(b^2-a^2)\s] is an easy integral.}}}|This \s[\sint_a^b x = \sfrac{1}{2}(b^2-a^2)\s] is an easy integral.|\n|{{{This $$\sint_a^b \ssin x = -(\scos b - \scos a)$$ is another easy integral.}}}|This $$\sint_a^b \ssin x = -(\scos b - \scos a)$$ is another easy integral.|\n|{{{Block formatted equations may also use the 'equation' environment \sbegin{equation} \sint \stan x = -\sln \scos x \send{equation} }}}|Block formatted equations may also use the 'equation' environment \sbegin{equation} \sint \stan x = -\sln \scos x \send{equation}|\n|{{{Equation arrays are also supported \sbegin{eqnarray} a &=& b \s\s c &=& d \send{eqnarray} }}}|Equation arrays are also supported \sbegin{eqnarray} a &=& b \s\s c &=& d \send{eqnarray} |\n|{{{I spent \s$7.38 on lunch.}}}|I spent \s$7.38 on lunch.|\n|{{{I had to insert a backslash (\s\s) into my document}}}|I had to insert a backslash (\s\s) into my document|\n
This site and the UNCW Thesis Format are provided by [[Dr. Herman|http://people.uncw.edu/hermanr]]. If you have any problems with the formatting of your thesis, feel free to contact Dr. Herman at [[hermanr@uncw.edu|mailto:hermanr@uncw.edu]]. For problems with general formatting in LaTeX see your advisor or Dr. Herman. This site is also designed to assist MAT 495 students in learning to use LaTeX for writing papers and doing presentations in mathematics using LaTeX.
<div>\n <span class='title' style='float:left;' macro='view title'></span>\n <span style='float:right;' class='subtitle'>\n <span macro='view modifier link'></span>, \n <span macro='view modified date [[DD MMM YYYY]]'></span> \n (created <span macro='view created date [[DD MMM YYYY]]'></span>)\n </span>\n <span class='toolbar' style='clear:right;margin-top:1px;float:right;'\n macro='toolbar -closeTiddler +editTiddler deleteTiddler closeOthers permalink references jump'>\n </span>\n <div class='tagClear'></div>\n</div>\n<hr>\n<div class='tagClear viewer' macro='view text wikified'></div>
In this section are listed some resources on writing mathematics papers and presenting mathematics talks.\n\n!!How to Write Mathematics Papers\n*[[How to write mathematics|http://www.stat.ualberta.ca/~wiens/trent_write.pdf#search=%22how%20to%20write%20mathematics%22]]\n*[[Halmos on Writing Mathematics|http://www.stat.rice.edu/~riedi/HalmosWrite.rtf]]\n*[[A Guide to Writing Mathematics|http://ems.calumet.purdue.edu/mcss/kevinlee/mathwriting/writingman.pdf#search=%22how%20to%20write%20mathematics%22 ]]\n*[[A Few Tips on How to Write Mathematics|http://www.math.ups.edu/~bryans/Current/PDF/MTHWRT97.PDF#search=%22how%20to%20write%20mathematics%22]]\n*[[Writing a Research Paper in Mathematics|http://web.mit.edu/jrickert/www/mathadvice.html]]\n*[[Write Right for Readers|http://www.sci.usq.edu.au/staff/robertsa/LaTeX/ltxwrite.html]]\n\n!!Mathematics Presentations\n*[[Mathematical Communication and Technology|http://www.math.tamu.edu/~Harold.Boas/courses/math696/index.html]]\n*[[PowerPoint Tips|http://www.uncw.edu/cte/programs/WORKSHOP/POWERPT/Ppintro.ppt]]
<html><iframe src="http://plastex.sourceforge.net/sample2e/sample2e.txt" style="width:100%;height:400px"></iframe></html>\n{{{http://plastex.sourceforge.net/sample2e/sample2e.txt}}}