tips & tricks

About this forum...FAQ, and various tips and tricks to make using the forum easier and more effective

tips & tricks

Postby egc » Wed Feb 10, 2010 10:36 am

Updated periodically...

1. - embedding equations - An experimental feature which allows you to enter equations (and related things) into your posts. Occasionally, it is difficult to either (1) describe in words, or (2) render in simple ASCII, something which might be better represented using math typesetting. As such, a new and still 'experimental' feature has been added to the board the ability to embed equations using the LaTeX typesetting system. If you know how to use LaTeX, using the new feature will be extremely simple. If you don't know LaTeX, for shame! :P Actually, even if you don't know LaTeX, there are a number of online utilities which will allow you to build an equation - typically using a graphical template - and then generate the corresponding LaTeX code, which you can copy-and-paste into the forum.

Here's a simple example. Suppose you wanted to write out the probability expression corresponding to the live encounter history '1101'. You could use ASCII text, and write 'phi(1)p(2)phi(2)(1-p(3))phi(3)p(4)'. While this expression is interpretable as written, its a bit 'clunky'. Alternatively, if you use the new 'tex' markup option, you could render it much more elegantly. For this probability expression, you would simply enter

Code: Select all
[tex]\phi_1p_2\phi_2\left(1-p_3\right)\phi_3p_4[/tex]

which renders as

\phi_1p_2\phi_2\left(1-p_3\right)\phi_3p_4

Pretty slick, eh? The upside is obvious - looks much nicer, and is easier to read. Two downsides: (1) the email that gets sent out after you post something to a forum contains a corrupted version of the LaTeX code underlying the equation - it doesn't send the equation itself (which in fact is rendered in the forum as a small image, generated on the back-end by LaTeX running on the server). In addition, (2) the small images take up server space.

2. - embedding images - Analogous to the preceding item on equations, it is occasionally difficult to either (1) describe in words, or (2) render in simple ASCII, something which might be better represented using...a figure. For example, suppose you wanted to confirm a parameter index matrix (PIM) structure in a MARK analysis. You could try rendering it in ASCII. For example

Code: Select all
[code]
1 7 8 9 10 11
  2 8 9 10 11
    3 9 10 11
      4 10 11
         5 11
            6
[/code]


While this works, you end up having to decide between formatting the text so it looks correct (i.e., properly spaced and aligned) in the email that gets sent out, or in the online post.

Compare this with actually embedding the image of the PIM. To accomplish this, all you need to do is (i) make the image available on a web server somewhere (JPG and PNG image formats are currently supported), and (ii) embed the URL to the image in the appropriate markup tags:

Code: Select all
[img]http://img_url[/img]


For the example PIM, this would render as

Image

This option to embed graphics in posts is also classified as 'experimental', until it's determined how much extra load (if any) might be placed on the system. The upside is obvious. The downside is that if the image is deleted from the server, or the URL is no longer valid, then the image will no longer be embedded in the post. Also, as with embedded equations, the image itself is not included in the email that gets sent out to subscribers.

3. - exact phrase searches - The current search back-end allows you to do exact 'phrase-match' searches for single phrases. All you need to do is enclose the phrase you want to search for in quotes (e.g., "AIC weights"). Alas, wildcards aren't supported for phrase searches, at least not directly. So, for example, searching for "AIC weight*" does not return results for "AIC weight" + "AIC weights" + "AIC weighting" + ... There are some clever games you can play with nested booleans (see the advanced search), but they don't allow for exact phrase matches (at least, not at present).

4. - embedding code - If you want to embed some text or code where you'd like to maintain the formatting (say, a design matrix or some such), then it is suggested you use the *code* tag. For example, instead of trying to enter a parameter structure like

1 2 3 4 5 6
2 3 4 5 6
3 4 5 6
4 5 6
5 6
6

you use the code tag, and end up with

Code: Select all
1 2 3 4 5 6
  2 3 4 5 6
    3 4 5 6
      4 5 6
        5 6
          6


which is of course exactly what you want it to look like in the first place.
egc
Site Admin
 
Posts: 201
Joined: Thu May 15, 2003 3:25 pm

Return to forum FAQ, tips & tricks

Who is online

Users browsing this forum: No registered users and 3 guests

cron