ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Aditya Mahajan <adityam@umich.edu>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: How to read sources? (was:) Footnotes
Date: Mon, 21 Jul 2008 12:59:18 -0400 (EDT)	[thread overview]
Message-ID: <alpine.DEB.1.00.0807211241450.26483@nqv-yncgbc> (raw)
In-Reply-To: <09F122A4-CDB1-4045-9741-F7476C03C30B@jpberlin.de>

On Mon, 21 Jul 2008, Joachim Kreimer-de Fries wrote:

> Goden Dag,
> although my primary field of ConTeXt questions is marginal notes, I use to 
> read the "footnote" threads on NTG-context with curiousness as well .
>
> Am 20.07.2008 um 19:50 schrieb Aditya Mahajan:
>> When the manual is inadequate, I look at the sources.
>
> => Which sorces, wich directory and kind of files are meant, if one says 
> "look at the source", where do I find them? (On my TeX-life distribution on 
> Mac OSX 10.4x Tiger with actualized ConTeXt I didn't find the later mentioned 
> "core-not.tex")


I do not know how the file explorer in Mac works. And I do not know where 
a typical installation installs context in Mac. Suppose it is installed in 
/usr/local/texlive/2007.

The all the context files will be in

/usr/local/texlive/2007/texmf-dist/tex/context/base

Basically, INSTALL-LOCATION/texmf or INTSTALL-LOCATION/texmf-dist or 
INSTALL-LOCATION/texmf-context and then tex/context/base directory inside 
it.

>> Once you figure out how to scan them for information,
>
> => Could one comunicate "how to scan them for infomation" or must that stay a 
> secret?

The basic idea is to first understand how a particular command is defined. 
Here is what I do: go to tex/context/base directory and search (by any 
means, I use grep, but you can as well use any program that allows you to 
search inside files) for the command you are looking for: in this case 
footnote. You may either get a huge number of results, or a few results. 
If you get a few results, check them manually, to see which file defines a 
command. A command is usually defined as

\def\commandname

or (rarely)

\edef\commandname

\xdef\commandname

\gdef\commandname

or (more frequently)

\define<something>[\v!commandname]

here <something> can be any text.

If your search gives a lot of results, you need to use a regular 
expression to filter it to one of the above. I don't know if Finder in Mac 
allows for regular expressions.

>> they are easy to understand.
> [I repeat: "easy to understand"!]

I know what you mean here :)

>> In this case, core-not.tex says that the options of \setupfootnotes are
>>
>>      [\c!location=\v!page,
>>       \c!way=\v!by\v!part,
>>       \c!sectionnumber=\v!no,
>>       \c!conversion=,
>>       \c!rule=\v!on,
> [etc. and so on...]
>
> Nothing of this and the following code lines I can understand, so it is not 
> "easy" - albeit that one knows the syntax and meanings of these commands.

As far as syntax goes, just ignore those funny \c! \v! thingies. Then you 
can read them as
         [location=page,
          way=bypart,
          sectionnumber=no,
          conversion=,
          rule=on,
        [etc..]

These mean, that

i) Footnotes should be located per page.

ii) They should be numbered per part. That is, if you start a new part, 
footnote numbering restarts.

iii) I don't know what sectionnumber does, so I ignore it.

iv) The number should not be converted to anything. You can convert them 
to characters, Characters, romannumerals, Romannumberals, etc.

v) The footnotes should be proceeded by a rule, etc.

You see, most of the keys for all environments take command key-value 
options. If they are explained in the manual, then great; if they are not, 
start guessing what they mean, and experiment if you get the right 
result. Try three times, and if you don't get hit the right answer, ask on 
the mailing list. Hopefully, someone will reply. Then you know, what a 
particular option does for *all environments*. If you don't get an answer, 
well... then ask what you want to achieve, and hopefully someone will tell 
you if it is possible or not.

> => Where can I find an explanation of this, not to write this kind of code 
> myself but to understand off it, which kind of commands I can use with 
> footnotes (in this case)?

I explained above how I started to understand these things. I am sure that 
other people have different approaches. I do not understand how TeX works, 
but reading ConTeXt sources are much easier than reading latex sources. I 
started with LaTeX, and in LaTeX I could never manage to understand 80% of 
the what was written in the sources. In ConTeXt, I can understand 50-60%, 
that is what I meant my "easy".

Aditya
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


      parent reply	other threads:[~2008-07-21 16:59 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-20  7:54 Footnotes Ulrich Dirr
2008-07-20 17:50 ` Footnotes Aditya Mahajan
2008-07-21  7:09   ` Footnotes Ulrich Dirr
2008-07-21 16:39     ` Footnotes Aditya Mahajan
2008-07-21 17:25       ` Footnotes Ulrich Dirr
2008-07-21 20:58         ` Footnotes Aditya Mahajan
2008-07-21 11:28   ` How to read sources? (was:) Footnotes Joachim Kreimer-de Fries
2008-07-21 12:01     ` How to read sources? Jörg Hagmann
2008-07-21 12:03       ` Wolfgang Schuster
2008-07-21 12:09         ` Andrea Valle
2008-07-21 12:02     ` How to read sources? (was:) Footnotes Thomas A. Schmitz
2008-07-21 12:13     ` Andrea Valle
2008-07-21 16:59     ` Aditya Mahajan [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.1.00.0807211241450.26483@nqv-yncgbc \
    --to=adityam@umich.edu \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).