Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • display quotation marks in latex

    Dear all,

    I would like to make a macro such that I can type in latex something between `` and ". The current state of my code is something like this:

    Code:
    local say = "There is too much noise."
    file write document `"``say""' _n
    However, the ` and " seems to cancel out the outside brackets. Can anyone help me with this? I would like my peace of code in tex to be:

    Code:
    ``There is too much noise"

  • #2
    Perhaps the following is what you want.
    Code:
    . tempfile gnxl
    
    . file open document using `gnxl', write
    
    . local say = "There is too much noise."
    
    . file write document `"\`\``say'""' _n
    
    . file close document
    
    . type `gnxl'
    ``There is too much noise."
    
    .

    Comment


    • #3
      Sorry I just tried that and I get:

      Code:
      . type document
      file document not found

      Comment


      • #4
        The type command requires a filename not a file handle from the file open command. You should use the same filename on the type command that you used in the using clause on the file open command.

        Comment


        • #5
          Thank you. A further question I have is how to write a longer sentence that includes the local.

          Code:
          file write document "The sentence `say'"
          such that the code types in the tex:

          Code:
          The sentence ``the is too much noise"

          Comment


          • #6
            Code:
            file write document `"The sentence \`\``say'""' _n

            Comment

            Working...
            X