Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: scmbradley/draftinputlines
base: d875f03683
head fork: scmbradley/draftinputlines
compare: 5c898e955c
Checking mergeability… Don't worry, you can still create the pull request.
  • 2 commits
  • 3 files changed
  • 0 commit comments
  • 1 contributor
Showing with 107 additions and 21 deletions.
  1. +85 −8 draftinputlines-man.tex
  2. +21 −12 draftinputlines.sty
  3. +1 −1  inputfile.tex
93 draftinputlines-man.tex
@@ -6,12 +6,30 @@
+ basicstyle=\ttfamily,
+ commentstyle=\itshape\ttfamily\small,
+ showspaces=false,
+ showstringspaces=false,
+ breaklines=true,
+ breakautoindent=true,
+ captionpos=t,
+ frame=single,
+ escapeinside={(*}{*)},
+% \xdef\thefilename{\currfilename}
+% \chead{\texttt{\thefilename}\xdef\thefilename{\currfilename}}
+% \cfoot{\texttt{\currfilename}}
@@ -30,16 +48,75 @@ \section{Introduction}
This should be rare since floats should have their own space.
+Here are the options that are currently defined and a description of
+what they do.
+This sets what package is used to do the headers and footers.
+Set it to whatever is setting the headers and footers in your
+The options are:
+\item[scrpage] Uses KOMA script's |scrpage2|
+\item[fancyhdr] Uses |fancyhdr|
+\item[memoir] Uses |memoir|. Awkwardly, given the way |memoir|'s
+ header and footer mechanisms work, this will overwrite any current
+ headers you have set.
+ So this just sets a page number somewhere where it isn't setting an
+ input line number.
+ If you want to add the input line number to your existing headers
+ instead, you can do that with these two macros:
+ \textsc{These macros don't exist yet.
+ When I make memoir work, I will fix this.}
+ \item[plain] Use the plain TeX macros.
+This defines what font the input line numbers will appear in.
+The default is |\ttfamily|.
+This option takes a list of environment names.
+Those environments listed will then print the line number where they
+The following is a list of Boolean (true/false) options and what they
+\item[sectionline] Determines whether each section will print the line
+ it is printed on.
+\item[captionline] Determines whether captions to figures, tables and
+ so on, will print their input line number.
+ I expect this will break with subcaptions.
+ These marginpars don't float.
+\item[inputfloatname] Prints the name of the file the float is from.
+ If |captionline| is false, this has no effect.
+\item[dilbasicenvlines] This basically passes a bunch of basic
+ environments to |environmentline|, namely:
+ |itemize,enumerate,description,quote,displaymath,equation,equation*,quotation,verse,abstract,flushleft,center,flushright,eqnarry,minipage|
+\item[dilamsmathenvlines] Like |dilbasicenvlines| this makes some
+ |amsmath| environments print their input line numbers.
+ For now it only actually does this for |align| and |align*|.
+ Most of the other environments are supposed to be use \emph{inside}
+ another mathmode environment, and so the outer mathmode
+ environment's start should give enough of an indication of where
+ this environment is.
+\item[dilinputfiles] Prints the name and input line number of files
+ included with |\input| and |\include|.
+\item[dilinputfilesrule] Prints rules above the start and below the
+ end of an included file, so it's obvious where in the page it starts
+ and ends.
+ If |dilinputfiles| is false, this doesn't do anything.
33 draftinputlines.sty
@@ -72,6 +72,8 @@
% The actual keys
+% Here is a terribly messy looking way of doing what I want:
% \define@choicekey{dilfamily}{inputlineshead}[\val\nr]{%
% inside,outside,center,left,right,off}{%
% \AtEndPreamble{
@@ -109,6 +111,8 @@
% }
% }
+% Here's a much neater way of doing it:
\AtEndPreamble{\csname dil@#1head\endcsname}%
@@ -118,22 +122,21 @@
\AtEndPreamble{\csname dil@#1foot\endcsname}%
+% Other input line numbers
-% Package option for user coloured linenumbers?
-% % Package option that loads showkeys?
-% \RequirePackage{showkeys}
% Here comes the meat of the functionality
+% % Package option for user coloured linenumbers?
+% \RequirePackage{xcolor}
+% \newcommand\useraddlineno{\dilmnote{\textcolor{red}{\the\inputlineno}}}
@@ -163,11 +166,15 @@
- % inputlineshead=outside,
- % inputlinesfoot=outside,
+ inputlineshead=outside,
+ inputlinesfoot=outside,
+% Here comes the options
@@ -258,11 +265,13 @@
\ifKV@dilfamily@inputfloatname\currfilename: \fi%
@@ -270,6 +279,7 @@
@@ -290,7 +300,6 @@
\AtEndOfIncludes{\dilmnote{End of \texttt{\currfilename}}}
2  inputfile.tex
@@ -5,7 +5,7 @@
\item Two
\item Three
\item One
\item Two

No commit comments for this range

Something went wrong with that request. Please try again.