scientific writing with latex - lib4ri · tex philosophy i enter one-dimensional instructions (the...
TRANSCRIPT
Scientific Writing with LaTeX
One Possible Workflow in Scientific Writing
Document Preparation: LaTeX
From www.lamport.org
typesetting was conceived and developed by Donald A. Knuth between 1977 and 1986 in
collaboration with his students and with advice from typesetters and calligraphers.
TeX is a typesetting system for technical texts.
is a collection of TeX macros
written by L. Lamport
It’s All About Typography
From ETH-Bib’s e-collection, a disseration in Word from 2012
TeX Philosophy I
Enter one-dimensional instructions (the .tex input file) in the well weathered (platform-independent) ASCII format for the eventually two-dimensional page layout. The logical structure of document-, page-, paragraph-, word-, and finally letter- design proceeds via boxes: The same way a classical typesetter would work:
TeX solves many optimization problems of penalty-functions which are formulated for all kinds of typographical rules. The result of the optimization process should finally lead to a «aesthetically pleasing typeset document» (Knuth)
TeX Philosophy II
TeX acts as a high-level programming language The type-setting instructions are interspersed within the actual text which is to be typeset. The parser of the .tex files identifies the commands by their specific structure
\commandname{arg1}{arg2}{arg3}
TeX’s Strength
From its initial goal and history LaTeX provides an aesthetic mathematical formula typesetting in the context of technical texts (and it still is a leading player in this ‘market’):
Many extensions were added over the years from other fields of science: Physics (Feynman graphs), chemistry (chemical structures), ...
From G. Grätzer: Math into LaTeX
TeX Installation
First, install the TeX system (i.e. compiler, libraries, packages,
and typographic infrastructure)
Microsoft : MikTeX, proTeXt Linux : TeXLive Apple : MacTeX iPad : TeXWriter / Texpad
Examples of TeX-systems for different operating systems
Type Up a TeX File
\documentclass{article} Preamble part: Specify the necessary packages \begin{document} \titel{Ein Artikel} \author{H. Harzenmoser} \maketitle \section{Einleitung} Text ... \cite{HarziPigs04} \section{Methoden} Text ... \subsection{Habe gemessen} Text ... \subsubsection{ ... und \emph{gemessen}} Text ... \section{Resultate} Text ... \bibliographystyle{plain} \bibliography{MeineLiteratur} \end{document}
Ein Artikel H. Harzenmoser
1. Einleitung Text . . . 2. Methoden Text . . . Harzenmoser (2004) 2.1. Habe gemessen Text . . . 2.1.1. . . . und gemessen Text . . . 3. Resultate Text . . . Referenzen …. Harzenmoser, E. 2004, Pigs and Porcu Hugentobler, H. 1962, Braunvieh Inter
Input file: Artikel.tex Result
La/TeX IDEs
For Microsoft systems:
TeXnicCenter
WinShell
WinEdt
and the WYSIWYG-ly
LyX
LaTeX IDEs
on Linux distributions
Kile
and again the WYSIWYG -like LyX
pdfLaTeX
N.B. Since TeXLive 2010 pdfLaTeX accepts not only .eps figures but most bitmap/vector graphics formats: .pdf, .jpg, .png, .tiff, …
pdfLaTeX the modern alternative to classic LaTeX:
Source: agodemar on Tex.stackexchange.com 18. Jan. 2012
The LaTeX – Bib(La)Tex Connection
How to typeset references
in LaTeX documents
Bibtex vs. Biblatex
\usepackage{natbib} \bibliographystyle{<uvw>} % .bst file \begin{document} Let's cite! Einstein's journal paper \citep{einstein} and the book of \citet{dirac} are physics related items. \bibliography{<MyLib>} % .bib file \end{document}
\usepackage[]{biblatex} \bibliography{MyLib} % .bib file \begin{document} Let's cite! The Einstein's journal paper \citep{einstein} and the Dirac's book \citet{dirac} are physics related items. \printbibliography \end{document}
The Inner Workings of the BibTeX Application
BibTex application .aux files list the bibliographic requirements (from the \cite-like references) as extracted from the source file (Artikel.tex). The BibTeX program loads to corresponding BibTeX data (from say MeineLiteratur.bib) and generates the reference section (Artikel.bbl) which belongs to Artikel.tex. A new compilation of the LaTeX-file, Artikel.tex, molds together text and references into a coherent whole .
Artikel.bbl
Artikel.tex
BibTeX
Artikel.aux
MeineLiteratur.bib
BibTeX Format
BibTeX (Oren Patashnik, 1986) is a data format as well as an application to store and work on bibliographic data which is necessary to produce the bibliographies in LaTeX documents.
BibTeX, the data format
Tags
Publication type
BibTeX key
JabRef: BibTeX’s Good Soul
Graphically oriented bibliographic information manager of BibTeX files.
GUI for painless generation and maintenance of BibItems.
JabRef is an OpenSource Java VM application. Advantage: Program runs platform-independent.
Artikel.b
BibTeX
Artikel.a
MeineLiteratur.bib
JabRef
JabRef’s Bibliography Viewer
Import to JabRef
• Direct filling of the JabRef GUI forms • Import ASCII data file with BibTeX-formated bibliographic information • Import of proprietary data formats from: Inspec (engineering-oriented literature) ISI (Web of Knowledge/Science database) Medline (US National Library of Medicine, bibl. database) Ovid (Platform for STM information) Scifinder ( Chemistry-specific database for literature & substances) EndNote ….
Working with References using LaTex & JabRef
Literature/Reference Management: Zotero
Finally, use Zotero as the front-end tool to acquire, manage and deploy the bibliographic Information necessary for scientific writing.
Register for free at http://zotero.org with free 300 MB cloud storage space.
A Most Versatile Web Picker
Picker uses (Context Objects in Spans) COinS: Zotero tries to sense the content type in web browser. If successful: add information to personal library with a single click. Zotero supports thousands of sites from book stores, to newspapers, to academic journals and repositories.
Book
Correctly identifies Table of Contents as a folder with a set of single entities
This applies to Firefox!
For other browsers (IE, Safari, Opera, …), .js Bookmarklet solutions available
More than just Reference Collection
Bibliographic information
Group Libraries to collaborate
For collaborative working: Group Libraries
Zotero groups can be private or public, open or closed.
For example, you and a few colleagues might initially work on a research project in private.
After publication, why not share your research notes
and library with the world?
Number of group libraries and number of participants: unlimited
Administration: Through setup process at zotero.org by the group-library owner
Export Zotero entries to BibTeX
Output Options:
Synchronized across the Universe
Zotero automatically synchronizes data across as many devices as you choose. Add to your research library on your work PC, and organize your collections on your home laptop.
In preferences:
All of your notes, files, and bibliographic data remain seamlessly and silently up to date. Returning from field work? Your data will be waiting for you when you get home.
The Good and the Bad
+ - Excellent web-picker Synchronization across all popular platforms - MS/Mac/Linux. Standalones (Desktop versions) for Linux/MS/Mac. A viewer exist on iPad (ZotPad) Integration in word processors (MS- & Libre-Office) Bibliographic data download can be coupled with PDF grabbing
Firefox optimized (however, there exist Bookmarklets as web-picker for IE, Safari & Chrome) Bulk transfers are done as website-«scrapes» using COinS.
Exercise 1
1. Collect at least 5 references on the web using Firefox and the Zotero plugin. 2. Select a few or all of the new references, export them in BibTex form to the local desktop. Import the Bibtex file to the existing MyBib.bib BibTeX data collection using JabRef.
N.B. All files connected with LaTeX/BibTex are kept in the folder \LaTeX_Artikel on the USB stick.
Exercise 2
1. Add new citations to the LaTeX File Zrad.tex using texmaker.
2. Process (pdftex) the wrapper files WrapperSimple.tex and WrapperStylish.tex to obtain two different forms of the same article.
3. Change the bibliographystyle to say (plain,
nature, abbrvnat, unsrtnat) and reprocess the article.
Alfred Gautschy, Fachreferat für Physik & Astronomie