├── .gitignore ├── how-to ├── 00-convert-latex-template-into-org-mode-template │ ├── self-check-example-04.pdf │ ├── self-check-example-01.org │ ├── self-check-example-02.org │ ├── template.tex │ ├── self-check-example-04.tex │ ├── journal-template.org │ ├── self-check-example-03.org │ ├── svepj.clo │ ├── self-check-example-04.org │ └── svjour.cls └── 01-assassinate-the-archbishop-of-canterbury-in-1170-ce │ └── how-to-assassinate-the-archbishop-of-canterbury-in-1170-ce.org ├── README.org ├── LICENSE └── common-project-files.org /.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled 2 | *.elc 3 | 4 | # Packaging 5 | .cask 6 | 7 | # Backup files 8 | *~ 9 | 10 | # Undo-tree save-files 11 | *.~undo-tree 12 | -------------------------------------------------------------------------------- /how-to/00-convert-latex-template-into-org-mode-template/self-check-example-04.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Literate-DevOps/literate-programming-tutorials/HEAD/how-to/00-convert-latex-template-into-org-mode-template/self-check-example-04.pdf -------------------------------------------------------------------------------- /how-to/00-convert-latex-template-into-org-mode-template/self-check-example-01.org: -------------------------------------------------------------------------------- 1 | # -*- mode: org; org-confirm-babel-evaluate: nil; org-babel-noweb-wrap-start: "«"; org-babel-noweb-wrap-end: "»"; -*- 2 | 3 | * Template Utility Code :noexport: 4 | 5 | * Common Export Settings :noexport: 6 | 7 | #+OPTIONS: ':nil *:t -:t ::t <:nil H:4 \n:nil ^:{} arch:headline 8 | #+OPTIONS: author:nil broken-links:nil c:nil creator:nil 9 | #+OPTIONS: d:(not "LOGBOOK") date:nil e:t email:nil f:t inline:t num:nil 10 | #+OPTIONS: p:nil pri:nil prop:t stat:nil tags:t tasks:nil tex:t 11 | #+OPTIONS: timestamp:nil title:nil toc:nil todo:nil |:t 12 | #+SELECT_TAGS: export 13 | #+EXCLUDE_TAGS: noexport nolatex 14 | 15 | # For Display when file is exported with org-ruby 16 | 17 | #+EXPORT_SELECT_TAGS: export 18 | #+EXPORT_EXCLUDE_TAGS: noexport 19 | -------------------------------------------------------------------------------- /how-to/00-convert-latex-template-into-org-mode-template/self-check-example-02.org: -------------------------------------------------------------------------------- 1 | # -*- mode: org; org-confirm-babel-evaluate: nil; org-babel-noweb-wrap-start: "«"; org-babel-noweb-wrap-end: "»"; -*- 2 | 3 | #+LATEX_CLASS: epj-svjour 4 | 5 | * Template Utility Code :noexport: 6 | 7 | * Common Export Settings :noexport: 8 | 9 | #+OPTIONS: ':nil *:t -:t ::t <:nil H:4 \n:nil ^:{} arch:headline 10 | #+OPTIONS: author:nil broken-links:nil c:nil creator:nil 11 | #+OPTIONS: d:(not "LOGBOOK") date:nil e:t email:nil f:t inline:t num:nil 12 | #+OPTIONS: p:nil pri:nil prop:t stat:nil tags:t tasks:nil tex:t 13 | #+OPTIONS: timestamp:nil title:nil toc:nil todo:nil |:t 14 | #+SELECT_TAGS: export 15 | #+EXCLUDE_TAGS: noexport nolatex 16 | 17 | # For Display when file is exported with org-ruby 18 | 19 | #+EXPORT_SELECT_TAGS: export 20 | #+EXPORT_EXCLUDE_TAGS: noexport 21 | 22 | 23 | # Local Variables: 24 | # eval: (require (quote cl-lib)) 25 | # eval: (require (quote ox)) 26 | # eval: (require (quote ox-publish)) 27 | # org-latex-with-hyperref: nil 28 | # eval: (add-to-list (quote org-latex-classes) (quote ("epj-svjour" "%%%%%%%%%%%%%%%%%%%%%%%% epj-svjour %%%%%%%%%%%%%%%%%%%%%%%%%% 29 | # % 30 | # \\begin{filecontents}{leer.eps} 31 | # %!PS-Adobe-2.0 EPSF-2.0 32 | # %%CreationDate: Mon Jul 13 16:51:17 1992 33 | # %%DocumentFonts: (atend) 34 | # %%Pages: 0 1 35 | # %%BoundingBox: 72 31 601 342 36 | # %%EndComments 37 | # 38 | # gsave 39 | # 72 31 moveto 40 | # 72 342 lineto 41 | # 601 342 lineto 42 | # 601 31 lineto 43 | # 72 31 lineto 44 | # showpage 45 | # grestore 46 | # %%Trailer 47 | # %%DocumentFonts: Helvetica 48 | # \\end{filecontents} 49 | # % 50 | # \\documentclass[epj]{svjour} 51 | # [NO-DEFAULT-PACKAGES] 52 | # [PACKAGES] 53 | # [EXTRA]" ("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}") ("\\paragraph{%s}" . "\\paragraph*{%s}") ("\\subparagraph{%s}" . "\\subparagraph*{%s}")))) 54 | # End: 55 | -------------------------------------------------------------------------------- /README.org: -------------------------------------------------------------------------------- 1 | #+TITLE: Literate Programming Tutorials 2 | 3 | #+HTML: 4 | 5 | ** Description 6 | 7 | Welcome to Literate Programming Tutorials! The goal of this repository is to provide a curated list of open source tutorials and resources related to the Literate Programming Paradigm[fn:1]. 8 | 9 | ** Tutorials 10 | 11 | *** Literate Programming using org-mode 12 | 13 | **** How-To 14 | 15 | The =How-To= tutorials provide enough details to complete a small project. 16 | 17 | #+BEGIN_SRC bash :exports results :results drawer replace 18 | ROOT_DIR='how-to' 19 | for dir in `ls -1 ${ROOT_DIR}`; do 20 | echo "- [[file:${ROOT_DIR}/${dir}][${dir}]]" 21 | done 22 | #+END_SRC 23 | 24 | #+RESULTS: 25 | :RESULTS: 26 | - [[file:how-to/00-convert-latex-template-into-org-mode-template][00-convert-latex-template-into-org-mode-template]] 27 | - [[file:how-to/01-assassinate-the-archbishop-of-canterbury-in-1170-ce][01-assassinate-the-archbishop-of-canterbury-in-1170-ce]] 28 | :END: 29 | 30 | ** Useful Resources 31 | 32 | *** noweb 33 | - [[https://www.cs.tufts.edu/~nr/noweb/][Noweb — A Simple, Extensible Tool for Literate Programming]] 34 | 35 | *** org-mode 36 | 37 | - [[https://orgmode.org]] 38 | - manual [[https://orgmode.org/manual/][HTML]] [[https://orgmode.org/org.pdf][PDF]] 39 | - [[https://orgmode.org/org.html#Noweb-reference-syntax][Noweb reference syntax]] 40 | - [[https://orgmode.org/org.html#Working-with-source-code][Working with source code]] 41 | - [[https://orgmode.org/worg/org-papers.html][org-papers]] 42 | - [[https://orgmode.org/worg/org-tutorials/][org-tutorials]] 43 | 44 | ** Project Files 45 | 46 | - [[file:LICENSE][LICENSE]] 47 | 48 | 49 | #+OPTIONS: ':nil *:t -:t ::t <:t H:7 \n:nil ^:{} arch:headline 50 | #+OPTIONS: author:t broken-links:nil c:nil creator:nil 51 | #+OPTIONS: d:(not "LOGBOOK") date:t e:t email:nil f:t inline:t num:nil 52 | #+OPTIONS: p:nil pri:nil prop:nil stat:t tags:t tasks:t tex:t 53 | #+OPTIONS: timestamp:t title:t toc:nil todo:t |:t 54 | #+SELECT_TAGS: export 55 | #+EXCLUDE_TAGS: noexport 56 | 57 | # For Display when file is exported with org-ruby 58 | 59 | #+EXPORT_SELECT_TAGS: export 60 | #+EXPORT_EXCLUDE_TAGS: noexport 61 | 62 | 63 | * Footnotes 64 | 65 | [fn:1] [[https://en.wikipedia.org/w/index.php?title=Literate_programming&oldid=866590640]] 66 | -------------------------------------------------------------------------------- /how-to/00-convert-latex-template-into-org-mode-template/template.tex: -------------------------------------------------------------------------------- 1 | %%%%%%%%%%%%%%%%%%%%%%% file template.tex %%%%%%%%%%%%%%%%%%%%%%%%% 2 | % 3 | % This is a template file for The European Physical Journal 4 | % 5 | % Copy it to a new file with a new name and use it as the basis 6 | % for your article 7 | % 8 | %%%%%%%%%%%%%%%%%%%%%%%% Springer-Verlag %%%%%%%%%%%%%%%%%%%%%%%%%% 9 | % 10 | \begin{filecontents}{leer.eps} 11 | %!PS-Adobe-2.0 EPSF-2.0 12 | %%CreationDate: Mon Jul 13 16:51:17 1992 13 | %%DocumentFonts: (atend) 14 | %%Pages: 0 1 15 | %%BoundingBox: 72 31 601 342 16 | %%EndComments 17 | 18 | gsave 19 | 72 31 moveto 20 | 72 342 lineto 21 | 601 342 lineto 22 | 601 31 lineto 23 | 72 31 lineto 24 | showpage 25 | grestore 26 | %%Trailer 27 | %%DocumentFonts: Helvetica 28 | \end{filecontents} 29 | % 30 | \documentclass[epj]{svjour} 31 | % Remove option referee for final version 32 | % 33 | % Remove any % below to load the required packages 34 | %\usepackage{latexsym} 35 | \usepackage{graphics} 36 | % etc 37 | % 38 | \begin{document} 39 | % 40 | \title{Insert your title here} 41 | \subtitle{Do you have a subtitle?\\ If so, write it here} 42 | \author{First author\inst{1} \and Second author\inst{2}% etc 43 | % \thanks is optional - remove next line if not needed 44 | \thanks{\emph{Present address:} Insert the address here if needed}% 45 | } % Do not remove 46 | % 47 | \offprints{} % Insert a name or remove this line 48 | % 49 | \institute{Insert the first address here \and the second here} 50 | % 51 | \date{Received: date / Revised version: date} 52 | % The correct dates will be entered by Springer 53 | % 54 | \abstract{ 55 | Insert your abstract here. 56 | % 57 | \PACS{ 58 | {PACS-key}{discribing text of that key} \and 59 | {PACS-key}{discribing text of that key} 60 | } % end of PACS codes 61 | } %end of abstract 62 | % 63 | \maketitle 64 | % 65 | \section{Introduction} 66 | \label{intro} 67 | Your text comes here. Separate text sections with 68 | \section{Section title} 69 | \label{sec:1} 70 | and \cite{RefJ} 71 | \subsection{Subsection title} 72 | \label{sec:2} 73 | as required. Don't forget to give each section 74 | and subsection a unique label (see Sect.~\ref{sec:1}). 75 | % 76 | % For one-column wide figures use 77 | \begin{figure} 78 | % Use the relevant command for your figure-insertion program 79 | % to insert the figure file. 80 | % For example, with the option graphics use 81 | \resizebox{0.75\textwidth}{!}{% 82 | \includegraphics{leer.eps} 83 | } 84 | % If not, use 85 | %\vspace{5cm} % Give the correct figure height in cm 86 | \caption{Please write your figure caption here} 87 | \label{fig:1} % Give a unique label 88 | \end{figure} 89 | % 90 | % For two-column wide figures use 91 | \begin{figure*} 92 | % Use the relevant command for your figure-insertion program 93 | % to insert the figure file. See example above. 94 | % If not, use 95 | \vspace*{5cm} % Give the correct figure height in cm 96 | \caption{Please write your figure caption here} 97 | \label{fig:2} % Give a unique label 98 | \end{figure*} 99 | % 100 | % For tables use 101 | \begin{table} 102 | \caption{Please write your table caption here} 103 | \label{tab:1} % Give a unique label 104 | % For LaTeX tables use 105 | \begin{tabular}{lll} 106 | \hline\noalign{\smallskip} 107 | first & second & third \\ 108 | \noalign{\smallskip}\hline\noalign{\smallskip} 109 | number & number & number \\ 110 | number & number & number \\ 111 | \noalign{\smallskip}\hline 112 | \end{tabular} 113 | % Or use 114 | \vspace*{5cm} % with the correct table height 115 | \end{table} 116 | % 117 | % BibTeX users please use 118 | % \bibliographystyle{} 119 | % \bibliography{} 120 | % 121 | % Non-BibTeX users please use 122 | \begin{thebibliography}{} 123 | % 124 | % and use \bibitem to create references. 125 | % 126 | \bibitem{RefJ} 127 | % Format for Journal Reference 128 | Author, Journal \textbf{Volume}, (year) page numbers. 129 | % Format for books 130 | \bibitem{RefB} 131 | Author, \textit{Book title} (Publisher, place year) page numbers 132 | % etc 133 | \end{thebibliography} 134 | 135 | \end{document} 136 | 137 | % end of file template.tex 138 | -------------------------------------------------------------------------------- /how-to/00-convert-latex-template-into-org-mode-template/self-check-example-04.tex: -------------------------------------------------------------------------------- 1 | % Intended LaTeX compiler: pdflatex 2 | %%%%%%%%%%%%%%%%%%%%%%%% epj-svjour %%%%%%%%%%%%%%%%%%%%%%%%%% 3 | % 4 | \begin{filecontents}{leer.eps} 5 | %!PS-Adobe-2.0 EPSF-2.0 6 | %%CreationDate: Mon Jul 13 16:51:17 1992 7 | %%DocumentFonts: (atend) 8 | %%Pages: 0 1 9 | %%BoundingBox: 72 31 601 342 10 | %%EndComments 11 | 12 | gsave 13 | 72 31 moveto 14 | 72 342 lineto 15 | 601 342 lineto 16 | 601 31 lineto 17 | 72 31 lineto 18 | showpage 19 | grestore 20 | %%Trailer 21 | %%DocumentFonts: Helvetica 22 | \end{filecontents} 23 | % 24 | \documentclass[epj]{svjour} 25 | \date{} 26 | \title{Title Goes Here\\\medskip 27 | \large Subtitle Goes Here} 28 | \begin{document} 29 | 30 | % 31 | \title{Title Goes Here} 32 | \subtitle{Subtitle Goes Here} 33 | \author{Mai Deah\inst{1} \and Arthur Secondus\inst{1} \and E. Tal\inst{2}% etc 34 | % \thanks is optional - remove next line if not needed 35 | \thanks{\emph{Present address:} Insert the address here if needed}% 36 | } % Do not remove 37 | % 38 | \offprints{} % Insert a name or remove this line 39 | % 40 | \institute{New Discoveries Lab, Department of Something-or-Ruther, University of Some-Sort, Some-Sort, Some-Sort-of-Country \and Golden Opportunities Lab, Department of Obscure Studies, Ancient College, Olde-Locale, Stodgy-Land} 41 | % 42 | \date{Received: date / Revised version: date} 43 | % The correct dates will be entered by Springer 44 | % 45 | \abstract{ 46 | Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. 47 | % 48 | \PACS{ 49 | {PACS-key01}{Text Describing PACS-key01} \and 50 | {PACS-key02}{Text Describing PACS-key02} 51 | } % end of PACS codes 52 | } %end of abstract 53 | % 54 | \maketitle 55 | 56 | \section*{Introduction} 57 | \label{sec:org90cee2c} 58 | 59 | Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. 60 | 61 | \section*{Methods} 62 | \label{sec:orgf129c9b} 63 | 64 | Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. 65 | 66 | Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. 67 | 68 | Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. 69 | 70 | Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. 71 | 72 | \section*{Results and Discussion} 73 | \label{sec:orge03aae6} 74 | 75 | \subsection*{Results} 76 | \label{sec:orga06def2} 77 | 78 | Sed ut perspiciatis, unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam eaque ipsa, quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt, explicabo. Nemo enim ipsam voluptatem, quia voluptas sit, aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos, qui ratione voluptatem sequi nesciunt, neque porro quisquam est, qui dolorem ipsum, quia dolor sit amet consectetur adipisci[ng] velit, sed quia non-numquam [do] eius modi tempora inci[di]dunt, ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur? 79 | 80 | \begin{table}[htbp] 81 | \caption{Please write your caption here} 82 | \centering 83 | \begin{tabular}{lll} 84 | first & second & third\\ 85 | \hline 86 | number & number & number\\ 87 | number & number & number\\ 88 | \end{tabular} 89 | \end{table} 90 | 91 | \subsection*{Discussion} 92 | \label{sec:org888897b} 93 | 94 | At vero eos et accusamus et iusto odio dignissimos ducimus, qui blanditiis praesentium voluptatum deleniti atque corrupti, quos dolores et quas molestias excepturi sint, obcaecati cupiditate non-provident, similique sunt in culpa, qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio, cumque nihil impedit, quo minus id, quod maxime placeat, facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Temporibus autem quibusdam et aut officiis debitis aut rerum necessitatibus saepe eveniet, ut et voluptates repudiandae sint et molestiae non-recusandae. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat. 95 | 96 | \section*{Conclusions} 97 | \label{sec:orgb948c0e} 98 | 99 | Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. 100 | 101 | % 102 | % BibTeX users please use 103 | % \bibliographystyle{} 104 | % \bibliography{} 105 | % 106 | % Non-BibTeX users please use 107 | \begin{thebibliography}{} 108 | % 109 | % and use \bibitem to create references. 110 | % 111 | \bibitem{RefJ} 112 | % Format for Journal Reference 113 | Author, Journal \textbf{Volume}, (year) page numbers. 114 | % Format for books 115 | \bibitem{RefB} 116 | Author, \textit{Book title} (Publisher, place year) page numbers 117 | % etc 118 | \end{thebibliography} 119 | \end{document} 120 | -------------------------------------------------------------------------------- /how-to/00-convert-latex-template-into-org-mode-template/journal-template.org: -------------------------------------------------------------------------------- 1 | # -*- mode: org; org-confirm-babel-evaluate: nil; org-babel-noweb-wrap-start: "«"; org-babel-noweb-wrap-end: "»"; -*- 2 | 3 | #+LATEX_CLASS: epj-svjour 4 | 5 | #+TITLE: Title Goes Here 6 | 7 | #+SUBTITLE: Subtitle Goes Here 8 | 9 | #+CALL: export-epj-latex-block() 10 | 11 | * Authors :nolatex: 12 | 13 | #+NAME: authors-table 14 | | Author | Email | Institution-ID | 15 | |-----------------+----------------------+----------------| 16 | | Mai Deah | mai.deah@example.edu | 1 | 17 | | Arthur Secondus | | 1 | 18 | | E. Tal | | 2 | 19 | 20 | * Institutions :nolatex: 21 | 22 | #+NAME: institutions-table 23 | | Institution-ID | Institution | 24 | |----------------+------------------------------------------------------------------------------------------------------------------| 25 | | 1 | New Discoveries Lab, Department of Something-or-Ruther, University of Some-Sort, Some-Sort, Some-Sort-of-Country | 26 | | 2 | Golden Opportunities Lab, Department of Obscure Studies, Ancient College, Olde-Locale, Stodgy-Land | 27 | 28 | * PACS :nolatex: 29 | 30 | #+NAME: pacs-codes-table 31 | | PACS-KEY | PACS-KEY-Description-Text | 32 | |------------+----------------------------| 33 | | PACS-key01 | Text Describing PACS-key01 | 34 | | PACS-key02 | Text Describing PACS-key02 | 35 | 36 | * Abstract :nolatex: 37 | 38 | # The abstract goes here. 39 | 40 | 41 | * Template Utility Code :noexport: 42 | 43 | ** export-epj-latex-block 44 | 45 | #+NAME: export-epj-latex-block 46 | #+BEGIN_SRC latex :noweb yes 47 | % 48 | \title{«get-title-text()»} 49 | \subtitle{«get-subtitle-text()»} 50 | \author{«epj-authors-latex()»% etc 51 | % \thanks is optional - remove next line if not needed 52 | \thanks{\emph{Present address:} Insert the address here if needed}% 53 | } % Do not remove 54 | % 55 | \offprints{} % Insert a name or remove this line 56 | % 57 | \institute{«epj-institutions-latex()»} 58 | % 59 | \date{Received: date / Revised version: date} 60 | % The correct dates will be entered by Springer 61 | % 62 | \abstract{ 63 | «get-abstract-text()» 64 | % 65 | \PACS{ 66 | «epj-pacs-codes-latex()» 67 | } % end of PACS codes 68 | } %end of abstract 69 | % 70 | \maketitle 71 | #+END_SRC 72 | 73 | *** get-title-text 74 | 75 | #+NAME: get-title-text 76 | #+BEGIN_SRC elisp 77 | (format "%s" (car (plist-get (org-export-get-environment) ':title))) 78 | #+END_SRC 79 | 80 | #+RESULTS: get-title-text 81 | : Title Goes Here 82 | 83 | *** get-subtitle-text 84 | 85 | #+NAME: get-subtitle-text 86 | #+BEGIN_SRC elisp :results replace :var keyword="subtitle" :var delimiter=" " 87 | (mapconcat 'car (org-element-map 88 | (org-element-parse-buffer) 89 | '(keyword) 90 | (lambda (x) (if (string= (upcase keyword) (org-element-property :key x)) 91 | (list (org-element-property :value x)) ) 92 | ) 93 | ) delimiter) 94 | #+END_SRC 95 | 96 | #+RESULTS: get-subtitle-text 97 | : Subtitle Goes Here 98 | 99 | *** get-abstract-text 100 | 101 | #+NAME: get-abstract-text 102 | #+BEGIN_SRC elisp :results replace :var keyword="abstract" 103 | (org-element-map (org-element-map 104 | (org-element-parse-buffer) 105 | '(headline) 106 | (lambda (hl) (if (string= (upcase keyword) (upcase (org-element-property :raw-value hl))) 107 | hl) 108 | ) 109 | nil t) 110 | '(paragraph) 111 | (lambda (p) 112 | (format "%s" (replace-regexp-in-string (rx (or (: bos (* (any " \t\n"))) 113 | (: (* (any " \t\n")) eos))) 114 | "" 115 | (buffer-substring-no-properties (org-element-property :contents-begin p) (org-element-property :contents-end p)))) 116 | ) 117 | nil t) 118 | #+END_SRC 119 | 120 | #+RESULTS: get-abstract-text 121 | : The abstract goes here. 122 | 123 | *** epj-pacs-codes-latex 124 | 125 | #+NAME: epj-pacs-codes-latex 126 | #+BEGIN_SRC elisp :var pacs_codes=pacs-codes-table :results latex replace :var join_delim=" \\and\n" 127 | (mapconcat 'identity (mapcar (lambda (x) (format " {%s}{%s}" (car x) (nth 1 x))) pacs_codes) join_delim) 128 | #+END_SRC 129 | 130 | #+RESULTS: epj-pacs-codes-latex 131 | #+BEGIN_EXPORT latex 132 | {PACS-key01}{Text Describing PACS-key01} \and 133 | {PACS-key02}{Text Describing PACS-key02} 134 | #+END_EXPORT 135 | 136 | *** epj-authors-latex 137 | 138 | #+NAME: epj-authors-latex 139 | #+BEGIN_SRC elisp :var authors=authors-table :results latex replace :var join_delim=" \\and " 140 | (mapconcat 'identity (mapcar (lambda (x) (format "%s\\inst{%s}" (car x) (nth 2 x))) authors) join_delim) 141 | #+END_SRC 142 | 143 | #+RESULTS: epj-authors-latex 144 | #+BEGIN_EXPORT latex 145 | Mai Deah\inst{1} \and Arthur Secondus\inst{1} \and E. Tal\inst{2} 146 | #+END_EXPORT 147 | 148 | *** epj-institutions-latex 149 | 150 | #+NAME: epj-institutions-latex 151 | #+BEGIN_SRC elisp :var institutions=institutions-table :results latex replace :var join_delim=" \\and " 152 | (mapconcat 'identity (mapcar (lambda (x) (format "%s" (nth 1 x))) institutions) join_delim) 153 | #+END_SRC 154 | 155 | #+RESULTS: epj-institutions-latex 156 | #+BEGIN_EXPORT latex 157 | New Discoveries Lab, Department of Something-or-Ruther, University of Some-Sort, Some-Sort, Some-Sort-of-Country \and Golden Opportunities Lab, Department of Obscure Studies, Ancient College, Olde-Locale, Stodgy-Land 158 | #+END_EXPORT 159 | 160 | * Common Export Settings :noexport: 161 | 162 | #+OPTIONS: ':nil *:t -:t ::t <:nil H:4 \n:nil ^:{} arch:headline 163 | #+OPTIONS: author:nil broken-links:nil c:nil creator:nil 164 | #+OPTIONS: d:(not "LOGBOOK") date:nil e:t email:nil f:t inline:t num:nil 165 | #+OPTIONS: p:nil pri:nil prop:t stat:nil tags:t tasks:nil tex:t 166 | #+OPTIONS: timestamp:nil title:nil toc:nil todo:nil |:t 167 | #+SELECT_TAGS: export 168 | #+EXCLUDE_TAGS: noexport nolatex 169 | 170 | # For Display when file is exported with org-ruby 171 | 172 | #+EXPORT_SELECT_TAGS: export 173 | #+EXPORT_EXCLUDE_TAGS: noexport 174 | 175 | 176 | # Local Variables: 177 | # eval: (require (quote cl-lib)) 178 | # eval: (require (quote ox)) 179 | # eval: (require (quote ox-publish)) 180 | # org-latex-with-hyperref: nil 181 | # eval: (add-to-list (quote org-latex-classes) (quote ("epj-svjour" "%%%%%%%%%%%%%%%%%%%%%%%% epj-svjour %%%%%%%%%%%%%%%%%%%%%%%%%% 182 | # % 183 | # \\begin{filecontents}{leer.eps} 184 | # %!PS-Adobe-2.0 EPSF-2.0 185 | # %%CreationDate: Mon Jul 13 16:51:17 1992 186 | # %%DocumentFonts: (atend) 187 | # %%Pages: 0 1 188 | # %%BoundingBox: 72 31 601 342 189 | # %%EndComments 190 | # 191 | # gsave 192 | # 72 31 moveto 193 | # 72 342 lineto 194 | # 601 342 lineto 195 | # 601 31 lineto 196 | # 72 31 lineto 197 | # showpage 198 | # grestore 199 | # %%Trailer 200 | # %%DocumentFonts: Helvetica 201 | # \\end{filecontents} 202 | # % 203 | # \\documentclass[epj]{svjour} 204 | # [NO-DEFAULT-PACKAGES] 205 | # [PACKAGES] 206 | # [EXTRA]" ("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}") ("\\paragraph{%s}" . "\\paragraph*{%s}") ("\\subparagraph{%s}" . "\\subparagraph*{%s}")))) 207 | # End: 208 | -------------------------------------------------------------------------------- /how-to/00-convert-latex-template-into-org-mode-template/self-check-example-03.org: -------------------------------------------------------------------------------- 1 | # -*- mode: org; org-confirm-babel-evaluate: nil; org-babel-noweb-wrap-start: "«"; org-babel-noweb-wrap-end: "»"; -*- 2 | 3 | #+LATEX_CLASS: epj-svjour 4 | 5 | #+TITLE: Title Goes Here 6 | 7 | #+SUBTITLE: Subtitle Goes Here 8 | 9 | #+CALL: export-epj-latex-block() 10 | 11 | * Authors :nolatex: 12 | 13 | #+NAME: authors-table 14 | | Author | Email | Institution-ID | 15 | |-----------------+----------------------+----------------| 16 | | Mai Deah | mai.deah@example.edu | 1 | 17 | | Arthur Secondus | | 1 | 18 | | E. Tal | | 2 | 19 | 20 | * Institutions :nolatex: 21 | 22 | #+NAME: institutions-table 23 | | Institution-ID | Institution | 24 | |----------------+------------------------------------------------------------------------------------------------------------------| 25 | | 1 | New Discoveries Lab, Department of Something-or-Ruther, University of Some-Sort, Some-Sort, Some-Sort-of-Country | 26 | | 2 | Golden Opportunities Lab, Department of Obscure Studies, Ancient College, Olde-Locale, Stodgy-Land | 27 | 28 | * PACS :nolatex: 29 | 30 | #+NAME: pacs-codes-table 31 | | PACS-KEY | PACS-KEY-Description-Text | 32 | |------------+----------------------------| 33 | | PACS-key01 | Text Describing PACS-key01 | 34 | | PACS-key02 | Text Describing PACS-key02 | 35 | 36 | * Abstract :nolatex: 37 | 38 | # The abstract goes here. 39 | 40 | 41 | * Template Utility Code :noexport: 42 | 43 | ** export-epj-latex-block 44 | 45 | #+NAME: export-epj-latex-block 46 | #+BEGIN_SRC latex :noweb yes 47 | % 48 | \title{«get-title-text()»} 49 | \subtitle{«get-subtitle-text()»} 50 | \author{«epj-authors-latex()»% etc 51 | % \thanks is optional - remove next line if not needed 52 | \thanks{\emph{Present address:} Insert the address here if needed}% 53 | } % Do not remove 54 | % 55 | \offprints{} % Insert a name or remove this line 56 | % 57 | \institute{«epj-institutions-latex()»} 58 | % 59 | \date{Received: date / Revised version: date} 60 | % The correct dates will be entered by Springer 61 | % 62 | \abstract{ 63 | «get-abstract-text()» 64 | % 65 | \PACS{ 66 | «epj-pacs-codes-latex()» 67 | } % end of PACS codes 68 | } %end of abstract 69 | % 70 | \maketitle 71 | #+END_SRC 72 | 73 | *** get-title-text 74 | 75 | #+NAME: get-title-text 76 | #+BEGIN_SRC elisp 77 | (format "%s" (car (plist-get (org-export-get-environment) ':title))) 78 | #+END_SRC 79 | 80 | #+RESULTS: get-title-text 81 | : Title Goes Here 82 | 83 | *** get-subtitle-text 84 | 85 | #+NAME: get-subtitle-text 86 | #+BEGIN_SRC elisp :results replace :var keyword="subtitle" :var delimiter=" " 87 | (mapconcat 'car (org-element-map 88 | (org-element-parse-buffer) 89 | '(keyword) 90 | (lambda (x) (if (string= (upcase keyword) (org-element-property :key x)) 91 | (list (org-element-property :value x)) ) 92 | ) 93 | ) delimiter) 94 | #+END_SRC 95 | 96 | #+RESULTS: get-subtitle-text 97 | : Subtitle Goes Here 98 | 99 | *** get-abstract-text 100 | 101 | #+NAME: get-abstract-text 102 | #+BEGIN_SRC elisp :results replace :var keyword="abstract" 103 | (org-element-map (org-element-map 104 | (org-element-parse-buffer) 105 | '(headline) 106 | (lambda (hl) (if (string= (upcase keyword) (upcase (org-element-property :raw-value hl))) 107 | hl) 108 | ) 109 | nil t) 110 | '(paragraph) 111 | (lambda (p) 112 | (format "%s" (replace-regexp-in-string (rx (or (: bos (* (any " \t\n"))) 113 | (: (* (any " \t\n")) eos))) 114 | "" 115 | (buffer-substring-no-properties (org-element-property :contents-begin p) (org-element-property :contents-end p)))) 116 | ) 117 | nil t) 118 | #+END_SRC 119 | 120 | #+RESULTS: get-abstract-text 121 | : The abstract goes here. 122 | 123 | *** epj-pacs-codes-latex 124 | 125 | #+NAME: epj-pacs-codes-latex 126 | #+BEGIN_SRC elisp :var pacs_codes=pacs-codes-table :results latex replace :var join_delim=" \\and\n" 127 | (mapconcat 'identity (mapcar (lambda (x) (format " {%s}{%s}" (car x) (nth 1 x))) pacs_codes) join_delim) 128 | #+END_SRC 129 | 130 | #+RESULTS: epj-pacs-codes-latex 131 | #+BEGIN_EXPORT latex 132 | {PACS-key01}{Text Describing PACS-key01} \and 133 | {PACS-key02}{Text Describing PACS-key02} 134 | #+END_EXPORT 135 | 136 | *** epj-authors-latex 137 | 138 | #+NAME: epj-authors-latex 139 | #+BEGIN_SRC elisp :var authors=authors-table :results latex replace :var join_delim=" \\and " 140 | (mapconcat 'identity (mapcar (lambda (x) (format "%s\\inst{%s}" (car x) (nth 2 x))) authors) join_delim) 141 | #+END_SRC 142 | 143 | #+RESULTS: epj-authors-latex 144 | #+BEGIN_EXPORT latex 145 | Mai Deah\inst{1} \and Arthur Secondus\inst{1} \and E. Tal\inst{2} 146 | #+END_EXPORT 147 | 148 | *** epj-institutions-latex 149 | 150 | #+NAME: epj-institutions-latex 151 | #+BEGIN_SRC elisp :var institutions=institutions-table :results latex replace :var join_delim=" \\and " 152 | (mapconcat 'identity (mapcar (lambda (x) (format "%s" (nth 1 x))) institutions) join_delim) 153 | #+END_SRC 154 | 155 | #+RESULTS: epj-institutions-latex 156 | #+BEGIN_EXPORT latex 157 | New Discoveries Lab, Department of Something-or-Ruther, University of Some-Sort, Some-Sort, Some-Sort-of-Country \and Golden Opportunities Lab, Department of Obscure Studies, Ancient College, Olde-Locale, Stodgy-Land 158 | #+END_EXPORT 159 | 160 | * Common Export Settings :noexport: 161 | 162 | #+OPTIONS: ':nil *:t -:t ::t <:nil H:4 \n:nil ^:{} arch:headline 163 | #+OPTIONS: author:nil broken-links:nil c:nil creator:nil 164 | #+OPTIONS: d:(not "LOGBOOK") date:nil e:t email:nil f:t inline:t num:nil 165 | #+OPTIONS: p:nil pri:nil prop:t stat:nil tags:t tasks:nil tex:t 166 | #+OPTIONS: timestamp:nil title:nil toc:nil todo:nil |:t 167 | #+SELECT_TAGS: export 168 | #+EXCLUDE_TAGS: noexport nolatex 169 | 170 | # For Display when file is exported with org-ruby 171 | 172 | #+EXPORT_SELECT_TAGS: export 173 | #+EXPORT_EXCLUDE_TAGS: noexport 174 | 175 | 176 | # Local Variables: 177 | # eval: (require (quote cl-lib)) 178 | # eval: (require (quote ox)) 179 | # eval: (require (quote ox-publish)) 180 | # org-latex-with-hyperref: nil 181 | # eval: (add-to-list (quote org-latex-classes) (quote ("epj-svjour" "%%%%%%%%%%%%%%%%%%%%%%%% epj-svjour %%%%%%%%%%%%%%%%%%%%%%%%%% 182 | # % 183 | # \\begin{filecontents}{leer.eps} 184 | # %!PS-Adobe-2.0 EPSF-2.0 185 | # %%CreationDate: Mon Jul 13 16:51:17 1992 186 | # %%DocumentFonts: (atend) 187 | # %%Pages: 0 1 188 | # %%BoundingBox: 72 31 601 342 189 | # %%EndComments 190 | # 191 | # gsave 192 | # 72 31 moveto 193 | # 72 342 lineto 194 | # 601 342 lineto 195 | # 601 31 lineto 196 | # 72 31 lineto 197 | # showpage 198 | # grestore 199 | # %%Trailer 200 | # %%DocumentFonts: Helvetica 201 | # \\end{filecontents} 202 | # % 203 | # \\documentclass[epj]{svjour} 204 | # [NO-DEFAULT-PACKAGES] 205 | # [PACKAGES] 206 | # [EXTRA]" ("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}") ("\\paragraph{%s}" . "\\paragraph*{%s}") ("\\subparagraph{%s}" . "\\subparagraph*{%s}")))) 207 | # End: 208 | -------------------------------------------------------------------------------- /how-to/01-assassinate-the-archbishop-of-canterbury-in-1170-ce/how-to-assassinate-the-archbishop-of-canterbury-in-1170-ce.org: -------------------------------------------------------------------------------- 1 | # -*- mode: org; org-confirm-babel-evaluate: nil; org-babel-noweb-wrap-start: "«"; org-babel-noweb-wrap-end: "»"; -*- 2 | 3 | #+TITLE: How to Assassinate the Archbishop of Canterbury in 1170 CE 4 | 5 | * Summary 6 | 7 | This =How-To= tutorial provides a step by step guide on how to assassinate the Archbishop of Canterbury in 1170 CE if you are Henry II of England. 8 | 9 | #+BEGIN_QUOTE 10 | *Note:* If you are not Henry II of England, then this tutorial is really about how literate programming can be used enhance understanding by writing and structuring code for a human audience instead of a computer. After you finish this tutorial, you should read the raw code of this document as well to see the full syntax of the literate program. 11 | #+END_QUOTE 12 | 13 | * Setup Instructions 14 | 15 | 1. Appoint your friendly chancellor as Archbishop of Canterbury in 1162 CE to reassert royal supremacy of English Church[fn:1]. 16 | 17 | 2. When your plan falls apart, get into 10 year pissing match with lots of other historical figures. 18 | 19 | 3. In 1170 CE 20 | 1. Get really upset when the Archbishop of Canterbury excommunicates a bunch of people you like. 21 | 2. Hold a Christmas party 22 | 23 | * Plan Details 24 | 25 | ** Christmas Party Royal Guest List 26 | 27 | The =royal-guest-list-x-mas-1170-ce= table contains the guest list. 28 | 29 | #+NAME: royal-guest-list-x-mas-1170-ce 30 | | Name | Title | 31 | |-------------------+--------| 32 | | Hugh de Morville | Knight | 33 | | Reginald Fitzurse | Knight | 34 | | William de Tracy | Knight | 35 | | Richard le Breton | Knight | 36 | | Henry II | King | 37 | 38 | ** At the Party, Say this Phrase 39 | 40 | #+NAME: plausible-deniability 41 | #+BEGIN_SRC css :noweb yes 42 | "Will no one rid me of this turbulent priest?" 43 | #+END_SRC 44 | 45 | #+BEGIN_QUOTE 46 | *Hint:* If the date is after 1170 CE, then let's put this phrase is inside a code block is named =plausible-deniability=. 47 | #+END_QUOTE 48 | 49 | ** Have Guests Play the Popular =Read between the Lines= Party Game 50 | 51 | 1. Guess meaning of the words, =Will no one=, using =Christmas Party Royal Guest List= as a clue. 52 | 53 | #+BEGIN_QUOTE 54 | *Hint:* If the date is after 1170 CE, then use the following =ruby= code block which is named =will_no_one_code=. 55 | #+END_QUOTE 56 | 57 | #+NAME: will_no_one_code 58 | #+BEGIN_SRC ruby :var guests=royal-guest-list-x-mas-1170-ce 59 | special_friends = guests.select!{|guest| guest[1] == 'Knight'}.map{|row| [row[0].split(/ /)[0]]}.sort 60 | [special_friends[0..2].join(', '), special_friends[3]].join(' & ') 61 | #+END_SRC 62 | 63 | 2. Guess the meaning of the words, =rid me of=, using the =Christmas Party Royal Guest List= and the following =List of Phrases= as clues. 64 | 65 | The =list-of-phrases= table contains the phrases available to the guests. 66 | 67 | #+NAME: list-of-phrases 68 | | List of Phrases | 69 | |---------------------------------------------| 70 | | seize and return to Normandy with | 71 | | apologize and give a large sum of money to | 72 | | request excommunication be undone by | 73 | | use those pointy sharp sticks I gave you on | 74 | 75 | #+BEGIN_QUOTE 76 | *Hint:* If the date is after 1170 CE, then use the following =ruby= code block which is named =rid_me_of_code=. 77 | #+END_QUOTE 78 | 79 | #+NAME: rid_me_of_code 80 | #+BEGIN_SRC ruby :var guests=royal-guest-list-x-mas-1170-ce :var list_of_phrases=list-of-phrases 81 | list_of_phrases[guests.select!{|guest| not guest[1] == 'King'}.map{|row| [row[0].split(/ /)[0]]}.count - 1].join(' ') 82 | #+END_SRC 83 | 84 | 3. Guess the meaning of the words, =this turbulent priest?=, using the =Christmas Party Royal Guest List= and the following =Famous Religious Personages= as clues. 85 | 86 | The =favorite-religious-personages= table contains a list of famous religious personages for the party game. 87 | 88 | #+NAME: favorite-religious-personages 89 | | Famous Religious Personages | 90 | |---------------------------------------------| 91 | | God | 92 | | Jesus | 93 | | Holy Ghost | 94 | | Thomas Becket, the Archbishop of Canterbury | 95 | 96 | #+BEGIN_QUOTE 97 | *Hint:* If the date is after 1170 CE, then use the following =ruby= code block which is named =this_turbulent_priest?_code=. 98 | #+END_QUOTE 99 | 100 | #+NAME: this_turbulent_priest?_code 101 | #+BEGIN_SRC ruby :var guests=royal-guest-list-x-mas-1170-ce :var favorite_religious_personages=favorite-religious-personages 102 | favorite_religious_personages[guests.select!{|guest| guest[1] == 'King'}.map{|row| [row[0].split(/ /)[0]]}.count + 2].join(' ') 103 | #+END_SRC 104 | 105 | 4. Have Guests Leave the Christmas Party and Return with Correct Answer the Next Day. 106 | 107 | 5. Reward Everyone that Guessed the /Correct/ Answer to =Read between the Lines= Game. 108 | 109 | ** To see the /correct/ answer let's use the following Literate Program. 110 | 111 | #+BEGIN_QUOTE 112 | *Sneaky Surprise:* This entire tutorial file is the literate program, not just this section. 113 | #+END_QUOTE 114 | 115 | 1. Encode What the King Said as Literate Program[fn:2] 116 | 117 | - The following =ruby= code block which is named =what_the_king_said_code=. The ~the_king_said~ variable value is set to the output of the =plausible-deniability= code block. 118 | 119 | #+NAME: what_the_king_said_code 120 | #+BEGIN_SRC ruby :var the_king_said=plausible-deniability 121 | the_king_said.downcase! 122 | the_king_said.gsub!(/(will no one)/i,'«\1»') 123 | the_king_said.gsub!(/(rid me of)/i,'«\1»') 124 | the_king_said.gsub!(/(this turbulent priest[?])/i,'«\1»') 125 | the_king_said.gsub!(/([^«»]) /, '\1_') 126 | the_king_said 127 | #+END_SRC 128 | 129 | - The following code block named =will_no_one=, will execute the =will_no_one_code= =ruby= code. 130 | 131 | #+NAME: will_no_one 132 | #+BEGIN_SRC css :noweb yes :exports code 133 | «will_no_one_code()» 134 | #+END_SRC 135 | 136 | - The following code block named =rid_me_of=, will execute the =rid_me_of_code= =ruby= code. 137 | 138 | #+NAME: rid_me_of 139 | #+BEGIN_SRC css :noweb yes :exports code 140 | «rid_me_of_code()» 141 | #+END_SRC 142 | 143 | - The following code block named =this_turbulent_priest?=, will execute the =this_turbulent_priest?_code= =ruby= code. 144 | 145 | #+NAME: this_turbulent_priest? 146 | #+BEGIN_SRC css :noweb yes :exports code 147 | «this_turbulent_priest?_code()» 148 | #+END_SRC 149 | 150 | 2. Translate *What the King Said* into *What the King Wanted* 151 | 152 | - The following =what_the_king_said= code block will execute the =what_the_king_said_code= =ruby= code. 153 | 154 | #+NAME: what_the_king_said 155 | #+begin_SRC css :noweb yes :wrap "SRC css :noweb yes" :exports both 156 | «what_the_king_said_code()» 157 | #+end_SRC 158 | 159 | - The following code block renames the results of the =what_the_king_said= =ruby= code to a new code block named =what_the_king_wanted=. 160 | 161 | #+NAME: what_the_king_wanted 162 | #+RESULTS: what_the_king_said 163 | #+BEGIN_SRC css :noweb yes 164 | «will_no_one» «rid_me_of» «this_turbulent_priest?» 165 | #+END_SRC 166 | 167 | 3. Now we can learn *What the King Wanted*. 168 | 169 | - The following code block is named =the_correct_answer= and executes the code block named =what_the_king_wanted=. 170 | 171 | #+name: the_correct_answer 172 | #+BEGIN_SRC css :noweb yes :exports both 173 | «what_the_king_wanted()» 174 | #+END_SRC 175 | 176 | Below are the results from the =the_correct_answer= code block. 177 | 178 | #+RESULTS: the_correct_answer 179 | : Hugh, Reginald, Richard & William use those pointy sharp sticks I gave you on Thomas Becket, the Archbishop of Canterbury 180 | 181 | 182 | 183 | * Common Export Settings :noexport: 184 | 185 | #+OPTIONS: ':nil *:t -:t ::t <:nil H:4 \n:nil ^:{} arch:headline 186 | #+OPTIONS: author:nil broken-links:nil c:nil creator:nil 187 | #+OPTIONS: d:(not "LOGBOOK") date:nil e:t email:nil f:t inline:t num:nil 188 | #+OPTIONS: p:nil pri:nil prop:t stat:nil tags:t tasks:nil tex:t 189 | #+OPTIONS: timestamp:nil title:nil toc:nil todo:nil |:t 190 | #+SELECT_TAGS: export 191 | #+EXCLUDE_TAGS: noexport nolatex 192 | 193 | # For Display when file is exported with org-ruby 194 | 195 | #+EXPORT_SELECT_TAGS: export 196 | #+EXPORT_EXCLUDE_TAGS: noexport 197 | 198 | * Footnotes 199 | 200 | [fn:1] https://en.wikipedia.org/wiki/Becket_controversy 201 | 202 | [fn:2] 'Write ten page of prose unrelated. Somewhere in footnotes "Oh by the way, we killed the priest"', Twitter post by @Di4naO on 2019-06-08 203 | -------------------------------------------------------------------------------- /how-to/00-convert-latex-template-into-org-mode-template/svepj.clo: -------------------------------------------------------------------------------- 1 | % SVJour DOCUMENT CLASS OPTION EPJ -- The European Physical Journal 2 | % 3 | % This is an enhancement for the 4 | % LaTeX document class for Springer journals (two column version) 5 | % 6 | %% 7 | %% 8 | %% \CharacterTable 9 | %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z 10 | %% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z 11 | %% Digits \0\1\2\3\4\5\6\7\8\9 12 | %% Exclamation \! Double quote \" Hash (number) \# 13 | %% Dollar \$ Percent \% Ampersand \& 14 | %% Acute accent \' Left paren \( Right paren \) 15 | %% Asterisk \* Plus \+ Comma \, 16 | %% Minus \- Point \. Solidus \/ 17 | %% Colon \: Semicolon \; Less than \< 18 | %% Equals \= Greater than \> Question mark \? 19 | %% Commercial at \@ Left bracket \[ Backslash \\ 20 | %% Right bracket \] Circumflex \^ Underscore \_ 21 | %% Grave accent \` Left brace \{ Vertical bar \| 22 | %% Right brace \} Tilde \~} 23 | \ProvidesFile{svepj.clo} 24 | [2002/03/11 v1.2 25 | style option for The European Physical Journal] 26 | \typeout{SVJour Class option: svepj.clo for The European Physical Journal} 27 | \DeclareOption{leqno}{\input{leqno.clo}} 28 | \let\if@nopacs\iffalse 29 | \DeclareOption{nopacs}{\let\if@nopacs\iftrue} 30 | \ExecuteOptions{final,twocolumn,10pt} 31 | \newif\if@normhead \@normheadtrue 32 | \def\hugehead{\@normheadfalse 33 | \let\ProcessRunnHead=\relax 34 | \onecolumn 35 | \let\thanks=\footnote 36 | \long\def\@makefntext##1{\parindent\bibindent 37 | \columnwidth\textwidth 38 | \advance\columnwidth -\columnsep 39 | \divide\columnwidth\tw@ 40 | \hsize\columnwidth 41 | \linewidth\columnwidth 42 | \noindent\hbox to\parindent{\hss\@makefnmark\enspace}##1}% 43 | } 44 | \let\if@mathematic\iffalse 45 | % No size changing allowed, hence a copy of size10.clo is included 46 | \renewcommand\normalsize{% 47 | \@setfontsize\normalsize\@xpt{10.5dd}% 48 | \abovedisplayskip 10\p@ \@plus2\p@ \@minus5\p@ 49 | \abovedisplayshortskip \z@ \@plus3\p@ 50 | \belowdisplayshortskip 6\p@ \@plus3\p@ \@minus3\p@ 51 | \belowdisplayskip \abovedisplayskip 52 | \let\@listi\@listI} 53 | \normalsize 54 | \newcommand\small{% 55 | \@setfontsize\small\@ixpt{10dd}% 56 | \abovedisplayskip 8.5\p@ \@plus3\p@ \@minus4\p@ 57 | \abovedisplayshortskip \z@ \@plus2\p@ 58 | \belowdisplayshortskip 4\p@ \@plus2\p@ \@minus2\p@ 59 | \def\@listi{\leftmargin\leftmargini 60 | \parsep 0\p@ \@plus1\p@ \@minus\p@ 61 | \topsep 8\p@ \@plus2\p@ \@minus4\p@ 62 | \itemsep0\p@}% 63 | \belowdisplayskip \abovedisplayskip 64 | } 65 | \let\footnotesize\small 66 | \newcommand\scriptsize{\@setfontsize\scriptsize\@viipt\@viiipt} 67 | \newcommand\tiny{\@setfontsize\tiny\@vpt\@vipt} 68 | \newcommand\large{\@setfontsize\large\@xiipt{13dd}} 69 | \newcommand\Large{\@setfontsize\Large\@xivpt{15dd}} 70 | \newcommand\LARGE{\@setfontsize\LARGE\@xviipt{17dd}} 71 | \newcommand\huge{\@setfontsize\huge\@xxpt{25}} 72 | \newcommand\Huge{\@setfontsize\Huge\@xxvpt{30}} 73 | % 74 | \setlength{\textwidth}{180mm} 75 | \setlength{\textheight}{56pc} 76 | % 77 | \def\epj@maketitle{\par 78 | \ch@ckobl{journalname}{Noname} 79 | \ch@ckobl{date}{the date of receipt and acceptance should be inserted 80 | later} 81 | \ch@ckobl{title}{A title should be given} 82 | \ch@ckobl{author}{Name(s) and initial(s) of author(s) should be given} 83 | \ch@ckobl{institute}{Address(es) of author(s) should be given} 84 | \ch@ckobl{abstract}{Abstract is missing.} 85 | \begingroup 86 | % 87 | \renewcommand\thefootnote{\@fnsymbol\c@footnote}% 88 | \def\@makefnmark{$^{\@thefnmark}$}% 89 | \def\switch@fnmark{\def\thefootnote{\mathrm{\alph{footnote}}}} 90 | % 91 | \def\lastand{\ifnum\value{inst}=2\relax 92 | \unskip{} \andname\ 93 | \else 94 | \unskip, \andname\ 95 | \fi}% 96 | \def\and{\stepcounter{auth}\relax 97 | \if@smartand 98 | \ifnum\value{auth}=\value{inst}% 99 | \lastand 100 | \else 101 | \unskip, 102 | \fi 103 | \else 104 | \unskip, 105 | \fi}% 106 | \thispagestyle{empty} 107 | \ifnum \col@number=\@ne 108 | \@maketitle 109 | \else 110 | \twocolumn[\@maketitle]% 111 | \fi 112 | \global\@topnum\z@ 113 | \if@normhead 114 | \@thanks 115 | \else 116 | \twocolumn[\vspace{\@tempdima}] 117 | \addtocounter{page}{-1} 118 | \if!\the\authorrunning! 119 | \authorrunning{ }% 120 | \fi 121 | \fi 122 | \if!\@mail!\else 123 | \footnotetext[0]{\kern-\bibindent\mailname\ 124 | \ignorespaces\@mail}% 125 | \fi 126 | % 127 | \if@runhead 128 | \ProcessRunnHead 129 | \fi 130 | % 131 | \endgroup 132 | \setcounter{footnote}{0} 133 | \global\let\thanks\relax 134 | \global\let\maketitle\relax 135 | \global\let\@maketitle\relax 136 | \global\let\@thanks\@empty 137 | \global\let\@author\@empty 138 | \global\let\@date\@empty 139 | \global\let\@title\@empty 140 | \global\let\@subtitle\@empty 141 | \global\let\title\relax 142 | \global\let\author\relax 143 | \global\let\date\relax 144 | \global\let\and\relax} 145 | % 146 | \def\epj@@maketitle{\newpage 147 | \normalfont 148 | \vbox to0pt{\vskip-40pt 149 | \nointerlineskip 150 | \makeheadbox\vss}\nointerlineskip 151 | \if@normhead 152 | \setbox\authrun=\vbox\bgroup 153 | \fi 154 | {\LARGE \sffamily\bfseries 155 | \hrule\@height\logodepth\@width\z@ 156 | \pretolerance=10000 157 | \rightskip=0pt plus 4cm 158 | \if!\@headnote!\else 159 | \noindent 160 | {\LARGE\normalfont\itshape\ignorespaces\@headnote\par}\vskip 3.5mm 161 | \fi 162 | \noindent\ignorespaces 163 | \@title \par}\vskip 11.24pt\relax 164 | \authorfont 165 | \if!\@subtitle!\else 166 | {\large\sffamily\bfseries 167 | \pretolerance=10000 168 | \rightskip=0pt plus 3cm 169 | \noindent\ignorespaces\@subtitle \par}\vskip 11.24pt 170 | \fi 171 | \lineskip .5em 172 | \switch@fnmark 173 | \def\@makefnmark{$^{\mathrm\@thefnmark}$}% 174 | \protected@xdef\@thanks{\@thanks\protect\switch@fnmark}% 175 | \setbox0=\vbox{\setcounter{auth}{1}\def\and{\stepcounter{auth} }% 176 | \hfuzz=2\textwidth\def\thanks##1{}\@author}% 177 | \setcounter{footnote}{0}% 178 | \value{inst}=\value{auth}% 179 | \setcounter{auth}{1}% 180 | \rightskip=0pt plus 2cm 181 | \noindent\ignorespaces\@author\vskip7.23pt 182 | \rightskip=0pt\relax 183 | \small\rm 184 | \institutename 185 | \vskip 12.85pt 186 | \leftskip=1.5cm\rightskip=\leftskip 187 | \noindent\@date 188 | \if!\@dedic!\else 189 | \par 190 | \normalsize\it 191 | \addvspace\baselineskip 192 | \noindent\@dedic 193 | \fi 194 | \vskip 12.85pt 195 | {\topsep=0pt\partopsep=0pt\parsep=0pt\itemsep=0pt\relax 196 | \def\pacsstart##1##2{##1\hskip5pt plus2ptminus2pt##2}% 197 | \def\and##1##2{\unskip\ -- ##1\hskip5pt plus2ptminus2pt##2}% 198 | \trivlist\item[\hskip\labelsep 199 | {\sffamily\bfseries\abstractname}]% 200 | \leftskip=1.5cm\rightskip=\leftskip 201 | \@abstract 202 | \if@nopacs\else 203 | \ch@ckobl{PACS}{{XX.XX.XX}{No PACS code given}}% 204 | \@@PACS 205 | \fi 206 | \endtrivlist}% 207 | \if@normhead 208 | \egroup % end of header box 209 | \@tempdima=\headerboxheight 210 | \advance\@tempdima by-\ht\authrun 211 | \ifdim\@tempdima>0pt 212 | \vrule width0pt height\@tempdima 213 | \fi 214 | \unvbox\authrun 215 | \global\@minipagetrue 216 | \global\everypar{\global\@minipagefalse\global\everypar{}} 217 | \else 218 | \typeout{\the\c@auth\space author names and} 219 | \typeout{\the\c@inst\space institutes processed} 220 | \global\@tempdima=\pagetotal 221 | \global\advance\@tempdima by22.47pt 222 | \fi 223 | \vskip22.47pt 224 | } 225 | % 226 | \def\PACS#1{\gdef\@PACS{#1}} 227 | \def\@@PACS{\par\addvspace\baselineskip\noindent{\sffamily\bfseries 228 | PACS.\enspace}\ignorespaces\expandafter\pacsstart\@PACS\par} 229 | % 230 | \def\epjabstract#1{\gdef\@abstract{#1}} 231 | % 232 | \def\epjrunnhead{% 233 | \def\\{\unskip\ \ignorespaces}\def\inst##1{\unskip{}}% 234 | \def\thanks##1{\unskip{}}\def\fnmsep{\unskip}% 235 | \instindent=\textwidth 236 | \advance\instindent by-\headlineindent 237 | \if!\the\titlerunning!\else 238 | \edef\@title{\the\titlerunning}% 239 | \fi 240 | \global\setbox\titrun=\hbox{\small\rm\ignorespaces\@title}% 241 | \ifdim\wd\titrun>\instindent 242 | \typeout{^^JSVJour Warning: Title too long for running head.}% 243 | \typeout{Please supply a shorter form with \string\titlerunning 244 | \space prior to \string\maketitle}% 245 | \global\setbox\titrun=\hbox{\small\rm 246 | Title Suppressed Due to Excessive Length}% 247 | \fi 248 | \xdef\@title{\copy\titrun}% 249 | % 250 | \if!\the\authorrunning! 251 | \else 252 | \setcounter{auth}{1}% 253 | \edef\@author{\the\authorrunning}% 254 | \fi 255 | \ifnum\value{auth}>2 256 | \def\stripauthor##1\and##2\endauthor{% 257 | \protected@xdef\@author{##1\unskip\unskip\if!##2!\else\ et al.\fi}}% 258 | \expandafter\stripauthor\@author\and\endauthor 259 | \else 260 | \gdef\and{\unskip, \ignorespaces}% 261 | {\def\and{\noexpand\protect\noexpand\and}% 262 | \protected@xdef\@author{\@author}} 263 | \fi 264 | \global\setbox\authrun=\hbox{\small\ignorespaces 265 | \@author\unskip: \unhbox\titrun}% 266 | \ifdim\wd\authrun>\instindent 267 | \typeout{^^JSVJour Warning: The running head built automatically from 268 | \string\author\space and \string\title 269 | ^^Jexceeds the pagewidth, please supply a shorter form 270 | ^^Jwith \string\authorrunning\space and 271 | \string\titlerunning\space prior to \string\maketitle}% 272 | \global\setbox\authrun=\hbox{\small\rm Please give a shorter version 273 | with: {\tt\string\authorrunning\space and 274 | \string\titlerunning\space prior to \string\maketitle}}% 275 | \fi 276 | \xdef\@author{\copy\authrun}% 277 | \markboth{\@author}{\@author}% 278 | } 279 | % 280 | \AtEndOfClass{\let\ackname\@empty 281 | \let\if@runhead\iftrue 282 | \let\if@smartand\iftrue 283 | \let\@maketitle=\epj@@maketitle 284 | \let\maketitle=\epj@maketitle 285 | \let\ProcessRunnHead=\epjrunnhead 286 | \let\abstract=\epjabstract 287 | \def\@evenhead{\small\rlap{\thepage}\hfil\leftmark\hfil}% 288 | \def\@oddhead{\small\hfil\rightmark\hfil\llap{\thepage}}% 289 | \def\sectcounterend{} 290 | \setlength\columnsep{4mm} 291 | \def\section{\@startsection{section}{1}{\z@}% 292 | {-21dd plus-4pt minus-4pt}{10.5dd plus 4pt 293 | minus4pt}{\large\sffamily\bfseries}} 294 | \def\subsection{\@startsection{subsection}{2}{\z@}% 295 | {-21dd plus-4pt minus-4pt}{10.5dd plus 4pt 296 | minus4pt}{\normalsize\sffamily\bfseries}} 297 | \def\subsubsection{\@startsection{subsubsection}{3}{\z@}% 298 | {-21dd plus-4pt minus-4pt}{10.5dd plus 4pt 299 | minus4pt}{\normalsize\sffamily}} 300 | \def\paragraph{\@startsection{subsubsection}{4}{\z@}% 301 | {-21dd plus-4pt minus-4pt}{-1pt}{\normalsize\sffamily\bfseries}} 302 | \def\authorfont{\rmfamily} 303 | \def\leftlegendglue{\hfil} 304 | \journalname{EPJ}} 305 | %% 306 | %% End of copy of file `svepj.clo'. 307 | \endinput 308 | -------------------------------------------------------------------------------- /how-to/00-convert-latex-template-into-org-mode-template/self-check-example-04.org: -------------------------------------------------------------------------------- 1 | # -*- mode: org; org-confirm-babel-evaluate: nil; org-babel-noweb-wrap-start: "«"; org-babel-noweb-wrap-end: "»"; -*- 2 | 3 | #+LATEX_CLASS: epj-svjour 4 | 5 | #+TITLE: Title Goes Here 6 | 7 | #+SUBTITLE: Subtitle Goes Here 8 | 9 | #+CALL: export-epj-latex-block() 10 | 11 | * Authors :nolatex: 12 | 13 | #+NAME: authors-table 14 | | Author | Email | Institution-ID | 15 | |-----------------+----------------------+----------------| 16 | | Mai Deah | mai.deah@example.edu | 1 | 17 | | Arthur Secondus | | 1 | 18 | | E. Tal | | 2 | 19 | 20 | * Institutions :nolatex: 21 | 22 | #+NAME: institutions-table 23 | | Institution-ID | Institution | 24 | |----------------+------------------------------------------------------------------------------------------------------------------| 25 | | 1 | New Discoveries Lab, Department of Something-or-Ruther, University of Some-Sort, Some-Sort, Some-Sort-of-Country | 26 | | 2 | Golden Opportunities Lab, Department of Obscure Studies, Ancient College, Olde-Locale, Stodgy-Land | 27 | 28 | * PACS :nolatex: 29 | 30 | #+NAME: pacs-codes-table 31 | | PACS-KEY | PACS-KEY-Description-Text | 32 | |------------+----------------------------| 33 | | PACS-key01 | Text Describing PACS-key01 | 34 | | PACS-key02 | Text Describing PACS-key02 | 35 | 36 | * Abstract :nolatex: 37 | 38 | # The abstract goes here. 39 | 40 | 41 | 42 | Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. 43 | 44 | # The abstract goes here. 45 | 46 | * Introduction 47 | 48 | Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. 49 | 50 | # The introduction goes here. 51 | 52 | * Methods 53 | 54 | Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. 55 | 56 | Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. 57 | 58 | Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. 59 | 60 | Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. 61 | 62 | # The methods go here. 63 | 64 | * Results and Discussion 65 | 66 | ** Results 67 | 68 | # The results and discussion goes here. 69 | 70 | Sed ut perspiciatis, unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam eaque ipsa, quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt, explicabo. Nemo enim ipsam voluptatem, quia voluptas sit, aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos, qui ratione voluptatem sequi nesciunt, neque porro quisquam est, qui dolorem ipsum, quia dolor sit amet consectetur adipisci[ng] velit, sed quia non-numquam [do] eius modi tempora inci[di]dunt, ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur? 71 | 72 | #+CAPTION: Please write your caption here 73 | | first | second | third | 74 | |--------+--------+--------| 75 | | number | number | number | 76 | | number | number | number | 77 | 78 | ** Discussion 79 | 80 | At vero eos et accusamus et iusto odio dignissimos ducimus, qui blanditiis praesentium voluptatum deleniti atque corrupti, quos dolores et quas molestias excepturi sint, obcaecati cupiditate non-provident, similique sunt in culpa, qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio, cumque nihil impedit, quo minus id, quod maxime placeat, facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Temporibus autem quibusdam et aut officiis debitis aut rerum necessitatibus saepe eveniet, ut et voluptates repudiandae sint et molestiae non-recusandae. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat. 81 | 82 | * Conclusions 83 | 84 | Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. 85 | 86 | # The conclusions go here 87 | 88 | # References 89 | 90 | #+BEGIN_SRC latex :exports results 91 | % 92 | % BibTeX users please use 93 | % \bibliographystyle{} 94 | % \bibliography{} 95 | % 96 | % Non-BibTeX users please use 97 | \begin{thebibliography}{} 98 | % 99 | % and use \bibitem to create references. 100 | % 101 | \bibitem{RefJ} 102 | % Format for Journal Reference 103 | Author, Journal \textbf{Volume}, (year) page numbers. 104 | % Format for books 105 | \bibitem{RefB} 106 | Author, \textit{Book title} (Publisher, place year) page numbers 107 | % etc 108 | \end{thebibliography} 109 | #+END_SRC 110 | 111 | * Template Utility Code :noexport: 112 | 113 | ** export-epj-latex-block 114 | 115 | #+NAME: export-epj-latex-block 116 | #+BEGIN_SRC latex :noweb yes 117 | % 118 | \title{«get-title-text()»} 119 | \subtitle{«get-subtitle-text()»} 120 | \author{«epj-authors-latex()»% etc 121 | % \thanks is optional - remove next line if not needed 122 | \thanks{\emph{Present address:} Insert the address here if needed}% 123 | } % Do not remove 124 | % 125 | \offprints{} % Insert a name or remove this line 126 | % 127 | \institute{«epj-institutions-latex()»} 128 | % 129 | \date{Received: date / Revised version: date} 130 | % The correct dates will be entered by Springer 131 | % 132 | \abstract{ 133 | «get-abstract-text()» 134 | % 135 | \PACS{ 136 | «epj-pacs-codes-latex()» 137 | } % end of PACS codes 138 | } %end of abstract 139 | % 140 | \maketitle 141 | #+END_SRC 142 | 143 | *** get-title-text 144 | 145 | #+NAME: get-title-text 146 | #+BEGIN_SRC elisp 147 | (format "%s" (car (plist-get (org-export-get-environment) ':title))) 148 | #+END_SRC 149 | 150 | #+RESULTS: get-title-text 151 | : Title Goes Here 152 | 153 | *** get-subtitle-text 154 | 155 | #+NAME: get-subtitle-text 156 | #+BEGIN_SRC elisp :results replace :var keyword="subtitle" :var delimiter=" " 157 | (mapconcat 'car (org-element-map 158 | (org-element-parse-buffer) 159 | '(keyword) 160 | (lambda (x) (if (string= (upcase keyword) (org-element-property :key x)) 161 | (list (org-element-property :value x)) ) 162 | ) 163 | ) delimiter) 164 | #+END_SRC 165 | 166 | #+RESULTS: get-subtitle-text 167 | : Subtitle Goes Here 168 | 169 | *** get-abstract-text 170 | 171 | #+NAME: get-abstract-text 172 | #+BEGIN_SRC elisp :results replace :var keyword="abstract" 173 | (org-element-map (org-element-map 174 | (org-element-parse-buffer) 175 | '(headline) 176 | (lambda (hl) (if (string= (upcase keyword) (upcase (org-element-property :raw-value hl))) 177 | hl) 178 | ) 179 | nil t) 180 | '(paragraph) 181 | (lambda (p) 182 | (format "%s" (replace-regexp-in-string (rx (or (: bos (* (any " \t\n"))) 183 | (: (* (any " \t\n")) eos))) 184 | "" 185 | (buffer-substring-no-properties (org-element-property :contents-begin p) (org-element-property :contents-end p)))) 186 | ) 187 | nil t) 188 | #+END_SRC 189 | 190 | #+RESULTS: get-abstract-text 191 | : The abstract goes here. 192 | 193 | *** epj-pacs-codes-latex 194 | 195 | #+NAME: epj-pacs-codes-latex 196 | #+BEGIN_SRC elisp :var pacs_codes=pacs-codes-table :results latex replace :var join_delim=" \\and\n" 197 | (mapconcat 'identity (mapcar (lambda (x) (format " {%s}{%s}" (car x) (nth 1 x))) pacs_codes) join_delim) 198 | #+END_SRC 199 | 200 | #+RESULTS: epj-pacs-codes-latex 201 | #+BEGIN_EXPORT latex 202 | {PACS-key01}{Text Describing PACS-key01} \and 203 | {PACS-key02}{Text Describing PACS-key02} 204 | #+END_EXPORT 205 | 206 | *** epj-authors-latex 207 | 208 | #+NAME: epj-authors-latex 209 | #+BEGIN_SRC elisp :var authors=authors-table :results latex replace :var join_delim=" \\and " 210 | (mapconcat 'identity (mapcar (lambda (x) (format "%s\\inst{%s}" (car x) (nth 2 x))) authors) join_delim) 211 | #+END_SRC 212 | 213 | #+RESULTS: epj-authors-latex 214 | #+BEGIN_EXPORT latex 215 | Mai Deah\inst{1} \and Arthur Secondus\inst{1} \and E. Tal\inst{2} 216 | #+END_EXPORT 217 | 218 | *** epj-institutions-latex 219 | 220 | #+NAME: epj-institutions-latex 221 | #+BEGIN_SRC elisp :var institutions=institutions-table :results latex replace :var join_delim=" \\and " 222 | (mapconcat 'identity (mapcar (lambda (x) (format "%s" (nth 1 x))) institutions) join_delim) 223 | #+END_SRC 224 | 225 | #+RESULTS: epj-institutions-latex 226 | #+BEGIN_EXPORT latex 227 | New Discoveries Lab, Department of Something-or-Ruther, University of Some-Sort, Some-Sort, Some-Sort-of-Country \and Golden Opportunities Lab, Department of Obscure Studies, Ancient College, Olde-Locale, Stodgy-Land 228 | #+END_EXPORT 229 | 230 | * Common Export Settings :noexport: 231 | 232 | #+OPTIONS: ':nil *:t -:t ::t <:nil H:4 \n:nil ^:{} arch:headline 233 | #+OPTIONS: author:nil broken-links:nil c:nil creator:nil 234 | #+OPTIONS: d:(not "LOGBOOK") date:nil e:t email:nil f:t inline:t num:nil 235 | #+OPTIONS: p:nil pri:nil prop:t stat:nil tags:t tasks:nil tex:t 236 | #+OPTIONS: timestamp:nil title:nil toc:nil todo:nil |:t 237 | #+SELECT_TAGS: export 238 | #+EXCLUDE_TAGS: noexport nolatex 239 | 240 | # For Display when file is exported with org-ruby 241 | 242 | #+EXPORT_SELECT_TAGS: export 243 | #+EXPORT_EXCLUDE_TAGS: noexport 244 | 245 | 246 | # Local Variables: 247 | # eval: (require (quote cl-lib)) 248 | # eval: (require (quote ox)) 249 | # eval: (require (quote ox-publish)) 250 | # org-latex-with-hyperref: nil 251 | # eval: (add-to-list (quote org-latex-classes) (quote ("epj-svjour" "%%%%%%%%%%%%%%%%%%%%%%%% epj-svjour %%%%%%%%%%%%%%%%%%%%%%%%%% 252 | # % 253 | # \\begin{filecontents}{leer.eps} 254 | # %!PS-Adobe-2.0 EPSF-2.0 255 | # %%CreationDate: Mon Jul 13 16:51:17 1992 256 | # %%DocumentFonts: (atend) 257 | # %%Pages: 0 1 258 | # %%BoundingBox: 72 31 601 342 259 | # %%EndComments 260 | # 261 | # gsave 262 | # 72 31 moveto 263 | # 72 342 lineto 264 | # 601 342 lineto 265 | # 601 31 lineto 266 | # 72 31 lineto 267 | # showpage 268 | # grestore 269 | # %%Trailer 270 | # %%DocumentFonts: Helvetica 271 | # \\end{filecontents} 272 | # % 273 | # \\documentclass[epj]{svjour} 274 | # [NO-DEFAULT-PACKAGES] 275 | # [PACKAGES] 276 | # [EXTRA]" ("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}") ("\\paragraph{%s}" . "\\paragraph*{%s}") ("\\subparagraph{%s}" . "\\subparagraph*{%s}")))) 277 | # End: 278 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | -------------------------------------------------------------------------------- /common-project-files.org: -------------------------------------------------------------------------------- 1 | #+TITLE: Common Project Files and Settings 2 | 3 | Use this file to manage the files listed in the table below: 4 | 5 | #+NAME: file-list-table 6 | | Files | 7 | |------------| 8 | | .gitignore | 9 | | LICENSE | 10 | | README.org | 11 | 12 | #+BEGIN_QUOTE 13 | *Note:* After updating this file, use ~C-c~ ~C-v~ ~t~ or evaluate the ~org-babel-tangle~ function against this file to update the contents of all the files in the table above. 14 | #+END_QUOTE 15 | 16 | * Common Project Files 17 | ** [[file:.gitignore][.gitignore]] 18 | :PROPERTIES: 19 | :ID: ECBD2FC2-E1F1-41C5-8D92-4F2F31EA56C0 20 | :END: 21 | 22 | #+NAME: gitignore-file 23 | #+BEGIN_SRC org :eval never :exports none :tangle .gitignore 24 | # Compiled 25 | ,*.elc 26 | 27 | # Packaging 28 | .cask 29 | 30 | # Backup files 31 | ,*~ 32 | 33 | # Undo-tree save-files 34 | ,*.~undo-tree 35 | 36 | #+END_SRC 37 | 38 | ** [[file:LICENSE][LICENSE]] 39 | :PROPERTIES: 40 | :ID: 2E04761F-4F3C-43F5-8BB3-47C01232184F 41 | :END: 42 | 43 | #+NAME: license-file 44 | #+BEGIN_SRC org :exports none :file LICENSE 45 | GNU GENERAL PUBLIC LICENSE 46 | Version 3, 29 June 2007 47 | 48 | Copyright (C) 2007 Free Software Foundation, Inc. 49 | Everyone is permitted to copy and distribute verbatim copies 50 | of this license document, but changing it is not allowed. 51 | 52 | Preamble 53 | 54 | The GNU General Public License is a free, copyleft license for 55 | software and other kinds of works. 56 | 57 | The licenses for most software and other practical works are designed 58 | to take away your freedom to share and change the works. By contrast, 59 | the GNU General Public License is intended to guarantee your freedom to 60 | share and change all versions of a program--to make sure it remains free 61 | software for all its users. We, the Free Software Foundation, use the 62 | GNU General Public License for most of our software; it applies also to 63 | any other work released this way by its authors. You can apply it to 64 | your programs, too. 65 | 66 | When we speak of free software, we are referring to freedom, not 67 | price. Our General Public Licenses are designed to make sure that you 68 | have the freedom to distribute copies of free software (and charge for 69 | them if you wish), that you receive source code or can get it if you 70 | want it, that you can change the software or use pieces of it in new 71 | free programs, and that you know you can do these things. 72 | 73 | To protect your rights, we need to prevent others from denying you 74 | these rights or asking you to surrender the rights. Therefore, you have 75 | certain responsibilities if you distribute copies of the software, or if 76 | you modify it: responsibilities to respect the freedom of others. 77 | 78 | For example, if you distribute copies of such a program, whether 79 | gratis or for a fee, you must pass on to the recipients the same 80 | freedoms that you received. You must make sure that they, too, receive 81 | or can get the source code. And you must show them these terms so they 82 | know their rights. 83 | 84 | Developers that use the GNU GPL protect your rights with two steps: 85 | (1) assert copyright on the software, and (2) offer you this License 86 | giving you legal permission to copy, distribute and/or modify it. 87 | 88 | For the developers' and authors' protection, the GPL clearly explains 89 | that there is no warranty for this free software. For both users' and 90 | authors' sake, the GPL requires that modified versions be marked as 91 | changed, so that their problems will not be attributed erroneously to 92 | authors of previous versions. 93 | 94 | Some devices are designed to deny users access to install or run 95 | modified versions of the software inside them, although the manufacturer 96 | can do so. This is fundamentally incompatible with the aim of 97 | protecting users' freedom to change the software. The systematic 98 | pattern of such abuse occurs in the area of products for individuals to 99 | use, which is precisely where it is most unacceptable. Therefore, we 100 | have designed this version of the GPL to prohibit the practice for those 101 | products. If such problems arise substantially in other domains, we 102 | stand ready to extend this provision to those domains in future versions 103 | of the GPL, as needed to protect the freedom of users. 104 | 105 | Finally, every program is threatened constantly by software patents. 106 | States should not allow patents to restrict development and use of 107 | software on general-purpose computers, but in those that do, we wish to 108 | avoid the special danger that patents applied to a free program could 109 | make it effectively proprietary. To prevent this, the GPL assures that 110 | patents cannot be used to render the program non-free. 111 | 112 | The precise terms and conditions for copying, distribution and 113 | modification follow. 114 | 115 | TERMS AND CONDITIONS 116 | 117 | 0. Definitions. 118 | 119 | "This License" refers to version 3 of the GNU General Public License. 120 | 121 | "Copyright" also means copyright-like laws that apply to other kinds of 122 | works, such as semiconductor masks. 123 | 124 | "The Program" refers to any copyrightable work licensed under this 125 | License. Each licensee is addressed as "you". "Licensees" and 126 | "recipients" may be individuals or organizations. 127 | 128 | To "modify" a work means to copy from or adapt all or part of the work 129 | in a fashion requiring copyright permission, other than the making of an 130 | exact copy. The resulting work is called a "modified version" of the 131 | earlier work or a work "based on" the earlier work. 132 | 133 | A "covered work" means either the unmodified Program or a work based 134 | on the Program. 135 | 136 | To "propagate" a work means to do anything with it that, without 137 | permission, would make you directly or secondarily liable for 138 | infringement under applicable copyright law, except executing it on a 139 | computer or modifying a private copy. Propagation includes copying, 140 | distribution (with or without modification), making available to the 141 | public, and in some countries other activities as well. 142 | 143 | To "convey" a work means any kind of propagation that enables other 144 | parties to make or receive copies. Mere interaction with a user through 145 | a computer network, with no transfer of a copy, is not conveying. 146 | 147 | An interactive user interface displays "Appropriate Legal Notices" 148 | to the extent that it includes a convenient and prominently visible 149 | feature that (1) displays an appropriate copyright notice, and (2) 150 | tells the user that there is no warranty for the work (except to the 151 | extent that warranties are provided), that licensees may convey the 152 | work under this License, and how to view a copy of this License. If 153 | the interface presents a list of user commands or options, such as a 154 | menu, a prominent item in the list meets this criterion. 155 | 156 | 1. Source Code. 157 | 158 | The "source code" for a work means the preferred form of the work 159 | for making modifications to it. "Object code" means any non-source 160 | form of a work. 161 | 162 | A "Standard Interface" means an interface that either is an official 163 | standard defined by a recognized standards body, or, in the case of 164 | interfaces specified for a particular programming language, one that 165 | is widely used among developers working in that language. 166 | 167 | The "System Libraries" of an executable work include anything, other 168 | than the work as a whole, that (a) is included in the normal form of 169 | packaging a Major Component, but which is not part of that Major 170 | Component, and (b) serves only to enable use of the work with that 171 | Major Component, or to implement a Standard Interface for which an 172 | implementation is available to the public in source code form. A 173 | "Major Component", in this context, means a major essential component 174 | (kernel, window system, and so on) of the specific operating system 175 | (if any) on which the executable work runs, or a compiler used to 176 | produce the work, or an object code interpreter used to run it. 177 | 178 | The "Corresponding Source" for a work in object code form means all 179 | the source code needed to generate, install, and (for an executable 180 | work) run the object code and to modify the work, including scripts to 181 | control those activities. However, it does not include the work's 182 | System Libraries, or general-purpose tools or generally available free 183 | programs which are used unmodified in performing those activities but 184 | which are not part of the work. For example, Corresponding Source 185 | includes interface definition files associated with source files for 186 | the work, and the source code for shared libraries and dynamically 187 | linked subprograms that the work is specifically designed to require, 188 | such as by intimate data communication or control flow between those 189 | subprograms and other parts of the work. 190 | 191 | The Corresponding Source need not include anything that users 192 | can regenerate automatically from other parts of the Corresponding 193 | Source. 194 | 195 | The Corresponding Source for a work in source code form is that 196 | same work. 197 | 198 | 2. Basic Permissions. 199 | 200 | All rights granted under this License are granted for the term of 201 | copyright on the Program, and are irrevocable provided the stated 202 | conditions are met. This License explicitly affirms your unlimited 203 | permission to run the unmodified Program. The output from running a 204 | covered work is covered by this License only if the output, given its 205 | content, constitutes a covered work. This License acknowledges your 206 | rights of fair use or other equivalent, as provided by copyright law. 207 | 208 | You may make, run and propagate covered works that you do not 209 | convey, without conditions so long as your license otherwise remains 210 | in force. You may convey covered works to others for the sole purpose 211 | of having them make modifications exclusively for you, or provide you 212 | with facilities for running those works, provided that you comply with 213 | the terms of this License in conveying all material for which you do 214 | not control copyright. Those thus making or running the covered works 215 | for you must do so exclusively on your behalf, under your direction 216 | and control, on terms that prohibit them from making any copies of 217 | your copyrighted material outside their relationship with you. 218 | 219 | Conveying under any other circumstances is permitted solely under 220 | the conditions stated below. Sublicensing is not allowed; section 10 221 | makes it unnecessary. 222 | 223 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 224 | 225 | No covered work shall be deemed part of an effective technological 226 | measure under any applicable law fulfilling obligations under article 227 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 228 | similar laws prohibiting or restricting circumvention of such 229 | measures. 230 | 231 | When you convey a covered work, you waive any legal power to forbid 232 | circumvention of technological measures to the extent such circumvention 233 | is effected by exercising rights under this License with respect to 234 | the covered work, and you disclaim any intention to limit operation or 235 | modification of the work as a means of enforcing, against the work's 236 | users, your or third parties' legal rights to forbid circumvention of 237 | technological measures. 238 | 239 | 4. Conveying Verbatim Copies. 240 | 241 | You may convey verbatim copies of the Program's source code as you 242 | receive it, in any medium, provided that you conspicuously and 243 | appropriately publish on each copy an appropriate copyright notice; 244 | keep intact all notices stating that this License and any 245 | non-permissive terms added in accord with section 7 apply to the code; 246 | keep intact all notices of the absence of any warranty; and give all 247 | recipients a copy of this License along with the Program. 248 | 249 | You may charge any price or no price for each copy that you convey, 250 | and you may offer support or warranty protection for a fee. 251 | 252 | 5. Conveying Modified Source Versions. 253 | 254 | You may convey a work based on the Program, or the modifications to 255 | produce it from the Program, in the form of source code under the 256 | terms of section 4, provided that you also meet all of these conditions: 257 | 258 | a) The work must carry prominent notices stating that you modified 259 | it, and giving a relevant date. 260 | 261 | b) The work must carry prominent notices stating that it is 262 | released under this License and any conditions added under section 263 | 7. This requirement modifies the requirement in section 4 to 264 | "keep intact all notices". 265 | 266 | c) You must license the entire work, as a whole, under this 267 | License to anyone who comes into possession of a copy. This 268 | License will therefore apply, along with any applicable section 7 269 | additional terms, to the whole of the work, and all its parts, 270 | regardless of how they are packaged. This License gives no 271 | permission to license the work in any other way, but it does not 272 | invalidate such permission if you have separately received it. 273 | 274 | d) If the work has interactive user interfaces, each must display 275 | Appropriate Legal Notices; however, if the Program has interactive 276 | interfaces that do not display Appropriate Legal Notices, your 277 | work need not make them do so. 278 | 279 | A compilation of a covered work with other separate and independent 280 | works, which are not by their nature extensions of the covered work, 281 | and which are not combined with it such as to form a larger program, 282 | in or on a volume of a storage or distribution medium, is called an 283 | "aggregate" if the compilation and its resulting copyright are not 284 | used to limit the access or legal rights of the compilation's users 285 | beyond what the individual works permit. Inclusion of a covered work 286 | in an aggregate does not cause this License to apply to the other 287 | parts of the aggregate. 288 | 289 | 6. Conveying Non-Source Forms. 290 | 291 | You may convey a covered work in object code form under the terms 292 | of sections 4 and 5, provided that you also convey the 293 | machine-readable Corresponding Source under the terms of this License, 294 | in one of these ways: 295 | 296 | a) Convey the object code in, or embodied in, a physical product 297 | (including a physical distribution medium), accompanied by the 298 | Corresponding Source fixed on a durable physical medium 299 | customarily used for software interchange. 300 | 301 | b) Convey the object code in, or embodied in, a physical product 302 | (including a physical distribution medium), accompanied by a 303 | written offer, valid for at least three years and valid for as 304 | long as you offer spare parts or customer support for that product 305 | model, to give anyone who possesses the object code either (1) a 306 | copy of the Corresponding Source for all the software in the 307 | product that is covered by this License, on a durable physical 308 | medium customarily used for software interchange, for a price no 309 | more than your reasonable cost of physically performing this 310 | conveying of source, or (2) access to copy the 311 | Corresponding Source from a network server at no charge. 312 | 313 | c) Convey individual copies of the object code with a copy of the 314 | written offer to provide the Corresponding Source. This 315 | alternative is allowed only occasionally and noncommercially, and 316 | only if you received the object code with such an offer, in accord 317 | with subsection 6b. 318 | 319 | d) Convey the object code by offering access from a designated 320 | place (gratis or for a charge), and offer equivalent access to the 321 | Corresponding Source in the same way through the same place at no 322 | further charge. You need not require recipients to copy the 323 | Corresponding Source along with the object code. If the place to 324 | copy the object code is a network server, the Corresponding Source 325 | may be on a different server (operated by you or a third party) 326 | that supports equivalent copying facilities, provided you maintain 327 | clear directions next to the object code saying where to find the 328 | Corresponding Source. Regardless of what server hosts the 329 | Corresponding Source, you remain obligated to ensure that it is 330 | available for as long as needed to satisfy these requirements. 331 | 332 | e) Convey the object code using peer-to-peer transmission, provided 333 | you inform other peers where the object code and Corresponding 334 | Source of the work are being offered to the general public at no 335 | charge under subsection 6d. 336 | 337 | A separable portion of the object code, whose source code is excluded 338 | from the Corresponding Source as a System Library, need not be 339 | included in conveying the object code work. 340 | 341 | A "User Product" is either (1) a "consumer product", which means any 342 | tangible personal property which is normally used for personal, family, 343 | or household purposes, or (2) anything designed or sold for incorporation 344 | into a dwelling. In determining whether a product is a consumer product, 345 | doubtful cases shall be resolved in favor of coverage. For a particular 346 | product received by a particular user, "normally used" refers to a 347 | typical or common use of that class of product, regardless of the status 348 | of the particular user or of the way in which the particular user 349 | actually uses, or expects or is expected to use, the product. A product 350 | is a consumer product regardless of whether the product has substantial 351 | commercial, industrial or non-consumer uses, unless such uses represent 352 | the only significant mode of use of the product. 353 | 354 | "Installation Information" for a User Product means any methods, 355 | procedures, authorization keys, or other information required to install 356 | and execute modified versions of a covered work in that User Product from 357 | a modified version of its Corresponding Source. The information must 358 | suffice to ensure that the continued functioning of the modified object 359 | code is in no case prevented or interfered with solely because 360 | modification has been made. 361 | 362 | If you convey an object code work under this section in, or with, or 363 | specifically for use in, a User Product, and the conveying occurs as 364 | part of a transaction in which the right of possession and use of the 365 | User Product is transferred to the recipient in perpetuity or for a 366 | fixed term (regardless of how the transaction is characterized), the 367 | Corresponding Source conveyed under this section must be accompanied 368 | by the Installation Information. But this requirement does not apply 369 | if neither you nor any third party retains the ability to install 370 | modified object code on the User Product (for example, the work has 371 | been installed in ROM). 372 | 373 | The requirement to provide Installation Information does not include a 374 | requirement to continue to provide support service, warranty, or updates 375 | for a work that has been modified or installed by the recipient, or for 376 | the User Product in which it has been modified or installed. Access to a 377 | network may be denied when the modification itself materially and 378 | adversely affects the operation of the network or violates the rules and 379 | protocols for communication across the network. 380 | 381 | Corresponding Source conveyed, and Installation Information provided, 382 | in accord with this section must be in a format that is publicly 383 | documented (and with an implementation available to the public in 384 | source code form), and must require no special password or key for 385 | unpacking, reading or copying. 386 | 387 | 7. Additional Terms. 388 | 389 | "Additional permissions" are terms that supplement the terms of this 390 | License by making exceptions from one or more of its conditions. 391 | Additional permissions that are applicable to the entire Program shall 392 | be treated as though they were included in this License, to the extent 393 | that they are valid under applicable law. If additional permissions 394 | apply only to part of the Program, that part may be used separately 395 | under those permissions, but the entire Program remains governed by 396 | this License without regard to the additional permissions. 397 | 398 | When you convey a copy of a covered work, you may at your option 399 | remove any additional permissions from that copy, or from any part of 400 | it. (Additional permissions may be written to require their own 401 | removal in certain cases when you modify the work.) You may place 402 | additional permissions on material, added by you to a covered work, 403 | for which you have or can give appropriate copyright permission. 404 | 405 | Notwithstanding any other provision of this License, for material you 406 | add to a covered work, you may (if authorized by the copyright holders of 407 | that material) supplement the terms of this License with terms: 408 | 409 | a) Disclaiming warranty or limiting liability differently from the 410 | terms of sections 15 and 16 of this License; or 411 | 412 | b) Requiring preservation of specified reasonable legal notices or 413 | author attributions in that material or in the Appropriate Legal 414 | Notices displayed by works containing it; or 415 | 416 | c) Prohibiting misrepresentation of the origin of that material, or 417 | requiring that modified versions of such material be marked in 418 | reasonable ways as different from the original version; or 419 | 420 | d) Limiting the use for publicity purposes of names of licensors or 421 | authors of the material; or 422 | 423 | e) Declining to grant rights under trademark law for use of some 424 | trade names, trademarks, or service marks; or 425 | 426 | f) Requiring indemnification of licensors and authors of that 427 | material by anyone who conveys the material (or modified versions of 428 | it) with contractual assumptions of liability to the recipient, for 429 | any liability that these contractual assumptions directly impose on 430 | those licensors and authors. 431 | 432 | All other non-permissive additional terms are considered "further 433 | restrictions" within the meaning of section 10. If the Program as you 434 | received it, or any part of it, contains a notice stating that it is 435 | governed by this License along with a term that is a further 436 | restriction, you may remove that term. If a license document contains 437 | a further restriction but permits relicensing or conveying under this 438 | License, you may add to a covered work material governed by the terms 439 | of that license document, provided that the further restriction does 440 | not survive such relicensing or conveying. 441 | 442 | If you add terms to a covered work in accord with this section, you 443 | must place, in the relevant source files, a statement of the 444 | additional terms that apply to those files, or a notice indicating 445 | where to find the applicable terms. 446 | 447 | Additional terms, permissive or non-permissive, may be stated in the 448 | form of a separately written license, or stated as exceptions; 449 | the above requirements apply either way. 450 | 451 | 8. Termination. 452 | 453 | You may not propagate or modify a covered work except as expressly 454 | provided under this License. Any attempt otherwise to propagate or 455 | modify it is void, and will automatically terminate your rights under 456 | this License (including any patent licenses granted under the third 457 | paragraph of section 11). 458 | 459 | However, if you cease all violation of this License, then your 460 | license from a particular copyright holder is reinstated (a) 461 | provisionally, unless and until the copyright holder explicitly and 462 | finally terminates your license, and (b) permanently, if the copyright 463 | holder fails to notify you of the violation by some reasonable means 464 | prior to 60 days after the cessation. 465 | 466 | Moreover, your license from a particular copyright holder is 467 | reinstated permanently if the copyright holder notifies you of the 468 | violation by some reasonable means, this is the first time you have 469 | received notice of violation of this License (for any work) from that 470 | copyright holder, and you cure the violation prior to 30 days after 471 | your receipt of the notice. 472 | 473 | Termination of your rights under this section does not terminate the 474 | licenses of parties who have received copies or rights from you under 475 | this License. If your rights have been terminated and not permanently 476 | reinstated, you do not qualify to receive new licenses for the same 477 | material under section 10. 478 | 479 | 9. Acceptance Not Required for Having Copies. 480 | 481 | You are not required to accept this License in order to receive or 482 | run a copy of the Program. Ancillary propagation of a covered work 483 | occurring solely as a consequence of using peer-to-peer transmission 484 | to receive a copy likewise does not require acceptance. However, 485 | nothing other than this License grants you permission to propagate or 486 | modify any covered work. These actions infringe copyright if you do 487 | not accept this License. Therefore, by modifying or propagating a 488 | covered work, you indicate your acceptance of this License to do so. 489 | 490 | 10. Automatic Licensing of Downstream Recipients. 491 | 492 | Each time you convey a covered work, the recipient automatically 493 | receives a license from the original licensors, to run, modify and 494 | propagate that work, subject to this License. You are not responsible 495 | for enforcing compliance by third parties with this License. 496 | 497 | An "entity transaction" is a transaction transferring control of an 498 | organization, or substantially all assets of one, or subdividing an 499 | organization, or merging organizations. If propagation of a covered 500 | work results from an entity transaction, each party to that 501 | transaction who receives a copy of the work also receives whatever 502 | licenses to the work the party's predecessor in interest had or could 503 | give under the previous paragraph, plus a right to possession of the 504 | Corresponding Source of the work from the predecessor in interest, if 505 | the predecessor has it or can get it with reasonable efforts. 506 | 507 | You may not impose any further restrictions on the exercise of the 508 | rights granted or affirmed under this License. For example, you may 509 | not impose a license fee, royalty, or other charge for exercise of 510 | rights granted under this License, and you may not initiate litigation 511 | (including a cross-claim or counterclaim in a lawsuit) alleging that 512 | any patent claim is infringed by making, using, selling, offering for 513 | sale, or importing the Program or any portion of it. 514 | 515 | 11. Patents. 516 | 517 | A "contributor" is a copyright holder who authorizes use under this 518 | License of the Program or a work on which the Program is based. The 519 | work thus licensed is called the contributor's "contributor version". 520 | 521 | A contributor's "essential patent claims" are all patent claims 522 | owned or controlled by the contributor, whether already acquired or 523 | hereafter acquired, that would be infringed by some manner, permitted 524 | by this License, of making, using, or selling its contributor version, 525 | but do not include claims that would be infringed only as a 526 | consequence of further modification of the contributor version. For 527 | purposes of this definition, "control" includes the right to grant 528 | patent sublicenses in a manner consistent with the requirements of 529 | this License. 530 | 531 | Each contributor grants you a non-exclusive, worldwide, royalty-free 532 | patent license under the contributor's essential patent claims, to 533 | make, use, sell, offer for sale, import and otherwise run, modify and 534 | propagate the contents of its contributor version. 535 | 536 | In the following three paragraphs, a "patent license" is any express 537 | agreement or commitment, however denominated, not to enforce a patent 538 | (such as an express permission to practice a patent or covenant not to 539 | sue for patent infringement). To "grant" such a patent license to a 540 | party means to make such an agreement or commitment not to enforce a 541 | patent against the party. 542 | 543 | If you convey a covered work, knowingly relying on a patent license, 544 | and the Corresponding Source of the work is not available for anyone 545 | to copy, free of charge and under the terms of this License, through a 546 | publicly available network server or other readily accessible means, 547 | then you must either (1) cause the Corresponding Source to be so 548 | available, or (2) arrange to deprive yourself of the benefit of the 549 | patent license for this particular work, or (3) arrange, in a manner 550 | consistent with the requirements of this License, to extend the patent 551 | license to downstream recipients. "Knowingly relying" means you have 552 | actual knowledge that, but for the patent license, your conveying the 553 | covered work in a country, or your recipient's use of the covered work 554 | in a country, would infringe one or more identifiable patents in that 555 | country that you have reason to believe are valid. 556 | 557 | If, pursuant to or in connection with a single transaction or 558 | arrangement, you convey, or propagate by procuring conveyance of, a 559 | covered work, and grant a patent license to some of the parties 560 | receiving the covered work authorizing them to use, propagate, modify 561 | or convey a specific copy of the covered work, then the patent license 562 | you grant is automatically extended to all recipients of the covered 563 | work and works based on it. 564 | 565 | A patent license is "discriminatory" if it does not include within 566 | the scope of its coverage, prohibits the exercise of, or is 567 | conditioned on the non-exercise of one or more of the rights that are 568 | specifically granted under this License. You may not convey a covered 569 | work if you are a party to an arrangement with a third party that is 570 | in the business of distributing software, under which you make payment 571 | to the third party based on the extent of your activity of conveying 572 | the work, and under which the third party grants, to any of the 573 | parties who would receive the covered work from you, a discriminatory 574 | patent license (a) in connection with copies of the covered work 575 | conveyed by you (or copies made from those copies), or (b) primarily 576 | for and in connection with specific products or compilations that 577 | contain the covered work, unless you entered into that arrangement, 578 | or that patent license was granted, prior to 28 March 2007. 579 | 580 | Nothing in this License shall be construed as excluding or limiting 581 | any implied license or other defenses to infringement that may 582 | otherwise be available to you under applicable patent law. 583 | 584 | 12. No Surrender of Others' Freedom. 585 | 586 | If conditions are imposed on you (whether by court order, agreement or 587 | otherwise) that contradict the conditions of this License, they do not 588 | excuse you from the conditions of this License. If you cannot convey a 589 | covered work so as to satisfy simultaneously your obligations under this 590 | License and any other pertinent obligations, then as a consequence you may 591 | not convey it at all. For example, if you agree to terms that obligate you 592 | to collect a royalty for further conveying from those to whom you convey 593 | the Program, the only way you could satisfy both those terms and this 594 | License would be to refrain entirely from conveying the Program. 595 | 596 | 13. Use with the GNU Affero General Public License. 597 | 598 | Notwithstanding any other provision of this License, you have 599 | permission to link or combine any covered work with a work licensed 600 | under version 3 of the GNU Affero General Public License into a single 601 | combined work, and to convey the resulting work. The terms of this 602 | License will continue to apply to the part which is the covered work, 603 | but the special requirements of the GNU Affero General Public License, 604 | section 13, concerning interaction through a network will apply to the 605 | combination as such. 606 | 607 | 14. Revised Versions of this License. 608 | 609 | The Free Software Foundation may publish revised and/or new versions of 610 | the GNU General Public License from time to time. Such new versions will 611 | be similar in spirit to the present version, but may differ in detail to 612 | address new problems or concerns. 613 | 614 | Each version is given a distinguishing version number. If the 615 | Program specifies that a certain numbered version of the GNU General 616 | Public License "or any later version" applies to it, you have the 617 | option of following the terms and conditions either of that numbered 618 | version or of any later version published by the Free Software 619 | Foundation. If the Program does not specify a version number of the 620 | GNU General Public License, you may choose any version ever published 621 | by the Free Software Foundation. 622 | 623 | If the Program specifies that a proxy can decide which future 624 | versions of the GNU General Public License can be used, that proxy's 625 | public statement of acceptance of a version permanently authorizes you 626 | to choose that version for the Program. 627 | 628 | Later license versions may give you additional or different 629 | permissions. However, no additional obligations are imposed on any 630 | author or copyright holder as a result of your choosing to follow a 631 | later version. 632 | 633 | 15. Disclaimer of Warranty. 634 | 635 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 636 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 637 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 638 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 639 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 640 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 641 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 642 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 643 | 644 | 16. Limitation of Liability. 645 | 646 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 647 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 648 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 649 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 650 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 651 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 652 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 653 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 654 | SUCH DAMAGES. 655 | 656 | 17. Interpretation of Sections 15 and 16. 657 | 658 | If the disclaimer of warranty and limitation of liability provided 659 | above cannot be given local legal effect according to their terms, 660 | reviewing courts shall apply local law that most closely approximates 661 | an absolute waiver of all civil liability in connection with the 662 | Program, unless a warranty or assumption of liability accompanies a 663 | copy of the Program in return for a fee. 664 | 665 | END OF TERMS AND CONDITIONS 666 | 667 | How to Apply These Terms to Your New Programs 668 | 669 | If you develop a new program, and you want it to be of the greatest 670 | possible use to the public, the best way to achieve this is to make it 671 | free software which everyone can redistribute and change under these terms. 672 | 673 | To do so, attach the following notices to the program. It is safest 674 | to attach them to the start of each source file to most effectively 675 | state the exclusion of warranty; and each file should have at least 676 | the "copyright" line and a pointer to where the full notice is found. 677 | 678 | 679 | Copyright (C) 680 | 681 | This program is free software: you can redistribute it and/or modify 682 | it under the terms of the GNU General Public License as published by 683 | the Free Software Foundation, either version 3 of the License, or 684 | (at your option) any later version. 685 | 686 | This program is distributed in the hope that it will be useful, 687 | but WITHOUT ANY WARRANTY; without even the implied warranty of 688 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 689 | GNU General Public License for more details. 690 | 691 | You should have received a copy of the GNU General Public License 692 | along with this program. If not, see . 693 | 694 | Also add information on how to contact you by electronic and paper mail. 695 | 696 | If the program does terminal interaction, make it output a short 697 | notice like this when it starts in an interactive mode: 698 | 699 | Copyright (C) 700 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 701 | This is free software, and you are welcome to redistribute it 702 | under certain conditions; type `show c' for details. 703 | 704 | The hypothetical commands `show w' and `show c' should show the appropriate 705 | parts of the General Public License. Of course, your program's commands 706 | might be different; for a GUI interface, you would use an "about box". 707 | 708 | You should also get your employer (if you work as a programmer) or school, 709 | if any, to sign a "copyright disclaimer" for the program, if necessary. 710 | For more information on this, and how to apply and follow the GNU GPL, see 711 | . 712 | 713 | The GNU General Public License does not permit incorporating your program 714 | into proprietary programs. If your program is a subroutine library, you 715 | may consider it more useful to permit linking proprietary applications with 716 | the library. If this is what you want to do, use the GNU Lesser General 717 | Public License instead of this License. But first, please read 718 | . 719 | 720 | #+END_SRC 721 | 722 | # 723 | # Workaround for LICENSE formatting issue when using tangle 724 | # 725 | 726 | #+BEGIN_SRC org :exports none :noweb yes :tangle LICENSE~ 727 | <> 728 | #+END_SRC 729 | 730 | ** [[file:README.org][README.org]] 731 | :PROPERTIES: 732 | :ID: 12162C15-FB1D-4748-B376-9433FFB50D79 733 | :END: 734 | 735 | #+NAME: readme-file 736 | #+BEGIN_SRC org :eval never :exports none :tangle README.org :noweb yes 737 | ,#+TITLE: Literate Programming Tutorials 738 | 739 | ,#+HTML: 740 | 741 | ,** Description 742 | 743 | Welcome to Literate Programming Tutorials! The goal of this repository is to provide a curated list of open source tutorials and resources related to the Literate Programming Paradigm[fn:1]. 744 | 745 | ,** Tutorials 746 | 747 | ,*** Literate Programming using org-mode 748 | 749 | ,**** How-To 750 | 751 | The =How-To= tutorials provide enough details to complete a small project. 752 | 753 | ,#+BEGIN_SRC bash :exports results :results drawer replace 754 | ROOT_DIR='how-to' 755 | for dir in `ls -1 ${ROOT_DIR}`; do 756 | echo "- [[file:${ROOT_DIR}/${dir}][${dir}]]" 757 | done 758 | ,#+END_SRC 759 | 760 | ,#+RESULTS: 761 | :RESULTS: 762 | - [[file:how-to/00-convert-latex-template-into-org-mode-template][00-convert-latex-template-into-org-mode-template]] 763 | :END: 764 | 765 | ,** Useful Resources 766 | 767 | ,*** noweb 768 | - [[https://www.cs.tufts.edu/~nr/noweb/][Noweb — A Simple, Extensible Tool for Literate Programming]] 769 | 770 | ,*** org-mode 771 | 772 | - [[https://orgmode.org]] 773 | - manual [[https://orgmode.org/manual/][HTML]] [[https://orgmode.org/org.pdf][PDF]] 774 | - [[https://orgmode.org/org.html#Noweb-reference-syntax][Noweb reference syntax]] 775 | - [[https://orgmode.org/org.html#Working-with-source-code][Working with source code]] 776 | - [[https://orgmode.org/worg/org-papers.html][org-papers]] 777 | - [[https://orgmode.org/worg/org-tutorials/][org-tutorials]] 778 | 779 | ,** Project Files 780 | 781 | - [[file:LICENSE][LICENSE]] 782 | 783 | «common-export-settings» 784 | 785 | ,* Footnotes 786 | 787 | [fn:1] [[https://en.wikipedia.org/w/index.php?title=Literate_programming&oldid=866590640]] 788 | 789 | #+END_SRC 790 | 791 | * Common Project Settings 792 | 793 | ** Common Export Settings 794 | 795 | #+NAME: common-export-settings 796 | #+BEGIN_SRC org :results drawer replace :exports both 797 | 798 | ,#+OPTIONS: ':nil *:t -:t ::t <:t H:7 \n:nil ^:{} arch:headline 799 | ,#+OPTIONS: author:t broken-links:nil c:nil creator:nil 800 | ,#+OPTIONS: d:(not "LOGBOOK") date:t e:t email:nil f:t inline:t num:nil 801 | ,#+OPTIONS: p:nil pri:nil prop:nil stat:t tags:t tasks:t tex:t 802 | ,#+OPTIONS: timestamp:t title:t toc:nil todo:t |:t 803 | ,#+SELECT_TAGS: export 804 | ,#+EXCLUDE_TAGS: noexport 805 | 806 | # For Display when file is exported with org-ruby 807 | 808 | ,#+EXPORT_SELECT_TAGS: export 809 | ,#+EXPORT_EXCLUDE_TAGS: noexport 810 | 811 | #+END_SRC 812 | 813 | #+RESULTS: common-export-settings 814 | :RESULTS: 815 | 816 | #+OPTIONS: ':nil *:t -:t ::t <:t H:7 \n:nil ^:{} arch:headline 817 | #+OPTIONS: author:t broken-links:nil c:nil creator:nil 818 | #+OPTIONS: d:(not "LOGBOOK") date:t e:t email:nil f:t inline:t num:nil 819 | #+OPTIONS: p:nil pri:nil prop:nil stat:t tags:t tasks:t tex:t 820 | #+OPTIONS: timestamp:t title:t toc:nil todo:t |:t 821 | #+SELECT_TAGS: export 822 | #+EXCLUDE_TAGS: noexport 823 | 824 | # For Display when file is exported with org-ruby 825 | 826 | #+EXPORT_SELECT_TAGS: export 827 | #+EXPORT_EXCLUDE_TAGS: noexport 828 | :END: 829 | 830 | ** Tutorial Template 831 | 832 | #+BEGIN_SRC org :eval never :noweb yes 833 | 834 | ,#+TITLE: 835 | ,#+HTML: 836 | 837 | ,* Summary 838 | ,* Concepts 839 | ,* Examples 840 | ,* Further Study 841 | ,* Common Export Settings :noexport: 842 | 843 | «common-export-settings» 844 | 845 | #+END_SRC 846 | 847 | -------------------------------------------------------------------------------- /how-to/00-convert-latex-template-into-org-mode-template/svjour.cls: -------------------------------------------------------------------------------- 1 | % SVJour DOCUMENT CLASS -- version 1.11 for LaTeX2e 2 | % 3 | % LaTeX document class for Springer journals 4 | % 5 | %% 6 | %% 7 | %% \CharacterTable 8 | %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z 9 | %% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z 10 | %% Digits \0\1\2\3\4\5\6\7\8\9 11 | %% Exclamation \! Double quote \" Hash (number) \# 12 | %% Dollar \$ Percent \% Ampersand \& 13 | %% Acute accent \' Left paren \( Right paren \) 14 | %% Asterisk \* Plus \+ Comma \, 15 | %% Minus \- Point \. Solidus \/ 16 | %% Colon \: Semicolon \; Less than \< 17 | %% Equals \= Greater than \> Question mark \? 18 | %% Commercial at \@ Left bracket \[ Backslash \\ 19 | %% Right bracket \] Circumflex \^ Underscore \_ 20 | %% Grave accent \` Left brace \{ Vertical bar \| 21 | %% Right brace \} Tilde \~} 22 | \NeedsTeXFormat{LaTeX2e}[1995/12/01] 23 | \ProvidesClass{svjour}[2003/04/15 24 | ^^JLaTeX document class for Springer journals - version 1.11] 25 | \newcommand\@ptsize{} 26 | \newif\if@restonecol 27 | \newif\if@titlepage 28 | \@titlepagefalse 29 | \DeclareOption{a4paper} 30 | {\setlength\paperheight {297mm}% 31 | \setlength\paperwidth {210mm}} 32 | \DeclareOption{10pt}{\renewcommand\@ptsize{0}} 33 | \DeclareOption{twoside}{\@twosidetrue \@mparswitchtrue} 34 | \DeclareOption{draft}{\setlength\overfullrule{5pt}} 35 | \DeclareOption{final}{\setlength\overfullrule{0pt}} 36 | \DeclareOption{twocolumn}{\@twocolumntrue} 37 | \DeclareOption{fleqn}{\input{fleqn.clo}\AtEndOfClass{\mathindent\z@}} 38 | \let\if@mathematic\iftrue 39 | \let\if@numbook\iffalse 40 | \DeclareOption{numbook}{\let\if@envcntsect\iftrue 41 | \AtEndOfPackage{% 42 | \renewcommand\thefigure{\thesection.\@arabic\c@figure}% 43 | \renewcommand\thetable{\thesection.\@arabic\c@table}% 44 | \renewcommand\theequation{\thesection.\@arabic\c@equation}% 45 | \@addtoreset{figure}{section}% 46 | \@addtoreset{table}{section}% 47 | \@addtoreset{equation}{section}% 48 | }% 49 | } 50 | \DeclareOption{openbib}{% 51 | \AtEndOfPackage{% 52 | \renewcommand\@openbib@code{% 53 | \advance\leftmargin\bibindent 54 | \itemindent -\bibindent 55 | \listparindent \itemindent 56 | \parsep \z@ 57 | }% 58 | \renewcommand\newblock{\par}}% 59 | } 60 | % 61 | \let\if@runhead\iffalse 62 | \DeclareOption{runningheads}{\let\if@runhead\iftrue} 63 | \let\if@smartrunh\iffalse 64 | \DeclareOption{smartrunhead}{\let\if@smartrunh\iftrue} 65 | \DeclareOption{nosmartrunhead}{\let\if@smartrunh\iffalse} 66 | \let\if@envcntreset\iffalse 67 | \DeclareOption{envcountreset}{\let\if@envcntreset\iftrue} 68 | \let\if@envcntsame\iffalse 69 | \DeclareOption{envcountsame}{\let\if@envcntsame\iftrue} 70 | \let\if@envcntsect\iffalse 71 | \DeclareOption{envcountsect}{\let\if@envcntsect\iftrue} 72 | \let\if@referee\iffalse 73 | \DeclareOption{referee}{\let\if@referee\iftrue} 74 | \def\makereferee{\def\baselinestretch{2}} 75 | \let\if@instindent\iffalse 76 | \DeclareOption{instindent}{\let\if@instindent\iftrue} 77 | \let\if@smartand\iffalse 78 | \DeclareOption{smartand}{\let\if@smartand\iftrue} 79 | \let\if@spthms\iftrue 80 | \DeclareOption{nospthms}{\let\if@spthms\iffalse} 81 | \let\switch@texts\relax 82 | \DeclareOption{deutsch}{\def\switch@texts{\ds@deutsch}} 83 | \DeclareOption{francais}{\def\switch@texts{\ds@francais}} 84 | % 85 | \let\journalopt\@empty 86 | \DeclareOption*{\InputIfFileExists{sv\CurrentOption.clo}{% 87 | \let\journalopt\CurrentOption}{% 88 | \ClassWarning{Springer-SVJour}{Specified option or subpackage 89 | "\CurrentOption" not found -}\OptionNotUsed}} 90 | \ExecuteOptions{a4paper,twoside,10pt,instindent} 91 | \ProcessOptions 92 | \ifx\journalopt\@empty 93 | \ClassError{Springer-SVJour}{No valid journal specified in option list}{} 94 | \expandafter\stop 95 | \fi 96 | % 97 | \if@smartrunh\AtEndDocument{\islastpageeven\getlastpagenumber}\fi 98 | % 99 | \DeclareMathSymbol{\Gamma}{\mathalpha}{letters}{"00} 100 | \DeclareMathSymbol{\Delta}{\mathalpha}{letters}{"01} 101 | \DeclareMathSymbol{\Theta}{\mathalpha}{letters}{"02} 102 | \DeclareMathSymbol{\Lambda}{\mathalpha}{letters}{"03} 103 | \DeclareMathSymbol{\Xi}{\mathalpha}{letters}{"04} 104 | \DeclareMathSymbol{\Pi}{\mathalpha}{letters}{"05} 105 | \DeclareMathSymbol{\Sigma}{\mathalpha}{letters}{"06} 106 | \DeclareMathSymbol{\Upsilon}{\mathalpha}{letters}{"07} 107 | \DeclareMathSymbol{\Phi}{\mathalpha}{letters}{"08} 108 | \DeclareMathSymbol{\Psi}{\mathalpha}{letters}{"09} 109 | \DeclareMathSymbol{\Omega}{\mathalpha}{letters}{"0A} 110 | % 111 | \setlength\parindent{15\p@} 112 | \setlength\smallskipamount{3\p@ \@plus 1\p@ \@minus 1\p@} 113 | \setlength\medskipamount{6\p@ \@plus 2\p@ \@minus 2\p@} 114 | \setlength\bigskipamount{12\p@ \@plus 4\p@ \@minus 4\p@} 115 | \setlength\headheight{12\p@} 116 | \setlength\headsep {16.74dd} 117 | \setlength\topskip {10\p@} 118 | \setlength\footskip{30\p@} 119 | \setlength\maxdepth{.5\topskip} 120 | % 121 | \@settopoint\textwidth 122 | \setlength\marginparsep {10\p@} 123 | \setlength\marginparpush{5\p@} 124 | \setlength\topmargin{-10pt} 125 | \if@twocolumn 126 | \setlength\oddsidemargin {-30\p@} 127 | \setlength\evensidemargin{-30\p@} 128 | \else 129 | \setlength\oddsidemargin {\z@} 130 | \setlength\evensidemargin{\z@} 131 | \fi 132 | \setlength\marginparwidth {48\p@} 133 | \setlength\footnotesep{8\p@} 134 | \setlength{\skip\footins}{9\p@ \@plus 4\p@ \@minus 2\p@} 135 | \setlength\floatsep {12\p@ \@plus 2\p@ \@minus 2\p@} 136 | \setlength\textfloatsep{20\p@ \@plus 2\p@ \@minus 4\p@} 137 | \setlength\intextsep {20\p@ \@plus 2\p@ \@minus 2\p@} 138 | \setlength\dblfloatsep {12\p@ \@plus 2\p@ \@minus 2\p@} 139 | \setlength\dbltextfloatsep{20\p@ \@plus 2\p@ \@minus 4\p@} 140 | \setlength\@fptop{0\p@} 141 | \setlength\@fpsep{12\p@ \@plus 2\p@ \@minus 2\p@} 142 | \setlength\@fpbot{0\p@ \@plus 1fil} 143 | \setlength\@dblfptop{0\p@} 144 | \setlength\@dblfpsep{12\p@ \@plus 2\p@ \@minus 2\p@} 145 | \setlength\@dblfpbot{0\p@ \@plus 1fil} 146 | \setlength\partopsep{2\p@ \@plus 1\p@ \@minus 1\p@} 147 | \def\@listi{\leftmargin\leftmargini 148 | \parsep \z@ 149 | \topsep 6\p@ \@plus2\p@ \@minus4\p@ 150 | \itemsep\parsep} 151 | \let\@listI\@listi 152 | \@listi 153 | \def\@listii {\leftmargin\leftmarginii 154 | \labelwidth\leftmarginii 155 | \advance\labelwidth-\labelsep 156 | \topsep \z@ 157 | \parsep \topsep 158 | \itemsep \parsep} 159 | \def\@listiii{\leftmargin\leftmarginiii 160 | \labelwidth\leftmarginiii 161 | \advance\labelwidth-\labelsep 162 | \topsep \z@ 163 | \parsep \topsep 164 | \itemsep \parsep} 165 | \def\@listiv {\leftmargin\leftmarginiv 166 | \labelwidth\leftmarginiv 167 | \advance\labelwidth-\labelsep} 168 | \def\@listv {\leftmargin\leftmarginv 169 | \labelwidth\leftmarginv 170 | \advance\labelwidth-\labelsep} 171 | \def\@listvi {\leftmargin\leftmarginvi 172 | \labelwidth\leftmarginvi 173 | \advance\labelwidth-\labelsep} 174 | % 175 | \setlength\lineskip{1\p@} 176 | \setlength\normallineskip{1\p@} 177 | \renewcommand\baselinestretch{} 178 | \setlength\parskip{0\p@ \@plus \p@} 179 | \@lowpenalty 51 180 | \@medpenalty 151 181 | \@highpenalty 301 182 | \setcounter{topnumber}{4} 183 | \renewcommand\topfraction{.9} 184 | \setcounter{bottomnumber}{2} 185 | \renewcommand\bottomfraction{.7} 186 | \setcounter{totalnumber}{6} 187 | \renewcommand\textfraction{.1} 188 | \renewcommand\floatpagefraction{.85} 189 | \setcounter{dbltopnumber}{3} 190 | \renewcommand\dbltopfraction{.85} 191 | \renewcommand\dblfloatpagefraction{.85} 192 | \def\ps@headings{% 193 | \let\@oddfoot\@empty\let\@evenfoot\@empty 194 | \def\@evenhead{\small\rlap{\thepage}\hfil\leftmark\unskip}% 195 | \def\@oddhead{\small\rightmark\hfil\llap{\thepage}}% 196 | \let\@mkboth\@gobbletwo 197 | \let\sectionmark\@gobble 198 | \let\subsectionmark\@gobble 199 | } 200 | % make indentations changeable 201 | \def\setitemindent#1{\settowidth{\labelwidth}{#1}% 202 | \leftmargini\labelwidth 203 | \advance\leftmargini\labelsep 204 | \def\@listi{\leftmargin\leftmargini 205 | \labelwidth\leftmargini\advance\labelwidth by -\labelsep 206 | \parsep=\parskip 207 | \topsep=\medskipamount 208 | \itemsep=\parskip \advance\itemsep by -\parsep}} 209 | \def\setitemitemindent#1{\settowidth{\labelwidth}{#1}% 210 | \leftmarginii\labelwidth 211 | \advance\leftmarginii\labelsep 212 | \def\@listii{\leftmargin\leftmarginii 213 | \labelwidth\leftmarginii\advance\labelwidth by -\labelsep 214 | \parsep=\parskip 215 | \topsep=\z@ 216 | \itemsep=\parskip \advance\itemsep by -\parsep}} 217 | % labels of description 218 | \def\descriptionlabel#1{\hspace\labelsep #1\hfil} 219 | % adjusted environment "description" 220 | % if an optional parameter (at the first two levels of lists) 221 | % is present, its width is considered to be the widest mark 222 | % throughout the current list. 223 | \def\description{\@ifnextchar[{\@describe}{\list{}{\labelwidth\z@ 224 | \itemindent-\leftmargin \let\makelabel\descriptionlabel}}} 225 | \let\enddescription\endlist 226 | % 227 | \def\describelabel#1{#1\hfil} 228 | \def\@describe[#1]{\relax\ifnum\@listdepth=0 229 | \setitemindent{#1}\else\ifnum\@listdepth=1 230 | \setitemitemindent{#1}\fi\fi 231 | \list{--}{\let\makelabel\describelabel}} 232 | % 233 | \newdimen\logodepth 234 | \logodepth=2.2cm 235 | \newdimen\headerboxheight 236 | \headerboxheight=180pt % 18 10.5dd-lines - 2\baselineskip 237 | \newdimen\betweenumberspace % dimension for space between 238 | \betweenumberspace=3.33pt % number and text of titles. 239 | \newdimen\aftertext % dimension for space after 240 | \aftertext=5pt % text of title. 241 | \newdimen\headlineindent % dimension for space between 242 | \headlineindent=1.166cm % number and text of headings. 243 | \def\andname{and} 244 | \if@mathematic 245 | \def\runinend{\enspace} 246 | \def\floatcounterend{\enspace} 247 | \def\sectcounterend{} 248 | \else 249 | \def\runinend{.} 250 | \def\floatcounterend{.\ } 251 | \def\sectcounterend{.} 252 | \fi 253 | \def\keywordname{{\bfseries Key words\runinend}} 254 | \def\lastandname{, and} 255 | \def\mailname{{\itshape Correspondence to\/}:} 256 | \def\email#1{{e-mail: \tt#1}} 257 | \def\keywords#1{\par\addvspace\baselineskip\noindent\keywordname\enspace 258 | \ignorespaces#1} 259 | % 260 | \newcounter{inst} 261 | \newcounter{auth} 262 | \def\authdepth{2} 263 | \newdimen\instindent 264 | \newbox\authrun 265 | \newtoks\authorrunning 266 | \newbox\titrun 267 | \newtoks\titlerunning 268 | \def\authorfont{\bfseries} 269 | 270 | \def\combirunning#1{\gdef\@combi{#1}} 271 | \def\@combi{} 272 | \newbox\combirun 273 | % 274 | \def\ps@last{\def\@evenhead{\small\rlap{\thepage}\hfil 275 | \lastevenhead}} 276 | \newcounter{lastpage} 277 | \def\islastpageeven{\@ifundefined{lastpagenumber} 278 | {\setcounter{lastpage}{0}}{\setcounter{lastpage}{\lastpagenumber}} 279 | \ifnum\value{lastpage}>0 280 | \ifodd\value{lastpage}% 281 | \else 282 | \if@smartrunh 283 | \thispagestyle{last}% 284 | \fi 285 | \fi 286 | \fi} 287 | \def\getlastpagenumber{\clearpage 288 | \addtocounter{page}{-1}% 289 | \immediate\write\@auxout{\string\gdef\string\lastpagenumber{\thepage}}% 290 | \immediate\write\@auxout{\string\newlabel{LastPage}{{}{\thepage}}}% 291 | \addtocounter{page}{1}} 292 | 293 | \def\journalname#1{\gdef\@journalname{#1}} 294 | 295 | \def\dedication#1{\gdef\@dedic{#1}} 296 | \def\@dedic{} 297 | 298 | \let\@date\undefined 299 | 300 | \def\institute#1{\gdef\@institute{#1}} 301 | 302 | \def\institutename{\par 303 | \begingroup 304 | \parindent=0pt 305 | \parskip=0pt 306 | \setcounter{inst}{1}% 307 | \def\and{\par\stepcounter{inst}% 308 | \if@instindent\hangindent\instindent\fi 309 | \noindent 310 | \hbox to\instindent{\hss\smash{$^{\theinst}$}\enspace}\ignorespaces}% 311 | \setbox0=\vbox{\def\thanks##1{}\@institute} 312 | \ifnum\value{inst}>9\relax\setbox0=\hbox{$^{88}$\enspace}% 313 | \else\setbox0=\hbox{$^{8}$\enspace}\fi 314 | \instindent=\wd0\relax 315 | \ifnum\value{inst}=1\relax 316 | \else 317 | \setcounter{inst}{1}% 318 | \if@instindent\hangindent\instindent\fi 319 | \noindent 320 | \hbox to\instindent{\hss\smash{$^{\theinst}$}\enspace}\ignorespaces 321 | \fi 322 | \small 323 | \ignorespaces 324 | \@institute\par 325 | \endgroup} 326 | 327 | \def\offprints#1{\begingroup 328 | \def\protect{\noexpand\protect\noexpand}\xdef\@thanks{\@thanks 329 | \protect\footnotetext[0]{\unskip\hskip-15pt{\itshape Send offprint requests 330 | to\/}: \ignorespaces#1}}\endgroup\ignorespaces} 331 | 332 | \def\mail#1{\gdef\@mail{#1}} 333 | \def\@mail{} 334 | 335 | \def\@thanks{} 336 | 337 | \def\@fnsymbol#1{\ifcase#1\or\star\or{\star\star}\or{\star\star\star}% 338 | \or \dagger\or \ddagger\or 339 | \mathchar "278\or \mathchar "27B\or \|\or **\or \dagger\dagger 340 | \or \ddagger\ddagger \else\@ctrerr\fi\relax} 341 | 342 | \def\inst#1{\unskip$^{#1}$} 343 | \def\fnmsep{\unskip$^,$} 344 | 345 | \def\subtitle#1{\gdef\@subtitle{#1}} 346 | \def\@subtitle{} 347 | 348 | \def\headnote#1{\gdef\@headnote{#1}} 349 | \def\@headnote{} 350 | 351 | \def\ch@ckobl#1#2{\@ifundefined{@#1} 352 | {\typeout{SVJour warning: Missing 353 | \expandafter\string\csname#1\endcsname}% 354 | \csname #1\endcsname{#2}} 355 | {}} 356 | % 357 | \def\ProcessRunnHead{% 358 | \def\\{\unskip\ \ignorespaces}\def\inst##1{\unskip{}}% 359 | \def\thanks##1{\unskip{}}\def\fnmsep{\unskip}% 360 | \instindent=\textwidth 361 | \advance\instindent by-\headlineindent 362 | \if!\the\titlerunning!\else 363 | \edef\@title{\the\titlerunning}% 364 | \fi 365 | \global\setbox\titrun=\hbox{\small\rmfamily\unboldmath\ignorespaces\@title 366 | \unskip}% 367 | \ifdim\wd\titrun>\instindent 368 | \typeout{^^JSVJour Warning: Title too long for running head.}% 369 | \typeout{Please supply a shorter form with \string\titlerunning 370 | \space prior to \string\maketitle}% 371 | \global\setbox\titrun=\hbox{\small\rmfamily 372 | Title Suppressed Due to Excessive Length}% 373 | \fi 374 | \xdef\@title{\copy\titrun}% 375 | % 376 | \if!\the\authorrunning! 377 | \else 378 | \setcounter{auth}{1}% 379 | \edef\@author{\the\authorrunning}% 380 | \fi 381 | \ifnum\value{auth}>\authdepth 382 | \def\stripauthor##1\and##2\endauthor{% 383 | \protected@xdef\@author{##1\unskip\unskip\if!##2!\else\ et al.\fi}}% 384 | \expandafter\stripauthor\@author\and\endauthor 385 | \else 386 | \gdef\and{\unskip, \ignorespaces}% 387 | {\def\and{\noexpand\protect\noexpand\and}% 388 | \protected@xdef\@author{\@author}} 389 | \fi 390 | \global\setbox\authrun=\hbox{\small\rmfamily\unboldmath\ignorespaces 391 | \@author\unskip}% 392 | \ifdim\wd\authrun>\instindent 393 | \typeout{^^JSVJour Warning: Author name(s) too long for running head. 394 | ^^JPlease supply a shorter form with \string\authorrunning 395 | \space prior to \string\maketitle}% 396 | \global\setbox\authrun=\hbox{\small\rmfamily Please give a shorter version 397 | with: {\tt\string\authorrunning\space and 398 | \string\titlerunning\space prior to \string\maketitle}}% 399 | \fi 400 | \xdef\@author{\copy\authrun}% 401 | \markboth{\@author}{\@title}% 402 | } 403 | % 404 | \def\maketitle{\par 405 | \ch@ckobl{journalname}{Noname} 406 | \ch@ckobl{date}{The date of receipt and acceptance will be inserted by 407 | the editor} 408 | \ch@ckobl{title}{A title should be given} 409 | \ch@ckobl{author}{Name(s) and initial(s) of author(s) should be given} 410 | \ch@ckobl{institute}{Address(es) of author(s) should be given} 411 | \begingroup 412 | % 413 | \renewcommand\thefootnote{\@fnsymbol\c@footnote}% 414 | \def\@makefnmark{$^{\@thefnmark}$}% 415 | % 416 | \def\lastand{\ifnum\value{inst}=2\relax 417 | \unskip{} \andname\ 418 | \else 419 | \unskip, \andname\ 420 | \fi}% 421 | \def\and{\stepcounter{auth}\relax 422 | \if@smartand 423 | \ifnum\value{auth}=\value{inst}% 424 | \lastand 425 | \else 426 | \unskip, 427 | \fi 428 | \else 429 | \unskip, 430 | \fi}% 431 | \ifnum \col@number=\@ne 432 | \@maketitle 433 | \else 434 | \twocolumn[\@maketitle]% 435 | \fi 436 | \thispagestyle{empty} 437 | \global\@topnum\z@ 438 | \@thanks 439 | \if!\@mail!\else 440 | \footnotetext[0]{\kern-\bibindent\mailname\ 441 | \ignorespaces\@mail}% 442 | \fi 443 | % 444 | \if@runhead 445 | \ProcessRunnHead 446 | \if@smartrunh 447 | \instindent=\textwidth 448 | \advance\instindent by-\headlineindent 449 | \if!\@combi!% 450 | \global\setbox\combirun=\hbox{\small\rmfamily\unboldmath\ignorespaces 451 | \@author\unskip: \@title\unskip}% 452 | \def\@tempa{Automatically generated running head}% 453 | \else 454 | \global\setbox\combirun=\hbox{\small\rmfamily\unboldmath\ignorespaces 455 | \@combi\unskip}% 456 | \def\@tempa{With \string\combirunning\space supplied running head}% 457 | \fi 458 | \ifdim\wd\combirun>\instindent 459 | \typeout{^^JSVJour Warning: \@tempa}% 460 | \typeout{for a possible last even numbered page is too long.}% 461 | \typeout{Please supply a shorter form with \string\combirunning 462 | \space prior to \string\maketitle.}% 463 | \global\setbox\combirun=\hbox{\small\rmfamily 464 | Title Suppressed Due to Excessive Length -- 465 | supply \ttfamily\char92combirunning}% 466 | \fi 467 | \xdef\lastevenhead{\copy\combirun}% 468 | \fi 469 | \fi 470 | % 471 | \endgroup 472 | \setcounter{footnote}{0} 473 | \global\let\thanks\relax 474 | \global\let\maketitle\relax 475 | \global\let\@maketitle\relax 476 | \global\let\@thanks\@empty 477 | \global\let\@author\@empty 478 | \global\let\@date\@empty 479 | \global\let\@title\@empty 480 | \global\let\@subtitle\@empty 481 | \global\let\title\relax 482 | \global\let\author\relax 483 | \global\let\date\relax 484 | \global\let\and\relax} 485 | 486 | \def\makeheadbox{{% 487 | \hbox to0pt{\vbox{\baselineskip=10dd\hrule\hbox 488 | to\hsize{\vrule\kern3pt\vbox{\kern3pt 489 | \hbox{\bfseries\@journalname\ manuscript No.} 490 | \hbox{(will be inserted by the editor)} 491 | \kern3pt}\hfil\kern3pt\vrule}\hrule}% 492 | \hss}}} 493 | 494 | \def\@maketitle{\newpage 495 | \normalfont 496 | \vbox to0pt{\vskip-40pt 497 | \nointerlineskip 498 | \makeheadbox\vss}\nointerlineskip 499 | \setbox\authrun=\vbox\bgroup 500 | {\Large \bfseries\boldmath 501 | \hrule\@height\logodepth\@width\z@ 502 | \pretolerance=10000 503 | \rightskip=0pt plus 4cm 504 | \if!\@headnote!\else 505 | \noindent 506 | {\normalfont\em\ignorespaces\@headnote\par}\vskip 3.5mm 507 | \fi 508 | \noindent\ignorespaces 509 | \@title \par}\vskip 11.24pt\relax 510 | \if!\@subtitle!\else 511 | {\large\bfseries\boldmath 512 | \pretolerance=10000 513 | \rightskip=0pt plus 3cm 514 | \noindent\ignorespaces\@subtitle \par}\vskip 11.24pt 515 | \fi 516 | \normalfont\authorfont 517 | \lineskip .5em 518 | \setbox0=\vbox{\setcounter{auth}{1}\def\and{\stepcounter{auth} }% 519 | \hfuzz=2\textwidth\def\thanks##1{}\@author}% 520 | \value{inst}=\value{auth}% 521 | \setcounter{auth}{1}% 522 | \rightskip=0pt plus 2cm 523 | \noindent\ignorespaces\@author\vskip7.23pt 524 | \rightskip=0pt\relax 525 | \normalfont\small\rmfamily 526 | \institutename 527 | \vskip 12.85pt \noindent\@date 528 | \if!\@dedic!\else 529 | \par 530 | \small\itshape 531 | \addvspace\baselineskip 532 | \noindent\@dedic 533 | \fi 534 | \egroup % end of header box 535 | \@tempdima=\headerboxheight 536 | \advance\@tempdima by-\ht\authrun 537 | \ifdim\@tempdima>0pt 538 | \vrule width0pt height\@tempdima 539 | \fi 540 | \unvbox\authrun 541 | \global\@minipagetrue 542 | \global\everypar{\global\@minipagefalse\global\everypar{}} 543 | \vskip22.47pt 544 | } 545 | % 546 | \if@mathematic 547 | \def\vec#1{\ensuremath{\mathchoice 548 | {\mbox{\boldmath$\displaystyle\mathbf{#1}$}} 549 | {\mbox{\boldmath$\textstyle\mathbf{#1}$}} 550 | {\mbox{\boldmath$\scriptstyle\mathbf{#1}$}} 551 | {\mbox{\boldmath$\scriptscriptstyle\mathbf{#1}$}}}} 552 | \else 553 | \def\vec#1{\ensuremath{\mathchoice 554 | {\mbox{\boldmath$\displaystyle#1$}} 555 | {\mbox{\boldmath$\textstyle#1$}} 556 | {\mbox{\boldmath$\scriptstyle#1$}} 557 | {\mbox{\boldmath$\scriptscriptstyle#1$}}}} 558 | \fi 559 | % 560 | \def\tens#1{\ensuremath{\mathsf{#1}}} 561 | % 562 | \setcounter{secnumdepth}{3} 563 | \newcounter {section} 564 | \newcounter {subsection}[section] 565 | \newcounter {subsubsection}[subsection] 566 | \newcounter {paragraph}[subsubsection] 567 | \newcounter {subparagraph}[paragraph] 568 | \renewcommand\thesection {\@arabic\c@section} 569 | \renewcommand\thesubsection {\thesection.\@arabic\c@subsection} 570 | \renewcommand\thesubsubsection{\thesubsection.\@arabic\c@subsubsection} 571 | \renewcommand\theparagraph {\thesubsubsection.\@arabic\c@paragraph} 572 | \renewcommand\thesubparagraph {\theparagraph.\@arabic\c@subparagraph} 573 | % 574 | \def\@hangfrom#1{\setbox\@tempboxa\hbox{#1}% 575 | \hangindent \z@\noindent\box\@tempboxa} 576 | 577 | \def\@seccntformat#1{\csname the#1\endcsname\sectcounterend 578 | \hskip\betweenumberspace} 579 | 580 | \def\@sect#1#2#3#4#5#6[#7]#8{% 581 | \ifnum #2>\c@secnumdepth 582 | \let\@svsec\@empty 583 | \else 584 | \refstepcounter{#1}% 585 | \protected@edef\@svsec{\@seccntformat{#1}\relax}% 586 | \fi 587 | \@tempskipa #5\relax 588 | \ifdim \@tempskipa>\z@ 589 | \begingroup 590 | #6{% 591 | \@hangfrom{\hskip #3\relax\@svsec}% 592 | \raggedright 593 | \hyphenpenalty \@M% 594 | \interlinepenalty \@M #8\@@par}% 595 | \endgroup 596 | \csname #1mark\endcsname{#7}% 597 | \addcontentsline{toc}{#1}{% 598 | \ifnum #2>\c@secnumdepth \else 599 | \protect\numberline{\csname the#1\endcsname\sectcounterend}% 600 | \fi 601 | #7}% 602 | \else 603 | \def\@svsechd{% 604 | #6{\hskip #3\relax 605 | \@svsec #8\hskip\aftertext}% 606 | \csname #1mark\endcsname{#7}% 607 | \addcontentsline{toc}{#1}{% 608 | \ifnum #2>\c@secnumdepth \else 609 | \protect\numberline{\csname the#1\endcsname}% 610 | \fi 611 | #7}}% 612 | \fi 613 | \@xsect{#5}} 614 | 615 | % 616 | % measures and setting of sections 617 | % 618 | \def\section{\@startsection{section}{1}{\z@}% 619 | {-21dd plus-4pt minus-4pt}{10.5dd plus 4pt 620 | minus4pt}{\normalsize\bfseries\boldmath}} 621 | \def\subsection{\@startsection{subsection}{2}{\z@}% 622 | {-21dd plus-4pt minus-4pt}{10.5dd plus 4pt 623 | minus4pt}{\normalsize\itshape}} 624 | \def\subsubsection{\@startsection{subsubsection}{3}{\z@}% 625 | {-13dd plus-4pt minus-4pt}{-5.5pt}{\normalsize\itshape}} 626 | \def\paragraph{\@startsection{paragraph}{4}{\z@}% 627 | {-13pt plus-4pt minus-4pt}{-5.5pt}{\normalsize\itshape}} 628 | 629 | \setlength\leftmargini {\parindent} 630 | \leftmargin \leftmargini 631 | \setlength\leftmarginii {\parindent} 632 | \setlength\leftmarginiii {1.87em} 633 | \setlength\leftmarginiv {1.7em} 634 | \setlength\leftmarginv {.5em} 635 | \setlength\leftmarginvi {.5em} 636 | \setlength \labelsep {.5em} 637 | \setlength \labelwidth{\leftmargini} 638 | \addtolength\labelwidth{-\labelsep} 639 | \@beginparpenalty -\@lowpenalty 640 | \@endparpenalty -\@lowpenalty 641 | \@itempenalty -\@lowpenalty 642 | \renewcommand\theenumi{\@arabic\c@enumi} 643 | \renewcommand\theenumii{\@alph\c@enumii} 644 | \renewcommand\theenumiii{\@roman\c@enumiii} 645 | \renewcommand\theenumiv{\@Alph\c@enumiv} 646 | \newcommand\labelenumi{\theenumi.} 647 | \newcommand\labelenumii{(\theenumii)} 648 | \newcommand\labelenumiii{\theenumiii.} 649 | \newcommand\labelenumiv{\theenumiv.} 650 | \renewcommand\p@enumii{\theenumi} 651 | \renewcommand\p@enumiii{\theenumi(\theenumii)} 652 | \renewcommand\p@enumiv{\p@enumiii\theenumiii} 653 | \newcommand\labelitemi{\normalfont\bfseries --} 654 | \newcommand\labelitemii{\normalfont\bfseries --} 655 | \newcommand\labelitemiii{$\m@th\bullet$} 656 | \newcommand\labelitemiv{$\m@th\cdot$} 657 | 658 | \if@spthms 659 | % definition of the "\spnewtheorem" command. 660 | % 661 | % Usage: 662 | % 663 | % \spnewtheorem{env_nam}{caption}[within]{cap_font}{body_font} 664 | % or \spnewtheorem{env_nam}[numbered_like]{caption}{cap_font}{body_font} 665 | % or \spnewtheorem*{env_nam}{caption}{cap_font}{body_font} 666 | % 667 | % New is "cap_font" and "body_font". It stands for 668 | % fontdefinition of the caption and the text itself. 669 | % 670 | % "\spnewtheorem*" gives a theorem without number. 671 | % 672 | % A defined spnewthoerem environment is used as described 673 | % by Lamport. 674 | % 675 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 676 | 677 | \def\@thmcountersep{} 678 | \def\@thmcounterend{} 679 | \newdimen\spthmsep \spthmsep=3pt 680 | 681 | \def\spnewtheorem{\@ifstar{\@sthm}{\@Sthm}} 682 | 683 | % definition of \spnewtheorem with number 684 | 685 | \def\@spnthm#1#2{% 686 | \@ifnextchar[{\@spxnthm{#1}{#2}}{\@spynthm{#1}{#2}}} 687 | \def\@Sthm#1{\@ifnextchar[{\@spothm{#1}}{\@spnthm{#1}}} 688 | 689 | \def\@spxnthm#1#2[#3]#4#5{\expandafter\@ifdefinable\csname #1\endcsname 690 | {\@definecounter{#1}\@addtoreset{#1}{#3}% 691 | \expandafter\xdef\csname the#1\endcsname{\expandafter\noexpand 692 | \csname the#3\endcsname \noexpand\@thmcountersep \@thmcounter{#1}}% 693 | \expandafter\xdef\csname #1name\endcsname{#2}% 694 | \global\@namedef{#1}{\@spthm{#1}{\csname #1name\endcsname}{#4}{#5}}% 695 | \global\@namedef{end#1}{\@endtheorem}}} 696 | 697 | \def\@spynthm#1#2#3#4{\expandafter\@ifdefinable\csname #1\endcsname 698 | {\@definecounter{#1}% 699 | \expandafter\xdef\csname the#1\endcsname{\@thmcounter{#1}}% 700 | \expandafter\xdef\csname #1name\endcsname{#2}% 701 | \global\@namedef{#1}{\@spthm{#1}{\csname #1name\endcsname}{#3}{#4}}% 702 | \global\@namedef{end#1}{\@endtheorem}}} 703 | 704 | \def\@spothm#1[#2]#3#4#5{% 705 | \@ifundefined{c@#2}{\@latexerr{No theorem environment `#2' defined}\@eha}% 706 | {\expandafter\@ifdefinable\csname #1\endcsname 707 | {\global\@namedef{the#1}{\@nameuse{the#2}}% 708 | \expandafter\xdef\csname #1name\endcsname{#3}% 709 | \global\@namedef{#1}{\@spthm{#2}{\csname #1name\endcsname}{#4}{#5}}% 710 | \global\@namedef{end#1}{\@endtheorem}}}} 711 | 712 | \def\@spthm#1#2#3#4{\topsep 7\p@ \@plus2\p@ \@minus4\p@ 713 | \labelsep=\spthmsep\refstepcounter{#1}% 714 | \@ifnextchar[{\@spythm{#1}{#2}{#3}{#4}}{\@spxthm{#1}{#2}{#3}{#4}}} 715 | 716 | \def\@spxthm#1#2#3#4{\@spbegintheorem{#2}{\csname the#1\endcsname}{#3}{#4}% 717 | \ignorespaces} 718 | 719 | \def\@spythm#1#2#3#4[#5]{\@spopargbegintheorem{#2}{\csname 720 | the#1\endcsname}{#5}{#3}{#4}\ignorespaces} 721 | 722 | \def\normalthmheadings{\def\@spbegintheorem##1##2##3##4{\trivlist 723 | \item[\hskip\labelsep{##3##1\ ##2\@thmcounterend}]##4} 724 | \def\@spopargbegintheorem##1##2##3##4##5{\trivlist 725 | \item[\hskip\labelsep{##4##1\ ##2}]{##4(##3)\@thmcounterend\ }##5}} 726 | \normalthmheadings 727 | 728 | \def\reversethmheadings{\def\@spbegintheorem##1##2##3##4{\trivlist 729 | \item[\hskip\labelsep{##3##2\ ##1\@thmcounterend}]##4} 730 | \def\@spopargbegintheorem##1##2##3##4##5{\trivlist 731 | \item[\hskip\labelsep{##4##2\ ##1}]{##4(##3)\@thmcounterend\ }##5}} 732 | 733 | % definition of \spnewtheorem* without number 734 | 735 | \def\@sthm#1#2{\@Ynthm{#1}{#2}} 736 | 737 | \def\@Ynthm#1#2#3#4{\expandafter\@ifdefinable\csname #1\endcsname 738 | {\global\@namedef{#1}{\@Thm{\csname #1name\endcsname}{#3}{#4}}% 739 | \expandafter\xdef\csname #1name\endcsname{#2}% 740 | \global\@namedef{end#1}{\@endtheorem}}} 741 | 742 | \def\@Thm#1#2#3{\topsep 7\p@ \@plus2\p@ \@minus4\p@ 743 | \@ifnextchar[{\@Ythm{#1}{#2}{#3}}{\@Xthm{#1}{#2}{#3}}} 744 | 745 | \def\@Xthm#1#2#3{\@Begintheorem{#1}{#2}{#3}\ignorespaces} 746 | 747 | \def\@Ythm#1#2#3[#4]{\@Opargbegintheorem{#1} 748 | {#4}{#2}{#3}\ignorespaces} 749 | 750 | \def\@Begintheorem#1#2#3{#3\trivlist 751 | \item[\hskip\labelsep{#2#1\@thmcounterend}]} 752 | 753 | \def\@Opargbegintheorem#1#2#3#4{#4\trivlist 754 | \item[\hskip\labelsep{#3#1}]{#3(#2)\@thmcounterend\ }} 755 | 756 | \if@envcntsect 757 | \def\@thmcountersep{.} 758 | \spnewtheorem{theorem}{Theorem}[section]{\bfseries}{\itshape} 759 | \else 760 | \spnewtheorem{theorem}{Theorem}{\bfseries}{\itshape} 761 | \if@envcntreset 762 | \@addtoreset{theorem}{section} 763 | \else 764 | \@addtoreset{theorem}{chapter} 765 | \fi 766 | \fi 767 | 768 | %definition of divers theorem environments 769 | \spnewtheorem*{claim}{Claim}{\itshape}{\rmfamily} 770 | \spnewtheorem*{proof}{Proof}{\itshape}{\rmfamily} 771 | \if@envcntsame % alle Umgebungen wie Theorem. 772 | \def\spn@wtheorem#1#2#3#4{\@spothm{#1}[theorem]{#2}{#3}{#4}} 773 | \else % alle Umgebungen mit eigenem Zaehler 774 | \if@envcntsect % mit section numeriert 775 | \def\spn@wtheorem#1#2#3#4{\@spxnthm{#1}{#2}[section]{#3}{#4}} 776 | \else % nicht mit section numeriert 777 | \if@envcntreset 778 | \def\spn@wtheorem#1#2#3#4{\@spynthm{#1}{#2}{#3}{#4} 779 | \@addtoreset{#1}{section}} 780 | \else 781 | \let\spn@wtheorem=\@spynthm 782 | \fi 783 | \fi 784 | \fi 785 | \spn@wtheorem{case}{Case}{\itshape}{\rmfamily} 786 | \spn@wtheorem{conjecture}{Conjecture}{\itshape}{\rmfamily} 787 | \spn@wtheorem{corollary}{Corollary}{\bfseries}{\itshape} 788 | \spn@wtheorem{definition}{Definition}{\bfseries}{\itshape} 789 | \spn@wtheorem{example}{Example}{\itshape}{\rmfamily} 790 | \spn@wtheorem{exercise}{Exercise}{\bfseries}{\rmfamily} 791 | \spn@wtheorem{lemma}{Lemma}{\bfseries}{\itshape} 792 | \spn@wtheorem{note}{Note}{\itshape}{\rmfamily} 793 | \spn@wtheorem{problem}{Problem}{\bfseries}{\rmfamily} 794 | \spn@wtheorem{property}{Property}{\itshape}{\rmfamily} 795 | \spn@wtheorem{proposition}{Proposition}{\bfseries}{\itshape} 796 | \spn@wtheorem{question}{Question}{\itshape}{\rmfamily} 797 | \spn@wtheorem{solution}{Solution}{\bfseries}{\rmfamily} 798 | \spn@wtheorem{remark}{Remark}{\itshape}{\rmfamily} 799 | % 800 | \newenvironment{theopargself} 801 | {\def\@spopargbegintheorem##1##2##3##4##5{\trivlist 802 | \item[\hskip\labelsep{##4##1\ ##2}]{##4##3\@thmcounterend\ }##5} 803 | \def\@Opargbegintheorem##1##2##3##4{##4\trivlist 804 | \item[\hskip\labelsep{##3##1}]{##3##2\@thmcounterend\ }}}{} 805 | \newenvironment{theopargself*} 806 | {\def\@spopargbegintheorem##1##2##3##4##5{\trivlist 807 | \item[\hskip\labelsep{##4##1\ ##2}]{\hspace*{-\labelsep}##4##3\@thmcounterend}##5} 808 | \def\@Opargbegintheorem##1##2##3##4{##4\trivlist 809 | \item[\hskip\labelsep{##3##1}]{\hspace*{-\labelsep}##3##2\@thmcounterend}}}{} 810 | \fi 811 | 812 | \def\@takefromreset#1#2{% 813 | \def\@tempa{#1}% 814 | \let\@tempd\@elt 815 | \def\@elt##1{% 816 | \def\@tempb{##1}% 817 | \ifx\@tempa\@tempb\else 818 | \@addtoreset{##1}{#2}% 819 | \fi}% 820 | \expandafter\expandafter\let\expandafter\@tempc\csname cl@#2\endcsname 821 | \expandafter\def\csname cl@#2\endcsname{}% 822 | \@tempc 823 | \let\@elt\@tempd} 824 | 825 | \def\squareforqed{\hbox{\rlap{$\sqcap$}$\sqcup$}} 826 | \def\qed{\ifmmode\else\unskip\quad\fi\squareforqed} 827 | \def\smartqed{\def\qed{\ifmmode\squareforqed\else{\unskip\nobreak\hfil 828 | \penalty50\hskip1em\null\nobreak\hfil\squareforqed 829 | \parfillskip=0pt\finalhyphendemerits=0\endgraf}\fi}} 830 | 831 | % Define `abstract' environment 832 | \def\abstract{\topsep=0pt\partopsep=0pt\parsep=0pt\itemsep=0pt\relax 833 | \trivlist\item[\hskip\labelsep 834 | {\bfseries\abstractname}]\if!\abstractname!\hskip-\labelsep\fi} 835 | \if@twocolumn 836 | \def\endabstract{\endtrivlist\addvspace{5mm}\strich} 837 | \def\strich{\hrule\vskip3ptplus12pt\null} 838 | \else 839 | \def\endabstract{\endtrivlist\addvspace{3mm}} 840 | \fi 841 | % 842 | \newenvironment{verse} 843 | {\let\\\@centercr 844 | \list{}{\itemsep \z@ 845 | \itemindent -1.5em% 846 | \listparindent\itemindent 847 | \rightmargin \leftmargin 848 | \advance\leftmargin 1.5em}% 849 | \item\relax} 850 | {\endlist} 851 | \newenvironment{quotation} 852 | {\list{}{\listparindent 1.5em% 853 | \itemindent \listparindent 854 | \rightmargin \leftmargin 855 | \parsep \z@ \@plus\p@}% 856 | \item\relax} 857 | {\endlist} 858 | \newenvironment{quote} 859 | {\list{}{\rightmargin\leftmargin}% 860 | \item\relax} 861 | {\endlist} 862 | \newcommand\appendix{\par 863 | \setcounter{section}{0}% 864 | \setcounter{subsection}{0}% 865 | \renewcommand\thesection{\@Alph\c@section}} 866 | \setlength\arraycolsep{1.5\p@} 867 | \setlength\tabcolsep{6\p@} 868 | \setlength\arrayrulewidth{.4\p@} 869 | \setlength\doublerulesep{2\p@} 870 | \setlength\tabbingsep{\labelsep} 871 | \skip\@mpfootins = \skip\footins 872 | \setlength\fboxsep{3\p@} 873 | \setlength\fboxrule{.4\p@} 874 | \renewcommand\theequation{\@arabic\c@equation} 875 | \newcounter{figure} 876 | \renewcommand\thefigure{\@arabic\c@figure} 877 | \def\fps@figure{tbp} 878 | \def\ftype@figure{1} 879 | \def\ext@figure{lof} 880 | \def\fnum@figure{\figurename~\thefigure} 881 | \newenvironment{figure} 882 | {\@float{figure}} 883 | {\end@float} 884 | \newenvironment{figure*} 885 | {\@dblfloat{figure}} 886 | {\end@dblfloat} 887 | \newcounter{table} 888 | \renewcommand\thetable{\@arabic\c@table} 889 | \def\fps@table{tbp} 890 | \def\ftype@table{2} 891 | \def\ext@table{lot} 892 | \def\fnum@table{\tablename~\thetable} 893 | \newenvironment{table} 894 | {\@float{table}} 895 | {\end@float} 896 | \newenvironment{table*} 897 | {\@dblfloat{table}} 898 | {\end@dblfloat} 899 | 900 | \def \@floatboxreset {% 901 | \reset@font 902 | \small 903 | \@setnobreak 904 | \@setminipage 905 | } 906 | 907 | \newlength\abovecaptionskip 908 | \newlength\belowcaptionskip 909 | \setlength\abovecaptionskip{10\p@} 910 | \setlength\belowcaptionskip{0\p@} 911 | \newcommand\leftlegendglue{} 912 | 913 | \def\fig@type{figure} 914 | 915 | \newdimen\figcapgap\figcapgap=3pt 916 | \newdimen\tabcapgap\tabcapgap=5.5pt 917 | 918 | \@ifundefined{floatlegendstyle}{\def\floatlegendstyle{\bfseries}}{} 919 | 920 | \long\def\@caption#1[#2]#3{\par\addcontentsline{\csname 921 | ext@#1\endcsname}{#1}{\protect\numberline{\csname 922 | the#1\endcsname}{\ignorespaces #2}}\begingroup 923 | \@parboxrestore 924 | \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par 925 | \endgroup} 926 | 927 | \def\capstrut{\vrule\@width\z@\@height\topskip} 928 | 929 | \@ifundefined{captionstyle}{\def\captionstyle{\normalfont\small}}{} 930 | 931 | \long\def\@makecaption#1#2{% 932 | \captionstyle 933 | \ifx\@captype\fig@type 934 | \vskip\figcapgap 935 | \fi 936 | \setbox\@tempboxa\hbox{{\floatlegendstyle #1\floatcounterend}% 937 | \capstrut #2}% 938 | \ifdim \wd\@tempboxa >\hsize 939 | {\floatlegendstyle #1\floatcounterend}\capstrut #2\par 940 | \else 941 | \hbox to\hsize{\leftlegendglue\unhbox\@tempboxa\hfil}% 942 | \fi 943 | \ifx\@captype\fig@type\else 944 | \vskip\tabcapgap 945 | \fi} 946 | 947 | \newdimen\figgap\figgap=1cc 948 | \long\def\@makesidecaption#1#2{% 949 | \parbox[b]{\@tempdima}{\captionstyle{\floatlegendstyle 950 | #1\floatcounterend}#2}} 951 | \def\sidecaption#1\caption{% 952 | \setbox\@tempboxa=\hbox{#1\unskip}% 953 | \if@twocolumn 954 | \ifdim\hsize<\textwidth\else 955 | \ifdim\wd\@tempboxa<\columnwidth 956 | \typeout{Double column float fits into single column - 957 | ^^Jyou'd better switch the environment. }% 958 | \fi 959 | \fi 960 | \fi 961 | \@tempdima=\hsize 962 | \advance\@tempdima by-\figgap 963 | \advance\@tempdima by-\wd\@tempboxa 964 | \ifdim\@tempdima<3cm 965 | \typeout{\string\sidecaption: No sufficient room for the legend; 966 | using normal \string\caption. }% 967 | \unhbox\@tempboxa 968 | \let\@capcommand=\@caption 969 | \else 970 | \let\@capcommand=\@sidecaption 971 | \leavevmode 972 | \unhbox\@tempboxa 973 | \hfill 974 | \fi 975 | \refstepcounter\@captype 976 | \@dblarg{\@capcommand\@captype}} 977 | 978 | \long\def\@sidecaption#1[#2]#3{\addcontentsline{\csname 979 | ext@#1\endcsname}{#1}{\protect\numberline{\csname 980 | the#1\endcsname}{\ignorespaces #2}}\begingroup 981 | \@parboxrestore 982 | \@makesidecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par 983 | \endgroup} 984 | 985 | % Define `acknowledgement' environment 986 | \def\acknowledgement{\par\addvspace{17pt}\small\rmfamily 987 | \trivlist\if!\ackname!\item[]\else 988 | \item[\hskip\labelsep 989 | {\it\ackname}]\fi} 990 | \def\endacknowledgement{\endtrivlist\addvspace{6pt}} 991 | % Define `noteadd' environment 992 | \def\noteadd{\par\addvspace{17pt}\small\rmfamily 993 | \trivlist\item[\hskip\labelsep 994 | {\itshape\noteaddname}]} 995 | \def\endnoteadd{\endtrivlist\addvspace{6pt}} 996 | 997 | \DeclareOldFontCommand{\rm}{\normalfont\rmfamily}{\mathrm} 998 | \DeclareOldFontCommand{\sf}{\normalfont\sffamily}{\mathsf} 999 | \DeclareOldFontCommand{\tt}{\normalfont\ttfamily}{\mathtt} 1000 | \DeclareOldFontCommand{\bf}{\normalfont\bfseries}{\mathbf} 1001 | \DeclareOldFontCommand{\it}{\normalfont\itshape}{\mathit} 1002 | \DeclareOldFontCommand{\sl}{\normalfont\slshape}{\@nomath\sl} 1003 | \DeclareOldFontCommand{\sc}{\normalfont\scshape}{\@nomath\sc} 1004 | \DeclareRobustCommand*\cal{\@fontswitch\relax\mathcal} 1005 | \DeclareRobustCommand*\mit{\@fontswitch\relax\mathnormal} 1006 | \newcommand\@pnumwidth{1.55em} 1007 | \newcommand\@tocrmarg{2.55em} 1008 | \newcommand\@dotsep{4.5} 1009 | \setcounter{tocdepth}{1} 1010 | \newcommand\tableofcontents{% 1011 | \section*{\contentsname}% 1012 | \@starttoc{toc}% 1013 | \addtocontents{toc}{\begingroup\protect\small}% 1014 | \AtEndDocument{\addtocontents{toc}{\endgroup}}% 1015 | } 1016 | \newcommand*\l@part[2]{% 1017 | \ifnum \c@tocdepth >-2\relax 1018 | \addpenalty\@secpenalty 1019 | \addvspace{2.25em \@plus\p@}% 1020 | \begingroup 1021 | \setlength\@tempdima{3em}% 1022 | \parindent \z@ \rightskip \@pnumwidth 1023 | \parfillskip -\@pnumwidth 1024 | {\leavevmode 1025 | \large \bfseries #1\hfil \hb@xt@\@pnumwidth{\hss #2}}\par 1026 | \nobreak 1027 | \if@compatibility 1028 | \global\@nobreaktrue 1029 | \everypar{\global\@nobreakfalse\everypar{}}% 1030 | \fi 1031 | \endgroup 1032 | \fi} 1033 | \newcommand*\l@section{\@dottedtocline{1}{0pt}{1.5em}} 1034 | \newcommand*\l@subsection{\@dottedtocline{2}{1.5em}{2.3em}} 1035 | \newcommand*\l@subsubsection{\@dottedtocline{3}{3.8em}{3.2em}} 1036 | \newcommand*\l@paragraph{\@dottedtocline{4}{7.0em}{4.1em}} 1037 | \newcommand*\l@subparagraph{\@dottedtocline{5}{10em}{5em}} 1038 | \newcommand\listoffigures{% 1039 | \section*{\listfigurename 1040 | \@mkboth{\listfigurename}% 1041 | {\listfigurename}}% 1042 | \@starttoc{lof}% 1043 | } 1044 | \newcommand*\l@figure{\@dottedtocline{1}{1.5em}{2.3em}} 1045 | \newcommand\listoftables{% 1046 | \section*{\listtablename 1047 | \@mkboth{\listtablename}{\listtablename}}% 1048 | \@starttoc{lot}% 1049 | } 1050 | \let\l@table\l@figure 1051 | \newdimen\bibindent 1052 | \setlength\bibindent{\parindent} 1053 | \def\@biblabel#1{#1.} 1054 | \def\@lbibitem[#1]#2{\item[{[#1]}\hfill]\if@filesw 1055 | {\let\protect\noexpand 1056 | \immediate 1057 | \write\@auxout{\string\bibcite{#2}{#1}}}\fi\ignorespaces} 1058 | \newenvironment{thebibliography}[1] 1059 | {\section*{\refname 1060 | \@mkboth{\refname}{\refname}}\small 1061 | \list{\@biblabel{\@arabic\c@enumiv}}% 1062 | {\settowidth\labelwidth{\@biblabel{#1}}% 1063 | \leftmargin\labelwidth 1064 | \advance\leftmargin\labelsep 1065 | \@openbib@code 1066 | \usecounter{enumiv}% 1067 | \let\p@enumiv\@empty 1068 | \renewcommand\theenumiv{\@arabic\c@enumiv}}% 1069 | \sloppy\clubpenalty4000\widowpenalty4000% 1070 | \sfcode`\.\@m} 1071 | {\def\@noitemerr 1072 | {\@latex@warning{Empty `thebibliography' environment}}% 1073 | \endlist} 1074 | % 1075 | \newcount\@tempcntc 1076 | \def\@citex[#1]#2{\if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi 1077 | \@tempcnta\z@\@tempcntb\m@ne\def\@citea{}\@cite{\@for\@citeb:=#2\do 1078 | {\@ifundefined 1079 | {b@\@citeb}{\@citeo\@tempcntb\m@ne\@citea\def\@citea{,}{\bfseries 1080 | ?}\@warning 1081 | {Citation `\@citeb' on page \thepage \space undefined}}% 1082 | {\setbox\z@\hbox{\global\@tempcntc0\csname b@\@citeb\endcsname\relax}% 1083 | \ifnum\@tempcntc=\z@ \@citeo\@tempcntb\m@ne 1084 | \@citea\def\@citea{,\hskip0.1em\ignorespaces}\hbox{\csname b@\@citeb\endcsname}% 1085 | \else 1086 | \advance\@tempcntb\@ne 1087 | \ifnum\@tempcntb=\@tempcntc 1088 | \else\advance\@tempcntb\m@ne\@citeo 1089 | \@tempcnta\@tempcntc\@tempcntb\@tempcntc\fi\fi}}\@citeo}{#1}} 1090 | \def\@citeo{\ifnum\@tempcnta>\@tempcntb\else 1091 | \@citea\def\@citea{,\hskip0.1em\ignorespaces}% 1092 | \ifnum\@tempcnta=\@tempcntb\the\@tempcnta\else 1093 | {\advance\@tempcnta\@ne\ifnum\@tempcnta=\@tempcntb \else \def\@citea{--}\fi 1094 | \advance\@tempcnta\m@ne\the\@tempcnta\@citea\the\@tempcntb}\fi\fi} 1095 | % 1096 | \newcommand\newblock{\hskip .11em\@plus.33em\@minus.07em} 1097 | \let\@openbib@code\@empty 1098 | \newenvironment{theindex} 1099 | {\if@twocolumn 1100 | \@restonecolfalse 1101 | \else 1102 | \@restonecoltrue 1103 | \fi 1104 | \columnseprule \z@ 1105 | \columnsep 35\p@ 1106 | \twocolumn[\section*{\indexname}]% 1107 | \@mkboth{\indexname}{\indexname}% 1108 | \thispagestyle{plain}\parindent\z@ 1109 | \parskip\z@ \@plus .3\p@\relax 1110 | \let\item\@idxitem} 1111 | {\if@restonecol\onecolumn\else\clearpage\fi} 1112 | \newcommand\@idxitem{\par\hangindent 40\p@} 1113 | \newcommand\subitem{\@idxitem \hspace*{20\p@}} 1114 | \newcommand\subsubitem{\@idxitem \hspace*{30\p@}} 1115 | \newcommand\indexspace{\par \vskip 10\p@ \@plus5\p@ \@minus3\p@\relax} 1116 | \renewcommand\footnoterule{% 1117 | \kern-3\p@ 1118 | \hrule\@width.4\columnwidth 1119 | \kern2.6\p@} 1120 | \newcommand\@makefntext[1]{% 1121 | \noindent 1122 | \hb@xt@\bibindent{\hss\@makefnmark\enspace}#1} 1123 | % 1124 | \newcommand\contentsname{Contents} 1125 | \newcommand\listfigurename{List of Figures} 1126 | \newcommand\listtablename{List of Tables} 1127 | \newcommand\refname{References} 1128 | \newcommand\indexname{Index} 1129 | \newcommand\figurename{Fig.} 1130 | \newcommand\tablename{Table} 1131 | \newcommand\partname{Part} 1132 | \newcommand\appendixname{Appendix} 1133 | \newcommand\abstractname{Abstract\runinend} 1134 | \newcommand\ackname{Acknowledgements\runinend} 1135 | \newcommand\noteaddname{Note added in proof} 1136 | % French section 1137 | \def\ds@francais{% 1138 | \typeout{On parle francais.}% 1139 | \def\abstractname{R\'esum\'e\runinend}% 1140 | \def\ackname{Remerciements\runinend}% 1141 | \def\andname{et}% 1142 | \def\lastandname{ et}% 1143 | \def\appendixname{Appendice} 1144 | \def\chaptername{Chapitre}% 1145 | \def\claimname{Pr\'etention}% 1146 | \def\conjecturename{Hypoth\`ese}% 1147 | \def\contentsname{Table des mati\`eres}% 1148 | \def\corollaryname{Corollaire}% 1149 | \def\definitionname{D\'efinition}% 1150 | \def\examplename{Exemple}% 1151 | \def\exercisename{Exercice}% 1152 | \def\figurename{Fig.}% 1153 | \def\keywordname{{\bfseries Mots-cl\'e\runinend}} 1154 | \def\indexname{Index} 1155 | \def\lemmaname{Lemme}% 1156 | \def\contriblistname{Liste des contributeurs} 1157 | \def\listfigurename{Liste des figures}% 1158 | \def\listtablename{Liste des tables}% 1159 | \def\mailname{{\itshape Correspondence to\/}:} 1160 | \def\noteaddname{Note ajout\'ee \`a l'\'epreuve}% 1161 | \def\notename{Remarque}% 1162 | \def\partname{Partie}% 1163 | \def\problemname{Probl\`eme}% 1164 | \def\proofname{Preuve}% 1165 | \def\propertyname{Caract\'eristique}% 1166 | %\def\propositionname{Proposition}% 1167 | \def\questionname{Question}% 1168 | \def\refname{Bibliographie}% 1169 | \def\remarkname{Remarque}% 1170 | \def\seename{voyez} 1171 | \def\solutionname{Solution}% 1172 | %\def\subclassname{{\it Subject Classifications\/}:} 1173 | \def\tablename{Tableau}% 1174 | \def\theoremname{Th\'eor\`eme}% 1175 | } 1176 | % 1177 | % German section 1178 | \def\ds@deutsch{\typeout{Man spricht deutsch.}% 1179 | \def\abstractname{Zusammenfassung\runinend}% 1180 | \def\ackname{Danksagung\runinend}% 1181 | \def\andname{und}% 1182 | \def\lastandname{ und}% 1183 | \def\appendixname{Anhang}% 1184 | \def\chaptername{Kapitel}% 1185 | \def\claimname{Behauptung}% 1186 | \def\conjecturename{Hypothese}% 1187 | \def\contentsname{Inhaltsverzeichnis}% 1188 | \def\corollaryname{Korollar}% 1189 | %\def\definitionname{Definition}% 1190 | \def\examplename{Beispiel}% 1191 | \def\exercisename{\"Ubung}% 1192 | \def\figurename{Abb.}% 1193 | \def\keywordname{{\bfseries Schl\"usselw\"orter\runinend}} 1194 | \def\indexname{Index} 1195 | %\def\lemmaname{Lemma}% 1196 | \def\contriblistname{Mitarbeiter} 1197 | \def\listfigurename{Abbildungsverzeichnis}% 1198 | \def\listtablename{Tabellenverzeichnis}% 1199 | \def\mailname{{\itshape Correspondence to\/}:} 1200 | \def\noteaddname{Nachtrag}% 1201 | \def\notename{Anmerkung}% 1202 | \def\partname{Teil}% 1203 | %\def\problemname{Problem}% 1204 | \def\proofname{Beweis}% 1205 | \def\propertyname{Eigenschaft}% 1206 | %\def\propositionname{Proposition}% 1207 | \def\questionname{Frage}% 1208 | \def\refname{Literatur}% 1209 | \def\remarkname{Anmerkung}% 1210 | \def\seename{siehe} 1211 | \def\solutionname{L\"osung}% 1212 | %\def\subclassname{{\it Subject Classifications\/}:} 1213 | \def\tablename{Tabelle}% 1214 | %\def\theoremname{Theorem}% 1215 | } 1216 | \AtBeginDocument{\switch@texts} 1217 | \newcommand\today{} 1218 | \edef\today{\ifcase\month\or 1219 | January\or February\or March\or April\or May\or June\or 1220 | July\or August\or September\or October\or November\or December\fi 1221 | \space\number\day, \number\year} 1222 | \setlength\columnsep{1.5cc} 1223 | \setlength\columnseprule{0\p@} 1224 | % 1225 | \frenchspacing 1226 | \clubpenalty=10000 1227 | \widowpenalty=10000 1228 | \def\thisbottomragged{\def\@textbottom{\vskip\z@ plus.0001fil 1229 | \global\let\@textbottom\relax}} 1230 | \pagestyle{headings} 1231 | \pagenumbering{arabic} 1232 | \if@twocolumn 1233 | \twocolumn 1234 | \fi 1235 | \if@referee 1236 | \makereferee 1237 | \fi 1238 | \flushbottom 1239 | \endinput 1240 | %% 1241 | %% End of file `svjour.cls'. 1242 | --------------------------------------------------------------------------------