Giter Site home page Giter Site logo

shortex's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

shortex's Issues

Some more minor todos

  • updated copyright (to include Jonathan and Jeff)
  • no need for @ in \cadlag definition
  • add var greek letters to \lowercaseGreek

Add a "squish math" command

We should add a command that reduces whitespace in a line of math (especially around symbols like +, -, =, which tend to be quite whitespace heavy.

Example -- not sure if this is possible, especially with the & inside, but ideally something like

\[
\squish{A &= b + c}
\]

backref hyperref

probably worth including an option for the shortex package that adds the backref option to the hyperref package. It's not something I've used a lot so I'd need to play with it a bit, but from the one demo I've seen it seems like it might be very useful to include.

why no \hh?

Is there a reason to exclude h here?

\charalphabetmacro{h}{\hat}{\lowerCaseRomanLettersNoMHT}

I replaced \lowerCaseRomanLettersNoMHT with a similar \lowerCaseRomanLettersNoMT and did not have issues using \hh.

commenter names/colors

Right now we have \PRB, \RMK, \mPRB, \mRMK for problem/remark in-text/margin, and \HLT for highlighting text. I'm working on a paper right now with multiple people doing editing, and I find it super helpful to have comments denoted by initials.

I wonder if we can do something like

\usepackage[commenters=TC,JH,JN]{shortex}

and then have commenting commands (perhaps with commenter-specific colors!) like

\cTC   (comment TC)
\mcTC  (margin comment TC)
\pTC  (problem TC)
\mpTC  (margin problem TC)
\hTC   (highlight TC)

and furthermore, I wonder if the "problem" type comments are kind of pointless. When editing I don't feel the need to distinguish between "comment" and "problem" -- I just use comment for everything. Perhaps instead of "problem" we have bold comment like \bcTC if you want something to stick out more.

remove xargs?

Currently it seems to be unused. Need to investigate but could probably just remove it.

pp(, pp[, and cppl

I remember way back when I implemented these I wanted to do something like \pp{ or \pp\{ (instead of \cppl ) but couldn't get away with it. Just creating an issue to keep a record of that idea. Any ideas how to do that @jhuggins @jnegrea ?

replace eucal with mathrsfs

I never really paid much attention to this (since originally adapting the style file from other people), but shortex includes eucal. That package apparently replaces \mathscr with a script that sort of fits the same niche as \mathcal but just looks worse IMHO. I also don't see this script used very often in papers.

I would suggest we use mathrsfs instead, which is quite distinct from \mathcal, generally looks good, and is used somewhat frequently in papers.

(obviously all of my assessments are based on my own subjective opinion and particular literature bubble -- but at the very least, eucal is visually similar to mathcal, so I'd prefer having the more distinct mathrsfs)

Subscript special chars needs braces

I'm not sure if this is so important -- not even sure if I want to change this -- but figured I'd document it here. Currently,

f_\scS

will cause LaTeX to hit an error:

[21]
! Missing { inserted.
<to be read again> 
                   \let 
l.726 \]

In contrast:

f_{\scS}

works.

Add CI tests?

After v0.1 releases, we should probably:

  • create some unit tests for package functionality. I would need to investigate the right way to do that in LaTeX...
  • create some GitHub actions to automate those tests on PR etc.

too much space between theorem-like and display eqn

I'm not sure if this is something that is particular to the style file I'm using currently (neurips_2024.sty) or if it's more general, but I encountered this recently:

Reprex:

\[
blah
\]
\bthm
asdf
\ethm

results in too much space between the display and the theorem-like:

image

derivative commands

I like \der, but the fact that partial derivatives are \D is a bit odd (from a semantic naming point of view).

Maybe we should change to \pder? Other ideas welcome.

inconsistency in environment defs

some are \long\def, some \newcommand. Need to investigate a bit and decide on a consistent style for these (though may need inconsitency in some cases. My LaTeX-fu isn't good enough at the moment to know)

todos on new `\f...` macros

  • testing
  • add more annotation types (e.g. more fonts and accents)
  • make it a package option
  • consider changing to \s...

Jupyterbook documentation?

Right now we have a combination of a markdown readme and a separate PDF documentation.

Might be worthwhile to just do it all in Jupyterbook or something similar so we can write one documentation and have it as both the README and a compiled PDF.

I think this is a bit low priority at the moment, so I'll punt to some time after v0.1.

New set defines

@jhuggins I see you've added some new sets like

\newcommand{\posReals}{\reals_+}

We should come up with a set of modifiers (like \b... and \h... for symbols) for common modifications to spaces. Goal is to:

  • improve tex readability
  • save time typing

e.g. camelcase is OK for readability but might make typing a pain (need to hit shift constantly). What do you think is the right tradeoff there?

Perhaps would it make sense to do something like \ex... for extended, so e.g. \exreals and \p... for positive, e.g. \preals ?

Some missing prefixed symbols

In the style file there are some commented out prefixed symbols (e.g. some of the \b... symbols). I imagine this is because of a clash with some base latex command.

We should figure out what to do about these -- ideally keep the super short prefixes we have now and get rid of the preceding definition, if it doesn't muck anything basic up...

typesetting matrices

Right now we typeset matrices via

\bmat
...
\ema 

which is a shortcut for \begin{pmatrix}...\end{pmatrix}. I want to use square brackets around my matrices -- I think it's more standard/common anyway (\begin{bmatrix}...\end{bmatrix}). Can we do

\bmat
\emat

for square brackets (or maybe \bbmat...\ebmat), and

\bpmat
\epmat

for parentheses?

Potential bugs in `\f` and `\parsefontstylestrings`

  • it seems in the definition of \f I can't use \bm instead of \mathbf (which treats greeks better and maintains style on romans)
  • the \parsefontstylestrings command doesn't work with greek symbols in the alphabet (at least, not the two obvious things I tried, \parse...{{blahblah}}{\alpha\beta\gamma} and \parse...{{blahblah}}{{alpha}{beta}{gamma}} )

Hessians

Currently shortex.pdf uses \hes but shorter.sty uses \hess.

Add mention of what packages *not to* include in docs

People have told me theyre getting option clashes, likely due to their inclusion of hyperref etc in their individual document. We should tell people what packages to remove from their own preamble in the documentation (and have an example in the "usage" section of the readme)

\P preceded by alignment reverts to pilcrow

Right now we have \P defined as
image

But if \P is preceded by an alignment character, like
image

Then it typesets as a pilcrow:
image

Adding almost anything, e.g. \hspace{0cm}, prior to \P fixes it:
image
image

arxiv green/red boxes are back...

I noticed recently that my blackhypersetup doesn't prevent those ugly green/red boxes from appearing in papers on arxiv. I think arxiv must have updated their process recently (as it also appears you can have a non-flat folder structure now too...)

A student of mine fixed it for one paper by doing

\hypersetup{
breaklinks=true,
colorlinks=true,
pdfusetitle=true
}

My guess is that the breaklinks=true command was the important one there, but some testing required.

draft mode

Add an option to pass through to graphicx for draft mode

Establish a contributing guide

We should establish some principles for defining new commands / shortcuts. E.g. a list of priorities when creating new commands:

  • brevity
  • consistency
  • readability
  • others?

Something I feel pretty strongly about: this style file is for "power-users," so I personally prefer brevity and consistency over plain-english readability (but usually brevity engenders readability so these aren't mutually exclusive goals). The other reason I put brevity at the top is for health reasons -- the less I type (especially special characters which require ctrl / shift / etc), the less likely I am to cause a repetitive stress injury to hands/wrists/etc.

E.g. if I could choose between \exreals vs \extendedReals vs \er I would have a strong preference for \exreals, which I think has the best tradeoff between readability and brevity of the three.

But if, say, \exnats was not possible to use (because of a previous basic unmutable latex define) while \extnats was, then I'd prefer \extreals for consistency's sake.

This is all open to discussion obviously, but I figured I'd try to give a sense for my style preferences.

Another (somewhat related) idea is to make sure every definition in the style file has a "long-form" that is readable, and then shortcut versions. Not sure whether this is a good idea or will just create a bunch of work to make things consistent.

Finally -- is it possible to define commands with macros? I.e. define the "bold prefix" operator, and then apply it to all characters. So if we ever want to change that prefix operator we just change one line in the style file instead of having to do it for all characters. This might also let us keep one "list of characters for which modifiers apply".

v/var greeks in lowercaseGreeks?

I see we have a few shortened greek letters and variants (eps, ups, veps, vtheta, etc)

need to think about whether to remove these, include them in lowercaseGreeks, or leave them in but not include them

some additional packages

Someone reached out to me and suggested that we add:

  • xr (and xr-hyper) for splitting main and appendix for conference submissions
  • thmtools, especially for restateable theorems

I'm not sold on adding them necessarily, but figured I'd document it here for now pending further thought.

breqn?

I'm not sure how reliable this package is, or how well it plays with cleveref and autonum (I suspect not but who knows), but breqn seems like it might be another thing to add to shortex. It removes all the boilerplate around breaking equations.

Anyway, something to keep in mind

reorganize the style file

Right now the file is organized in terms of "topic" (algorithms, urls, figures, etc). I think it would be better to match the documentation and organize in terms of types of shortcut/macro (so all environments together, for example). This will help with consistency (all similar defs together) and easier to change later to make automated macro defns out of a large block of manual defns.

algpseudocode comments break

Hi! Thanks for the great package. algpseudocode comments aren't working for me. The following breaks

\begin{algorithmic}
\State $i \gets 10$ \Comment{hi}
\end{algorithmic}

The log shows

Environment align* undefined. \State $i \gets 10$ \Comment{hi}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.