#! /usr/bin/env python3 """provides texts for orgnote.py""" def orgtexts(): texts = {} ########################################################################### texts[ "usage" ] = """ "orgnote.py dir name" creates dir/name.org. "orgnote . name" creates name.org in the current directory. A Makefile and .tmp directory are also created. The .tmp directory contains a setup file and some file fragments needed while generating some of the formats. Existing files WILL be clobbered. Just typing "make" will show all options available in the Makefile. "make sample" replaces the current .org file with a sample file showing examples of markup. """ ########################################################################### texts[ "setup" ] = r"""#+OPTIONS: toc:nil #+OPTIONS: num:nil #+OPTIONS: ^:{} #+OPTIONS: ':t #+OPTIONS: author:nil #+LANGUAGE: en #+LATEX_HEADER: \pagestyle{empty} #+LATEX_HEADER: \usepackage[a4paper,hscale=0.75, vscale=0.75, vcentering,hcentering]{geometry} #+LATEX_HEADER: \usepackage[x11names]{xcolor} #+LATEX_HEADER: \hypersetup{linktoc=all,colorlinks=true, urlcolor=DodgerBlue4,citecolor=PaleGreen1, linkcolor=black} #+LATEX_HEADER: \usepackage[utf8]{inputenc} #+LATEX_HEADER: \usepackage{fontspec} #+LATEX_HEADER: \usepackage{textcomp} #+LATEX_HEADER: \setmainfont{STIX Two Text} #+LATEX_HEADER: \setlength\parindent{0pt} #+LATEX_HEADER: \setlength{\parskip}{7pt plus 1pt minus 1pt} # To stop interpretation of `*' or `_' etc" # use a zero width non joiner (ZWNJ) after the `*' or `_' as described at # To insert in emacs: C-x 8 RET 200c RET" # see also: https://en.wikipedia.org/wiki/Zero-width_non-joiner # like this... " # """ ########################################################################### texts[ "htmlhead1" ] = """ """ ########################################################################### texts[ "htmlhead2" ] = """
""" ########################################################################### texts["htmlfoot"] = "
\n\n" ########################################################################### texts[ "latextemplate" ] = r"""\documentclass[11pt]{article} \setcounter{secnumdepth}{0} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{graphicx} \usepackage{grffile} \usepackage{longtable} \usepackage{wrapfig} \usepackage{rotating} \usepackage[normalem]{ulem} \usepackage{amsmath} \usepackage{textcomp} \usepackage{amssymb} \usepackage{capt-of} \usepackage{hyperref} \pagestyle{empty} \usepackage[a4paper,hscale=0.75,vscale=0.75,vcentering,hcentering]{geometry} \usepackage[x11names]{xcolor} \hypersetup{linktoc=all,colorlinks=true,urlcolor=DodgerBlue4,citecolor=PaleGreen1,linkcolor=black} \usepackage{fontspec} \usepackage{textcomp} \setmainfont{STIX Two Text} \setlength\parindent{0pt} \setlength{\parskip}{7pt plus 1pt minus 1pt} \author{Roger Whittaker} \date{\today} \title{$title$} \providecommand{\tightlist}{% \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}} \hypersetup{ pdfauthor={orgnote.py (Roger Whittaker)}, pdftitle={}, pdfkeywords={}, pdfsubject={}, pdfcreator={pandoc / LaTeX / lualatex}, pdflang={English}} \begin{document} $body$ \end{document}""" ########################################################################### texts[ "sample" ] = """#+SETUPFILE: .tmp/sample.setup * Sample file for orgnote ** Heading level 2 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. Here is some ~monotype~ text. Here is some *bold* text. Here is some /italic/ text. And here is some +strikethrough text+. Here is a naked url: http://www.opensuse.org. Here is a url with description [[http://www.opensuse.org][openSUSE web site]]. ~a_{1}~ produces \\\\ a_{1} ~a^{2}~ produces \\\\ a^{2} Sometimes we might want ~_~ and ~*~ not to be interpreted. In the below examples, ~|~ represents a zero-width-non-joiner character (~U+200c~, ~‌~). ~a_|b~ produces \\\\ a_‌b ~*|notbold*|~ produces \\\\ *‌notbold*‌ (Unfortunately this fails in the ~adochtml~ target: extra editing needed.) *** Heading level 3 - item 1 - item 2 Some source code below: #+BEGIN_SRC if len(argv) != 3 or (len(argv) == 2 and argv[1] == "-h"): print(USAGE) exit() (DN, FN) = (argv[1], argv[2]) #+END_SRC """ ########################################################################### return texts