Q: How to use Xpra and Screen to run an GUI application in background and log out?
Provided that xpra and screen already installed on the server.
On the server side:
1. Start a new screen session:
        screen -S NewScreenSessionName
2. Start an xpra server using a four digit display number:
        xpra start :FourDigitNumber
3. Start firefox running inside the xpra server:
       DISPLAY=:FourDigitNumber firefox &
4. Detach from the current screen session:
       Ctrl + a + d
5. If you want to re-attach to the screen session, run "screen -ls" to list all of the current screen session(s) and then
    run: "screen -r FullScreenSessionName" to re-attach to the screen. 
6. To terminate a screen session, type:
        exit
7. To stop the xpra server on the display number:
        xpra stop :FourDigitNumber

On a Windows or Linux client:
1. Ensure that xpra is installed.  If not, go to xpra.org to download the package and install it.
2. Use ssh to attach a Linux client to the xpra server which has firefox running:
        xpra attach ssh:YourUserName@ServerName:FourDigitNumber
   (If  you run into any perl error, just run the command again and the GUI of the remote application will be open)
3. For a Windows client, open the xpra application and fill in the required fields to attach to the xpra server.
Q: Do you have anti-virus software that I can download and use free of charge?

Updated Jan 2010
For Home use: Windows XP/7/Vista, Login using  account with Administrator privilege
Remove Sophos first.

http://support.microsoft.com/kb/307895

Download and install Microsoft software.
http://www.microsoft.com/Security_Essentials/

Yes. UBC ITServices has purchased a software license for the Sophos AntiVirus software. All students, staff and faculty can download a copy and use it. Versions can be found for all flavous of Windows (95/98/Me/NT/2000/XP/2003) as well as most flavours of MacOSX (8/9/OSX/OSX 10.2 and above).

In order to download the installation kit, you first have to create a Campus Wide Login (CWL) account that verifies that you are an eligible member of the University. This can be done by going to this page and following the registration instructions to create a CWL account:

http://www.cwl.ubc.ca/

Remember the account details since you can use this CWL account in the future for other University web application that uses CWL or for downloading another copy for another machine.

When you have created the CWL account, you can then go to the UBC Software Download website and go through the procedure to download your copy of the Sophos AntiVirus software. The download site is here:

http://download.ubc.ca/

Installation instruction ought to be included but another set of installation and usage instructions can be found here:

http://www.itservices.ubc.ca/services/software/antivirus/sophos.html"
Q: How do I get Firefox to use xpdf as my PDF reader

There are various problems associated with Adobe's PDF plugin for browsers (nppdf.so). Benign problems are the inability to print or produce printable Postscript files. More serious problems are crashing or an unwillingness to deal with different document versions.

xpdf is generally more robust. If you are on a UNIX/linux system then in $(HOME)/.mailcap, include a line with
 

  application/pdf; xpdf -q %s


The advantage of this approach is the 'xpdf' is the viewer for all browsers (firefox, mozilla, lynx etc) and email software (mutt, pine, thunderbird etc).

If you are using a different environment, then to configure firefox to use xpdf instead of the Acrobat plugin,

  1. Let Firefox show you plugins:
    • Type "about:config" in the URL window.
    • Look for the browser.download.hide_plugins_without_extensions option.
    • Right-click over true and toggle this value to false.
  2. Disable plugin and use xpdf instead:
    • Go to the Edit / Preferences / Downloads / View and Edit Actions menu.
    • Double-click the application/pdf file type.
    • A window will pop up asking how to handle PDF files: select Open them with this application.
    • Another file chooser window will pop up: enter /usr/local/bin/xpdf into the filename field, then click Open.
    • This will bring you back to the previous window: press OK here.
    • This will bring you back to first menu: click Close here.
  3. You are done: test by going to a clicking onto a PDF link.
Q: TexnicCenter setup configuration

When you start TeXnicCenter, it will start to run the configuration:
   - Configuration Wizard - Welcome
        Click [next]

   - Configuration wizard - Distribution Directory      C:\Program
Files\MiKTeX 2.7\miktex\bin
        click [next]

   - Configuration Wizard - PostScripts-Viewer
        leave everything blank and just click [Next]

   - Configuration Wizard - Finish
        click [finish] to finish
 

Q: How do I get bold math in foils?
  • For math symbols in the running text, you can use bm{} command.

    Example:

    ...$bm{y_{ij}}$ is the response... The bm macro is different from the mathbf command in that it emboldens everything including symbols.
  • For math symbols in the equation or eqnarray environment, use a pair of environments: begin{boldequation} formula end{boldequation} begin{boldequation*} formula end{boldequation*} The unstarred form has automatic referencing and is numbered, while the starred form has no automatic referencing and numbering.
Q: How to have double-spacing effect in LaTeX?

Add

\usepackage{setspace} \doublespacing

to the preamble. The whole document will be double-spaced including bibliography. Footnotes, figures, and tables will still be single-spaced. If you want a part of the text still be single-spaced, include the part in the environment:

\begin{singlespace} \end{singlespace}

If you want to have other spacing effect for a part of the text, you can use the environment:

\begin{spacing}{space}...\end{spacing}

