Represent the command as a string in LaTeX syntax.

        Returns
        -------
        str
            The LaTeX formatted command
540203
def dumps(self):
        

        options = self.options.dumps()
        arguments = self.arguments.dumps()

        if self.extra_arguments is None:
            return r'\{command}{options}{arguments}'\
                .format(command=self.latex_name, options=options,
                        arguments=arguments)

        extra_arguments = self.extra_arguments.dumps()

        return r'\{command}{arguments}{options}{extra_arguments}'\
            .format(command=self.latex_name, arguments=arguments,
                    options=options, extra_arguments=extra_arguments)
1231737
def to_line(self):
        
        if self.valid:
            return '%s %s %s\n' % (','.join(self.hostnames), self.key.get_name(),
                   self.key.get_base64())
        return None
254913
def format_invoke_command(self, string):
        

        string = string.replace('\\n', '\n')

        formated_response = ''
        for line in string.splitlines():
            if line.startswith('REPORT'):
                line = line.replace('\t', '\n')
            if line.startswith('[DEBUG]'):
                line = line.replace('\t', ' ')
            formated_response += line + '\n'
        formated_response = formated_response.replace('\n\n', '\n')

        return formated_response
602945
def format_commands(self, ctx, formatter):
        
        rows = []

        all_cmds = self.list_all_commands(ctx)
        for cmd_name in sorted(all_cmds):
            cmd = all_cmds[cmd_name]
            help = cmd.short_help or ''
            rows.append((cmd_name, help))

        if rows:
            with formatter.section('Commands'):
                formatter.write_dl(rows)
