Debian Codegraph @

texmf-dist/doc/latex/gb4e-next/gb4e-next.tex

raw
1 % !TEX TS-program = lualatexmk
2 \def\gbnextversion{0.5}
3 \def\gbnextdate{October 27, 2024}
4 \documentclass[11pt]{article}
5 \title{\textbf{The \textsf{gb4e-next} package}}
6 \author{\textbf{Alan Munn}\\Department of Linguistics, Languages, and Cultures\\Michigan State University\\\texttt{\href{mailto:[email protected]}{[email protected]}}}
7 \date{Version \gbnextversion\\\gbnextdate}
8 \usepackage[margin=.5in,includefoot]{geometry}
9 \usepackage{fontspec}
10 \setmonofont[Scale=MatchLowercase]{DejaVu Sans Mono}
11 \usepackage{titling}
12 \usepackage{array, booktabs, multicol, fancyhdr, xspace,tabularx}
13 \usepackage{enumitem}
14 \usepackage{fancyvrb,listings,url}
15 \usepackage[sf,compact]{titlesec}
16 \usepackage[colorlinks=true]{hyperref}
17
18
19 \DefineShortVerb{\|}
20 \newcommand*\bs{\textbackslash}
21
22
23 \lstset{%
24 basicstyle=\ttfamily\small,
25 commentstyle=\itshape\ttfamily\small,
26 keywordstyle={},
27 showspaces=false,
28 showstringspaces=false,
29 breaklines=true,
30 breakautoindent=true,
31 breakindent=1em,
32 xrightmargin=2.5em,
33 captionpos=t,
34 frame=tl,
35 language=TeX,
36 }
37
38 \newcommand*{\pkg}[1]{\texttt{#1}\xspace}
39 \setitemize[1]{label={}}
40 \setitemize[2]{label={}}
41 \setdescription{font={\normalfont}}
42 \setlength{\droptitle}{-1in}
43
44 \lhead{}
45 \chead{}
46 \rhead{}
47 \lfoot{\emph{}}
48 \cfoot{\thepage}
49 \rfoot{}
50 \renewcommand{\headrulewidth}{0pt}
51 \renewcommand{\footrulewidth}{0pt}
52 \pagestyle{fancy}
53
54
55 \begin{document}
56 \maketitle
57 \thispagestyle{empty}
58 \renewcommand{\abstractname}{\sffamily Abstract}
59 \abstract{\noindent\begin{quote}This package provides relative example referencing commands |\Next| and |\Prev| to \pkg{gb4e} users.\end{quote}}
60
61 \section{Package usage}
62 Usage of the package is simple: simply load it alongside \pkg{gb4e}. The commands |\Next| which refers to the next example in the text and |\Prev| which refers to the previous example in the text, will then be made available.
63 \subsection{Package options}
64 The package has a single key-value option |fn| to specify the default format for the commands when used inside a footnote. The \pkg{gb4e} package defaults to arabic numbering of examples in footnotes unless the |{xlisti}| environment is explicitly used. Since the package can’t know this, you need to specify the default format for relative reference inside a footnote. Possible values are |arabic| (default), |roman|, |Roman|, |alph|, and |Alph|. The most likely choice in most cases will be either the default or |roman|.
65 \subsection{Package commands}
66 The package provides two commands: |\Next[<format>]| which refers to the next example and |\Prev[<format>]| which refers to the previous example. The optional |[<format>]| argument allows you to specify a specific format for the number. Possible values are |arabic|, |roman|, |Roman|, |alph|, and |Alph|. The most likely choice in most cases will be either the default or |roman|. If you have specified a format for the |fn| option, this will be used automatically, so there will usually be no need for the optional argument.
67 \section{Example}
68 Here’s an example of how to use the package:
69
70 \begin{quote}
71 \begin{lstlisting}
72 \documentclass{article}
73 \usepackage{gb4e}
74 \usepackage[fn=roman]{gb4e-next}
75 \begin{document}
76 This is the reference to example \Next.
77 \begin{exe}
78 \ex An example
79 \end{exe}
80
81 This is reference to example \Next.
82
83 \begin{exe}
84 \ex Another example
85 \end{exe}
86 This contains a footnote\footnote{This is a footnote with an example. We can refer to it as \Next. \begin{xlisti}\ex A footnote example\end{xlisti}} And this is a reference to the previous example: \Prev
87 \end{document}
88 \end{lstlisting}
89 \end{quote}
90
91
92 \section{Bugs and support}
93 This is \emph{experimental} and has not been extensively tested. Use at your own risk. You're welcome to raise issues at the \href{https://github.com/amunn/gb4e-next}{GitHub repository}, however.
94 \section{Version history}
95 This is the initial version of the package (0.5).
96
97 \end{document}