with hepnames Other Useful Packages Core Tools BibLaTeX Glossary Typesetting with latexmk Et Cetera and Summary 2/29 Andreas Herten | IKP 1 Seminar | 8 October 2015
if one decides to follow rules Examples from the rulebook(s) ISO 80000-2; BIPM: International System of Units — Use thin space between value and unit (= multiplication). Exception: No space at plane angle units (◦, , ). If there is no thin space available, substitute with space. — Units are printed upright, variables in italics. Mathematical constants (e.g. π) upright, physical pseudo-constant values (e.g. c, NA ) in italics. It’s sin x and ex and dx/dt. — Units are mathematical entities, not abbreviations. No plurals! — Combination of value and unit is a product (because of entity). T = 273 K can also be written as T/K = 273. (Hence, labeling of axes is T/K, not T[K]!) → Hard to get right. Use a package, siunitx ! 4/29 Andreas Herten | IKP 1 Seminar | 8 October 2015
upright, independent of alphabet of which particle symbol is from; use italics for describing a generic class of particles (e.g. leptons). CERN’s e ort for standardization: Particle Entity Notation (PEN) scheme — Implement all PDG names — Machine-extractable — Maximum eight characters, but common particles shorter — First superscripts, then subscripts — No mass in name — Examples: Pe = e−, Pagne = νe , PgL = Λ, PsDp = D+ s See cookbook 7/29 Andreas Herten | IKP 1 Seminar | 8 October 2015
for that: hepnames Features: — PEN names pre-defined — More memorable names with sub-package hepnicenames — Properly typeset! — Context-sensitive adaption of typeset Structure: Using macros in hepparticles , the package o ers particles of o icial notation from hepppennames , or of easier notation from hepnicenames Load with \usepackage{hepnames} 8/29 Andreas Herten | IKP 1 Seminar | 8 October 2015
with minted (CTAN) — Uses external Pygments library — Inline: \mintinline{cpp}{int one = 1;} = int one = 1; — Block: \begin{minted}{cpp}int one = 1;\end{minted} = int one = 1; — Define own styles with \newminted and \newmintinline — Appendix: Notes on usage at IKP All color craziness with xcolor (CTAN) — Define colors in rgb, RGB, cmyk, hsb, HSB, gray, HTML space — Lots of predefined colors, e.g. »DarkOrchid3« (x11names option) — Mixing of colors, e.g. 40 % green, 60 % yellow = — Fun: color wavelength model, e.g. 485 nm is ≈ — Additional package xcolor-solarized which defines the 16 solarized colors base03 base02 base01 base00 base0 base1 base2 base3 yellow orange red magenta violet blue cyan green 11/29 Andreas Herten | IKP 1 Seminar | 8 October 2015
insertion of a space in your own commands (e.g. \newcommand{\something}{something\xspace} ) (CTAN) Also: \ensuremath{command} for using macro in every environment My panda package, which prints a beautiful PANDA and is context-aware (on Github) gitinfo2, enabling display of metadata of Git version control into your L A TEX documents. Useful to display versions of a document. (CTAN: v1, v2) feynmp & feynmp-auto for drawing Feynman Diagrams in the document (CTAN) γ, Z0 e− e+ e+, µ+ e−, µ+ i √ α i √ α 12/29 Andreas Herten | IKP 1 Seminar | 8 October 2015
bibliography management for more modern L A TEX days (CTAN) Completely backward compatible Uses same structure in .bib files ... ... but is much more versatile and customizable Select basic style at loading: \usepackage[style=numeric-comp]{biblatex} 15/29 Andreas Herten | IKP 1 Seminar | 8 October 2015
.bib resources with \addbibresource{refs/physics.bib} Or use mine: \addbibresource[location=remote]{https://raw.githubusercontent .com/AndiH/PhD/master/Bibliography/physics.bib} (With BibTex it was \bibliography{refs.bib}.) Lots of easily accessible options, changed with \ExecuteBibliographyOptions{} My options: sorting=none Do not sort refs, but list them as they come maxnames=5,minnames=3 Truncate author list a er 5, but show min. 3 hyperref=true Create links inside the PDF backref=true Create backlinks in bibliography section backrefstyle=two Combine backlinks isbn=false Do not show ISBN and ISSN numbers autolang=hyphen Use proper hyphenation as defined by babel package 16/29 Andreas Herten | IKP 1 Seminar | 8 October 2015
only public options, but also more under the hood Examples: — \DefineBibliographyStrings{english}{ techreport = {Tech. Rep.}, phdthesis = {PhD Thesis} } — \AtEveryBibitem{\clearlist{language}} — \renewcommand{\UrlFont}{\small\ttfamily} — \xpatchbibmacro{name:andothers}{\bibstring{andothers}}{ \bibstring[\emph]{andothers}}{}{} → — \DeclareFieldFormat[webpage,url]{usera}{Saved at: \url{#1}} — \renewcommand{\mkbibnamefirst}[1]{\textsc{#1}} Bottom line: If you ever wanted to change stu in your bibliography, you finally can do so now (modulo some googling) 17/29 Andreas Herten | IKP 1 Seminar | 8 October 2015
OLIVE et al.: Review of Particle Physics. In: Chin. Phys. C, 38:9 (090001) (2014). DOI: 10.1088/1674-1137/38/9/090001 (see pp. 4, 7–9, 14, 31–32, 141, 145, 179). [2] PETER W. HIGGS: Broken Symmetries and the Masses of Gauge Bosons. In: Phys. Rev. Lett., 13: (16 Oct. 1964), pp. 508–509. DOI: 10.1103/PhysRevLett.13.508 (see p. 5). [3] T. W. B. KIBBLE: Englert-Brout-Higgs-Guralnik-Hagen-Kibble mechanism. In: Schol- arpedia, 4:1 (2009). revision 91222, p. 6441. DOI: doi:10.4249/scholarpedia.6441 (see p. 5). [4] T. W. B. KIBBLE: Englert-Brout-Higgs-Guralnik-Hagen-Kibble mechanism (history). In: Scholarpedia, 4:1 (2009). revision 137393, p. 8741. DOI: doi:10.4249/scholarpedia. 8741 (see p. 5). [5] CMS COLLABORATION: Observation of a new boson at a mass of 125 GeV with the CMS experiment at the LHC. In: Physics Letters B, 716:1 (2012), pp. 30–61. URL: http://arxiv.org/abs/1207.7235 (see p. 5). [6] ATLAS COLLABORATION: Observation of a new particle in the search for the Stan- dard Model Higgs boson with the ATLAS detector at the LHC. In: Physics Letters B, 716:1 (2012), pp. 1–29. DOI: 10.1016/j.physletb.2012.08.020 (see p. 5). [7] The Nobel Prize in Physics 1969. URL: http://www.nobelprize.org/nobel_prizes/ physics/laureates/1969/ (see p. 6). [8] The Nobel Prize in Physics 2004. URL: http://www.nobelprize.org/nobel_prizes/ 18/29 Andreas Herten | IKP 1 Seminar | 8 October 2015
Terms (technical and physical phrases and concepts) — Symbols Great L A TEX implementation: package glossaries (CTAN) — Load with \usepackage[xindy]{glossaries} — Print with \printglossary — Also interesting: glossaries-prefix to allow for prefixes (»The GPU«) 19/29 Andreas Herten | IKP 1 Seminar | 8 October 2015
with \newacronym{cms}{CMS}{Compact Muon Solenoid} — Use with \gls{cms} or \Gls{cms} — Expands automatically at first usage, a er that just prints the abbreviation (link goes to glossary) — Accepts options, e.g. \newacronym[ sort={PANDA}, first={\glstext*{panda} experiment (\glsdesc*{panda})}, prefixfirst={the~}, prefix={} ] {panda}{\PANDA}{Antiproton Annihilation at Darmstadt} — Short version with \acrshort{cms}, long version \glsdesc{cms} Phrases 20/29 Andreas Herten | IKP 1 Seminar | 8 October 2015
entries (e.g. in glossaries.tex) — Reference entries throughout text by \gls{acro} — Add \makeglossaries to preamble (before definition of entries) — Add \printglossaries to document at correct position — Run makeglossaries from command line to sort entries Run L A TEXbefore and a er to first generate, then include glossary files; This can be automated (see next slides) Styling glossary — Select style of glossary with \setglossarystyle{name} — Examples: list, listgroup, long, tree, indexgroup, mcols (needs additional package, glossary-mcols) — Checkout samples coming with glossaries 23/29 Andreas Herten | IKP 1 Seminar | 8 October 2015
Reactions with Relativistic Radioactive Beams Race Condition Race conditions can occur when the output of one computing process is input to another. Especially in parallel programming, race condi- tions can become critical and need to be considered carefully. Radiation Length A property of a specific material, denoted X 0 . The mean distance an electron travels through this matter, until the electron’s en- ergy is reduced to 1/e (by means of bremsstrahlung). RESR Recuperated Experimental Storage Ring RF Cavity Radiofrequency cavities are used to accelerated charged particles by means of applied electromagnetic fields. RICH Short for Ring-Imaging Cherenkov. A de- tector using rings of Cherenkov light for PID. ROOT A data analysis framework from CERN. SciTil Scintillating Tiles – usually referring to PANDA’s time of flight detector. laboration STL Standard Template Library STT Straw Tube Tracker Super-FRS Super Fragment Separator Target Spectrometer The part of the PANDA detector around the interaction re- gion, instrumenting nearly a 4⇡ solid angle. µTCA Micro Telecommunications Computing Architecture TF Triplet Finder Thread A computing process on a GPU. Thrust A template library providing functions for often-used GPU-computing tasks, resembling the C++ Standard Template Library (STL). Thrust adds a layer of abstraction on top of CUDA and sup- plies pre-programmed functions for many tasks, e.g. reduction and sort- ing. [151] TOF Time Of Flight ToPix The read-out ASIC for the pixel part of PANDA’s MVD. UNILAC Linear Accelerator for ions at GSI. USR Ultra Low Energy Storage Ring 24/29 Andreas Herten | IKP 1 Seminar | 8 October 2015
L A TEX Greatly automates typesetting to create PDFs (etc.) Runs iteratively until stable PDF is generated Can watch files and continuously regenerate PDFs Expandable by own commands → Full documentation at CTAN 25/29 Andreas Herten | IKP 1 Seminar | 8 October 2015
-pdf document.tex Automatically detects biblatex (/biber ) Useful flags -c Cleans up all files -pv Previews the PDF a er generating -pvc Preview continuously -f Force processing despite errors -shell-escape Allow calling shell programs (e.g. for minted) -lualatex or -xelatex Use the respectife program for processing file 26/29 Andreas Herten | IKP 1 Seminar | 8 October 2015
like make, there are Makefile-equivalents: .latexmkrc! Steering file in the document’s directory (and/or in $HOME ) Useful options $pdf_mode = 1; PDFs as Output $recorder = 1; Use .fls file to optimize watched files $bibtex_use = 2; Run biber without testing for .bib file Glossary Generate glossaries automatically! A set of commands, included in appendix more Example rcfiles at CTAN 27/29 Andreas Herten | IKP 1 Seminar | 8 October 2015
Looks great Many features already implemented in class (like sub-figures, ToC extension, dra -mode) Easily customizable style microtype Excellent typesetting (but slow) Micro-manages characters, white-space, and words Look at documentation for an example (CTAN) xfrac For inline fractions, like 1⁄2 (CTAN) pdflscape Rotate PDF page for landscape pages (CTAN) multicol, multirow Multiple columns and rows for tables (CTAN col, row) todonotes Notes, markings, and other todo annotations (CTAN) 28/29 Andreas Herten | IKP 1 Seminar | 8 October 2015
and hepnames Use BibLaTex instead of BibTex glossaries for managing acronyms André and I created a template including most of the features Slides will be emailed! Rene installed most of package on institute’s computers Thank you! 29/29 Andreas Herten | IKP 1 Seminar | 8 October 2015
to install highlighting tool Pygments into userspace pip install --user Pygments 2 Add according local binary location to $PATH export PATH=~/.local/bin:$PATH 3 Typset document with correct flags latexmk -pdf -shell-escape document.tex Try it out, e.g. with this example 31/29 Andreas Herten | IKP 1 Seminar | 8 October 2015