WorkingWiki/LaTeX Example

From Projects
Jump to: navigation, search

A latex file

The file is entered in the source (edit or view to see), and rendered automatically.

log, pdfExample LaTeX document

Lee Worden

This is a sample LaTeX project for the WorkingWiki Extension. It includes an external graphics file, some math typesetting, and a bibliography file. It also demonstrates how to create links and margin notes in LaTeX code, and how they look on the wiki page. You can click on the “pdf” link above to see how it looks in the final version. Feel free to make changes and try things out (if you’re logged in — unfortunately, for security reasons we can’t allow anonymous visitors to edit our project files). Non-logged-in visitors, feel free to use the “view source” tab to see how the LaTeX source is embedded in this page’s wiki text. See also this real-life LaTeX example on the wiki. Please add bug reports to the WorkingWiki bug tracker, or send them to me.


Margin notes like this are sometimes nice to communicate with coauthors while a paper’s being written. (This one appears in the wiki only, not in the pdf version of this document.) Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum. Typi non habent claritatem insitam; est usus legentis in iis qui facit eorum claritatem. Investigationes demonstraverunt lectores legere me lius quod ii legunt saepius. Claritas est etiam processus dynamicus, qui sequitur mutationem consuetudium lectorum. Mirum est notare quam littera gothica, quam nunc putamus parum claram, anteposuerit litterarum formas humanitatis per seacula quarta decima et quinta decima. Eodem modo typi, qui nunc nobis videntur parum clari, fiant sollemnes in futurum.

1 Math formulas

When f^(x,y)=xy1+xy, we know that

p^ij =f^(xi,yj)

at the very least.

2 Figure

Figure 1: Temperature vs. time in a complicated model [1].

Figure 1 is a nice-looking image (at any rate, it looks nice in the pdf version). It’s created and stored as an eps file, and it’ll be included as eps when we make dvi or pdf output, but for display in the wiki page it’s automatically converted to a png file.


  • [1] L. Worden and S. A. Levin (2009) A simple dynamic argument for self-regulation in model biospheres. Note: In preparation. Cited by: Figure 1.


What are the plusses and minuses of different ways of counting the words in the file?


Two different ways we can try.

These rules are here for illustration (and development) purposes. They are also included in the site makefile, so you don't need them in your project.
%.pdf.count: %.pdf
	pdftotext $< -enc UTF-8 - | wc > $@
%.tex.count: %.tex
	texcount $< > $@


Once we have rules, we just ask WW for the target files.


wc reports lines, words and bytes. The reason it has more is that it is probably counting "words" from the texted version of the figure. Probably not a reliable tool, unless you have a document with no graphics.

     96     449    2685


texcount is trying to be user-friendly. Not sure what it's doing about included files and so on.

File: example.tex
Encoding: utf8
Words in text: 395
Words in headers: 6
Words outside text (captions, etc.): 7
Number of headers: 3
Number of floats/tables/figures: 1
Number of math inlines: 1
Number of math displayed: 1
  text+headers+captions (#headers/#floats/#inlines/#displayed)
  337+3+0 (1/0/0/0) _top_
  8+2+0 (1/0/1/1) Section: Math formulas
  50+1+7 (1/1/0/0) Section: Figure