trevorcampbell / shortex Goto Github PK
View Code? Open in Web Editor NEWLaTeX header file with useful definitions
License: MIT License
LaTeX header file with useful definitions
License: MIT License
from another style file I saw
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}
\]
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.
As in the title. Serves as both an example and a unit test for style file changes
Is there a reason to exclude h here?
Line 639 in 1443cc0
I replaced \lowerCaseRomanLettersNoMHT
with a similar \lowerCaseRomanLettersNoMT
and did not have issues using \hh
.
My instinct is to have the default be "all the usual stuff" so that people aren't surprised when things don't work (I just had a user have this happen and ask me what was going on), and then have a lightweight
option or something like that to avoid all the defs.
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.
Currently it seems to be unused. Need to investigate but could probably just remove it.
as in the title. I think right now no autonum is default, but maybe I'm mistaken. Need to look into it.
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
)
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.
As described in the math tools documentation, \DeclarePairedDelimiter
does a lot the things we have done manually, but more cleanly if you just want to toggle between using \left\right or not adjusting the size. Right now \lcrx
does not lead to good looking superscripts and subscripts, for example.
Should implement
\ol____
and
\wt____
macros
After v0.1 releases, we should probably:
as in the title
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.
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)
\s...
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.
@jhuggins I see you've added some new sets like
Line 175 in c5ec2d0
We should come up with a set of modifiers (like \b...
and \h...
for symbols) for common modifications to spaces. Goal is to:
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
?
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...
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?
\f
I can't use \bm
instead of \mathbf
(which treats greeks better and maintains style on romans)\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}}
)For example, \bdR
doesn't seem to work currently. This is a must-fix before v0.1
Currently shortex.pdf
uses \hes
but shorter.sty
uses \hess
.
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)
I think this macro needs fine tuning
Line 612 in 167bb34
What the title says. Currently it also placed additional characters before the highlighted text.
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.
Add an option to pass through to graphicx for draft mode
We should establish some principles for defining new commands / shortcuts. E.g. a list of priorities when creating new commands:
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".
scurl is defined but missing from docs
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
Someone reached out to me and suggested that we add:
xr
(and xr-hyper
) for splitting main and appendix for conference submissionsthmtools
, especially for restateable theoremsI'm not sold on adding them necessarily, but figured I'd document it here for now pending further thought.
Concretely:
\newcommand{\eg}{e.g.,\ }
\newcommand{\etal}{et al.\xspace}
\newcommand{\ie}{i.e.,\ }
\newcommand{\aka}{a.k.a.\ }
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
We need to provide examples for all the style file features in example.tex
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.
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}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.