[Mac OS X TeX] Macro Question

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

[Mac OS X TeX] Macro Question

Zachary S. Davis


<x-flowed windows-1252>Can anyone explain to me what is wrong with the following macro?  I keep
getting an error in the TeX log saying that it will assume that I
meant ##:

\def\linespacint#1{\baselineskip=#1\normalbaselineskip}

Thanks,

========================================================
Zachary S. Davis
Department of Aerospace Engineering
University of Texas at Arlington
P.O. Box 19032
Arlington, TX 76019

Home: (817) 272-6418 [hidden email]
Office: (817) 272-5269

         ?Throughout the centuries there were men who took
          first steps down new roads armed with nothing
          but their own vision.?
                                 -Ayn Rand
========================================================

-----------------------------------------------------------------
To UNSUBSCRIBE, send email to <[hidden email]> with
"unsubscribe macosx-tex" (no quotes) in the body.
For additional HELP, send email to <[hidden email]> with
"help" (no quotes) in the body.
This list is not moderated, and I am not responsible for
messages posted by third parties.
-----------------------------------------------------------------
</x-flowed>


Reply | Threaded
Open this post in threaded view
|

[Mac OS X TeX] Macro Question

Ross Moore



> Can anyone explain to me what is wrong with the following macro?  I keep
> getting an error in the TeX log saying that it will assume that I
> meant ##:
>
> \def\linespacint#1{\baselineskip=#1\normalbaselineskip}

