Menu

#463 Completed \item command should followed by a space

None
closed
nobody
None
1
2017-03-31
2013-05-16
No

When inserting a \item command from LaTeX -> Listes -> \item, a space follows the command inserted: so far, so good. But this is not the case when this command is inserted by completion.

Discussion

  • Tim Hoffmann

    Tim Hoffmann - 2013-05-16

    It's probably historical, that Texmaker inserted a space for the menu entry.
    Not really sure about this, but I don't think you can make the completer insert spaces right now. And I rather wouldn't do it.

    So what is your request?

     
  • Denis Bitouzé

    Denis Bitouzé - 2013-05-17

    Indeed, I should have been more specific: when you use the completer for inserting an \item command, you're looking:

    • either for \item[label], either because you're in a description list or because you want to override the default item label of an itemize or a enumerate list,
    • or for \item because you're either in an itemize or in a enumerate list.

    In the latter case, after \item is inserted, you need a space before continue to type you text (\itemfoo vs \item foo). Okay, you could just press the space key, but it would be more convenient if this space could be automatically inserted by TXS.

    BTW, in the former case, a space isn't necessary (\item[foo]bar is okay), but in this case as well, an extra space could be nice (\item[foo] bar is more readable).

     
  • Tim Hoffmann

    Tim Hoffmann - 2013-05-18

    All I can currently offer is to remove the space for consistency.

     
  • Denis Bitouzé

    Denis Bitouzé - 2013-05-18

    I'd prefer an half good solution rather than a completely bad one! ;)

     
  • Tim Hoffmann

    Tim Hoffmann - 2013-05-19

    So without any space is half good?

     
  • Denis Bitouzé

    Denis Bitouzé - 2013-05-19

    No, I meant to let the space whenever it is possible.

     
  • Tim Hoffmann

    Tim Hoffmann - 2013-05-19

    Ok. :) But strictly speaking, without context this isn't possible anywhere. You may always want \item[label] from the menu \item. And the completer does not support spaces at all.

     
  • Denis Bitouzé

    Denis Bitouzé - 2013-05-19

    But strictly speaking, without context this isn't possible anywhere. You may always want \item[label] from the menu \item.

    I don't see what you mean.

    And the completer does not support spaces at all.

    The space could be absent from the completer, but inserted after the corresponding entry would be chosen.

     
  • Tim Hoffmann

    Tim Hoffmann - 2013-05-19

    But strictly speaking, without context this isn't possible anywhere. You may always want \item[label] from the menu \item.

    I don't see what you mean.

    We currently have the space when inserting via menu. But in general, you don't always want a space because you may want \item[label]. As a compromise, I could add an extra \item[label] entry to the menu.

    The space could be absent from the completer, but inserted after the corresponding entry would be chosen.

    The completer just returns a string which is then inserted. You proposition would mean, that I have to reparse the string, check if it \item, modify it depending on the context and then insert. I don't think it's reasonable to hard code this just for getting a space.

     

    Last edit: Tim Hoffmann 2013-05-19
  • Denis Bitouzé

    Denis Bitouzé - 2017-03-31

    I guess this issue may be closed as it is now implemented.

     
  • Jan  Sundermeyer

    Jan Sundermeyer - 2017-03-31
    • status: open --> closed
    • Group: -->
     

Anonymous
Anonymous

Add attachments
Cancel