164436
function(command) {
        var patt = /("[^"]*")/,
            quotedStringPlaceholder = "__QUOTEDSTR__",
            escapedQuotePlaceholder = "__ESCAPED_QUOTE__",
            matches = [],
            match;

        command = command.replace(/\\\"/g, escapedQuotePlaceholder);

        while ((match = patt.exec(command))) {
            var matched = match[0];
            command =
                command.substr(0, match.index) + quotedStringPlaceholder + command.substr(match.index + matched.length);
            matches.push(matched.substring(1, matched.length - 1));
        }

        var parts = command.split(" ");
        parts = parts.map(function(part) {
            var item = part.trim();
            if (item === quotedStringPlaceholder) {
                item = matches.shift();
            }
            item = item.replace(new RegExp(escapedQuotePlaceholder, "g"), '"');
            return item;
        });

        return parts;
    }
1137677
def _print_rst(self, what):
        

        print
        print "Command - %s::" % what

        exec ("h = self.do_%s.__doc__" % what)
        # noinspection PyUnboundLocalVariable
        h = textwrap.dedent(h).replace("::\n\n", "")
        h = textwrap.dedent(h).replace("\n", "\n    ")
        print h
1152456
def format(self):
        

        values = {}
        title = "Description"
        description = self.command.description + "\n\n" + self.get_ending_note() if not self.is_cog() else inspect.getdoc(self.command)
        sections = []

        if isinstance(self.command, Command):
                description = self.command.short_doc
                sections = [{"name": "Usage", "value": self.get_command_signature()},
                            {"name": "More Info", "value": self.command.help.replace(self.command.short_doc, "").format(prefix=self.clean_prefix),
                             "inline": False}]

        def category(tup):
            cog = tup[1].cog_name
            return cog + ':' if cog is not None else '\u200bNo Category:'

        if self.is_bot():
            title = self.bot.user.display_name + " Help"
            data = sorted(self.filter_command_list(), key=category)
            for category, commands in itertools.groupby(data, key=category):
                section = {}
                commands = list(commands)
                if len(commands) > 0:
                    section['name'] = category
                section['value'] = self.add_commands(commands)
                section['inline'] = False
                sections.append(section)
        elif not sections or self.has_subcommands():
            section = {"name": "Commands:", "inline": False, "value": self.add_commands(self.filter_command_list())}
            sections.append(section)

        values['title'] = title
        values['description'] = description
        values['sections'] = sections
        return values
927778
def __printCommandSyntax(self, command):
        
        commandHelp = self.completion[command]
        if commandHelp != None and len(commandHelp) > 2:
            commandValues = commandHelp[2]
            #commandDefault = commandHelp[3]
            displayHelp = [self._color(self.COLOR_WHITE, command)]
            if commandValues != None:
                valuesIsEnum = len(commandHelp) >= 6
                if '+' in command or command.upper() in ['ATS0']:
                    displayHelp.append(self._color(self.COLOR_WHITE, '='))
                displayHelp.append(('|' if valuesIsEnum else ',').join([value[0] for value in commandValues]))
            sys.stdout.write('\r Syntax: {0}\n'.format(self._color(self.COLOR_WHITE, ''.join(displayHelp))))
            sys.stdout.flush()
            self._refreshInputPrompt(len(self.inputBuffer))
1198192
def plain(self):
        
        s = []
        s.append(self.DECL)
        root = self.root()
        if root is not None:
            s.append(root.plain())
        return ''.join(s)
745518
def format(self):
        '''
        '''
        c = n = ''
        if not self.both:
            c = ' (code only)'
        if self.leng:
            n = ' (%s)' % _nameof(self.leng)
        return _kwds(base=self.base, item=self.item, leng=n,
                     code=c,         kind=self.kind)
517017
def _format_command(ctx, show_nested, commands=None):
    """"""
    # the hidden attribute is part of click 7.x only hence use of getattr
    if getattr(ctx.command, 'hidden', False):
        return

    # description

    for line in _format_description(ctx):
        yield line

    yield '.. program:: {}'.format(ctx.command_path)

    # usage

    for line in _format_usage(ctx):
        yield line

    # options

    lines = list(_format_options(ctx))
    if lines:
        # we use rubric to provide some separation without exploding the table
        # of contents
        yield '.. rubric:: Options'
        yield ''

    for line in lines:
        yield line

    # arguments

    lines = list(_format_arguments(ctx))
    if lines:
        yield '.. rubric:: Arguments'
        yield ''

    for line in lines:
        yield line

    # environment variables

    lines = list(_format_envvars(ctx))
    if lines:
        yield '.. rubric:: Environment variables'
        yield ''

    for line in lines:
        yield line

    # if we're nesting commands, we need to do this slightly differently
    if show_nested:
        return

    commands = _filter_commands(ctx, commands)

    if commands:
        yield '.. rubric:: Commands'
        yield ''

    for command in commands:
        # Don't show hidden subcommands
        if CLICK_VERSION >= (7, 0):
            if command.hidden:
                continue

        for line in _format_subcommand(command):
            yield line
        yield ''
1212388
def cli_cmd_to_string(args):
    
    if isinstance(args, basestring):
        # Return directly if it's already a string.
        return args
    return ' '.join([pipes.quote(arg) for arg in args])
941860
def command_path(self):
        
        rv = ''
        if self.info_name is not None:
            rv = self.info_name
        if self.parent is not None:
            rv = self.parent.command_path + ' ' + rv
        return rv.lstrip()
175208
def toString(self):
        
        slist = self.toList()
        sign = '' if slist[0] == '+' else '-'
        string = '/'.join(['%02d' % v for v in slist[1:]])
        return sign + string
323775
def to_latex(self):
        
        if self.low == self.high:
            if self.low * 10 % 10 == 0:
                return "{0:d}".format(int(self.low))
            else:
                return "{0:0.2f}".format(self.low)
        else:
            t = ""
            if self.low == -np.inf:
                t += r"(-\infty, "
            elif self.low * 10 % 10 == 0:
                t += r"[{0:d}, ".format(int(self.low))
            else:
                t += r"[{0:0.2f}, ".format(self.low)
            if self.high == np.inf:
                t += r"\infty)"
            elif self.high * 10 % 10 == 0:
                t += r"{0:d}]".format(int(self.high))
            else:
                t += r"{0:0.2f}]".format(self.high)
            return t
629367
def to_string(input_):
    
    usetex = rcParams['text.usetex']
    if isinstance(input_, units.UnitBase):
        return input_.to_string('latex_inline')
    if isinstance(input_, (float, int)) and usetex:
        return tex.float_to_latex(input_)
    if usetex:
        return tex.label_to_latex(input_)
    return str(input_)
760037
def to_string(self):
        
        return '%s   %s %s %s %s' % (
            self.trait, self.start_position, self.peak_start_position,
            self.peak_stop_position, self.stop_position)