#! /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: \usepackage[a4paper,hscale=0.75, vscale=0.75, vcentering,hcentering]{geometry}
#+LATEX_HEADER: \pagestyle{empty}
#+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"
    ] = """<!DOCTYPE html>
<html lang="en">
<head>
<meta name=viewport content="width=device-width,initial-scale=1">
<meta charset=utf-8>
<title>
"""
    ###########################################################################
    texts[
        "htmlhead2"
    ] = """</title>
</head>
<body style="max-width:1024px;margin-top:10px;margin-left:auto;margin-right:auto;margin-bottom:auto">
<div style="background:lightcyan;text-align:justify;border-style:solid;border-width:1px;padding:2px">
"""
    ###########################################################################
    texts["htmlfoot"] = "</div>\n</body>\n</html>"
    ###########################################################################
    texts[
        "latextemplate"
    ] = r"""\documentclass[11pt]{article}
\usepackage[a4paper,hscale=0.75,vscale=0.75,vcentering,hcentering]{geometry}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[mathjax]{lwarp}
\usepackage[all]{nowidow}
\usepackage[x11names]{xcolor}
\setcounter{secnumdepth}{0}
\usepackage{graphicx}
\usepackage{grffile}
\usepackage{longtable}
\usepackage{wrapfig}
\usepackage{rotating}
\usepackage[normalem]{ulem}
\usepackage{soul}
\usepackage{amsmath}
\usepackage{textcomp}
\usepackage{amssymb}
\usepackage{capt-of}
\usepackage{hyperref}
\pagestyle{empty}
\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. Here is some +strikethrough+. 

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~, ~&zwnj;~).

~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
