Is there any convenient packages to typeset "in text" notes? I mean,
they are like footnotes, but instead of staying at the bottom, they
immediately follow the relevant paragraph in the text body, in
footnote size and increased left/right margins. And there is no need
for numbers like footnote numbers.
I read somewhere that it is European style. I know I can use text
boxes, but I don't know proper typography to set the proper
parameters.
thanking in advance
Ven. Pandita
I don't whether there's a package to do so. But that doesn't seem very
complicated.
\makeatletter
\def\intext#1{%
\expandafter\def\expandafter\@intext{%
\@intext
% Here you add whatever you want between notes.
#1%
}
\def\par{%
\endgraf
\bgroup
\footnotesize% Or any other font-changing command
\leftskip\myskip
\rightskip\myskip
\@intext
\endgraf
\egroup
\def\@intext{}%
}
\def\@intext{}
\newskip\myskip
\myskip=1cm % Or any other length, that's up to you
\makeatother
Now you can say:
"Bla bla bla\intext{Hello.} bla bla bla..."
and it will typeset:
Bla bla bla bla bla bla...
Hello
What I've just done seems very crude to me, but that's what I've
understood from your description. The main drawback is if \par gets
redefined by some other package.
Best,
Paul
I've never heard of that style or seen it (and I live in Europe).
Can you point at a book that does this?
It should be fairly straightforward to capture the text in notes and
emit it under control of \everypar, but that also gets used by a lot of
packages, so there may be a more reliable way to do it.
///Peter
But I get the following error:
#1->\expandafter \def \expandafter \@intext {\@intext #1} \def \par
{\ETC.
! File ended while scanning definition of \intext.
I have copied the code verbatim, I don't know what has gone wrong.
Regards
Ven. Pandita
> > Is there any convenient packages to typeset "in text" notes? I mean,
> > they are like footnotes, but instead of staying at the bottom, they
> > immediately follow the relevant paragraph in the text body, in
> > footnote size and increased left/right margins. And there is no need
> > for numbers like footnote numbers.
>
> > I read somewhere that it is European style. I know I can use text
> > boxes, but I don't know proper typography to set the proper
> > parameters.
> I've never heard of that style or seen it (and I live in Europe).
> Can you point at a book that does this?
The 5th edition of "Sanskrit Grammar" by William Dwight Whitney was
published in (1924) at Leipzig. What I have got is a photographic
reprint published in India. In this book,
1. Every paragraph in normal text body is numbered with arabic
numerals,
2. Each paragraph is followed by a single unnumbered note or notes
numbered "a, b, c, d" etc.
3. All such notes have footnotesize fonts.
Cheers
Ven. Pandita
ah, in grammars. sure i see it in some of my (older) greek and latin
grammars, but this is a unique type of book, not a common 'style' (i
don't think). grammars of course have numbered paragraphs (for cross-
reference purposes), and i suppose having the notes follow the regular
text makes sense because the paragraphs are short and the layouts
often so complicated that real footnotes would make things even more
of a mess --- though some certainly have footnotes (as well).
the only other context where i see anything remotely similar though,
are critical editions which are made up of short snippets of text,
logically distinct from the other snippets, and where you need your
apparatus criticus and/or apparatus fontium. then the two apparatus
must be kept with the main text, not all run together at the bottom of
the page. i think ledmac or ednotes would be what you wanted in this
situation, though i don't remember if they do this easily.
cheers,
jon.
Of course. I forgot a right brace. Here's the good code:
\makeatletter
\def\intext#1{%
\expandafter\def\expandafter\@intext{%
\@intext
% Here you add whatever you want between notes.
#1%
}%
}
\def\par{%
\endgraf
\bgroup
\footnotesize% Or any other font-changing command
\leftskip\myskip
\rightskip\myskip
\@intext
\endgraf
\egroup
\def\@intext{}%
}
\def\@intext{}
\newskip\myskip
\myskip=1cm % Or any other length, that's up to you
\makeatother
Paul
itym
\expandafter\def\expandafter\@intext\expandafter{%
> \@intext
>% Here you add whatever you want between notes.
(notably a line break)
> #1%
> }%
> }
>\def\par{%
> \endgraf
> \bgroup
> \footnotesize% Or any other font-changing command
> \leftskip\myskip
> \rightskip\myskip
> \@intext
> \endgraf
> \egroup
> \def\@intext{}%
> }
>\def\@intext{}
>\newskip\myskip
>\myskip=1cm % Or any other length, that's up to you
>\makeatother
which of course omits numbering the notes.
--
Robin Fairbairns, Cambridge
Thank you, that's a very useful reference. It's certainly not a common
style, but perhaps it is conventional in that discipline. If you end up
making a working style for this, perhaps you would consider publishing
it to CTAN so that others can use it?
///Peter
I've been drinking too much, apparently. Robin signals
> > \expandafter\def\expandafter\@intext{%
>
> itym
>
> \expandafter\def\expandafter\@intext\expandafter{%
which is so stupid an error that shame barely allows me to write
again. I flagellate myself and gives you the definitive code (I hope
so):
\makeatletter
\def\intext#1{%
\expandafter\def\expandafter\@intext\expandafter{%
\@intext
% Here you add whatever you want between notes.
#1%
}%
}
\def\par{%
\endgraf
\bgroup
\footnotesize% Or any other font-changing command
\leftskip\myskip
\rightskip\myskip
\@intext
\endgraf
\egroup
\def\@intext{}%
}
\def\@intext{}
\newskip\myskip
\myskip=1cm % Or any other length, that's up to you
\makeatother
Robin also signals line break and numbering, but It seems to me that
you didn't want them.
I have a question: if there's no formal connection (e.g. footnote
number) between the main text and the footnote, why not simply write
the note after the paragraph with some special formatting? Of course
you'd loose the "implicit" connection (and any possibility to create
an explicit one if you change your mind and want to add numbers, for
instance), but that'd be definitely simpler and there'd be no need to
hack the \par command.
Paul
> ah, in grammars. sure i see it in some of my (older) greek and latin
> grammars, but this is a unique type of book, not a common 'style' (i
> don't think). grammars of course have numbered paragraphs (for cross-
> reference purposes), and i suppose having the notes follow the regular
> text makes sense because the paragraphs are short and the layouts
> often so complicated that real footnotes would make things even more
> of a mess --- though some certainly have footnotes (as well).
>
> the only other context where i see anything remotely similar though,
> are critical editions which are made up of short snippets of text,
> logically distinct from the other snippets, and where you need your
> apparatus criticus and/or apparatus fontium. then the two apparatus
> must be kept with the main text, not all run together at the bottom of
> the page. i think ledmac or ednotes would be what you wanted in this
> situation, though i don't remember if they do this easily.
One modern non-grammatical sample is "Design of Everyday Things" (2nd
edition, 2002) by Donald Norman, the usability guru. In that book,
notes are given in italic type immediately following the relevant
paragraphs of the main text body. The author himself said that he had
to use such a format because the publisher did not permit proper
footnotes (235). As for us, who have been used to italic shape
representing emphasis, his notes are really distracting. I think
footnote-sized text, and probably increased left and right indents,
can be much better instead.
> \makeatletter
> \def\intext#1{%
> \expandafter\def\expandafter\@intext\expandafter{%
> \@intext
> % Here you add whatever you want between notes.
> #1%
> }%
> }
> \def\par{%
> \endgraf
> \bgroup
> \footnotesize% Or any other font-changing command
> \leftskip\myskip
> \rightskip\myskip
> \@intext
> \endgraf
> \egroup
> \def\@intext{}%
> }
> \def\@intext{}
> \newskip\myskip
> \myskip=1cm % Or any other length, that's up to you
> \makeatother
Thanks, it seems to be working now.
> I have a question: if there's no formal connection (e.g. footnote
> number) between the main text and the footnote, why not simply write
> the note after the paragraph with some special formatting? Of course
> you'd loose the "implicit" connection (and any possibility to create
> an explicit one if you change your mind and want to add numbers, for
> instance), but that'd be definitely simpler and there'd be no need to
> hack the \par command.
Well, if paragraphs are numbered in, say, arabic numerals, notes
should have its own set of, say, alphabetic numerals so that I can
refer to particular notes as 12A, 34C, etc. It is not possible to do
so with parano style.
And it should be possible to increase the left and right margins of
notes to make them smaller in width than the text body.
But I don't know whether it would be necessary to hack the \par
command or not to fulfil these requirements.
Cheers
Ven. Pandita
If you don't want the notes to be marked in the main text, that is
very easy, and there's no need to hack \par. I suppose you want
something like this:
45. Some say that Panini already used what structuralists would call
minimal pairs 25 centuries later...
... end of paragraph on Panini.
A. First note.
B. Second note.
C. Third note...
Then you can write:
\makeatletter
\newcount\parcount
\newcount\notecount
% This numbers paragraphs.
\def\numberpar{%
\advance\parcount1
\notecount0
\the\parcount.
}
\newskip\marginskip \marginskip=1cm % Increase of left and right
margins
\def\note{%
\advance\notecount1
\@ifnextchar[%
{\refnote}%
{\makenote}%
}
\def\refnote[#1]{%
\bgroup
\def\@currentlabel{\the\parcount\@Alph\notecount}%
\label{#1}%
\egroup
\makenote
}
\def\makenote#1{%
\bgroup
\everypar={}%
\par
\leftskip\marginskip
\rightskip\marginskip
\footnotesize
% \noindent% Uncomment this if you don't want notes to be indented.
\@Alph\notecount.~#1%
\egroup
}
\makeatother
Now, just AFTER your "\begin{document}" (you're using LaTeX, huh?) say
"\everypar={\numberpar}". And now you can write
Some say that Panini already used what structuralists would call
minimal pairs 25 centuries later...
... end of paragraph on Panini.
\note{First note.}
\note[mylabel]{Second note.}
\note{In note \ref{mylabel}, we have seen that...}
If you want notes in a row (instead of starting a new paragraph),
that'll take a little more work, but not much.
Paul
... anything that doesn't involve anything complicated using latex.
long ago (early 90s) i spent some time working on a paragraph-
numbering package for a colleague, who wanted to produce "expert
opinions" for court cases[*].
i eventually got it working for his (basically trivial) documents, but
it was fragile in the face of all sorts of latex usage.
>Some say that Panini already used what structuralists would call
>minimal pairs 25 centuries later...
>... end of paragraph on Panini.
>\note{First note.}
>\note[mylabel]{Second note.}
>\note{In note \ref{mylabel}, we have seen that...}
>
>If you want notes in a row (instead of starting a new paragraph),
>that'll take a little more work, but not much.
this is all well and good, but you *cannot* assume that \everypar is
stable, in all latex situations. for example, \@afterheading
redefines it to code which sets \everypar{} -- so section headings,
etc., are out for your na\"\ive code. lots of things stomped on my
original trivial code.
my numberpar.sty escaped to the internet (i had definitely not
published it), and long after i had lost my own copy, someone sent it
back to me after asking me for help with it (iirc). it worked in
simple cases, but was never good enough (i thought) for anyone outside
the building to use. but people did...
[*] one particularly nice "expert" opinion he had to refute came from
a bank witness, who said "the program is written in assembler, so
can't possibly have bugs in it".
--
Robin Fairbairns, Cambridge
I had (boldly? naïvely? ignorantly?) assumed that \everypar was stable
by default. I'd thought about a more stringent approach like:
\main Some say Panini...
\note{Note one...}
which would be markup all the way down, but quite a pain in the
inferior region of the back. However, do traditional (all) grammars
have a one-to-one relationship between "semantic" paragraphs
(indicated by numbers) and formal ones (i.e. typographic paragraphs)?
If they don't, i.e. if they do things like
15. Some say Panini used
minimal pairs in his study of...
Still in §15, semantically
speaking, although not typo-
graphically.
then my first approach is totally wrong anyway, because \everypar
would be a nuisance here.
So, back to Pandita. To make my previous approach work, you can issue
\numberpar at the beginning of each main paragraph. You shouldn't say
"\everypar={\numberpar}" anymore after "\begin{document}". (And you
can suppress the second line of the \makenote definition, i.e.
"\everypar={}", but if you don't it's harmless.)
Or: You can write your own class, which would be the best solution.
Not the simplest one, though.
Or: Maybe you can ask Robin to introduce us to his numberpar package,
or even publish it on CTAN. I'm sure he knows how to do so...?
Or: I'm just thinking you can also use my own easylist package (twice
in a row that I recommend it (I swear I've no MBA)); however, right
margins can't be increased (well, they can, but that's not implemented
in the package; I should do it).
Paul
> So, back to Pandita. To make my previous approach work, you can issue
> \numberpar at the beginning of each main paragraph. You shouldn't say
> "\everypar={\numberpar}" anymore after "\begin{document}". (And you
> can suppress the second line of the \makenote definition, i.e.
> "\everypar={}", but if you don't it's harmless.)
Well, I have tried it and it is working beautifully. I am really
stunned by the fact that a few lines of code (even though I cannot
absolutely make sense of it) can make out what I want. This is why I
love LaTeX. However, notes still have the same width as main
paragraphs. In other words, their left and right margins are not yet
increased.
> Or: You can write your own class, which would be the best solution.
> Not the simplest one, though.
I must admit I don't have the ability to do that.
> Or: I'm just thinking you can also use my own easylist package (twice
> in a row that I recommend it (I swear I've no MBA)); however, right
> margins can't be increased (well, they can, but that's not implemented
> in the package; I should do it).
I will look into it, and I would be much obliged if I can make similar
feature requests now and then while using the package.
Cheers
Ven. Pandita
Because I've made one more mistake. The proper definition for
\makenote is:
\def\makenote#1{%
\bgroup
\par
\leftskip\marginskip
\rightskip\marginskip
\footnotesize
% \noindent% Uncomment this if you don't want notes to be indented.
\@Alph\notecount.~#1\par
\egroup
}
The \par after #1, is important: it's what makes TeX create a
paragraph; with the previous definition, a paragraph was created
(because a \par always shows up) but outside the group (closed with
\egroup in the definition), and so without the \leftskip and
\rightskip specifications.
> > Or: I'm just thinking you can also use my own easylist package (twice
> > in a row that I recommend it (I swear I've no MBA)); however, right
> > margins can't be increased (well, they can, but that's not implemented
> > in the package; I should do it).
>
> I will look into it, and I would be much obliged if I can make similar
> feature requests now and then while using the package.
Of course you can.
Best,
Paul
I am trying to use easylist to number paragraphs in my paper now.
There is one point that I don't know how to deal with.
1. blah blah blah
1.1. blah blah blah
1.1.1. blah blah blah
1.1.2. blah blah blah
The text here is actually a continuation of 1.1, so it cannot be 1.1.3
nor 1.2. If I keep it without numbers it would appear like 1, not
like 1.1.
1. 2. blah blah blah
How should I format it?
Thanking in advance
Ven. Pandita