Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small syntax definition fixes and a new theme #2

Open
wants to merge 3 commits into
base: pandoc
Choose a base branch
from

Conversation

fredcallaway
Copy link

I took your advice and forked. I updated the regexes for citation, math, and header matching. I also created a new theme. As of now, only my theme supports LaTeX highlighting, but I can update the other three themes if you like it.

TODO:
I tried to set up (i) table highlighting with a light gray background and (ii) automatically numbered lists, which are currently recognized as headers.

For (i), I have a regex which will match pipe and grid tables: ((\+\-+)+\+(\n.+)*(\+\-+)+\+)|(((\|.*){2,}\n){2,}) but I think .tmLanguage doesn't like to match regexes over multiple lines. I could definitely figure out how to do it, probably with the \G symbol which I am yet to understand. However, the main utility of such highlighting would be to point out when a table is poorly constructed, and I'm not sure how you would do that with this system.

For (ii) I thought it would be as simple as adding a #\. every time I saw ^[ ]{0,3}([0-9]+\.|[a-z]\.)(?=\s) but I guess it's not so simple…

Cheers

this theme is slightly busier than the current themes, providing
- clear delineated list and block quote enivornments
- syntax coloring for math and inline latex code
- a soft, low contrast color scheme

(the theme is loosely based on Ciapre theme by vinhx
- $$ enclosed math (display equations) are now highlighted
- citations not beginning with [@ are now highlighted e.g. [c.f. @tomasello03]
- inline latex is highlighted (fairly simple regular expression; will not work on edge cases
- pandoc has an auto-numbered list format using #.
  which were being marked as headers
- added condition that headers do not start with .
bordaigorl pushed a commit that referenced this pull request Mar 19, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant