Visitar URL original
Handle < and > in array column specifiers · Issue #166 · jgm/texmath · GitHub
Skip to content

Handle < and > in array column specifiers #166

Open

Description

@catap

I just discovered the next issue when array's is used instead of case.

The test case:

\documentclass{scrartcl}

\usepackage{amsmath}
\usepackage{array}

\begin{document}

\setlength{\arraycolsep}{1pt}
\begin{equation}
  x =
  \left\{ \begin{array}{>{\arraybackslash$} p{3cm} <{$} l}
            y - 1, & \mbox{if } 1 \\
            y,       & \mbox{if } 2 \\
          \end{array} \right.
\end{equation}


\end{document}

Error:

[WARNING] Could not convert TeX math 'x =
    \left\{ \begin{array}{>{\arraybackslash$} p{3cm} <{$} l}
              y - 1, & \mbox{if } 1 \\
              y,       & \mbox{if } 2 \\
            \end{array} \right.', rendering as TeX:
  ft\{ \begin{array}{>{\arraybackslash$} p
                     ^
  unexpected ">"
  expecting white space, letter, "|" or "}"

Activity

  1. jgm commented on Dec 28, 2020

    @jgm
    Owner

    What is the meaning of the column specifiers {>{\arraybackslash$} and <{$}?
    That's the part the parser doesn't seem to understand.

  2. catap commented on Dec 28, 2020

    @catap
    Author

    >{XXX} and <{YYY} are used to put XXX in the entry of column and YYY right after entry of the column.

    In my case it puts

    • \arraybackslash to restore behaviour of \\ that is used to break a line :)
    • $ after \arraybackslash is using to start math environment,
    • $ at the end to finish math environment.
  3. changed the title [-]array's as case[/-] [+]Handle < and > in array column specifiers[/+] on Dec 28, 2020
  4. catap commented on Feb 18, 2021

    @catap
    Author

    @jgm any news with this? :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions