How to embed raw TEX into LATEX?

View: New views
9 Messages — Rating Filter:   Alert me  

How to embed raw TEX into LATEX?

by Waq :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi all,
Sorry if this question is directed to wrong party.

I use protext, texniccenter and miktex (not sure which does which) and can
successfully write article in Latex.

However now I have a diagram, drawn totally using 'raw' TEX and miktex
simply doesnt recognize the commands when i copy and paste into somewhere in
LATEX source. My question is, how can I put raw TEX into LATEX source and
compile successfully?

Some of the commands not recognized are /def and /magnification. Oh, and I
did full installation with all the packages.

Thanks.

Zaid Zulkifli
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
MiKTeX-Users mailing list
MiKTeX-Users@...
https://lists.sourceforge.net/lists/listinfo/miktex-users

Re: How to embed raw TEX into LATEX?

by Joseph Wright :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Waq wrote:

> Hi all,
> Sorry if this question is directed to wrong party.
>
> I use protext, texniccenter and miktex (not sure which does which) and can
> successfully write article in Latex.
>
> However now I have a diagram, drawn totally using 'raw' TEX and miktex
> simply doesnt recognize the commands when i copy and paste into somewhere in
> LATEX source. My question is, how can I put raw TEX into LATEX source and
> compile successfully?
>
> Some of the commands not recognized are /def and /magnification. Oh, and I
> did full installation with all the packages.
>
> Thanks.
>
> Zaid Zulkifli

More of a TeX question than a MiKTeX question: you may get more answers
at comp.text.tex that here.  That said, you don't say what raw TeX
commands you need to work.  For example, \def will work happily in LaTeX
(it is the underlying basis of \newcommand).  Could you post an example
of the TeX you need to use.  There are some plain TeX commands which are
not defined (or are defined differently) by LaTeX, but without seeing
what you'd like to do it's hard to be sure what is wrong.  Also, what do
you mean by "no recognised" - do you get error messages?

Joseph Wright

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
MiKTeX-Users mailing list
MiKTeX-Users@...
https://lists.sourceforge.net/lists/listinfo/miktex-users

Parent Message unknown Re: How to embed raw TEX into LATEX?

by Philip G. Ratcliffe-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> Hi all,
> Sorry if this question is directed to wrong party.

Well, it is really OT as it's a pure TeX/LaTeX question and there are more
suitable lists.

> I use protext, texniccenter and miktex (not sure which does
> which) and can successfully write article in Latex.

Even the most rapid glance at the relevant manuals would tell you which does
which.
 
> However now I have a diagram, drawn totally using 'raw' TEX
> and miktex simply doesnt recognize the commands when i copy
> and paste into somewhere in LATEX source. My question is, how
> can I put raw TEX into LATEX source and compile successfully?
>
> Some of the commands not recognized are /def and
> /magnification. Oh, and I did full installation with all the packages.

Well, if those are forward slashes (/) rather than backslashes (\), then it's
not surprising.  Certainly, \def is understood and used by LaTeX.

For those that really aren't understood, you'll have to go through by hand,
weed them out and find LaTeX replacements.

Cheers,  Phil
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
MiKTeX-Users mailing list
MiKTeX-Users@...
https://lists.sourceforge.net/lists/listinfo/miktex-users

Re: How to embed raw TEX into LATEX?

by Ted Pavlic :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

As discussed, this conversation is better on comp.text.tex ("CTT") and
not the MiKTeX list. You can access CTT via Google groups
(groups.google.com) or through a USENET news server.

That being said, your question (about \magnification) is about "Plain
TeX" and not raw TeX. It's important to know the distinction.

> However now I have a diagram, drawn totally using 'raw' TEX and miktex
> simply doesnt recognize the commands when i copy and paste into somewhere in
> LATEX source. My question is, how can I put raw TEX into LATEX source and
> compile successfully?

*Everything* from TeX will be recognized in LaTeX. LaTeX is just a set
of macro packages built out of TeX. You can consult the "source2e.pdf"
documentation that is included with most LaTeX distributions to verify this.

There is also "Plain TeX" which is also just TeX plus a few macros (in
the "plain" package) to simplify frequent tasks. "Plain TeX" looks more
like TeX than LaTeX, but they both support everything from TeX.
See pages 231--233 in Lamport's book for information on things that
conflict between Plain TeX and LaTeX.

If you need something from Plain TeX that's not in LaTeX, check CTAN to
see if someone has written a LaTeX package to provide you the feature
you need. If worse comes to worst, you can use both at the same time.

Again, both Plain TeX and LaTeX support all TeX.

> Some of the commands not recognized are /def and /magnification. Oh, and I
> did full installation with all the packages.

Of course, you should be using backslashes (\) and not slashes (/).

As discussed on page 233 of Lamport's book,

"The \magnification command of Plain TeX has no counterpart in LaTeX.
Magnification of the output can often be done by the program that prints
the dvi file."

So, either follow Lamport's advice *OR* go to CTAN to find a related
package *OR* try loading the plain macro package and using magnification
directly.

--Ted

--
Ted Pavlic <ted@...>

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
MiKTeX-Users mailing list
MiKTeX-Users@...
https://lists.sourceforge.net/lists/listinfo/miktex-users

