libzahl

big integer library
git clone git://git.suckless.org/libzahl
Log | Files | Refs | README | LICENSE

libzahl.tex (4143B)


      1 \documentclass[11pt,b5paper,openright,fleqn]{book}
      2 \special{papersize=176mm,250mm}
      3 \usepackage[utf8]{inputenc}
      4 \usepackage[T1]{fontenc}
      5 \usepackage{algorithmic, algorithm, colonequals, alltt}
      6 \usepackage{amsmath, amssymb, mathtools, MnSymbol, mathrsfs, esvect, wasysym}
      7 \usepackage{tipa, color, graphicx}
      8 \usepackage{shorttoc, minitoc}
      9 \usepackage{enumitem}
     10 \usepackage[english]{babel}
     11 \selectlanguage{english}
     12 \definecolor{linkcolour}{RGB}{112, 0, 0}
     13 \definecolor{urlcolour}{RGB}{0, 0, 112}
     14 \usepackage[unicode,pdfencoding=auto]{hyperref}
     15 \hypersetup{
     16   pdfborder={0 0 0},
     17   colorlinks=true,
     18   linkcolor=linkcolour,
     19   urlcolor=urlcolour,
     20   linktoc=all,
     21   pdfsubject={Computer science},
     22   pdfauthor={Mattias Andrée},
     23   pdftitle={libzahl},
     24   pdfkeywords={libzahl, big integer, big number, bigint, bignum, multiple-precision, arbitrary precision}
     25 }
     26 \usepackage{makeidx}
     27 \makeindex
     28 \usepackage{geometry}
     29 \geometry{margin=1in}
     30 \usepackage{microtype}
     31 \DisableLigatures{encoding = *, family = *} % NB! disables -- and ---
     32 % I really dislike fi- and ff-ligatures, just like look so wrong.
     33 \frenchspacing % i.e. non-American spacing: i.e. no extra space after sentences,
     34                % this also means that periods do not have to be context-marked.
     35 
     36 \newcommand{\chapref}[1]{\hyperref[#1]{Chapter~\ref*{#1} [\nameref*{#1}], page \pageref*{#1}}}
     37 \newcommand{\secref}[1]{\hyperref[#1]{Section~\ref*{#1} [\nameref*{#1}], page \pageref*{#1}}}
     38 \newcommand{\appxref}[1]{\hyperref[#1]{Appendix~\ref*{#1} [\nameref*{#1}], page \pageref*{#1}}}
     39 \newcommand{\pchapref}[1]{(see \hyperref[#1]{Chapter~\ref*{#1} [\nameref*{#1}], page \pageref*{#1}})}
     40 \newcommand{\psecref}[1]{(see \hyperref[#1]{Section~\ref*{#1} [\nameref*{#1}], page \pageref*{#1}})}
     41 \newcommand{\pappxref}[1]{(see \hyperref[#1]{Appendix~\ref*{#1} [\nameref*{#1}], page \pageref*{#1}})}
     42 \definecolor{c}{rgb}{0.45, 0.45, 0.45}
     43 
     44 \begin{document}
     45 
     46 \frontmatter
     47 
     48 \title{{\Huge \bf libzahl version 1.1}}
     49 \author{}
     50 \date{\vspace{3in}}
     51 \maketitle
     52 
     53 \thispagestyle{empty}
     54 \null
     55 \vfill
     56 \noindent
     57 Copyright \copyright{} 2016 $~$  Mattias Andrée $\langle$\href{mailto:m@maandree.se}{\texttt{m@maandree.se}}$\rangle$
     58 \vspace{1ex}
     59 
     60 \noindent
     61 {\small
     62 Permission to use, copy, modify, and/or distribute this document for any
     63 purpose with or without fee is hereby granted, provided that the above
     64 copyright notice and this permission notice appear in all copies.}
     65 \newpage
     66 
     67 
     68 % Conventionally, most words in a title in English should start with
     69 % uppercase. I believe that this is inconsistent stupidity, pardon my
     70 % Klatchian. There is not consensus of which words should not start
     71 % with lowercase or even if any shall start with lowercase. There is
     72 % also no consensus on how long the title should be before only the
     73 % first word should start with uppercase. It is only generally (but
     74 % not always) agreed that most words should start with uppercase and
     75 % when the title is too long only the first word start with uppercase.
     76 % I believe that is is better to stick with the Swedish convention:
     77 % It should look just like a sentience except it may not end with a
     78 % period unless that is part of an ellipsis or an abbreviation.
     79 % I would also like to use straight apostrophes, like in French, (and
     80 % reserve the curved ones for quotes), but that is just too painful in
     81 % LaTeX, so I will only be do so for French words. Most style guides
     82 % for English will be followed. They will only be broken if they are
     83 % stupid or inferior. For example, I will never write ‘CPU's’ for
     84 % plural of CPU — that's just stupid, — only for genitive, nor
     85 % will I write ‘CPUs’ for plural of CPU, because it is inferior to
     86 % ‘CPU:s’.
     87 
     88 
     89 \shorttoc{Short contents}{0}
     90 \setcounter{tocdepth}{2}
     91 \dominitoc
     92 \tableofcontents
     93 
     94 
     95 \mainmatter
     96 
     97 \input doc/what-is-libzahl.tex
     98 \input doc/libzahls-design.tex
     99 \input doc/get-started.tex
    100 \input doc/miscellaneous.tex
    101 \input doc/arithmetic.tex
    102 \input doc/bit-operations.tex
    103 \input doc/number-theory.tex
    104 \input doc/random-numbers.tex
    105 \input doc/not-implemented.tex
    106 \input doc/exercises.tex
    107 
    108 
    109 \appendix
    110 
    111 
    112 \backmatter
    113 
    114 \addcontentsline{toc}{chapter}{Index}
    115 \printindex
    116 
    117 \end{document}