Loading ...
Sorry, an error occurred while loading the content.

La/TeX mode

Expand Messages
  • Meino Christian Cramer
    Hi, when writing documents I am using plain TeX with some macros. When loading a TeX-file I see the message LaTeX file hook loaded. Is there a (plain-)
    Message 1 of 8 , Jun 10, 2005
    • 0 Attachment
      Hi,

      when writing documents I am using plain TeX with some macros. When
      loading a TeX-file I see the message "LaTeX file hook loaded. Is
      there a (plain-) TeX-file hook also (and therefore I did something
      wrong -- may be while installing me) ?

      Keep microemacsing !
      Meino
    • Jon Green
      ... Hi Meino, At the moment we do not have a plain TeX template just LaTeX which gets used for both. You are right we should probably address both types of TeX
      Message 2 of 8 , Jun 11, 2005
      • 0 Attachment
        Meino Christian Cramer wrote:
        > Hi,
        >
        > when writing documents I am using plain TeX with some macros. When
        > loading a TeX-file I see the message "LaTeX file hook loaded. Is
        > there a (plain-) TeX-file hook also (and therefore I did something
        > wrong -- may be while installing me) ?
        >
        > Keep microemacsing !
        > Meino
        >

        Hi Meino,

        At the moment we do not have a plain TeX template just LaTeX which gets used for both. You
        are right we should probably address both types of TeX file (in fact there are so many
        variant extensions I'm not sure if we can do them all). A plain TeX template should be a
        subset of the LaTeX template which probably means we need to reorganize somewhere.

        Will add to the wish list or you can be the first to write one!

        Regards
        Jon.
      • Meino Christian Cramer
        From: Jon Green Subject: Re: [jasspa] La/TeX mode Date: Sat, 11 Jun 2005 10:14:11 +0100 ... Hi Jon, ...just an idea (or in other words: a
        Message 3 of 8 , Jun 11, 2005
        • 0 Attachment
          From: Jon Green <jon@...>
          Subject: Re: [jasspa] La/TeX mode
          Date: Sat, 11 Jun 2005 10:14:11 +0100

          > Meino Christian Cramer wrote:
          > > Hi,
          > >
          > > when writing documents I am using plain TeX with some macros. When
          > > loading a TeX-file I see the message "LaTeX file hook loaded. Is
          > > there a (plain-) TeX-file hook also (and therefore I did something
          > > wrong -- may be while installing me) ?
          > >
          > > Keep microemacsing !
          > > Meino
          > >
          >
          > Hi Meino,
          >
          > At the moment we do not have a plain TeX template just LaTeX which gets used for both. You
          > are right we should probably address both types of TeX file (in fact there are so many
          > variant extensions I'm not sure if we can do them all). A plain TeX template should be a
          > subset of the LaTeX template which probably means we need to reorganize somewhere.
          >
          > Will add to the wish list or you can be the first to write one!
          >
          > Regards
          > Jon.
          >
          >
          >
          >
          >
          >
          Hi Jon,

          ...just an idea (or in other words: "a shot in the dark", cause I am
          not familiar with the internal structures):

          I think, that most TeXnicians will mostly use one or only a few of
          all macro packages for TeX like ConTeX, LaTeX, plainTeX....

          May be it would be possible, to do a me-TeX-in-a-TeX-macropackage?

          Means: me cannot be sure, what TeX-package is used inside a loaded
          *.tex-file. Especially me is helpless, if one will start with a new
          and empty file.

          Me could load a "mother/father-of-all-TeXlike-macros"-macropackage,
          which will enable the basic features like dvi-viewer-start and such,
          when recognizing a *.tex-file.

          Every specialized me-macro-package could then be loaded via a already
          key-binded command...something like: tex-load-macros.

          The user enters the name of the macropacke s/he wants then.

          The macropackage right after loaded alters ths end of the currently
          edited file with a "footnote" (or headerline) like

          % me-tex-package: <name>

          ("%" is the comment-sign in TeX, so it is not seen by the
          TeX-processor)

          When this tex(t) file is reloaded later for further editing, the
          "mother/father-of-all-TeXlike-macros"-macropackage will recognize
          this string and additional loads the specialized macropackage.

          If furthermore the user can add macrodefinitions of "her/his"
          favourite TeX-macropackage, the soecialized me-macropackage will grow
          easily and "automatically".

          Only my two cents...

          Have a nice weekend!
          Meino
        • Jon Green
          ... Wow! Jumping ahead here and considering the how and not what . The first question I would ask is what do you actually want the template to do for you ?
          Message 4 of 8 , Jun 11, 2005
          • 0 Attachment
            Meino Christian Cramer wrote:
            > From: Jon Green <jon@...>
            > Subject: Re: [jasspa] La/TeX mode
            > Date: Sat, 11 Jun 2005 10:14:11 +0100
            >
            >
            >>Meino Christian Cramer wrote:
            >>
            >>>Hi,
            >>>
            >>> when writing documents I am using plain TeX with some macros. When
            >>> loading a TeX-file I see the message "LaTeX file hook loaded. Is
            >>> there a (plain-) TeX-file hook also (and therefore I did something
            >>> wrong -- may be while installing me) ?
            >>>
            >>> Keep microemacsing !
            >>> Meino
            >>>
            >>
            >>Hi Meino,
            >>
            >>At the moment we do not have a plain TeX template just LaTeX which gets used for both. You
            >>are right we should probably address both types of TeX file (in fact there are so many
            >>variant extensions I'm not sure if we can do them all). A plain TeX template should be a
            >>subset of the LaTeX template which probably means we need to reorganize somewhere.
            >>
            >>Will add to the wish list or you can be the first to write one!
            >>
            >>Regards
            >>Jon.
            >>
            >>
            >>
            >>
            >>
            >>
            >
            > Hi Jon,
            >
            > ...just an idea (or in other words: "a shot in the dark", cause I am
            > not familiar with the internal structures):
            >
            > I think, that most TeXnicians will mostly use one or only a few of
            > all macro packages for TeX like ConTeX, LaTeX, plainTeX....
            >
            > May be it would be possible, to do a me-TeX-in-a-TeX-macropackage?
            >
            > Means: me cannot be sure, what TeX-package is used inside a loaded
            > *.tex-file. Especially me is helpless, if one will start with a new
            > and empty file.
            >
            > Me could load a "mother/father-of-all-TeXlike-macros"-macropackage,
            > which will enable the basic features like dvi-viewer-start and such,
            > when recognizing a *.tex-file.
            >
            > Every specialized me-macro-package could then be loaded via a already
            > key-binded command...something like: tex-load-macros.
            >
            > The user enters the name of the macropacke s/he wants then.
            >
            > The macropackage right after loaded alters ths end of the currently
            > edited file with a "footnote" (or headerline) like
            >
            > % me-tex-package: <name>
            >
            > ("%" is the comment-sign in TeX, so it is not seen by the
            > TeX-processor)
            >
            > When this tex(t) file is reloaded later for further editing, the
            > "mother/father-of-all-TeXlike-macros"-macropackage will recognize
            > this string and additional loads the specialized macropackage.
            >
            > If furthermore the user can add macrodefinitions of "her/his"
            > favourite TeX-macropackage, the soecialized me-macropackage will grow
            > easily and "automatically".
            >
            > Only my two cents...
            >
            > Have a nice weekend!
            > Meino
            >

            Wow! Jumping ahead here and considering the 'how' and not 'what'.

            The first question I would ask is what do you actually want the template to do for you ?
            The LaTeX template has quite a lot of stuff in it to do various things and its feature list
            is quite high - conversely it has been evolving for a few years.

            Given a Plain (or variant) Tex template then would we expect it to be as feature rich as
            LaTex - probably not as it will not be used so often.

            What would we expect the template to do:-

            1. Minimally
            a) Hilighting (generic plain TeX only)
            b) spell check
            c) syntax verify (generic plain TeX only)
            d) abbreviations/short-cuts
            e) compile (or build)
            f) Launch xdvi viewer
            g) Comment formatting.

            2. Would be nice (enhancement for variant)
            a) Folding (syntax specific)
            b) Item list (syntax specific)
            c) Pseudo view (syntax specific)
            d) Hilighting extensions (syntax specific).
            e) Abbreviations (syntax specific)

            3. Over the top
            a) Fancy language specifics

            So what would you minimally expect for it to be useful, to make it better what features
            would you want to see ?

            Once we have a minimal set of requirements then we can work out how best to do it.

            Jon.
          • Meino Christian Cramer
            From: Jon Green Subject: Re: [jasspa] La/TeX mode Date: Sat, 11 Jun 2005 11:51:43 +0100 ... Hi Jon, hmmmm....what should a La/TeX-template do
            Message 5 of 8 , Jun 11, 2005
            • 0 Attachment
              From: Jon Green <jon@...>
              Subject: Re: [jasspa] La/TeX mode
              Date: Sat, 11 Jun 2005 11:51:43 +0100

              > Meino Christian Cramer wrote:
              > > From: Jon Green <jon@...>
              > > Subject: Re: [jasspa] La/TeX mode
              > > Date: Sat, 11 Jun 2005 10:14:11 +0100
              > >
              > >
              > >>Meino Christian Cramer wrote:
              > >>
              > >>>Hi,
              > >>>
              > >>> when writing documents I am using plain TeX with some macros. When
              > >>> loading a TeX-file I see the message "LaTeX file hook loaded. Is
              > >>> there a (plain-) TeX-file hook also (and therefore I did something
              > >>> wrong -- may be while installing me) ?
              > >>>
              > >>> Keep microemacsing !
              > >>> Meino
              > >>>
              > >>
              > >>Hi Meino,
              > >>
              > >>At the moment we do not have a plain TeX template just LaTeX which gets used for both. You
              > >>are right we should probably address both types of TeX file (in fact there are so many
              > >>variant extensions I'm not sure if we can do them all). A plain TeX template should be a
              > >>subset of the LaTeX template which probably means we need to reorganize somewhere.
              > >>
              > >>Will add to the wish list or you can be the first to write one!
              > >>
              > >>Regards
              > >>Jon.
              > >>
              > >>
              > >>
              > >>
              > >>
              > >>
              > >
              > > Hi Jon,
              > >
              > > ...just an idea (or in other words: "a shot in the dark", cause I am
              > > not familiar with the internal structures):
              > >
              > > I think, that most TeXnicians will mostly use one or only a few of
              > > all macro packages for TeX like ConTeX, LaTeX, plainTeX....
              > >
              > > May be it would be possible, to do a me-TeX-in-a-TeX-macropackage?
              > >
              > > Means: me cannot be sure, what TeX-package is used inside a loaded
              > > *.tex-file. Especially me is helpless, if one will start with a new
              > > and empty file.
              > >
              > > Me could load a "mother/father-of-all-TeXlike-macros"-macropackage,
              > > which will enable the basic features like dvi-viewer-start and such,
              > > when recognizing a *.tex-file.
              > >
              > > Every specialized me-macro-package could then be loaded via a already
              > > key-binded command...something like: tex-load-macros.
              > >
              > > The user enters the name of the macropacke s/he wants then.
              > >
              > > The macropackage right after loaded alters ths end of the currently
              > > edited file with a "footnote" (or headerline) like
              > >
              > > % me-tex-package: <name>
              > >
              > > ("%" is the comment-sign in TeX, so it is not seen by the
              > > TeX-processor)
              > >
              > > When this tex(t) file is reloaded later for further editing, the
              > > "mother/father-of-all-TeXlike-macros"-macropackage will recognize
              > > this string and additional loads the specialized macropackage.
              > >
              > > If furthermore the user can add macrodefinitions of "her/his"
              > > favourite TeX-macropackage, the soecialized me-macropackage will grow
              > > easily and "automatically".
              > >
              > > Only my two cents...
              > >
              > > Have a nice weekend!
              > > Meino
              > >
              >
              > Wow! Jumping ahead here and considering the 'how' and not 'what'.
              >
              > The first question I would ask is what do you actually want the template to do for you ?
              > The LaTeX template has quite a lot of stuff in it to do various things and its feature list
              > is quite high - conversely it has been evolving for a few years.
              >
              > Given a Plain (or variant) Tex template then would we expect it to be as feature rich as
              > LaTex - probably not as it will not be used so often.
              >
              > What would we expect the template to do:-
              >
              > 1. Minimally
              > a) Hilighting (generic plain TeX only)
              > b) spell check
              > c) syntax verify (generic plain TeX only)
              > d) abbreviations/short-cuts
              > e) compile (or build)
              > f) Launch xdvi viewer
              > g) Comment formatting.
              >
              > 2. Would be nice (enhancement for variant)
              > a) Folding (syntax specific)
              > b) Item list (syntax specific)
              > c) Pseudo view (syntax specific)
              > d) Hilighting extensions (syntax specific).
              > e) Abbreviations (syntax specific)
              >
              > 3. Over the top
              > a) Fancy language specifics
              >
              > So what would you minimally expect for it to be useful, to make it better what features
              > would you want to see ?
              >
              > Once we have a minimal set of requirements then we can work out how best to do it.
              >
              > Jon.
              >

              Hi Jon,

              hmmmm....what should a La/TeX-template do for me?
              As ME is an editor it should help me editing TeX-t. For example:

              When I normally have to type

              {\bf thewordiwantinboldface }

              the template could "ease my pain" ;) in supporting me setting
              faces. This could be done as in setiing a "{\bf" and "}" around a
              region (if I decide to put in a certain face right _after_ typing in
              the word/sentence) as well as typing a "{\bf }" for me and setting
              the cursor before the closing brace, if I didn't forgot to think
              about...

              Or...more general. For the beginner of all TeXnology, the
              speaking/talking names of the TeX-related commands are a real
              help. For more advanced users, a "shortcut" (job of a template) will
              be of more help. Additional there is no "either/or" -- one is free to
              mix the help of a template with "hacking pure TeX".

              Additionally a template (in this case the parent template) should
              start sub processes like a dvi-viewer (what viewer to used should be
              configurable by the user...it depends on whether working with KDE,
              Gnome, the pure console or whateve) for me while maintaining the
              correct file name, which could be abstracted from the current file --
              but should also be settable by the user, if s/he is editing a
              multi-file TeX project.

              But most wanted is a very easy way of configuring own macros-macros
              (that is: a ME macro for a TeX-macro) even for users, which do not
              want to learn ME-programming in detail.

              Things, which are not LaTeX-specific should go in the parent
              template, everything else should go in the LaTeX-specific
              sub-package.

              Editing plain TeX with a LaTeX-aware editor sometimes is a
              little....hrrmmmm..... ;)

              These things -- I think -- could go into a parent template.


              > 1. Minimally
              > a) Hilighting (generic plain TeX only)
              > b) spell check
              > c) syntax verify (generic plain TeX only)
              > d) abbreviations/short-cuts
              > e) compile (or build)
              > f) Launch xdvi viewer
              > g) Comment formatting.


              > 2. Would be nice (enhancement for variant)
              > a) Folding (syntax specific)
              > b) Item list (syntax specific)
              > c) Pseudo view (syntax specific)
              > d) Hilighting extensions (syntax specific).
              > e) Abbreviations (syntax specific)


              Folding of TeX-text may be not that good, since most of the text of a
              TeX-file is just text and no formal programming language.

              Exception would be a specialzed template for _programming_ TeX....may
              be.

              What do you mean with "item list", Jon? (sorry....my English...)
              And what is a pseude view ?

              The "syntax specific" could be very difficult, since in TeX you can
              make even program your own language (LaTeX for example).

              And as a user I would prefer lesser support before wrong guessed
              support (for example when teh highlighting algorithm runs wild after
              stumbling across a arkane user-build macro...).

              To conclude all this:
              Since I am using plain TeX, because it is just ... plain (hrmmm ;) I
              would say as an abstraction a template should minimize my typing
              effort. It should neither decide for me ( "You have add an 'E' to the
              text. Dou you really want to add an 'E' to your text? [YES] [NO]
              [CANCEL]" with best wishes from Redmond ;O) nor correct me, before I
              say it should do it. It should not be another programming layer
              between me and TeX ("When entering the command @boldface the template
              will type {\bf } for you. You can configure this by writing a macro,
              that.....")
              Shortcuts and a typing help for commands are different.


              Hope it helps! :)

              keep microemacsing!
              Meino
            • Jon Green
              ... ... OK this is an abbreviation. So you need a TeX abbreviation mode. In toolbar mode there should be short cut abbreviations.which will address
              Message 6 of 8 , Jun 11, 2005
              • 0 Attachment
                Meino Christian Cramer wrote:
                > From: Jon Green <jon@...>
                > Subject: Re: [jasspa] La/TeX mode
                > Date: Sat, 11 Jun 2005 11:51:43 +0100


                <SNIP>

                >
                > Hi Jon,
                >
                > hmmmm....what should a La/TeX-template do for me?
                > As ME is an editor it should help me editing TeX-t. For example:
                >
                > When I normally have to type
                >
                > {\bf thewordiwantinboldface }
                >
                > the template could "ease my pain" ;) in supporting me setting
                > faces. This could be done as in setiing a "{\bf" and "}" around a
                > region (if I decide to put in a certain face right _after_ typing in
                > the word/sentence) as well as typing a "{\bf }" for me and setting
                > the cursor before the closing brace, if I didn't forgot to think
                > about...
                >


                OK this is an abbreviation.
                So you need a TeX abbreviation mode.

                In toolbar mode there should be short cut abbreviations.which will address novice below.


                > Or...more general. For the beginner of all TeXnology, the
                > speaking/talking names of the TeX-related commands are a real
                > help. For more advanced users, a "shortcut" (job of a template) will
                > be of more help. Additional there is no "either/or" -- one is free to
                > mix the help of a template with "hacking pure TeX".

                I think abbreviations are sufficient for this as well.

                >
                > Additionally a template (in this case the parent template) should
                > start sub processes like a dvi-viewer (what viewer to used should be
                > configurable by the user...it depends on whether working with KDE,
                > Gnome, the pure console or whateve) for me while maintaining the
                > correct file name, which could be abstracted from the current file --
                > but should also be settable by the user, if s/he is editing a
                > multi-file TeX project.
                >

                We can do this, typically like grep, so there would be a %dvi-com variable which is set to
                define the DVI viewer.


                > But most wanted is a very easy way of configuring own macros-macros
                > (that is: a ME macro for a TeX-macro) even for users, which do not
                > want to learn ME-programming in detail.

                No pain no gain !

                This is difficult, the only way to solve this is to lay down a template that is reasonably
                easy to read that people can extend by looking at other exmaples that have already been
                implemented. Should try and make this as painless as possible.

                >
                > Things, which are not LaTeX-specific should go in the parent
                > template, everything else should go in the LaTeX-specific
                > sub-package.
                >
                > Editing plain TeX with a LaTeX-aware editor sometimes is a
                > little....hrrmmmm..... ;)

                Yes I know.

                >
                > These things -- I think -- could go into a parent template.
                >
                >
                > > 1. Minimally
                > > a) Hilighting (generic plain TeX only)
                > > b) spell check
                > > c) syntax verify (generic plain TeX only)
                > > d) abbreviations/short-cuts
                > > e) compile (or build)
                > > f) Launch xdvi viewer
                > > g) Comment formatting.
                >
                >
                > > 2. Would be nice (enhancement for variant)
                > > a) Folding (syntax specific)
                > > b) Item list (syntax specific)
                > > c) Pseudo view (syntax specific)
                > > d) Hilighting extensions (syntax specific).
                > > e) Abbreviations (syntax specific)
                >
                >
                > Folding of TeX-text may be not that good, since most of the text of a
                > TeX-file is just text and no formal programming language.
                >
                > Exception would be a specialzed template for _programming_ TeX....may
                > be.
                >
                > What do you mean with "item list", Jon? (sorry....my English...)
                > And what is a pseude view ?
                >

                Item List

                With the toolbar enabled there is an 'items' Tab. This automatically finds things like
                \section{My Section 1} and presents a short cut list "My Section 1". When you select this
                then ME takes you straight to the section. It's like "Map View" in MS-Word which gives you a
                list of hyperlinked section headers.


                Pseudo View.

                If you are in a LeTeX file and do C-c C-h then it picks up on things like bold, italic and
                section headers and changes the rendered view i.e. "This is \textit{foo} item" is rendered
                as "This is foo item" where "foo" is shown in italic. This gives you a very quick and crude
                look at the rendered output in a ME buffer without actually processing it. I usually use
                this to make sure my bolds and italics are where I want them.


                > The "syntax specific" could be very difficult, since in TeX you can
                > make even program your own language (LaTeX for example).

                Yes you have to do your own extensions for this.

                >
                > And as a user I would prefer lesser support before wrong guessed
                > support (for example when teh highlighting algorithm runs wild after
                > stumbling across a arkane user-build macro...).
                >

                Agreed. This is the LaTeX syntax conflicting with TeX. If we used a simpler hilighting
                scheme for TeX then this should in the most part be resolved.

                > To conclude all this:
                > Since I am using plain TeX, because it is just ... plain (hrmmm ;) I
                > would say as an abstraction a template should minimize my typing
                > effort. It should neither decide for me ( "You have add an 'E' to the
                > text. Dou you really want to add an 'E' to your text? [YES] [NO]
                > [CANCEL]" with best wishes from Redmond ;O) nor correct me, before I
                > say it should do it. It should not be another programming layer
                > between me and TeX ("When entering the command @boldface the template
                > will type {\bf } for you. You can configure this by writing a macro,
                > that.....")
                > Shortcuts and a typing help for commands are different.
                >
                >

                I think I understand better. You are not asking for the world - which is good. A simpler
                template specifically for plain-tex will probably resolve most of your problems. With a
                little bit of 'user documentation' in the template file then you will probably be able to
                extend it as well.

                I'll try to find some time to play around and knock up a plain-tex template and then we can
                work together to build up something that works for both of us. My reference will be Knuths
                "The TEXbook" which I have here, so if it is not covered in that then it will not appear in
                the template.

                > Hope it helps! :)

                Yes it does - thanks.
                Jon.

                >
                > keep microemacsing!
                > Meino
              • Meino Christian Cramer
                Hi, I have the following constellation: $HOME/projekte/ srcs/ tk/include tk/src prof/src prof/include (only an example!) I have tried two tags-files, created
                Message 7 of 8 , Jun 22, 2005
                • 0 Attachment
                  Hi,

                  I have the following constellation:

                  $HOME/projekte/
                  srcs/
                  tk/include
                  tk/src
                  prof/src
                  prof/include


                  (only an example!)


                  I have tried two tags-files, created with

                  ctags -R -e -> $HOME/projekte/TAGS

                  and

                  ctags -R -> $HOME/projekte/tags


                  and I set %tag-file to $HOME/projekte/TAGS (and as I had no success
                  with that) to $HOME/projekte/tags

                  The variable %tag-option was set to "mrc".

                  I did a find-tag below prof/src in a *.c-file but the tag (a
                  function-definition) was not found.

                  The tag-files were ok.

                  Or should I use another tool to create the tag-files?

                  As so often, any help is very appreciated ! :O)

                  Thank you very much ! :O))

                  Keep microemacsing!
                  Meino
                • Jon Green
                  ... Look at the find-tag(2) page. This tells how Exuberent ctags should be called. For a regular UNIX ctags i.e. the Man page of ctags(1) on my Solaris O/S
                  Message 8 of 8 , Jun 22, 2005
                  • 0 Attachment
                    Meino Christian Cramer wrote:
                    > Hi,
                    >
                    > I have the following constellation:
                    >
                    > $HOME/projekte/
                    > srcs/
                    > tk/include
                    > tk/src
                    > prof/src
                    > prof/include
                    >
                    >
                    > (only an example!)
                    >
                    >
                    > I have tried two tags-files, created with
                    >
                    > ctags -R -e -> $HOME/projekte/TAGS
                    >
                    > and
                    >
                    > ctags -R -> $HOME/projekte/tags
                    >
                    >
                    > and I set %tag-file to $HOME/projekte/TAGS (and as I had no success
                    > with that) to $HOME/projekte/tags
                    >
                    > The variable %tag-option was set to "mrc".
                    >
                    > I did a find-tag below prof/src in a *.c-file but the tag (a
                    > function-definition) was not found.
                    >
                    > The tag-files were ok.
                    >
                    > Or should I use another tool to create the tag-files?
                    >
                    > As so often, any help is very appreciated ! :O)
                    >
                    > Thank you very much ! :O))
                    >
                    > Keep microemacsing!
                    > Meino
                    >

                    Look at the find-tag(2) page. This tells how Exuberent ctags should be called. For a regular
                    UNIX ctags i.e. the Man page of ctags(1) on my Solaris O/S here, then you have to use find
                    to generate a hierachical tags file. You are using the -R option so I do not really know
                    what version of ctags you are using ? Are you sure that the tag format is exactly the same
                    as ctags would generate ?

                    Jon.
                  Your message has been successfully submitted and would be delivered to recipients shortly.