Menu

#855 Document "Paste to LaTeX" and "Convert to LaTeX"

None
closed
nobody
None
1
2015-04-07
2015-04-07
No

I'm not sure what is (are?) the effect(s) of "Paste to LaTeX" and "Convert to LaTeX" entries in the "Idefix" menu.

Would it be possible to document them in the TXS manual?

Discussion

  • Tim Hoffmann

    Tim Hoffmann - 2015-04-07

    done: hg 5040 (7c6b1bbaba3e)

    Escaping reserved characters

    If you have text containing reserved TeX characters and want the text to appear literally in your document, you have to escape the reserved charaters to prevent LaTeX from interpreting them. The following functions take care of that (Menu: Idefix)

    • Paste to LaTeX: Takes the text from the clipboard and escapes reserved characters prior to pasting into the editor.
    • Convert to LaTeX: Escapes the reserved characters in the current selection.

    For example: "Less than 10% of computer users know the meaning of $PATH." will be converted to "Less than 10\% of computer users know the meaning of \$PATH."

     
    • Denis Bitouzé

      Denis Bitouzé - 2015-04-07

      Many thanks!

      Would it be a reasonable feature request that garbage characters (even in UTF-8 encoding), such as "°" or invisible spaces would be taken in account?

       
      • Tim Hoffmann

        Tim Hoffmann - 2015-04-07

        I'm not decided. This is a very basic feature. It's easy to handle, as long as there is no ambiguity, i.e. the has to be a general rule "replace char by char sequence".

        Currently we do only replace the reserved characters:

        \ { } # $ % & ~ _ ^
        

        Note: just changed the replacement for \ to \textbackslash{} according to
        http://en.wikibooks.org/wiki/LaTeX/Basics#Reserved_Characters (hg 5041 (b55b93fa4167)).

        We are not aiming at a replacement for every possible problematic char. But the replacements that we do have to be correct under all circumstances.

        I would be ok to add more replacements if they follow the above rule. In particular

        1. it must not depend on packages
        2. there should only be one commonly used replacement (IMO not the case for "°")
        3. it should not depend on the context, e.g. replacement in math different from replacement in text
         
  • Tim Hoffmann

    Tim Hoffmann - 2015-04-07
    • status: open --> closed
    • Group: -->
     

Anonymous
Anonymous

Add attachments
Cancel





Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.