Menu

#63 keyboard interaction at latex compile time

closed
nobody
texmakerx (141)
5
2012-10-17
2010-05-11
Anonymous
No

I have some latex documents that use the \typein command. When the document is compiling and comes across the \typein command, it
will stop and wait for keyboard input. I have not been able to figure out a way to do this in TexMakerX.

Discussion

  • Jan  Sundermeyer

    Jan Sundermeyer - 2010-05-11

    which operating system do you use ?

    anyway, why use typein ?

     
  • Nobody/Anonymous

    I use both Windows (XP, 7) and Unix (FreeBSD, OpenBSD, Sun's OS).
    When i make up tests, i like to include the answers in the latex file. When i compile
    the latex file, i get prompted if i want the solutions or just a blank test....

     
  • Benito van der Zander

    You can try to use
    xterm -e latex %.tex
    as latex command on Unix.
    And on Windows you can probably use something like this:
    cmd /c """latex ?m.tex"""

     
  • Nobody/Anonymous

    When i enter: cmd /c "latex ?m.tex" as a User command, the usual dialogue appears
    in the message window, but when the prompt for entering Y/N for a solution appears,
    i cannot enter a value. No keyboard input registers in the message window.....

     
  • Benito van der Zander

    Well, I don't have a running Windows here, so I can't help you with the details...
    You could try to put the command you usual use to compile the tex file after the /c, or to put everything in a bat file and than call that

     
  • Jan  Sundermeyer

    Jan Sundermeyer - 2010-05-12

    cmd.exe does not accept keyboard entries after it was started by tmx.
    (xterm under linux seems to work fine however)
    So principally you could try out to start xterm ... latex under linux and whether typein works there ...

     
  • Nobody/Anonymous

    YES! \typein works when starting an xterm session and running latex on the file.
    (Using FreeBSD). For Windows, the command: cmd /c latex % < file
    (where file contains either y or n) seems to work.
    Thanks for your suggestions and also for a fantastic editor...

     
  • Benito van der Zander

    If "cmd /c latex % < file" works you could probably also use "echo %2 | latex %1" in a batch file called by "batch.bat % y" (requiring only one additional file)

     

Anonymous
Anonymous

Add attachments
Cancel