2

I admit I'm new to LaTeX yet I'm writing my thesis using it. I'm having a hard time trouble shooting as the compiler doesn't give me any meaningful errors which leads me to believe what I'm doing is not wrong just being misinterpreted by the compiler.

I have a subsection with ONE single formula in text indicated by $$...$$. The text that comes after with peppered by question marks and missing characters like /.

\subsubsection*{Microarrays, Data Acquisition and Bioinformatics Methods}

To compare the expression pattern of individual genes to those of known clock 
components, we devised the following method explained in supplementary 
material. First, we subdivided the expression time course into six overlapping 
15h time windows (5-20h, 10-25h, etc., see Supplementary Figure S1A). 
For each gene and window, we then fit a polynomial of the form: 
$$expression_{{gene}_{i,t}} \sim a(t)^2 + b(t) + c$$ 
where $t$ corresponds to a time window consisting of four time points 
and expression corresponds to the matching expression values. This 
fitting procedure yields, for each gene, six sets (one set per window) 
of coefficients a, b, and c, where values of a indicate peaks if a 
$\pm$ s.e. $<$ 0 and troughs if a $\pm$ s.e. $>$ 0. To be even more 
stringent, we impose a cutoff of 0.05 on the p-value on $a$ 's t-statistic 
which is a measure of the likelihood that $a$ is incompatible 
with 0 by chance alone. In this manner, consecutive points along the 
time course for each gene can be represented as a series of peaks and 
troughs, and compared to specific peak\/trough combinations observed for 
different clock genes. \\\

Clock genes can be described by the following peak\/trough combinations 
(denominated simply as Peaks A-E in the main text): \\\
Joseph Wright
  • 259,911
  • 34
  • 706
  • 1,036
spork
  • 41
  • 2
    Embed your math in single dollar signs, e.g. $15^{-3}$. – 1010011010 Jul 18 '14 at 00:29
  • 1
    @1010011010 - Your suggestion -- while representing sound advice in general -- doesn't help solve the OP's problem with the text being "peppered with question marks and missing characters like '/'". – Mico Jul 18 '14 at 05:07
  • 2
    Perhaps you could show us the output? Where exactly are these question marks and missing slashes? – gardenhead Jul 18 '14 at 06:33

2 Answers2

7

The most likely cause is that you have an unbalanced pair $...$, this would make < produce an upside down question mark. \/ does not produce a slash, but a small amount of space (italic correction), use / or better \slash instead.

As others have said in a minimal document your snippet compiles without error. However there are many mark-up details that should be improved, some mentioned by the other posters.

  • Paragraphs should simply be separated by blank lines in the source
  • All mathematics should be set as such, including single characters and numbers
  • Upright names in mathematics can be given as \mathrm{...}
  • Mathematical expressions should be put inside a single math group, not divided up in to constituent parts, e.g. $a\pm\mathrm{s.e.}>0$ rather than a $\pm$ s.e. $>$ 0
  • In LaTeX you should use \[...\] for display math, not $$...$$
  • Unbreakable spaces should be given as ~ and used for example when providing the number for a figure Figure~1
  • / produces a slash, but \slash is preferable in text, as it allows a line break at that point
  • Numbers with units are best set using the siunitx package and its numerous features

Putting this together gives:

Sample output

\documentclass{article}

\usepackage{siunitx}

\sisetup{range-units=single,range-phrase=--}

\begin{document}

\subsubsection*{Microarrays, Data Acquisition and Bioinformatics Methods}

To compare the expression pattern of individual genes to those of
known clock components, we devised the following method explained in
supplementary material.  First, we subdivided the expression time
course into six overlapping \SI{15}{h} time windows
(\SIrange{5}{20}{h}, \SIrange{10}{25}{h}, etc., see Supplementary
Figure~S1A).  For each gene and window, we then fit a polynomial of
the form:
\[ 
 \mathrm{expression}_{\mathrm{gene}_{i,t}} \sim a(t)^2 + b(t) + c
\]
where $t$ corresponds to a time window consisting of four time points
and expression corresponds to the matching expression values. This
fitting procedure yields, for each gene, six sets (one set per window)
of coefficients $a$, $b$, and $c$, where values of $a$ indicate peaks if
$a\pm\mathrm{s.e.}<0$ and troughs if $a\pm\mathrm{s.e.}>0$.  To be
even more stringent, we impose a cutoff of $0.05$ on the $p$-value on
$a$'s $t$-statistic which is a measure of the likelihood that $a$ is
incompatible with $0$ by chance alone. In this manner, consecutive
points along the time course for each gene can be represented as a
series of peaks and troughs, and compared to specific peak\slash trough
combinations observed for different clock genes.

Clock genes can be described by the following peak\slash trough combinations 
(denominated simply as Peaks~A--E in the main text):

\end{document}
Andrew Swann
  • 95,762
  • @Mico Many thanks. Of course I should have written /. The \/ is probably the cause of the "disappearing slash" the poster reports. I have updated my answer. – Andrew Swann Jul 18 '14 at 07:47
0

To expand on 1010011010's comment:

What you need is inline math. This is done by putting dollars signs $ math expression here $ around the expression.

Double dollars signs denote display math, which is rendered on its own line and with more space (and usually centered). Also, it is prefereable to use \[ math expression \] to $$ math expression $$. See this question.

  • 1
    I'm afraid your suggestions -- while representing sound advice in general -- don't help solve the OP's problems with missing slash characters and question marks showing up. A big part of the problem is that the OP's code, once expanded to create a compilable document, doesn't produce the problems he/she says are occurring. – Mico Jul 18 '14 at 05:01