Parent Message unknown Re: How to embed raw TEX into LATEX?

by J.Fine :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello

> However now I have a diagram, drawn totally using 'raw' TEX and miktex
> simply doesnt recognize the commands when i copy and paste
> into somewhere in
> LATEX source. My question is, how can I put raw TEX into
> LATEX source and
> compile successfully?

It's not what you asked for, but you might be able to solve your problem
by using dvips to create a PostScript figure from the plain TeX source,
and then include that EPS as a graphic.  Not ideal, but might work.
(I'm assuming you want to generate PS output.)

--
Jonathan

---------------------------------
The Open University is incorporated by Royal Charter (RC 000391), an exempt charity in England & Wales and a charity registered in Scotland (SC 038302).

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
MiKTeX-Users mailing list
MiKTeX-Users@...
https://lists.sourceforge.net/lists/listinfo/miktex-users

Re: How to embed raw TEX into LATEX?

by Tim Adlam :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I'm curious as why you chose to draw with raw TeX when there are many
fine postscript illustration programs available that can create output
that will place easily into a LaTeX file. What is the advantage of raw
TeX - I guess it might be more precise, or perhaps you can generate
diagrams automatically in this way from a database?

Tim A


J.Fine wrote:

> Hello
>
>  
>> However now I have a diagram, drawn totally using 'raw' TEX and miktex
>> simply doesnt recognize the commands when i copy and paste
>> into somewhere in
>> LATEX source. My question is, how can I put raw TEX into
>> LATEX source and
>> compile successfully?
>>    
>
> It's not what you asked for, but you might be able to solve your problem
> by using dvips to create a PostScript figure from the plain TeX source,
> and then include that EPS as a graphic.  Not ideal, but might work.
> (I'm assuming you want to generate PS output.)
>
>  


--
*****************************************************
 Tim Adlam MSc CSci MIPEM CEng MIMechE
 Design and Development Engineer
 Bath Institute of Medical Engineering
 Wolfson Centre
 Royal United Hospital
 Bath.
 BA1 3NG

 T: 01225 824 107  F: 01225 824 111
 E: t.d.adlam@...  W: www.bime.org.uk
*****************************************************


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
MiKTeX-Users mailing list
MiKTeX-Users@...
https://lists.sourceforge.net/lists/listinfo/miktex-users

Re: How to embed raw TEX into LATEX?

by Ted Pavlic :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> I'm curious as why you chose to draw with raw TeX when there are many
> fine postscript illustration programs available that can create output
> that will place easily into a LaTeX file. What is the advantage of raw
> TeX - I guess it might be more precise, or perhaps you can generate
> diagrams automatically in this way from a database?

Drawing without a GUI often makes cleaner looking graphics that are
well-integrated into TeX. I do all of my line drawings (and many of my
plots of data) in LaTeX directly.

However, I think it's a mistake not to take advantage of the advanced
features of PostScript. The package "PSTricks" (available for use in TeX
and LaTeX) gives TeX'ers the ability to use everything wonderful
provided by PostScript without opening up a GUI.

See:

http://www.tug.org/PSTricks/

for some examples and more information.

The recent PGF/TikZ is available too. While it's maybe a little easier
to use, it doesn't have PostScript support (in fact, its creation was
motivated by needing something LIKE PSTricks that could be used in
PDFLaTeX directly).

--Ted


--
Ted Pavlic <ted@...>

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
MiKTeX-Users mailing list
MiKTeX-Users@...
https://lists.sourceforge.net/lists/listinfo/miktex-users

Re: How to embed raw TEX into LATEX?

by Alan G Isaac :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Fri, 27 Jun 2008, Ted Pavlic apparently wrote:
> The recent PGF/TikZ is available too. While it's maybe
> a little easier to use, it doesn't have PostScript support
> (in fact, its creation was motivated by needing something
> LIKE PSTricks that could be used in PDFLaTeX directly).

The portable graphics format (PGF) is portable across
PostScript and PDF document creation:
<URL:http://www.ctan.org/tex-archive/help/Catalogue/entries/pgf.html>
It seems to provide most of what most people needed from pstricks.

Cheers,
Alan Isaac




-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
MiKTeX-Users mailing list
MiKTeX-Users@...
https://lists.sourceforge.net/lists/listinfo/miktex-users

Re: How to embed raw TEX into LATEX?

by Ted Pavlic :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> The portable graphics format (PGF) is portable across
> PostScript and PDF document creation:
> <URL:http://www.ctan.org/tex-archive/help/Catalogue/entries/pgf.html>
> It seems to provide most of what most people needed from pstricks.

I didn't say that it wasn't portable to PostScript. The point is that
PSTricks cannot be used with PDFLaTeX (you have to go through a
dvips/ps2pdf process). So, PGF was created to be portable.

The downside is that it doesn't support the powerful PostScript
language. I can't, for example, do function evaluation with PGF/TikZ.
That is, there's no real port of the "pst-plot" functionality of PSTricks.

--Ted


--
Ted Pavlic <ted@...>

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
MiKTeX-Users mailing list
MiKTeX-Users@...
https://lists.sourceforge.net/lists/listinfo/miktex-users
LightInTheBox - Buy quality products at wholesale price!