From 74a8ddef6282850ec78324d5a188187c776f01ca Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Thu, 19 Feb 2009 23:42:06 +0000 Subject: intro-scientific update (19feb09) git-svn-id: svn://tug.org/texlive/trunk@12190 c570f23f-e606-0410-a88d-b1316a301751 --- .../doc/english/intro-scientific/Makefile | 2 +- .../texmf-doc/doc/english/intro-scientific/README | 4 +- .../doc/english/intro-scientific/scidoc.pdf | Bin 304234 -> 305262 bytes .../doc/english/intro-scientific/scidoc.tex | 91 +++++++++------------ 4 files changed, 42 insertions(+), 55 deletions(-) (limited to 'Master/texmf-doc/doc') diff --git a/Master/texmf-doc/doc/english/intro-scientific/Makefile b/Master/texmf-doc/doc/english/intro-scientific/Makefile index 82dda012df0..dba349df6f7 100644 --- a/Master/texmf-doc/doc/english/intro-scientific/Makefile +++ b/Master/texmf-doc/doc/english/intro-scientific/Makefile @@ -11,7 +11,7 @@ read: scidoc.pdf acroread scidoc.pdf clean: - rm -f *.aux *.toc *.log + rm -f *.aux *.toc *.log *.out veryclean: clean rm -f scidoc.pdf diff --git a/Master/texmf-doc/doc/english/intro-scientific/README b/Master/texmf-doc/doc/english/intro-scientific/README index 91f66be70e0..942aad38be2 100644 --- a/Master/texmf-doc/doc/english/intro-scientific/README +++ b/Master/texmf-doc/doc/english/intro-scientific/README @@ -1,7 +1,7 @@ Package: Writing Scientific Documents Using LaTeX Author: Andrew J. Bennieston -Copyright 2007-2008 Andrew J. Bennieston. +Copyright 2007-2009 Andrew J. Bennieston. This work may be distributed and/or modified under the conditions of the LaTeX Project Public License, either version 1.3 @@ -25,7 +25,7 @@ LaTeX in typesetting scientific documents. It covers the basics of creating a new LaTeX document, special typesetting considerations, mathematical typesetting and graphics. It also touches on bibliographic data and BibTeX. -Currently in its fourth edition, Writing Scientific Documents Using LaTeX is +Currently in its fifth edition, Writing Scientific Documents Using LaTeX is periodically updated and extended and is a perpetual work-in-progress. The file scidoc.pdf was generated from scidoc.tex using the `pdflatex' command. diff --git a/Master/texmf-doc/doc/english/intro-scientific/scidoc.pdf b/Master/texmf-doc/doc/english/intro-scientific/scidoc.pdf index d8762dfdd32..c9279cb9f91 100644 Binary files a/Master/texmf-doc/doc/english/intro-scientific/scidoc.pdf and b/Master/texmf-doc/doc/english/intro-scientific/scidoc.pdf differ diff --git a/Master/texmf-doc/doc/english/intro-scientific/scidoc.tex b/Master/texmf-doc/doc/english/intro-scientific/scidoc.tex index 477922513f9..da1463ada65 100644 --- a/Master/texmf-doc/doc/english/intro-scientific/scidoc.tex +++ b/Master/texmf-doc/doc/english/intro-scientific/scidoc.tex @@ -12,15 +12,15 @@ \title{Writing Scientific Documents Using \LaTeX} \author{Andrew J. Bennieston} -\date{Fourth Edition\\ -September 13, 2008} +\date{Fifth Edition\\ +February 19, 2009} \begin{document} \maketitle \tableofcontents \section{Introduction} -\LaTeX\, is the de-facto standard for scientific document processing. It is an accepted format for submission to a number of scientific journals, as well as many professional publishers. Its popularity stems from a history of flexibility, power and just `doing the right thing'. \LaTeX\, automatically numbers your equations and figures, lays content out according to strict style rules so as to obtain a readable, polished finish, and rarely gets in the way of the task of writing! +\LaTeX\, is the de-facto standard for typesetting scientific documents. It is an accepted format for submission to a number of scientific journals, as well as many professional publishers. Its popularity stems from a history of flexibility, power and just `doing the right thing'. \LaTeX\, automatically numbers your equations and figures, lays content out according to strict style rules so as to obtain a readable, polished finish, and rarely gets in the way of the task of writing! In this document, I introduce many of the \LaTeX\, commands and concepts required to produce a reasonable scientific document of any length, emphasising some of the more complicated aspects while skipping over the simpler things. In some cases, these simple things are silently included as part of a more involved example, so look closely at the example code provided! @@ -81,25 +81,28 @@ There are a few new things introduced here; sections will be covered later, but \section{Sections and Subsections} Sections are started with the \verb|\section{section-title}| command. The section title goes between the \verb|{}|. Similarly, subsections are started with the \verb|\subsection{sub-title}| command, and sub-subsections with the \\ -\verb|\subsubsection| command. By default, all sections and nested subsections are automatically numbered. This behaviour can be turned off on a per-section basis by using the \verb|\section*{section-title}| form, where the \verb|*| tells \LaTeX\, not to number these sections according to the document numbering scheme. The \verb|*| can be used on anything which would normally be numbered; (sub)sections, equations, figures, tables etc. +\verb|\subsubsection| command. By default, all sections and nested subsections are automatically numbered. This behaviour can be turned off on a per-section basis by using the \verb|\section*{section-title}| form, where the \verb|*| tells \LaTeX\, not to number these sections according to the document numbering scheme. The \verb|*| can be used on (almost) anything which would normally be numbered; (sub)sections, equations, etc. Figures and tables use the \verb|*| option in a different way because their naming and numbering is controlled through the \verb|\caption| command. \section{Typesetting Considerations} -\LaTeX\, is a little more pedantic than most word-processors, and requires certain punctuation to be typeset in slightly different ways. This section discusses the most commonly encountered issues. +\LaTeX\, is a little more pedantic than most word-processors, and requires certain punctuation marks to be typeset in slightly different ways. This section discusses the most commonly encountered issues. \subsection{Single Quotes} \LaTeX\, requires left and right quotes, rather than straight quotes. Using the apostrophe, \verb|'|, always produces a right quote, so you need to use the \emph{backtick}, \verb|`|, to obtain a left-quote. Quoted text then looks something like \emph{the `flavour' of a particle} and not like \emph{the 'flavour' of a particle}. The former produces the correct result when typeset, the latter begins and ends with end-quotes! \subsection{Double Quotes} -The double-quote, \verb|"|, acts as a double right quote. Since there is no \emph{double left quote} key on the keyboard, you produce a double left-quote in \LaTeX\, by typing two single left quotes (the backtick key again). You can end with either two single right quotes (apostrophes) or with the double quote symbol. For consistency, I prefer to end with two single right quotes. Double quoted text is, therefore, typeset something like \verb|\ldots said ``the project is on schedule| \verb|and an| \verb|internal| \verb|investigation has been launched''|, which looks something like this when typeset: \ldots said ``the project is on schedule and an internal investigation has been launched'' +Double left-quotes are input using two single left quotes (the backtick), while double right-quotes are input using two single right quotes (the apostrople). Double quoted text is typeset something like \verb|\ldots said| \verb|``the project| \verb|is on| \verb|schedule| \verb|and an| \verb|investigation has been launched''|, which looks something like this when typeset: \ldots said ``the project is on schedule and an investigation has been launched'' -\subsection{Hyphenation} -Hyphens in printed text have three sizes; the hyphen to split a word across a line is the shortest, and is automatically inserted by \LaTeX\, when required, but can be typeset using a single hyphen (\verb|-| $\Rightarrow$ -). This is also used to hyphenate words within a line. The hyphen to mark a range of numbers, 3--5, is slightly longer, typeset using two hyphens (\verb|--| $\Rightarrow$ --). Finally, the hyphen used to insert a pause in text (which should probably be replaced by a comma or semicolon anyway) is the longest, typeset using three hyphens (\verb|---| $\Rightarrow$ ---). +\subsection{An Aside on Quotation Marks} +In British English, the usual practice is to enclose quoted matter between single quotation marks, reserving double quotation marks for a quotation within a quotation. In US English, the reverse is true. For quotations nested within the second quotation, one should revert to the original mark, alternating accordingly for subsequent levels. + +\subsection{Hyphenation and Dashes} +Hyphens and dashes in printed text have three sizes; the soft hyphen, used to split a word across a line, is the shortest. This is automatically inserted by \LaTeX\, when required. The hard hyphen is the same length as its soft sibling. It is used to hyphenate words within a line, and is typeset using a single dash (\verb|-| $\Rightarrow$ -). The en-rule (or en-dash) marks a range (often of numbers), such as 3--5. This is slightly longer (one \emph{en} in length), and is typeset using two hyphens (\verb|--| $\Rightarrow$ --). Finally, the em-rule (or em-dash) is used to insert a pause in text --- which should probably be replaced by a comma or semicolon anyway --- and is the longest (one \emph{em} in length). It is typeset using three hyphens (\verb|---| $\Rightarrow$ ---). \subsection{Special Characters} -There are some characters which are used by \LaTeX\, as control sequences. These must be escaped to be used in normal text. The characters most often encoutered are \verb|\ _ & % { } #| (begin command, underscore, table separator, comment, left curly brace, right curly brace, hash or ``pound'' sign) and they can be produced in the text verbatim by `escaping' with a leading backslash: \verb|\\ \_ \& \% \{ \} \#|. +There are some characters which are used by \LaTeX\, as control sequences. These must be escaped to be used in normal text. The characters most often encoutered are \verb|\ _ & % { } #| (begin command, underscore, table separator, comment, left curly brace, right curly brace, hash or ``pound'' sign) and they can be produced in the text verbatim by `escaping' with a leading backslash: \verb| \_ \& \% \{ \} \#|, with the exception of the backslash, which can be inserted with the \verb|\textbackslash| command: \textbackslash. \subsection{Emphasising Text} -To place emphasis on a certain phrase, use the \verb|\emph{something}| command. This usually produces \emph{italic} text, but the effect depends on the document style used. The advantage of using \verb|\emph| is that emphasised text within an already emphasised section is typeset in Roman (non-italic) text. For example, \verb|The \emph{President of the \emph{United States} of America}| produces: The \emph{President of the \emph{United States} of America}. +To place emphasis on a certain phrase, use the \verb|\emph{something}| command. This usually produces \emph{italic} text, but the effect depends on the document style used. The advantage of using \verb|\emph| is that emphasised text within an already emphasised section is typeset in Roman (non-italic) text. For example, \verb|The \emph{President of | \verb|the \emph{United| \verb|States} of America}| produces: The \emph{President of the \emph{United States} of America}. In addition, it is possible to directly specify the typeface required. The command \verb|\textit{italic text}| produces \textit{italic text}, while \verb|\textbf{bold text}| produces \textbf{bold text} and \verb|\texttt{monospaced text}| produces \texttt{monospaced text}. @@ -117,13 +120,13 @@ When typeset, this looks like: The solar neutrino flux was found to be $2.1 \pm The use of \verb|$...$| to insert math-mode \LaTeX\, inline with the paragraph text allows for many $\epsilon$ff$\epsilon$$\hat{c}\tau$s; I used it to produce the right-arrows ($\Rightarrow$) in the hyphenation section, above. \subsection{Display Mathematics} -The display mathematics environment sets mathematical content on a line of its own, centred on the page. The shortcut form is the \verb|$$...$$| environment, which enters display mode but does not add equation numbering. -$$\frac{\hbar^2}{2m}\nabla^2\Psi + V(\mathbf{r})\Psi -= -i\hbar \frac{\partial\Psi}{\partial t}$$ +The display mathematics environment sets mathematical content on a line of its own, centred on the page. The shortcut form is the \verb|\[...\]| environment, which enters display mode but does not add equation numbering. +\[ \frac{\hbar^2}{2m}\nabla^2\Psi + V(\mathbf{r})\Psi += -i\hbar \frac{\partial\Psi}{\partial t} \] The Schr\"odinger equation, above, was typeset using: \begin{verbatim} -$$\frac{\hbar^2}{2m}\nabla^2\Psi + V(\mathbf{r})\Psi -= -i\hbar \frac{\partial\Psi}{\partial t}$$ +\[ \frac{\hbar^2}{2m}\nabla^2\Psi + V(\mathbf{r})\Psi += -i\hbar \frac{\partial\Psi}{\partial t} \] \end{verbatim} To get equation numbering, one has to be slightly more verbose: @@ -139,34 +142,10 @@ ds^2 = c^2 dt^2 \left( \frac{d\sigma^2}{1-k\sigma^2} + \sigma^2\left[ d\theta^2 + \sin^2\theta d\phi^2 \right] \right) \end{equation} -Note that the \verb|\label| command was used here, which sets a label that can used in references to that equation. For example, typing \verb|\eqref{rw-metric}| at any point in the document will yield: \eqref{rw-metric}. As with sections, using the ``starred form'' \verb|\begin{equation*}| suppresses equation numbering (which is precisely what \verb|$$...$$| does). +Note that the \verb|\label| command was used here, which sets a label that can used in references to that equation. For example, typing \verb|\eqref{rw-metric}| at any point in the document will yield: \eqref{rw-metric}. As with sections, using the ``starred form'' \verb|\begin{equation*}| suppresses equation numbering (which is precisely what \verb|\[...\]| does). -\subsection{Equation Arrays and the Align Environment} -To typeset equations over multiple lines, \LaTeX\, provides two useful environments. The first is the \emph{eqnarray}: -\begin{verbatim} -\begin{eqnarray}\label{x-of-t} -X(t) & = 1 + \frac{t^3}{2t} \\ -& = 1 + \frac{t^2}{2} -\end{eqnarray} -\end{verbatim} -\begin{eqnarray}\label{x-of-t} -X(t) & = 1 + \frac{t^3}{2t} \\ -& = 1 + \frac{t^2}{2} -\end{eqnarray} - -In an equation array, the \verb|&| character separates columns and \verb|\\| starts a new line. To suppress line numbering on one or more lines, use \verb|\nonumber| before the \verb|\\|: -\begin{verbatim} -\begin{eqnarray}\label{x-of-t-again} -X(t) & = 1 + \frac{t^3}{2t} \\ -& = 1 + \frac{t^2}{2} \nonumber -\end{eqnarray} -\end{verbatim} -\begin{eqnarray}\label{x-of-t-again} -X(t) & = 1 + \frac{t^3}{2t} \\ -& = 1 + \frac{t^2}{2} \nonumber -\end{eqnarray} - -The second method is to use the \emph{align} environment, which is preferred over \emph{eqnarray} since it tends to produce better results. Here is the same example with the \emph{align} environment: +\subsection{The Align Environment} +To typeset equations over multiple lines, use the \emph{align} environment, of the \emph{amsmath} package. Here is an example with the \emph{align} environment: \begin{verbatim} \begin{align} X(t) = 1 + \frac{t^3}{2t} \\ @@ -174,11 +153,11 @@ X(t) = 1 + \frac{t^3}{2t} \\ \end{align} \end{verbatim} \begin{align} -X(t) = 1 + \frac{t^3}{2t} \\ -= 1 + \frac{t^2}{2} +X(t) & = 1 + \frac{t^3}{2t} \\ +& = 1 + \frac{t^2}{2} \end{align} -Note that using the \emph{align} environment didn't squash the fractions into a single line height! Again, line numbers can be suppressed with \verb|\nonumber|, and the environments \emph{eqnarray*} and \emph{align*} provide unnumbered versions of the same functionality. +The ampersand character, \&, is used to set the alignment points. Note that using the \emph{align} environment does not squash fractions into a single line height! Line numbers can be suppressed with \verb|\nonumber|, and the environment and \emph{align*} provides an unnumbered version of the same functionality. \subsection{Symbols} There is a lot of documentation on the \LaTeX\, mathematical command set. For the most part it is obvious; Greek letters are produced using \verb|\lettername|, for example $\gamma$ is \verb|$\gamma$|. Uppercase Greek letters are obtained by capitalising the first letter: $\Omega$ is \verb|$\Omega$|\ldots @@ -187,9 +166,9 @@ There are also a variety of arrows and other symbols: \verb|$\rightarrow$| produ Summation symbols can be inserted either with \verb|\sum| or \verb|\Sigma|, though \verb|\sum| is preferred, since it scales as required. Integrals can be represented using \verb|\int| and variants for double integration, closed loop integration, etc. \begin{verbatim} -$$\sum_{i=1}^N \rightarrow \int_1^N\,\mathrm{d}i$$ +\[ \sum_{i=1}^N \rightarrow \int_1^N\,\mathrm{d}i \] \end{verbatim} -$$\sum_{i=1}^N \rightarrow \int_1^N\,\mathrm{d}i$$ +\[\sum_{i=1}^N \rightarrow \int_1^N\,\mathrm{d}i\] \subsection{Fractions} Fractions can be typeset in the form $1/2$: \verb|$1/2$|, or with horizontal lines $\frac{1}{2}$: \verb|$\frac{1}{2}$|. Fractions and many other symbols are sized differently depending on whether the equation is inline (part of the paragraph text) or displayed. To use the display sizes for inline symbols, add the \verb|\displaystyle| command to the inline equation: \verb|$\displaystyle\frac{1}{2}$| renders: $\displaystyle\frac{1}{2}$ @@ -257,11 +236,11 @@ x^2 + y = 5 \subsection{Math-mode Spacing} It is possible to add spaces of varying lengths to your mathematical typesetting. In the simultaneous equations example, equation \eqref{sim-eq}, I used \verb|~,~| to add spaces either side of the comma. I also typeset integrals using \verb|\int f(x)\,dx|, where the \verb|\,| adds a small space before the $dx$ symbol: \begin{verbatim} -$$\langle\psi|\psi\rangle = -\int_{-\infty}^{\infty} \psi^\star(x)\psi(x) \, dx$$ +\[\langle\psi|\psi\rangle = +\int_{-\infty}^{\infty} \psi^\star(x)\psi(x) \, dx\] \end{verbatim} -$$\langle\psi|\psi\rangle = -\int_{-\infty}^{\infty} \psi^\star(x)\psi(x) \, dx$$ +\[\langle\psi|\psi\rangle = +\int_{-\infty}^{\infty} \psi^\star(x)\psi(x) \, dx\] \section{Graphics} Graphics can be inserted into \LaTeX\, documents from a number of formats. Depending on whether you use \verb|latex| or \verb|pdflatex|, the recommended formats are Encapsulated PostScript (EPS) and Portable Document Format (PDF), respectively. These formats are good because they are scalable, though non-scalable bitmap formats are supported, including JPEG. The \emph{graphicx} environment allows inclusion of such graphics, as well as modification in-place (rotating, scaling, etc.) Full documentation for \emph{graphicx} is available online.\footnote{\url{http://www.ctan.org/tex-archive/macros/latex/required/graphics/grfguide.pdf}} @@ -337,9 +316,13 @@ Complex & $\mathbb{C}$ \\ The \emph{tabular} environment acts much like the \emph{array} math environment, and the \verb#|# character instructs \LaTeX\, to draw a vertical line between columns. You can use the \verb|\hline| command to draw horizontal lines. Such a table can, of course, be referred to using the \verb|\ref{my-table}| command: table \ref{my-table}. +The \emph{booktabs}\footnote{\url{ftp://ftp.tex.ac.uk/tex-archive/macros/latex/contrib/booktabs/booktabs.pdf}} package documentation includes a number of points for correctly typesetting tables, particularly for professional book layouts. + \section{Including \LaTeX\, Files} If your document is split across several files, they can be included with the command \verb|\include{filename}|. The \verb|.tex| extension is not required --- \LaTeX\, adds it automatically. \verb|\include| will add a page-break before the contents of the included file. +The \verb|\include| command will not work inside a file which has already been \verb|\include|d by another file. The \verb|\input| command is also useful. + \section{Bibliographies \& Citations} \subsection{Bibliographies \& References} A simple bibliography can be created as follows: @@ -381,7 +364,7 @@ pdflatex report && pdflatex report \end{verbatim} \section{About This Document} -This document is copyright \copyright\, 2007--2008 Andrew J. Bennieston. It may be freely distributed. The document was produced in the Vim text editor on the Slackware Linux operating system. Earlier versions were produced on an Apple Macbook using the TextMate text editor. +This document is copyright \copyright\, 2007--2009 Andrew J. Bennieston. It may be freely distributed according to the terms of the LaTeX Project Public License (details below). The document was produced in the Vim text editor on the OpenSUSE Linux operating system. Earlier versions were produced on an Apple Macbook using the TextMate text editor, and the Slackware Linux operating system using the Vim text editor. \subsection{License} This work may be distributed and/or modified under the conditions of the LaTeX Project Public License, either version 1.3 of this license or (at your option) any later version. The latest version of this license is in \url{http://www.latex-project.org/lppl.txt} and version 1.3 or later is part of all distributions of LaTeX version 2005/12/01 or later. @@ -397,6 +380,10 @@ This work has the LPPL maintenance status `maintained'. The Current Maintainer o \begin{itemize} \item Licence changed to LPPL (September 16, 2008). \end{itemize} +\item Fifth Edition: February 18, 2009 + \begin{itemize} + \item Minor corrections (February 19, 2009) + \end{itemize} \end{itemize} \end{document} -- cgit v1.2.3