command completion syntax

TXS - Help
Nitesh
2012-07-08
2012-10-17
  • Nitesh
    Nitesh
    2012-07-08

    Hi,
    I created a custom .cwl file with a list of commands for various packages that
    I am using. While most of them are working, the ones with label and reference
    classifiers are not being recognized.
    For example, I added the commands \figlabel and \figref (from refstyle) as
    follows:
    \figlabel{key}#l
    \figref{key}#r
    Is there something wrong with the above definitions?

     
  • works here (linux, most recent svn version)

     
  • Nitesh
    Nitesh
    2012-07-10

    So is this an issue with the current version then? Or is it just something I
    am experiencing?

     
  • which version do you use, which OS ?
    where do you put your cwl ? How do you activate it ?

     
  • Nitesh
    Nitesh
    2012-07-10

    I am using 2.3 (svn 2471) on Win 7 with MiKTeX 2.9.
    I have the .cwl file in a folder called completion in the TeXStudio
    installation directory (I had earlier tried to put it in a "config" folder as
    mentioned in the user manual, but that didn't work- I found some one else had
    success with using "completion" folder and that worked for me).
    I activated it by checking the new file under the Options>Configure>Completion
    menu.

    Like I said, other commands in the file are now being recognized. Only those
    with the label or ref classifier tags are not.

     
  • txs 2.3 does not know l/r as type descriptors.
    That has only been added in the recent svn version.

     
  • Nitesh
    Nitesh
    2012-07-10

    Ok! Thanks !

     
  • Nitesh
    Nitesh
    2012-07-21

    I am now running he latest svn (2.4), and it is still not working for me.
    The commands I mentioned earlier, with l and r classifiers/descriptors are
    still not recognized.
    Any solutions?

     
  • Nitesh
    Nitesh
    2012-07-21

    The problem is now fixed. I had saved the new completion files in unicode
    format. After changing them to ANSI, TeXStudio 2.4 is able to recognize l/r
    descriptors.

     
  • Tim Hoffmann
    Tim Hoffmann
    2012-07-21

    Interesting. Do you have any special chars in that completion file?

     
  • Which text editor did you use to create the file? Some (e.g. notepad) insert
    strange unicode boms in the first line

     
  • Nitesh
    Nitesh
    2012-07-26

    I did use notepad.
    No special characters, just the commands and descriptors.

     
  • Tim Hoffmann
    Tim Hoffmann
    2012-07-28

    can you post the file?

     
  • Nitesh
    Nitesh
    2012-07-28

    I am not sure how to post a file, but here are the contents:

    refstyle

    \figlabel{key}#l
    \figref{key}#r
    \Figref{key}#r
    \schmlabel{key}#l
    \schmref{key}#r
    \Schmref{key}#r
    \seclabel{key}#l
    \secref{key}#r
    \Secref{key}#r
    \eqlabel{key}#l
    \eqref{key}#r
    \Eqref{key}#r

    chemmacros

    \ch{arg}
    \iupac{arg}
    \Chemalpha
    \Chembeta
    \pH

    siunitx

    \numrange{arg1}{arg2}
    \SIrange{arg1}{arg2}{arg3}
    \SIlist{arg1}{arg2}

    textgreek

    \textalpha
    \textbeta
    \textlamda

    chemfig

    \chemfig{arg}
    \schemestart
    \schemestop
    \arrow

    threeparttablex

    \begin{ThreePartTable}#\tabular
    \end{ThreePartTable}#\tabular
    \begin{TableNotes}
    \end{TableNotes}
    \insertTableNotes
    \tnote{arg}#t

    paralist

    \begin{inparaenum}
    \end{inparaenum}

     
  • Tim Hoffmann
    Tim Hoffmann
    2012-07-29

    fixed

     
  • Nitesh
    Nitesh
    2012-07-29

    Interesting! I had specifically checked to see if I could add new completion
    files while program was running, and it worked for me (the new files showed up
    in the option list) !

    Anyway, thanks for the help, and for fixing the bug.