ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* TeX syntax -- a guide?
@ 2010-02-25 20:39 James Fisher
  2010-02-25 21:39 ` Thomas A. Schmitz
  2010-02-26  6:25 ` Peter Münster
  0 siblings, 2 replies; 5+ messages in thread
From: James Fisher @ 2010-02-25 20:39 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 1672 bytes --]

Hi,


After a few days working in "do what the tutorials say" mode, I now want to
understand TeX from a programmer's mindset.  I have not been able just by
practise to work out what the syntactic rules of TeX are, and I am hoping
that there is a sensible guide to this somewhere.  However, searches for
things like "tex syntax" draw a blank.  Some of the things I want to
understand, for example, are: (1) what is the distinction between square
brackets and curly brackets after a command?  (2) Why are there sometimes
lists of square-bracketed lists after a command, each with lists of seeming
arguments inside them?  (2) What exactly are the "variables" in a TeX file?
(I've seen variable-like things sometimes referred to just plainly,
sometimes with preceding backslashes as if they were commands/macros).  (4)
Why can't I end a square-bracketed section with a final square-bracket on a
line of its own, as I may do in other programming languages?  (5) How are
things like \subsection, \subsubsection, \subsubsubsection, ...
implemented?  I am used to languages in which there is only a finite set of
commands; why is the logic here not more like \section[level=1],
\section[level=2], ... ?  (6) Perhaps I'm misunderstanding things and all
this isn't actually the fundamental syntax of TeX but just adhoc syntax
defined by various macros doing different things -- is this the case; to
what degree can macros define syntax?

Obviously I don't expect answers to all these here, but can someone point me
to somewhere on the 'net that could answer them? The only other
possibilities I can see are buying an expensive copy of the TeXbook, etc.


Thanks all,


James Fisher

[-- Attachment #1.2: Type: text/html, Size: 1772 bytes --]

[-- Attachment #2: Type: text/plain, Size: 486 bytes --]

___________________________________________________________________________________
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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: TeX syntax -- a guide?
  2010-02-25 20:39 TeX syntax -- a guide? James Fisher
@ 2010-02-25 21:39 ` Thomas A. Schmitz
  2010-02-25 21:51   ` Aditya Mahajan
  2010-02-26  1:04   ` James Fisher
  2010-02-26  6:25 ` Peter Münster
  1 sibling, 2 replies; 5+ messages in thread
From: Thomas A. Schmitz @ 2010-02-25 21:39 UTC (permalink / raw)
  To: mailing list for ConTeXt users


On Feb 25, 2010, at 9:39 PM, James Fisher wrote:

> Hi,
> 
> 
> After a few days working in "do what the tutorials say" mode, I now want to understand TeX from a programmer's mindset.  I have not been able just by practise to work out what the syntactic rules of TeX are, and I am hoping that there is a sensible guide to this somewhere.  However, searches for things like "tex syntax" draw a blank.  Some of the things I want to understand, for example, are: (1) what is the distinction between square brackets and curly brackets after a command?  (2) Why are there sometimes lists of square-bracketed lists after a command, each with lists of seeming arguments inside them?  (2) What exactly are the "variables" in a TeX file? (I've seen variable-like things sometimes referred to just plainly, sometimes with preceding backslashes as if they were commands/mac
 ros).  (4) Why can't I end a square-bracketed section with a final square-bracket on a line of its own, as I may do in other programming languages?  (5) How are things like \subsection, \sub
 subsection, \subsubsubsection, ... implemented?  I am used to languages in which there is only a finite set of commands; why is the logic here not more like \section[level=1], \section[level=2], ... ?  (6) Perhaps I'm misunderstanding things and all this isn't actually the fundamental syntax of TeX but just adhoc syntax defined by various macros doing different things -- is this the case; to what degree can macros define syntax?
> 
> Obviously I don't expect answers to all these here, but can someone point me to somewhere on the 'net that could answer them? The only other possibilities I can see are buying an expensive copy of the TeXbook, etc.
> 
First, you're confusing two things: TeX syntax and ConTeXt syntax. Most of what you're asking here has to do with the way ConTeXt implements things. For starters, I would recommend http://wiki.contextgarden.net/Inside_ConTeXt, especially the overview about System Macros.

But if you want to actually write your own macros (or simply understand the way ConTeXt works) you will indeed need some understanding of TeX. Complaining about the price of the TeXbook doesn't sit very well with most TeXies (most of us think the price is reasonable, we're using this incredibly software for free, and if you're really poor, you can always go to a library), but there's an absolutely wonderful book which you can download for free, TeX by topic, http://eijkhout.net/texbytopic/texbytopic.html Personally, I find it more accessible than the TeXbook. 

HTH

Thomas


___________________________________________________________________________________
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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: TeX syntax -- a guide?
  2010-02-25 21:39 ` Thomas A. Schmitz
@ 2010-02-25 21:51   ` Aditya Mahajan
  2010-02-26  1:04   ` James Fisher
  1 sibling, 0 replies; 5+ messages in thread
From: Aditya Mahajan @ 2010-02-25 21:51 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Thu, 25 Feb 2010, Thomas A. Schmitz wrote:

> but there's an absolutely wonderful book which you can download for 
> free, TeX by topic, http://eijkhout.net/texbytopic/texbytopic.html 
> Personally, I find it more accessible than the TeXbook.

Also see

http://www.tex.ac.uk/cgi-bin/texfaq2html?label=ol-books

for a few other freely availbe books on TeX, and

http://www.tex.ac.uk/cgi-bin/texfaq2html?label=books

for other books on TeX. But if you really want to understand *why* TeX 
works the way it does, the TeXbook is essential.

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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: TeX syntax -- a guide?
  2010-02-25 21:39 ` Thomas A. Schmitz
  2010-02-25 21:51   ` Aditya Mahajan
@ 2010-02-26  1:04   ` James Fisher
  1 sibling, 0 replies; 5+ messages in thread
From: James Fisher @ 2010-02-26  1:04 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 3450 bytes --]

