-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmacros.tex
More file actions
80 lines (66 loc) · 2.8 KB
/
macros.tex
File metadata and controls
80 lines (66 loc) · 2.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
\usepackage{latexsym}
\usepackage{makeidx}
\usepackage{amssymb}
%\usepackage{url}
\usepackage{program-text}
\usepackage{color}
\usepackage{a4}
\usepackage{graphicx}
\usepackage{ifthen}
\usepackage{xspace}
\begin{pdfversion}
\usepackage[all]{xy}
\end{pdfversion}
\input{browseurl}
%%% ------------------------------------------------------------------
\usepackage[colorlinks,linkcolor=blue]{hyperref}
%\usepackage[]{hyperref}
\hypersetup{bookmarksopen=true}
\hypersetup{bookmarksopenlevel=0}
\hypersetup{pdftitle={Curry: A Tutorial Introduction}}
\hypersetup{pdfauthor={S. Antoy and M. Hanus}}
\hypersetup{pdfstartview=FitH}
%%% ------------------------------------------------------------------
\setlength{\textwidth}{15.5cm}
\setlength{\textheight}{23cm}
\renewcommand{\baselinestretch}{1.1}
\setlength{\topmargin}{-1cm}
\setlength{\oddsidemargin}{0.5cm}
\setlength{\evensidemargin}{0.5cm}
\setlength{\marginparwidth}{0.0cm}
\setlength{\marginparsep}{0.0cm}
\newlength{\figurewidth}
\setlength{\figurewidth}{\textwidth}
\addtolength{\figurewidth}{-0.4cm}
% base URL for downloading programs:
\def\baseurl{https://www.curry-lang.org/docs/tutorial/}
% reference to a program in the PROGRAMS directory:
\newcommand{\globalproghref}[2]{\href{\baseurl PROGRAMS/#1.pdf}{#2}}
\newcommand{\downloadref}[2]{\href{\baseurl PROGRAMS/chapter\thechapter/#1.curry}{[Download #2]}}
% reference to a program for the current chapter in the PROGRAMS directory:
%\newcommand{\proghref}[2]{\globalproghref{chapter\thechapter/#1}{[#2]}}
\newcommand{\proghref}[2]{\progbrowseurl{chapter\thechapter/#1.curry}{[Browse #2]}\downloadref{#1}{#2}}
\newcommand{\todo}[1]{{\color{red}\sc [{#1}]}}
\newcommand{\define}[1]{\emph{#1}\index{#1}} % definition of a new notion
\newcommand{\definei}[2]{\emph{#1}\index{#2}} % definition of a new notion
\newcommand{\pindex}[1]{\index{#1@{\tt #1}}} % program elements in index
% allow underscores in programs:
\catcode`\_=\active
\let_=\sb
\catcode`\_=12
% ------------------------------------------------------------------
%%% Next should be relative to the current document rather than absolute
%\hyperbaseurl{file:/home/mh/papers/tutorial/}
\newtheorem{rmexercise}{Exercise}
\newenvironment{exercise}{\begin{rmexercise}\rm}{\end{rmexercise}}
% ------------------------------------------------------------------
% ------------------------------------------------------------------
\newcommand{\curryurl}{https://www.curry-lang.org}
\newcommand{\curryref}{\href{\curryurl}{Curry}}
\newcommand{\pakcs}%
{\href{https://www.curry-lang.org/pakcs}{{\sc PAKCS}}\xspace}
\newcommand{\kics}%
{\href{https://www.curry-lang.org/kics2}{{\sc KiCS2}}\xspace}
\newcommand{\cpm}{\href{https://curry-lang.org/tools/cpm}{CPM}\xspace}
\newcommand{\wwwc}{\href{https://www.w3c.org}{W3C}}
% ------------------------------------------------------------------