2

While I went through the tutorial on Latex I couldn't get how to print "Hello World" using command tex as illustrated in wikibooks.The command I would like to execute in terminal is:

tex '\empty Hello world!\bye'.

But the error I'm getting is:

! I can't find file Hello

<*> \empty Hello

Could anyone tell me is there anything else needed to print this(Hello World) statement in the terminal using the command tex.

  • There is some misunderstanding: tex '\empty Hello World!\bye' does not print the Hello World string on the terminal itself, but uses the standard output file texput.dvi then. Are you using the correct ' characters? (If pdftex is used, the file is called texput.pdf then) – user31729 Dec 9 '14 at 6:07
  • @ChristianHupfer:that's right.But I can't get the standard output file textput.dvi.I first tried using the ' character then tried using the backslashcharacter but still can't get the output file.Could you help me. – justin Dec 9 '14 at 6:11
  • I entered the command on a terminal and there was no error, I just copied the command from the screen and inserted it on the command line, there was no error. I imagine some strange encoding on your terminal or another typo – user31729 Dec 9 '14 at 6:23
  • @ChristianHupfer:Thanks.I'm using Windows 7.I'm typing from command prompt and I'm using TEX live package.So does these specifications means a change in the command statement said in wikibooks?.It's also an system used from a library(restricted access by admin). – justin Dec 9 '14 at 6:25
  • 1
    run only tex and you are in TeXs interactive mode. Insert now hello World <enter> and then \bye. – user2478 Dec 9 '14 at 9:13
9

The command

tex '\empty {Hello World!}\bye'

only works on a Unix-like terminal, for Windows command prompt, the ' characters has to be replaced by " double quotes, it is

tex "\empty {Hello World!}\bye" 

In either case, a file called texput.dvi is generated, if pdftex is used, the file will be called texput.pdf then.

This is basically a test whether the tex installation was successful.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.