Wonderful!  Those were good recommendations; I shall work through them.
Maybe I will buy the TeXbook eventually; however, I've just splashed out on
the METAFONTbook, so I'll give it a while.

On Thu, Feb 25, 2010 at 9:39 PM, Thomas A. Schmitz <
thomas.schmitz@uni-bonn.de> wrote:

>
> On Feb 25, 2010, at 9:39 PM, James Fisher wrote:
>
> > Hi,
> >
> >
> > After a few days working in "do what the tutorials say" mode, I now want
> to understand TeX from a programmer's mindset.  I have not been able just by
> practise to work out what the syntactic rules of TeX are, and I am hoping
> that there is a sensible guide to this somewhere.  However, searches for
> things like "tex syntax" draw a blank.  Some of the things I want to
> understand, for example, are: (1) what is the distinction between square
> brackets and curly brackets after a command?  (2) Why are there sometimes
> lists of square-bracketed lists after a command, each with lists of seeming
> arguments inside them?  (2) What exactly are the "variables" in a TeX file?
> (I've seen variable-like things sometimes referred to just plainly,
> sometimes with preceding backslashes as if they were commands/macros).  (4)
> Why can't I end a square-bracketed section with a final square-bracket on a
> line of its own, as I may do in other programming languages?  (5) How are
> things like \subsection, \sub
>  subsection, \subsubsubsection, ... implemented?  I am used to languages in
> which there is only a finite set of commands; why is the logic here not more
> like \section[level=1], \section[level=2], ... ?  (6) Perhaps I'm
> misunderstanding things and all this isn't actually the fundamental syntax
> of TeX but just adhoc syntax defined by various macros doing different
> things -- is this the case; to what degree can macros define syntax?
> >
> > Obviously I don't expect answers to all these here, but can someone point
> me to somewhere on the 'net that could answer them? The only other
> possibilities I can see are buying an expensive copy of the TeXbook, etc.
> >
> First, you're confusing two things: TeX syntax and ConTeXt syntax. Most of
> what you're asking here has to do with the way ConTeXt implements things.
> For starters, I would recommend
> http://wiki.contextgarden.net/Inside_ConTeXt, especially the overview
> about System Macros.
>
> But if you want to actually write your own macros (or simply understand the
> way ConTeXt works) you will indeed need some understanding of TeX.
> Complaining about the price of the TeXbook doesn't sit very well with most
> TeXies (most of us think the price is reasonable, we're using this
> incredibly software for free, and if you're really poor, you can always go
> to a library), but there's an absolutely wonderful book which you can
> download for free, TeX by topic,
> http://eijkhout.net/texbytopic/texbytopic.html Personally, I find it more
> accessible than the TeXbook.
>
> HTH
>
> Thomas
>
>
>
> ___________________________________________________________________________________
> 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  : http://foundry.supelec.fr/projects/contextrev/
> wiki     : http://contextgarden.net
>
> ___________________________________________________________________________________
>

[-- Attachment #1.2: Type: text/html, Size: 4409 bytes --]

[-- Attachment #2: Type: text/plain, Size: 486 bytes --]

___________________________________________________________________________________
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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: TeX syntax -- a guide?
  2010-02-25 20:39 TeX syntax -- a guide? James Fisher
  2010-02-25 21:39 ` Thomas A. Schmitz
@ 2010-02-26  6:25 ` Peter Münster
  1 sibling, 0 replies; 5+ messages in thread
From: Peter Münster @ 2010-02-26  6:25 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Thu, Feb 25 2010, James Fisher wrote:

> Obviously I don't expect answers to all these here, but can someone point me
> to somewhere on the 'net that could answer them? The only other
> possibilities I can see are buying an expensive copy of the TeXbook, etc.

Hello James,

Look for a second-hand version. I've bought mine for 10€ on eBay.

Cheers, Peter

-- 
Contact information: http://pmrb.free.fr/contact/


___________________________________________________________________________________
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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-02-26  6:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-25 20:39 TeX syntax -- a guide? James Fisher
2010-02-25 21:39 ` Thomas A. Schmitz
2010-02-25 21:51   ` Aditya Mahajan
2010-02-26  1:04   ` James Fisher
2010-02-26  6:25 ` Peter Münster

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).