Is this definition within the macro-expansion part of another
definition; e.g.

 \newenvironment{myenv}
  {.... \def\linespacint#1{\baselineskip=#1\normalbaselineskip}...}
  {.....}

If so then the message is correct.
  #1, #2, .... refer to parameters of the  \myenv
  defined by the \newenvironment declaration.

To set parameters to  \linespacint and refer to them,
you need to say:
  \def\linespacint##1{\baselineskip=##1\normalbaselineskip}

Similarly, if your internally defined macro itself defines
further macros, then each # needs further doubling:

 \newenvironment{myenv}
  {.... \def\linespacint#1{%
    \def\next####1{\typeout{####1}...}.....}%
   ...}
  {...}


The same considerations apply for any definition macro:
  \def \edef \gdef \xdef
  \newcommand  \providecommand  \nextheorem \DeclareRobustCommand
  \renewcommand  \renewenvironment  etc.


Hope this helps,

        Ross Moore
 




-----------------------------------------------------------------
To UNSUBSCRIBE, send email to <[hidden email]> with
"unsubscribe macosx-tex" (no quotes) in the body.
For additional HELP, send email to <[hidden email]> with
"help" (no quotes) in the body.
This list is not moderated, and I am not responsible for
messages posted by third parties.
-----------------------------------------------------------------


Reply | Threaded
Open this post in threaded view
|

[Mac OS X TeX] Macro Question

Zachary S. Davis


<x-flowed windows-1252>The macro that I've defined here does not reside within an environment,
but is rather a stand-alone macro:

\def\linespacing\#1{\baselineskip=#1\normalbaselineskip}

To my knowledge, Plain TeX should accept one argument--an integer, set
the \baselineskip, which is a TeX primitive to this integer multiplied
by the \normalbaselineskip--a Plain TeX reporter which has the job of
remembering the normal size of a \baselineskip.  When TeX starts up, the
\normalbaselineskip is 12pt.  Therefore, by introducing this macro, I
should be able to double space my TeX documents by issuing the command
\linespacing{2}.  For some reason, I get an error when doing this, and
I'm sort of confused as to why this is happening.  I guess I could just
add another # into the definition, but I'm still curious as to why this
is needed.

Also, I have a list of macros that I would like to include at the
beginning of my TeX documents by issuing the command \input macros.  
Under Texshop, where does this file need to reside for TeX to be able to
find the file?

Thanks,

On Saturday, June 16, 2001, at 09:31  PM, Ross Moore wrote:

>
>> Can anyone explain to me what is wrong with the following macro?  I
>> keep
>> getting an error in the TeX log saying that it will assume that I
>> meant ##:
>>
>> \def\linespacint#1{\baselineskip=#1\normalbaselineskip}
>
> Is this definition within the macro-expansion part of another
> definition; e.g.
>
>  \newenvironment{myenv}
>   {.... \def\linespacint#1{\baselineskip=#1\normalbaselineskip}...}
>   {.....}
>
> If so then the message is correct.
>   #1, #2, .... refer to parameters of the  \myenv
>   defined by the \newenvironment declaration.
>
> To set parameters to  \linespacint and refer to them,
> you need to say:
>   \def\linespacint##1{\baselineskip=##1\normalbaselineskip}
>
> Similarly, if your internally defined macro itself defines
> further macros, then each # needs further doubling:
>
>  \newenvironment{myenv}
>   {.... \def\linespacint#1{%
>     \def\next####1{\typeout{####1}...}.....}%
>    ...}
>   {...}
>
>
> The same considerations apply for any definition macro:
>   \def \edef \gdef \xdef
>   \newcommand  \providecommand  \nextheorem \DeclareRobustCommand
>   \renewcommand  \renewenvironment  etc.
>
>
> Hope this helps,
>
> Ross Moore
>
>
>
>
>
> -----------------------------------------------------------------
> To UNSUBSCRIBE, send email to <[hidden email]> with
> "unsubscribe macosx-tex" (no quotes) in the body.
> For additional HELP, send email to <[hidden email]> with
> "help" (no quotes) in the body.
> This list is not moderated, and I am not responsible for
> messages posted by third parties.
> -----------------------------------------------------------------
>

========================================================
Zachary S. Davis
Department of Aerospace Engineering
University of Texas at Arlington
P.O. Box 19032
Arlington, TX 76019

Home: (817) 272-6418 [hidden email]
Office: (817) 272-5269

         ?Throughout the centuries there were men who took
          first steps down new roads armed with nothing
          but their own vision.?
                                 -Ayn Rand
========================================================

-----------------------------------------------------------------
To UNSUBSCRIBE, send email to <[hidden email]> with
"unsubscribe macosx-tex" (no quotes) in the body.
For additional HELP, send email to <[hidden email]> with
"help" (no quotes) in the body.
This list is not moderated, and I am not responsible for
messages posted by third parties.
-----------------------------------------------------------------
</x-flowed>


Reply | Threaded
Open this post in threaded view
|

[Mac OS X TeX] Macro Question

Ross Moore



The macro that I've defined here does not reside within an environment,
but is rather a stand-alone macro:

\def\linespacing\#1{\baselineskip=#1\normalbaselineskip}
                ^
what is this \ for ?
# by itself is a macro-parameter, \# is not.


Hope this helps ?

        Ross Moore



-----------------------------------------------------------------
To UNSUBSCRIBE, send email to <[hidden email]> with
"unsubscribe macosx-tex" (no quotes) in the body.
For additional HELP, send email to <[hidden email]> with
"help" (no quotes) in the body.
This list is not moderated, and I am not responsible for
messages posted by third parties.
-----------------------------------------------------------------


Reply | Threaded
Open this post in threaded view
|

[Mac OS X TeX] Macro Question

michael murray-6
In reply to this post by Zachary S. Davis


<x-flowed>>Can anyone explain to me what is wrong with the following macro?  I
>keep getting an error in the TeX log saying that it will assume that
>I meant ##:
>
>\def\linespacint#1{\baselineskip=#1\normalbaselineskip}
>
>Thanks,
>

Hi Zachary


This works for me:

---------------------
\def\linespacing#1{\baselineskip=#1\normalbaselineskip}
\linespacing{5}

this is a test this is a test this is ates this is ates this is theiaotieh
this is a test this is a test this is ates this is ates this is theiaotieh
this is a test this is a test this is ates this is ates this is theiaotieh
this is a test this is a test this is ates this is ates this is theiaotieh
this is a test this is a test this is ates this is ates this is theiaotieh
\end
-----------------

in TeXShop running TeX.


Michael
--

_________________________________________________________
Assoc/Prof Michael Murray                                                  
Department of Pure Mathematics       Fax: 61+ 8 8303
3696                                      
University of Adelaide             Phone: 61+ 8 8303 4174      
Australia  5005      Email: [hidden email]            
Home Page: http://www.maths.adelaide.edu.au/pure/mmurray
PGP public key:
http://www.maths.adelaide.edu.au/pure/mmurray/pgp.txt
_________________________________________________________


   



-----------------------------------------------------------------
To UNSUBSCRIBE, send email to <[hidden email]> with
"unsubscribe macosx-tex" (no quotes) in the body.
For additional HELP, send email to <[hidden email]> with
"help" (no quotes) in the body.
This list is not moderated, and I am not responsible for
messages posted by third parties.
-----------------------------------------------------------------
</x-flowed>


Reply | Threaded
Open this post in threaded view
|

[Mac OS X TeX] Macro Question

Zachary S. Davis
In reply to this post by Ross Moore


<x-flowed windows-1252>Thanks,

You're right, the macro should read:

\def\linespacing#1{\baselineskip=#1\normalbaselineskip}

On Sunday, June 17, 2001, at 02:18  AM, Ross Moore wrote:

>
> The macro that I've defined here does not reside within an environment,
> but is rather a stand-alone macro:
>
> \def\linespacing\#1{\baselineskip=#1\normalbaselineskip}
>                 ^
> what is this \ for ?
> # by itself is a macro-parameter, \# is not.
>
>
> Hope this helps ?
>
> Ross Moore
>
>
>
> -----------------------------------------------------------------
> To UNSUBSCRIBE, send email to <[hidden email]> with
> "unsubscribe macosx-tex" (no quotes) in the body.
> For additional HELP, send email to <[hidden email]> with
> "help" (no quotes) in the body.
> This list is not moderated, and I am not responsible for
> messages posted by third parties.
> -----------------------------------------------------------------
>

========================================================
Zachary S. Davis
Department of Aerospace Engineering
University of Texas at Arlington
P.O. Box 19032
Arlington, TX 76019

Home: (817) 272-6418 [hidden email]
Office: (817) 272-5269

         ?Throughout the centuries there were men who took
          first steps down new roads armed with nothing
          but their own vision.?
                                 -Ayn Rand
========================================================

-----------------------------------------------------------------
To UNSUBSCRIBE, send email to <[hidden email]> with
"unsubscribe macosx-tex" (no quotes) in the body.
For additional HELP, send email to <[hidden email]> with
"help" (no quotes) in the body.
This list is not moderated, and I am not responsible for
messages posted by third parties.
-----------------------------------------------------------------
</x-flowed>


Reply | Threaded
Open this post in threaded view
|

[Mac OS X TeX] Patch for pdftex for subsetted font printing problem binaries available?

Paul Fons


<x-flowed>
I noted with great interest that Tom Kacvinsky on the pdftex list has
released a patch to fix a bug in the pdf output of pdftex that results
in acrobat 5.0 not being able to read the output of pdftex files.  Is
there some kind sole out there who is willing to recompile teTeX to
incorporate this patch for MacOS X.  I (and many others I assume) would
love to be able to just download the binaries instead of having to
recompile teTeX (in my case for the first time). The bug fixes subsetted
fonts output in pdf so there are no gaps (otherwise Adobe Acrobat 5.0
complains that it can't print the file).
                                                               

-----------------------------------------------------------------
To UNSUBSCRIBE, send email to <[hidden email]> with
"unsubscribe macosx-tex" (no quotes) in the body.
For additional HELP, send email to <[hidden email]> with
"help" (no quotes) in the body.
This list is not moderated, and I am not responsible for
messages posted by third parties.
-----------------------------------------------------------------
</x-flowed>


Reply | Threaded
Open this post in threaded view
|

[Mac OS X TeX] Patch for pdftex for subsetted font printingproblem binaries available?

William F. Adams


Dr. Paul Fons said:
> I (and many others I assume) would
> love to be able to just download the binaries instead of having to
> recompile teTeX (in my case for the first time).

Although I agree here, I'd like to note in passing that ``Fink'' when it
installs LyX, seems to compile TeX.... so, if one could unify its tetex
distribution with that of TeXShop then all one'd need to do is d/l the
patch, apply it to the source and re-fink (is that a word?!?)

FWIW, I'd really like to see a Mac OS X-native port of LyX (or would
there be some way to make Mac OS X features like Services available to
X-Window apps?)

William

--
William Adams, publishing specialist
ATLIS Graphics & Design / 717-731-6707 voice / 717-731-6708 fax
Sphinx of black quartz, judge my vow.
http://www.atlis.com

-----------------------------------------------------------------
To UNSUBSCRIBE, send email to <[hidden email]> with
"unsubscribe macosx-tex" (no quotes) in the body.
For additional HELP, send email to <[hidden email]> with
"help" (no quotes) in the body.
This list is not moderated, and I am not responsible for
messages posted by third parties.
-----------------------------------------------------------------