. For example, to reduce the linespacing in the bibliography and table of contents, you can use the following command

\begin{spacing}{0.9} \tableofcontents \end{spacing} ... \begin{spacing}{0.9} \bibliographystyle{plain} \bibliography{refs} \end{spacing}

The other two commands provided by the

setspace

package are

\singlespacing

and

\onehalfspacing

You can also change the other spacing by using the \setstretch command, e.g. \setstretch{1.8}. To get single-spaced, one-and-half-spaced, and doublespaced effects, you can also use \setstretch{1}, \setstretch{1.5} and \setstretch{2} respectively.

Q: I am behide the times, what is new LaTeX2e?

LaTeX2e Information

OnLine Documentation About:

  • LaTeX2e Local Guide
  • Additional LaTeX2e Documents

(in PostScript):

  • UBC Statistics Dissertation Document Class
  • LaTeX2e WWW links

UBC Thesis Style Format

  • Located under /opt/texmf/bin/Thesis
  • Just copy the 4 files in that directory

(and fill in the blanks!!)

  • Carefully read the thesis.tex file

LaTeX2e Local Guide

  • local.ps (a local guide to use of LaTeX2e on the departmental research network)

Additional LaTeX documentation in .ps format

  • Introduction to LaTeX2e
    • essential.ps: a short introduction to the most important commands
    • usrguide.ps: overview on the new commands relative to LaTeX 2.09
  • Graphics
    • grfguide.ps: macros for including postscript images, color and much more. This file is created by running LaTeX on grfguide.tex and dvips grfguide.
  • Tools
    • afterpage.ps: causes the commands specified in its argument to be expanded after the current page is output.
    • array.ps: A new implementation of LaTex's tabular and array environment.
    • dcolumn.ps: This package defines a system for defining column of entries in an array or tablular which are to be aligned on a ``decimal point''.
    • delarry.ps: implicits \left \right pairs.
    • enumerate.ps: gives the enumerate environment an optional argrument which determines the style in which the counter is printed.
    • fileerr.ps: deal with ``File not found error''.
    • ftnright.ps: Footnotes in a multi-column layout.
    • hhline.ps: produces a line like \hline, or a double line like\hline\hline except for its interaction with vertical lines.
    • indentfirst.ps: makes the first line of all sections ec, be indented by the usual paragraph indentation.
    • layout.ps: displays page layout variables.
    • longtable.ps: defines the longtable environment, a multi-page version of tabular.
    • multicol.ps: improved typesetting in several columns
    • rawfonts.ps: provides emulation of LaTex 2.09 documents which used low-level commands such as \tenrm.
    • showkeys.ps: displays the internal labels with \ref, \cite etc.
    • somedefs.ps: allows package writers to provide options which switch definitions on and off.
    • tabularx.ps: a new environment which takes the same argument as tabular, but modifies the width of certain columns, rather than the inter column space, to set a table with the requested total width.
    • theorem.ps: an extension of the LaTex theorem environment.
    • varioref.ps: similar to \ref but adds an additional page references, like `` on the facing page'' or ``on page 27'' whenever the corresponding \lable is not on the same page.
    • verbatim.ps: reimplements the LaTeX verbatim and verbatim* environments.
    • xr.ps: implements a system for external references.
    • xspace.ps: saves the user from having to type \ or {} after most occurrences of a macro name in text.
  • Advanced topics
    • clsguide.ps: LaTeX2e for class and package writers
    • fntguide.ps: the New Font Selection Scheme for class and package writers
    • cfgguide.ps: configuration options for LaTeX2e

UBC Statistics Dissertation Document Classes

Q: How to change the distance between the title and the authors in the title page in foils?

Use vspace command in the author command. Example:

leftheader{textsc{Presentation using textsc{pdf}LaTeX, and FoilTeX, class}} %make a left header %rightheader{textsf{thepage}} %make a right header MyLogo{Eugenia and Weiliang, UBC Stats} %make a left footer %rightfooter{} %make a right footer title{shadowbox{Presentation using textsc{pdf}LaTeX, and FoilTeX, class}} % the document title % the author author{vspace{2cm}\r Latex Smart \r 6356 Agricultural Road\r University of British Columbia\r Vancouver BC \r V6T 1Z2} % the date date{today} begin{document} thispagestyle{empty} setcounter{page}{0} maketitle
Q: How to change the frame style of the slides in the "seminar" class?
A1) Method 1:
      a) first include "usepackage{fancybox}"
      b) then use
           slideframe{shadow} or
           slideframe{double} or
           slideframe{oval} or
           slideframe{Oval}
         to change frame style or use
           slideframe{none}
         to create slides without frame
     note: put these commands in the preamble will cause all slides have 
the same frame unless you use another slideframe command to change it.
The above commands can be used within any begin{slide}...end{slide}.

  Method 2:
    a) first include "usepackage{semcolor}"
    b) then use
      slideframe{scplain} or
      slideframe{scshadow} or
      slideframe{scdouble} or
      slideframe{none}
Q: Several BibTeX style files for Stats magazines

Here . Rated as "very useful" by Weiliang. Problem is that some journals require bibliographic references in one's paper to be exactly as they want. This collection can help you to solve this problem much faster.

Pages