private FlowToken readSlashToken() throws SnuggleParseException {
        FlowToken result;
        int afterSlashIndex = position+1;
        int c = workingDocument.charAt(afterSlashIndex);
        if (c==-1) {
            /* Nothing following \\ */
            result = createError(CoreErrorCode.TTEG01, position, afterSlashIndex, currentModeState.latexMode);
        }
        else if (c=='(' || c=='[') {
            /* It's the start of a math environment specified using \( or \[ */
            if (currentModeState.latexMode==LaTeXMode.MATH) {
                /* Error: Already in Math mode - not allowed \( or \[ */
                result = createError(CoreErrorCode.TTEM00, position, afterSlashIndex);
            }
            else {
                int startCommandIndex = position;
                /* Advance over the delimiter and parse environment content */
                position += 2;
                int startContentIndex = position;
                String closer = (c=='(') ? "\\)" : "\\]";
                ModeState contentResult = tokeniseInNewState(TokenisationMode.BUILTIN_ENVIRONMENT_CONTENT,
                        new StringTerminator(closer), LaTeXMode.MATH);
                if (!contentResult.foundTerminator) {
                    /* Error: We didn't find the required terminator so we'll register an error. There
                     * are probably lots of other errors caused by the missing terminator so we'll
                     * add this error *first* in the list for the environment.
                     */
                    contentResult.tokens.add(0, createError(CoreErrorCode.TTEM02, startCommandIndex, position,
                            "\\" + Character.valueOf((char) c), closer));
                }
                int endContentIndex = contentResult.computeLastTokenEndIndex();
                FrozenSlice contentSlice = workingDocument.freezeSlice(startContentIndex, endContentIndex);
                FrozenSlice mathSlice = workingDocument.freezeSlice(startCommandIndex, position);
                ArgumentContainerToken contentToken = new ArgumentContainerToken(contentSlice, LaTeXMode.MATH, contentResult.tokens);
                BuiltinEnvironment environment = (c=='(') ? CorePackageDefinitions.ENV_MATH : CorePackageDefinitions.ENV_DISPLAYMATH;
                result = new EnvironmentToken(mathSlice, currentModeState.latexMode, environment, contentToken);
            }
        }
        else if (c==')' || c==']') {
            /* Close of a math environment specified using \) or \]. This should have
             * been discovered at the time the environment was opened (above), so this is
             * always an error if we get here.
             */
            result = createError(CoreErrorCode.TTEG03, position, position+2,
                    workingDocument.freezeSlice(position, position+2).extract());
        }
        else {
            /* It's not math, so must be \verb(*), \command or environment control */
            result = readCommandOrEnvironmentOrVerb();
        }
        return result;
    }