mirror of
https://github.com/thufschmitt/tix-papers.git
synced 2024-10-26 21:42:45 +03:00
Add initial boileplate
This commit is contained in:
commit
70b647b4de
807
.chktexrc
Normal file
807
.chktexrc
Normal file
@ -0,0 +1,807 @@
|
||||
##
|
||||
## ChkTeX, example resource file for ChkTeX.
|
||||
## Copyright (C) 1995-96 Jens T. Berger Thielemann
|
||||
##
|
||||
## This program is free software; you can redistribute it and/or modify
|
||||
## it under the terms of the GNU General Public License as published by
|
||||
## the Free Software Foundation; either version 2 of the License, or
|
||||
## (at your option) any later version.
|
||||
##
|
||||
## This program is distributed in the hope that it will be useful,
|
||||
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
## GNU General Public License for more details.
|
||||
##
|
||||
## You should have received a copy of the GNU General Public License
|
||||
## along with this program; if not, write to the Free Software
|
||||
## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
##
|
||||
## Contact the author at:
|
||||
## Jens Berger
|
||||
## Spektrumvn. 4
|
||||
## N-0666 Oslo
|
||||
## Norway
|
||||
## E-mail: <jensthi@ifi.uio.no>
|
||||
##
|
||||
|
||||
#####################################################################
|
||||
#
|
||||
# Note: The format has changed slightly (again). The { ... }
|
||||
# syntax does now mean case-sensitive comparing, while [ ... ] means
|
||||
# case-insensitive comparing of the keywords. Case-insensitive
|
||||
# comparing of the keywords is only supported on a few of the
|
||||
# keywords (it's not meaningful in all contexts, and it slows ChkTeX
|
||||
# down). Keywords supporting this are marked throughout the file.
|
||||
#
|
||||
# You may also reset a list by saying "KEYWORD = { ... }"; it will
|
||||
# then be set equal to the contents of the list you specify.
|
||||
#
|
||||
# Comments begin with `#', and continues for the rest of the line.
|
||||
# Blank lines plus leading and trailing spaces are of course ignored.
|
||||
#
|
||||
# The general format of this file is the following:
|
||||
#
|
||||
# KEYWORD { item item ...} [ item item ... ] /* Adds items */
|
||||
#
|
||||
# KEYWORD [ item item ...] { item item ... } /* Adds items */
|
||||
#
|
||||
# KEYWORD = item
|
||||
#
|
||||
# KEYWORD = { item item ... } /* Clears list before adding */
|
||||
#
|
||||
# KEYWORD = [ item item ... ] /* Clears list before adding */
|
||||
#
|
||||
# This does _not_ mean that you may alternate the forms; certain
|
||||
# keywords demands a list, other a single value. You thus have to
|
||||
# look at the examples of their use.
|
||||
#
|
||||
# Please also note that if you specify a list-keyword twice, we'll
|
||||
# concatenate the lists. If you specify a item-keyword twice, we'll
|
||||
# kill the previous value.
|
||||
#
|
||||
# We are slightly context-sensitive when detecting tokens like "}"
|
||||
# and "]"; they have to be preceded by a space. This generally makes
|
||||
# life easier.
|
||||
#
|
||||
# Items are separated by spaces. Newlines are considered as spaces,
|
||||
# but can't be escaped. You may surround items with quotes (`"') to
|
||||
# easily put spaces into them.
|
||||
#
|
||||
# Escape sequences available:
|
||||
#
|
||||
# Sequence Resulting character
|
||||
# ! A space (type `! ', not just a exclamation mark)
|
||||
# !" "
|
||||
# !# #
|
||||
# !! !
|
||||
# !{ {
|
||||
# !} }
|
||||
# ![ [
|
||||
# !] ]
|
||||
# != =
|
||||
# !b Backspace
|
||||
# !n New line
|
||||
# !r Carriage return
|
||||
# !t Tab
|
||||
# !f Form feed
|
||||
# !xNN NN must be a hexadecimal number (00 - ff),
|
||||
# _both_ characters must be included.
|
||||
# !dNNN DDD must be a decimal number (000 - 255), all
|
||||
# three characters must be included. Unspecified
|
||||
# results if DDD > 255.
|
||||
# !NNN DDD must be a octal number (000 - 377), all
|
||||
# three characters must be included. Unspecified
|
||||
# results if DDD > 377.
|
||||
#
|
||||
# Minor note: As you can see, most of these escape sequences are
|
||||
# equal to those in C (with some extensions); however, we use !
|
||||
# instead of \ as escape character for obvious reasons.
|
||||
#
|
||||
#
|
||||
# Quick summary of keywords follows. Keywords marked with a * accept
|
||||
# keywords accepting case-insensitive lists.
|
||||
#
|
||||
# Abbrev* - A list of abbreviations not automatically caught.
|
||||
# CenterDots - Commands/characters which should have \cdots in
|
||||
# between.
|
||||
# CmdLine - Default commandline options. These will be
|
||||
# processed before the ones you give on the command
|
||||
# line.
|
||||
# HyphDash \
|
||||
# NumDash - Number of dashes allowed in different contexts.
|
||||
# WordDash /
|
||||
# IJAccent - Commands which puts an accent _over_ their
|
||||
# argument.
|
||||
# Italic - Commands immediately turning on italic mode.
|
||||
# ItalCmd - Commands putting their argument into italic.
|
||||
# Linker - Commands which should have a non-breaking space in
|
||||
# front.
|
||||
# LowDots - Commands/characters which should have \ldots in
|
||||
# between.
|
||||
# MathEnvir - Environments which turn on math mode.
|
||||
# MathCmd - Commands which turn on math mode.
|
||||
# TextCmd - Commands which turn off math mode.
|
||||
# MathRoman - Mathematical operators with LaTeX replacement
|
||||
# defined.
|
||||
# NoCharNext - Insists on that certain commands aren't followed by
|
||||
# certain characters.
|
||||
# NonItalic - Commands immediately turning off italic mode.
|
||||
# NotPreSpaced- Commands which should not have a space in front of
|
||||
# them.
|
||||
# Primitives - Primitive TeX commands.
|
||||
# PostLink - Commands which generates a page reference.
|
||||
# OutFormat - Formats to use for output. See the -f & -v switch
|
||||
# in the main doc.
|
||||
# QuoteStyle - Either "Traditional" or "Logical". See main doc,
|
||||
# warning 38.
|
||||
# Silent - These commands do not produce any textual output;
|
||||
# and are thus allowed to have a space after them.
|
||||
# TabSize - Tab size you are using.
|
||||
# TeXInputs - Paths to search \input and \include files for.
|
||||
# UserWarn* - These strings will be searched for throughout the
|
||||
# text.
|
||||
# VerbEnvir - Environments which contents should be ignored.
|
||||
# VerbClear - String we will overwrite unwanted data with.
|
||||
# WipeArg - Commands (with arguments) which should be ignored
|
||||
# in the checking.
|
||||
#
|
||||
|
||||
|
||||
#####################################################################
|
||||
#
|
||||
# Enter which type of quote-style you are using here. Currently, we
|
||||
# support the following styles:
|
||||
#
|
||||
# Style Example of use
|
||||
# Traditional "An example," he said, "would be great."
|
||||
# Logical "An example", he said, "would be great".
|
||||
#
|
||||
|
||||
QuoteStyle = Logical
|
||||
|
||||
#####################################################################
|
||||
#
|
||||
# Enter here what interval you have between your tabs. Only regular
|
||||
# intervals are supported.
|
||||
#
|
||||
|
||||
TabSize = 8
|
||||
|
||||
#####################################################################
|
||||
#
|
||||
# Here, you can put default commandline options; most users would for
|
||||
# instance like to put -v2 here.
|
||||
#
|
||||
|
||||
CmdLine
|
||||
{
|
||||
# Warning 11 is \ldots vs \cdots.
|
||||
# We disable it as we use both in the same context to differentiate
|
||||
# syntax and meta-syntax
|
||||
-n11
|
||||
}
|
||||
|
||||
#####################################################################
|
||||
#
|
||||
# These patterns will be searched for through the text; no matter
|
||||
# whether they appear as normal text, commands or whatever.
|
||||
# Currently case-sensitive. They are not found in comments.
|
||||
#
|
||||
# I usually define a special command like this:
|
||||
#
|
||||
# \def\unknown{\large\bf??}
|
||||
#
|
||||
# which I use whenever there is some information I don't have at the
|
||||
# moment of writing. Thus, it makes sense to search for it.
|
||||
#
|
||||
# You should be able to develop your own uses for this.
|
||||
#
|
||||
|
||||
UserWarn
|
||||
{
|
||||
|
||||
\unknown
|
||||
###
|
||||
#
|
||||
# Another example; one should write \chktex or Chk\TeX - never ChkTeX.
|
||||
#
|
||||
###
|
||||
|
||||
ChkTeX
|
||||
}
|
||||
[
|
||||
|
||||
###
|
||||
#
|
||||
# You may put case-insensitive patterns here.
|
||||
#
|
||||
###
|
||||
|
||||
]
|
||||
|
||||
|
||||
###
|
||||
#
|
||||
# These patterns will be searched for, no matter whether they appear
|
||||
# as normal text, commands or arguments. However, they will _not_
|
||||
# match in verbatim environments.
|
||||
#
|
||||
# Remember that you have to escape (with a !) the following
|
||||
# characters: "#!= as well as spaces and {}[] if they are proceeded by
|
||||
# a space.
|
||||
#
|
||||
# Since these are PCRE regular expressions, you can use (?i) to make
|
||||
# the expression case insensitive. See the man pages (man pcresyntax)
|
||||
# or the nicely formatted http://perldoc.perl.org/perlre.html for
|
||||
# documentation on the regular expression syntax. Note however that
|
||||
# some the features of perl regular expression are not available such
|
||||
# as running code (callouts), and replacing.
|
||||
#
|
||||
# An initial PCRE comment (?# ... ) can be used change what is
|
||||
# displayed, thereby reminding yourself how to fix the problem.
|
||||
#
|
||||
###
|
||||
UserWarnRegex
|
||||
{
|
||||
|
||||
(?!#Always! use! \nmid)\\not! *(\||\\mid)
|
||||
|
||||
# capitalize section when saying Section 6.
|
||||
(?!#-1:Capitalize! before! references)PCRE:\b(chapter|(sub)?section|theorem|lemma|proposition|corollary|appendix)~\\ref
|
||||
(?!#1:Capitalize! before! references)POSIX:([^[:alnum:]]|^)(chapter|(sub)?section|theorem|lemma|proposition|corollary|appendix)~\\ref
|
||||
|
||||
# spell it out.
|
||||
# PCRE:(?i)\bintro\b(?!#Spell! it! out.! This! comment! is! not! used.)
|
||||
# POSIX:([^[:alnum:]]|^)intro([^[:alnum:]]|$)
|
||||
|
||||
# Pretty tables--see http://texdoc.net/texmf-dist/doc/latex/booktabs/booktabs.pdf
|
||||
(?!#-2:Use! \toprule,! midrule,! or! \bottomrule! from! booktabs)\\hline
|
||||
# This relies on it being on a single line, and not having anything
|
||||
# else on that line. With PCRE we could match balanced [] and {},
|
||||
# but I wonder if it's worth the complexity...
|
||||
(?!#-2:Vertical! rules! in! tables! are! ugly)\\begin\{(array|tabularx?\*?)\}(\[.*\])?\{.*\|.*\}
|
||||
|
||||
}
|
||||
|
||||
|
||||
#####################################################################
|
||||
#
|
||||
# Here you can list the path of where ChkTeX should look for files it
|
||||
# \inputs. The // postfix is now supported; if you append a double
|
||||
# path-separator we'll recursively search that directory directories.
|
||||
# MS-DOS users must append \\ instead, e.g. "C:\EMTEX\\".
|
||||
#
|
||||
# If you under either MS-DOS or UNIX wish to search an entire
|
||||
# partition or the complete directory tree, you must use *three*
|
||||
# slashes, e.g. "c:\\\" or "///". This may be considered to be a bug.
|
||||
#
|
||||
# By default, we'll search the current directory (not recursively,
|
||||
# put "//" in the list for this); any paths specified below will be
|
||||
# searched in addition to this.
|
||||
#
|
||||
|
||||
TeXInputs
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
#####################################################################
|
||||
#
|
||||
# Here you may specify more output formats for use with the -v option,
|
||||
# it simply indexes into this list. Remember to use ! instead of \,
|
||||
# though.
|
||||
#
|
||||
# For explanation of how % fields expand; look at ChkTeX.{dvi,ps,pdf}.
|
||||
#
|
||||
# We will by default select entry number _two_ in this list (we count
|
||||
# from 0), and -v without any parameter selects entry number _three_.
|
||||
#
|
||||
|
||||
OutFormat
|
||||
{
|
||||
|
||||
# -v0; silent mode
|
||||
%f%b%l%b%c%b%n%b%m!n
|
||||
|
||||
# -v1; normal mode
|
||||
"%k %n in %f line %l: %m!n%r%s%t!n%u!n"
|
||||
|
||||
# -v2; fancy mode
|
||||
"%k %n in %f line %l: %m!n%r%i%s%I%t!n!n"
|
||||
|
||||
# -v3; lacheck mode
|
||||
"!"%f!", line %l: %m!n"
|
||||
|
||||
# -v4; verbose lacheck mode
|
||||
"!"%f!", line %l: %m!n%r%s%t!n%u!n"
|
||||
|
||||
# -v5; no line number, ease auto-test
|
||||
"%k %n in %f: %m!n%r%s%t!n%u!n"
|
||||
|
||||
# -v6; emacs compilation mode
|
||||
"!"%f!", line %l.%c:(#%n) %m!n"
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
#####################################################################
|
||||
#
|
||||
# These commands should be ignored when detecting whether a command
|
||||
# is ended by a space. You can specify regular expressions in the []
|
||||
# section in case you have many custom macros that can be safely
|
||||
# terminated with a space.
|
||||
#
|
||||
|
||||
Silent
|
||||
{
|
||||
\rm \em \bf \it \sl \sf \sc \tt \selectfont
|
||||
\rmfamily \sffamily \ttfamily \mdseries \bfseries
|
||||
\slshape \scshape \relax
|
||||
\vskip \pagebreak \nopagebreak
|
||||
|
||||
\textrm \textem \textbf \textit \textsl \textsf \textsc \texttt
|
||||
|
||||
\clearpage \ddots \dotfill \flushbottom \fussy \indent \linebreak
|
||||
\onecolumn \pagebreak \pushtabs \poptabs \scriptsize \sloppy
|
||||
\twocolumn \vdots
|
||||
\today \kill \newline \thicklines \thinlines
|
||||
|
||||
\columnsep \space \item \tiny \footnotesize \small \normalsize
|
||||
\normal \large \Large \LARGE \huge \Huge \printindex
|
||||
|
||||
\newpage \listoffigures \listoftables \tableofcontents
|
||||
\maketitle \makeindex
|
||||
|
||||
\hline \hrule \vrule
|
||||
|
||||
\centering
|
||||
|
||||
\bigskip \medskip \smallskip
|
||||
|
||||
\noindent \expandafter
|
||||
|
||||
\makeatletter \makeatother
|
||||
|
||||
\columnseprule
|
||||
|
||||
\textwidth \textheight \hsize \vsize
|
||||
|
||||
\if \fi \else
|
||||
|
||||
\csname \endcsname
|
||||
|
||||
\z@ \p@ \@warning \typeout
|
||||
|
||||
\dots \ldots \input \endinput \nextline \leavevmode \cdots
|
||||
\appendix \listfiles \and \quad
|
||||
\hskip \vfill \vfil \hfill \hfil \topmargin \oddsidemargin
|
||||
\frenchspacing \nonfrenchspacing
|
||||
\begingroup \endgroup \par
|
||||
|
||||
\vrefwarning \upshape \headheight \headsep \hoffset \voffset
|
||||
\cdot \qquad
|
||||
\left \right
|
||||
\qedhere
|
||||
|
||||
\xspace
|
||||
|
||||
\addlinespace \cr \fill \frontmatter
|
||||
\toprule \midrule \bottomrule
|
||||
|
||||
}[
|
||||
# Here you can put regular expressions to match Silent macros. It was
|
||||
# designed for the case where you have many custom macros sharing a
|
||||
# common prefix, but can of course be used for other things.
|
||||
|
||||
# Support ConTeXt to at least some extent
|
||||
\\start.* \\stop.*
|
||||
|
||||
]
|
||||
|
||||
#####################################################################
|
||||
#
|
||||
# Here, you can specify the length of various dashes. We sort the
|
||||
# dash according to which type of characters that are on the left and
|
||||
# right of it. We are only conclusive if they are the same.
|
||||
#
|
||||
# We associate as follows:
|
||||
#
|
||||
# Name Type of character on each side
|
||||
# HyphDash Alphabetic (foo-bar)
|
||||
# NumDash Numeric (2--3)
|
||||
# WordDash Space (like this --- see?)
|
||||
#
|
||||
# Below you specify how many dashes which are legal in each case. We
|
||||
# define 0 as a magic constant which always generates an error. You
|
||||
# may specify more than one legal dash-length.
|
||||
#
|
||||
# Let's look at an example. You use the following dash-syntax:
|
||||
#
|
||||
# foo-bar
|
||||
# 2--3
|
||||
# like this---see?
|
||||
#
|
||||
#
|
||||
# HYPHDASH { 1 3 } # Either a hyphen, or inter-word
|
||||
# NUMDASH { 2 } # Between words
|
||||
# WORDDASH { 0 } # We never use this
|
||||
#
|
||||
|
||||
HyphDash
|
||||
{
|
||||
1 3
|
||||
}
|
||||
|
||||
NumDash
|
||||
{
|
||||
2
|
||||
}
|
||||
|
||||
WordDash
|
||||
{
|
||||
3
|
||||
}
|
||||
|
||||
#####################################################################
|
||||
#
|
||||
# Here are exceptions to the dash rules above. For example, an
|
||||
# n-dash -- between words is usually wrong, but in some cases it is
|
||||
# correct, such as when naming a theorem. The Birch--Swinnerton-Dyer
|
||||
# conjecture is one example where the difference matters. You can
|
||||
# tell that Birch is one person and Swinnerton-Dyer is another.
|
||||
#
|
||||
# Adding line suppressions for these is possible, but can quickly
|
||||
# become tedious if a certain theorem is referenced often. For this
|
||||
# reason exceptions can be specified here. They are case-sensitive.
|
||||
#
|
||||
|
||||
DashExcpt
|
||||
{
|
||||
Birch--Swinnerton-Dyer
|
||||
}
|
||||
|
||||
#####################################################################
|
||||
#
|
||||
# This keyword indicates commands whose argument isn't LaTeX code,
|
||||
# and thus should be ignored.
|
||||
#
|
||||
# After the command, you may place arguments that you wish that
|
||||
# should be wiped in the process; use [] for optional arguments, {}
|
||||
# for required ones and * if the command supports an alternative
|
||||
# variant. These should be separated from the command with a colon.
|
||||
# Some commands (e.g. \cmidrule) use () to delimit and optional
|
||||
# argument and so this syntax is supported as well.
|
||||
#
|
||||
# For instance, if you would like to wipe the \newcommand command,
|
||||
# you would declare it as \newcommand:*[][]{}
|
||||
#
|
||||
# These commands may be "executed" before they're wiped, so you will
|
||||
# typically also wish to list filehandling commands and similar here.
|
||||
#
|
||||
|
||||
WipeArg
|
||||
{
|
||||
\label:{} \ref:{} \eqref:{} \vref:{} \pageref:{} \index:[]{}
|
||||
\cite:[][]{} \nocite:{}
|
||||
\input:{} \verbatiminput:[]{} \listinginput:[]{}{}
|
||||
\verbatimtabinput:[]{} \include:{} \includeonly:{}
|
||||
\bibitem:[]{}
|
||||
\cline:{} \cmidrule:[](){}
|
||||
\href:{}{}
|
||||
# Cleveref -- there are many others that could be here as well...
|
||||
\cref:*{} \cpageref:*{} \crefrange:*{}{} \cpagerefrange:*{}{}
|
||||
\Cref:*{} \Cpageref:*{} \Crefrange:*{}{} \Cpagerefrange:*{}{}
|
||||
# natbib
|
||||
\citet:*[][]{} \citep:*[][]{} \citealt:*{} \citealp:*[]{} \citeauthor:*{}
|
||||
\Citet:*[][]{} \Citep:*[][]{} \Citealt:*{} \Citealp:*[]{} \Citeauthor:{}
|
||||
\citetext:{} \citeyear:*{} \citeyearpar:{}
|
||||
# Listings
|
||||
\lstinline:{}
|
||||
}
|
||||
|
||||
#####################################################################
|
||||
#
|
||||
# These environments contain material which will be typeset as
|
||||
# mathematics by LaTeX. This turns on/off some warnings.
|
||||
#
|
||||
# We will automagically append a * to each keyword.
|
||||
#
|
||||
|
||||
MathEnvir
|
||||
{
|
||||
displaymath math eqnarray array equation
|
||||
align alignat gather flalign multline
|
||||
mathpar
|
||||
}
|
||||
|
||||
#####################################################################
|
||||
#
|
||||
# These commands contain material which will be typeset as mathematics
|
||||
# by LaTeX. The commands are assumed to have one mandatory argument
|
||||
# which is in math mode. This turns on/off some warnings.
|
||||
#
|
||||
|
||||
MathCmd
|
||||
{
|
||||
\ensuremath
|
||||
}
|
||||
|
||||
#####################################################################
|
||||
#
|
||||
# These commands contain material which will _not_ be typeset as
|
||||
# mathematics by LaTeX even if it would otherwise be in mathmode. The
|
||||
# commands are assumed to have one mandatory argument which is in text
|
||||
# mode. This turns on/off some warnings.
|
||||
#
|
||||
|
||||
TextCmd
|
||||
{
|
||||
\text \intertext \shortintertext \mbox
|
||||
}
|
||||
|
||||
#####################################################################
|
||||
#
|
||||
# These environments contains material which contents should be
|
||||
# ignored.
|
||||
#
|
||||
# We will automagically append a * to each keyword.
|
||||
#
|
||||
|
||||
VerbEnvir
|
||||
{
|
||||
verbatim comment listing verbatimtab rawhtml errexam picture texdraw
|
||||
filecontents pgfpicture tikzpicture
|
||||
lstlisting grammar
|
||||
}
|
||||
|
||||
#####################################################################
|
||||
#
|
||||
# ChkTeX does automagically catch most abbreviations; the ones we
|
||||
# need to list here, are those which are most likely to be followed
|
||||
# by a word with an upper-case letter (that is not the beginning of a
|
||||
# new sentence).
|
||||
#
|
||||
# The case-insensitive abbreviations are not really case-insensitive,
|
||||
# it seems to be more practical to only let the first character be
|
||||
# case-insensitive, while the remaining are case-sensitive.
|
||||
#
|
||||
# To speed up the searching process somewhat, we require that these
|
||||
# end in a `.', this should not be a problem.
|
||||
#
|
||||
# Much of this work (both the abbreviations below, and the regexps
|
||||
# necessary to catch the remaining automatically) have been provided
|
||||
# by Russ Bubley, <russ@scs.leeds.ac.uk>.
|
||||
#
|
||||
|
||||
Abbrev
|
||||
{
|
||||
# Ordinals
|
||||
1st. 2nd. 3rd. 4th.
|
||||
# Titles
|
||||
Mr. Mrs. Miss. Ms. Dr. Prof. St.
|
||||
|
||||
#
|
||||
# Days
|
||||
# Mon. Tue. Wed. Thu. Fri. Sat. Sun.
|
||||
#
|
||||
# Months
|
||||
# Jan. Feb. Mar. Apr. May. Jun. Jul. Aug. Sep. Oct. Nov. Dec.
|
||||
#
|
||||
# Letters
|
||||
# Kt. Jr.
|
||||
#
|
||||
# Corporate
|
||||
# Co. Ltd.
|
||||
#
|
||||
# Addresses
|
||||
# Rd. Dr. St. Ave. Cres. Gdns. Sq. Circ. Terr. Pl. Arc. La. Clo. Ho. Est. Gn.
|
||||
#
|
||||
# Misc.
|
||||
# oe. pbab. ps. rsvp. Tx.
|
||||
}
|
||||
[
|
||||
###
|
||||
#
|
||||
# The first letter is case-insensitive in the abbrevs in this
|
||||
# list. Due to the nature of the checking algorithm used for
|
||||
# this, entries consisting of only one character will be
|
||||
# silently ignored.
|
||||
#
|
||||
##
|
||||
|
||||
# Latin
|
||||
# cf. "et al." etc. qed. qv. viz.
|
||||
#
|
||||
# Corporate
|
||||
# inc. plc.
|
||||
#
|
||||
# Misc
|
||||
# fax. pcs. qty. tel. misc.
|
||||
]
|
||||
|
||||
#####################################################################
|
||||
#
|
||||
# Commands which accent characters, meaning that \i or \j (\imath and
|
||||
# \jmath in mathmode) should be used instead of `i' and `j'
|
||||
#
|
||||
|
||||
IJAccent
|
||||
{
|
||||
\hat \check \breve \acute \grave \tilde \bar \vec \dot \ddot
|
||||
|
||||
\' \` \^ \" \~ \= \. \u \v \H \t
|
||||
|
||||
###
|
||||
#
|
||||
# The remaining accent commands (\c,\d,\b) put their accent _under_
|
||||
# the character, not above, and should thus be used with normal i's
|
||||
# and j's.
|
||||
#
|
||||
###
|
||||
|
||||
}
|
||||
|
||||
#####################################################################
|
||||
#
|
||||
# Commands which, when the group is terminated, needs italic
|
||||
# correction.
|
||||
#
|
||||
|
||||
Italic
|
||||
{
|
||||
\it \em \sl
|
||||
\itshape \slshape
|
||||
}
|
||||
|
||||
#####################################################################
|
||||
#
|
||||
# Commands which makes the font non-italic.
|
||||
#
|
||||
|
||||
NonItalic
|
||||
{
|
||||
\bf \rm \sf \tt \sc
|
||||
\upshape
|
||||
}
|
||||
|
||||
#####################################################################
|
||||
#
|
||||
# Commands which put their argument into italic (and thus possibly
|
||||
# needs italic correction in the end).
|
||||
#
|
||||
# This is currently empty, since \textit, \textsl and \emph do that
|
||||
# automatically.
|
||||
#
|
||||
|
||||
ItalCmd
|
||||
{
|
||||
}
|
||||
|
||||
#####################################################################
|
||||
#
|
||||
# These commands all have in common that a pagebreak right in front
|
||||
# of them is highly undesirable; thus there should be no space in
|
||||
# front of them.
|
||||
#
|
||||
|
||||
PostLink
|
||||
{
|
||||
\index \label
|
||||
}
|
||||
|
||||
#####################################################################
|
||||
#
|
||||
# These commands should not have a space in front of them for various
|
||||
# reasons. I.e. much the same as POSTLINK, but produces another
|
||||
# warning.
|
||||
#
|
||||
|
||||
NotPreSpaced
|
||||
{
|
||||
\footnote \footnotemark \/
|
||||
}
|
||||
|
||||
#####################################################################
|
||||
#
|
||||
# The commands listed here, should be prepended with a `~', as in
|
||||
# "look in table~\ref{foo}", to avoid the references being split
|
||||
# across lines.
|
||||
#
|
||||
|
||||
Linker
|
||||
{
|
||||
\ref \vref \pageref \eqref \cite \pref
|
||||
}
|
||||
|
||||
#####################################################################
|
||||
#
|
||||
# Commands/characters which should have \cdots in between, e.g.
|
||||
# $1+2+3+\cdots+n$.
|
||||
#
|
||||
|
||||
CenterDots
|
||||
{
|
||||
= + - \cdot \div & \times \geq \leq < > , ;
|
||||
}
|
||||
|
||||
#####################################################################
|
||||
#
|
||||
# Commands/characters which should have \ldots in between, e.g.
|
||||
# $1,2,3,\ldots,n$.
|
||||
#
|
||||
|
||||
LowDots
|
||||
{
|
||||
.
|
||||
}
|
||||
|
||||
#####################################################################
|
||||
#
|
||||
# In maths mode, there are certain aliases for mathematical operators
|
||||
# like sin, cos, etc. Ignore the leading backslash in the commands,
|
||||
# and so forth. You should list these below.
|
||||
#
|
||||
|
||||
MathRoman
|
||||
{
|
||||
log lg ln lim limsup liminf sin arcsin sinh cos arccos cosh tan
|
||||
arctan tanh cot coth sec csc max min sup inf arg ker dim hom det
|
||||
exp Pr gcd deg bmod pmod mod
|
||||
}
|
||||
|
||||
#####################################################################
|
||||
#
|
||||
# These TeX commands have become unnecessary, as there are LaTeX
|
||||
# commands that does the same. Purists should thus avoid these in
|
||||
# their code.
|
||||
#
|
||||
# (These are a spell-corrected version of those lacheck uses).
|
||||
#
|
||||
|
||||
Primitives
|
||||
{
|
||||
\above \advance \catcode \chardef \closein \closeout \copy \count
|
||||
\countdef \cr \crcr \csname \delcode \dimendef \dimen \divide
|
||||
\expandafter \font \hskip \vskip \openout
|
||||
}
|
||||
|
||||
#####################################################################
|
||||
#
|
||||
# Format: \command:characters
|
||||
#
|
||||
# We'll emit a warning if any of characters are found after the
|
||||
# command.
|
||||
#
|
||||
|
||||
NoCharNext
|
||||
{
|
||||
\left:{}$ \right:{}$
|
||||
}
|
||||
|
||||
#####################################################################
|
||||
#
|
||||
# We're killing \verb@...@ commands and the arguments of the commands
|
||||
# listed above in WipeArg by overwriting them with a string or a
|
||||
# single character.
|
||||
#
|
||||
# This should not contain an alphabetic character (in case the user
|
||||
# writes (\foo\verb@bar@), neither should it contain be one of
|
||||
# LaTeX's reserved characters (`#$%&~_^\{}'), or any parenthesis
|
||||
# character ('()[]{}'). If possible, don't use a punctuation
|
||||
# character, either, or any spacing character.
|
||||
#
|
||||
# The asterisk is also unsuitable, as some commands behave in another
|
||||
# way if they are appended with an asterisk. Which more or less
|
||||
# leaves us with the pipe.
|
||||
#
|
||||
# Please note that this may also be a _string_, which will be
|
||||
# repeated until the proper length is reached.
|
||||
#
|
||||
|
||||
VerbClear = "|"
|
||||
|
||||
#
|
||||
# All for now - have fun.
|
||||
#
|
||||
#####################################################################
|
226
.gitignore
vendored
Normal file
226
.gitignore
vendored
Normal file
@ -0,0 +1,226 @@
|
||||
|
||||
# Created by https://www.gitignore.io/api/latex
|
||||
|
||||
### LaTeX ###
|
||||
## Core latex/pdflatex auxiliary files:
|
||||
*.aux
|
||||
*.lof
|
||||
*.log
|
||||
*.lot
|
||||
*.fls
|
||||
*.out
|
||||
*.toc
|
||||
*.fmt
|
||||
*.fot
|
||||
*.cb
|
||||
*.cb2
|
||||
|
||||
## Intermediate documents:
|
||||
*.dvi
|
||||
*-converted-to.*
|
||||
# these rules might exclude image files for figures etc.
|
||||
# *.ps
|
||||
# *.eps
|
||||
# *.pdf
|
||||
|
||||
## Generated if empty string is given at "Please type another file name for output:"
|
||||
.pdf
|
||||
|
||||
## Bibliography auxiliary files (bibtex/biblatex/biber):
|
||||
*.bbl
|
||||
*.bcf
|
||||
*.blg
|
||||
*-blx.aux
|
||||
*-blx.bib
|
||||
*.run.xml
|
||||
|
||||
## Build tool auxiliary files:
|
||||
*.fdb_latexmk
|
||||
*.synctex
|
||||
*.synctex(busy)
|
||||
*.synctex.gz
|
||||
*.synctex.gz(busy)
|
||||
*.pdfsync
|
||||
|
||||
## Auxiliary and intermediate files from other packages:
|
||||
# algorithms
|
||||
*.alg
|
||||
*.loa
|
||||
|
||||
# achemso
|
||||
acs-*.bib
|
||||
|
||||
# amsthm
|
||||
*.thm
|
||||
|
||||
# beamer
|
||||
*.nav
|
||||
*.pre
|
||||
*.snm
|
||||
*.vrb
|
||||
|
||||
# changes
|
||||
*.soc
|
||||
|
||||
# cprotect
|
||||
*.cpt
|
||||
|
||||
# elsarticle (documentclass of Elsevier journals)
|
||||
*.spl
|
||||
|
||||
# endnotes
|
||||
*.ent
|
||||
|
||||
# fixme
|
||||
*.lox
|
||||
|
||||
# feynmf/feynmp
|
||||
*.mf
|
||||
*.mp
|
||||
*.t[1-9]
|
||||
*.t[1-9][0-9]
|
||||
*.tfm
|
||||
|
||||
#(r)(e)ledmac/(r)(e)ledpar
|
||||
*.end
|
||||
*.?end
|
||||
*.[1-9]
|
||||
*.[1-9][0-9]
|
||||
*.[1-9][0-9][0-9]
|
||||
*.[1-9]R
|
||||
*.[1-9][0-9]R
|
||||
*.[1-9][0-9][0-9]R
|
||||
*.eledsec[1-9]
|
||||
*.eledsec[1-9]R
|
||||
*.eledsec[1-9][0-9]
|
||||
*.eledsec[1-9][0-9]R
|
||||
*.eledsec[1-9][0-9][0-9]
|
||||
*.eledsec[1-9][0-9][0-9]R
|
||||
|
||||
# glossaries
|
||||
*.acn
|
||||
*.acr
|
||||
*.glg
|
||||
*.glo
|
||||
*.gls
|
||||
*.glsdefs
|
||||
|
||||
# gnuplottex
|
||||
*-gnuplottex-*
|
||||
|
||||
# gregoriotex
|
||||
*.gaux
|
||||
*.gtex
|
||||
|
||||
# hyperref
|
||||
*.brf
|
||||
|
||||
# knitr
|
||||
*-concordance.tex
|
||||
# TODO Comment the next line if you want to keep your tikz graphics files
|
||||
*.tikz
|
||||
*-tikzDictionary
|
||||
|
||||
# listings
|
||||
*.lol
|
||||
|
||||
# makeidx
|
||||
*.idx
|
||||
*.ilg
|
||||
*.ind
|
||||
*.ist
|
||||
|
||||
# minitoc
|
||||
*.maf
|
||||
*.mlf
|
||||
*.mlt
|
||||
*.mtc[0-9]*
|
||||
*.slf[0-9]*
|
||||
*.slt[0-9]*
|
||||
*.stc[0-9]*
|
||||
|
||||
# minted
|
||||
_minted*
|
||||
*.pyg
|
||||
|
||||
# morewrites
|
||||
*.mw
|
||||
|
||||
# nomencl
|
||||
*.nlo
|
||||
|
||||
# pax
|
||||
*.pax
|
||||
|
||||
# sagetex
|
||||
*.sagetex.sage
|
||||
*.sagetex.py
|
||||
*.sagetex.scmd
|
||||
|
||||
# scrwfile
|
||||
*.wrt
|
||||
|
||||
# sympy
|
||||
*.sout
|
||||
*.sympy
|
||||
sympy-plots-for-*.tex/
|
||||
|
||||
# pdfcomment
|
||||
*.upa
|
||||
*.upb
|
||||
|
||||
# pythontex
|
||||
*.pytxcode
|
||||
pythontex-files-*/
|
||||
|
||||
# thmtools
|
||||
*.loe
|
||||
|
||||
# TikZ & PGF
|
||||
*.dpth
|
||||
*.md5
|
||||
*.auxlock
|
||||
|
||||
# todonotes
|
||||
*.tdo
|
||||
|
||||
# easy-todo
|
||||
*.lod
|
||||
|
||||
# xindy
|
||||
*.xdy
|
||||
|
||||
# xypic precompiled matrices
|
||||
*.xyc
|
||||
|
||||
# endfloat
|
||||
*.ttt
|
||||
*.fff
|
||||
|
||||
# Latexian
|
||||
TSWLatexianTemp*
|
||||
|
||||
## Editors:
|
||||
# WinEdt
|
||||
*.bak
|
||||
*.sav
|
||||
|
||||
# Texpad
|
||||
.texpadtmp
|
||||
|
||||
# Kile
|
||||
*.backup
|
||||
|
||||
# KBibTeX
|
||||
*~[0-9]*
|
||||
|
||||
# auto folder when using emacs and auctex
|
||||
/auto/*
|
||||
|
||||
# expex forward references with \gathertags
|
||||
*-tags.tex
|
||||
|
||||
# End of https://www.gitignore.io/api/latex
|
||||
|
||||
# Who does want build outputs in its repo ?
|
||||
*.pdf
|
25
Makefile
Normal file
25
Makefile
Normal file
@ -0,0 +1,25 @@
|
||||
# borrowed from
|
||||
# http://tex.stackexchange.com/questions/40738/how-to-properly-make-a-latex-project
|
||||
|
||||
VIEWER=evince
|
||||
|
||||
.PHONY: all clean
|
||||
|
||||
all: main.pdf
|
||||
|
||||
view: main.pdf
|
||||
$(VIEWER) out/main.pdf
|
||||
|
||||
check: FORCE
|
||||
chktex -g0 -l .chktexrc main.tex
|
||||
|
||||
%.pdf: %.tex FORCE
|
||||
latexmk -output-directory=out -pdf -xelatex -use-make $<
|
||||
|
||||
clean:
|
||||
rm -r out
|
||||
|
||||
# Fore some reasons that are far behind my understanding of make, The PHONY
|
||||
# rule doesn't work for the "%.pdf" rule, so let's use this old trick to
|
||||
# force-rebuild them every time.
|
||||
FORCE:
|
22
default.nix
Normal file
22
default.nix
Normal file
@ -0,0 +1,22 @@
|
||||
{
|
||||
nixpkgs ? <nixpkgs>, system ? builtins.currentSystem
|
||||
}:
|
||||
with import nixpkgs { inherit system; };
|
||||
stdenv.mkDerivation rec {
|
||||
name = "rapport-stage";
|
||||
version = "2017";
|
||||
buildInputs = [
|
||||
(texlive.combine {
|
||||
inherit (texlive) scheme-medium syntax todo;
|
||||
})
|
||||
];
|
||||
|
||||
src = ./.;
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/nix-support
|
||||
cp out/main.pdf $out/
|
||||
echo "file pdf $out/main.pdf" >> $out/nix-support/hydra-build-products
|
||||
'';
|
||||
}
|
||||
|
BIN
fonts/Crimson-Bold.otf
Normal file
BIN
fonts/Crimson-Bold.otf
Normal file
Binary file not shown.
BIN
fonts/Crimson-BoldItalic.otf
Normal file
BIN
fonts/Crimson-BoldItalic.otf
Normal file
Binary file not shown.
BIN
fonts/Crimson-Italic.otf
Normal file
BIN
fonts/Crimson-Italic.otf
Normal file
Binary file not shown.
BIN
fonts/Crimson-Roman.otf
Normal file
BIN
fonts/Crimson-Roman.otf
Normal file
Binary file not shown.
BIN
fonts/Crimson-Semibold.otf
Normal file
BIN
fonts/Crimson-Semibold.otf
Normal file
Binary file not shown.
BIN
fonts/Crimson-SemiboldItalic.otf
Normal file
BIN
fonts/Crimson-SemiboldItalic.otf
Normal file
Binary file not shown.
447
mathpartir.sty
Normal file
447
mathpartir.sty
Normal file
@ -0,0 +1,447 @@
|
||||
% Mathpartir --- Math Paragraph for Typesetting Inference Rules
|
||||
%
|
||||
% Copyright (C) 2001, 2002, 2003, 2004, 2005 Didier Rémy
|
||||
%
|
||||
% Author : Didier Remy
|
||||
% Version : 1.2.0
|
||||
% Bug Reports : to author
|
||||
% Web Site : http://pauillac.inria.fr/~remy/latex/
|
||||
%
|
||||
% Mathpartir is free software; you can redistribute it and/or modify
|
||||
% it under the terms of the GNU General Public License as published by
|
||||
% the Free Software Foundation; either version 2, or (at your option)
|
||||
% any later version.
|
||||
%
|
||||
% Mathpartir is distributed in the hope that it will be useful,
|
||||
% but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
% GNU General Public License for more details
|
||||
% (http://pauillac.inria.fr/~remy/license/GPL).
|
||||
%
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% File mathpartir.sty (LaTeX macros)
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
\NeedsTeXFormat{LaTeX2e}
|
||||
\ProvidesPackage{mathpartir}
|
||||
[2005/12/20 version 1.2.0 Math Paragraph for Typesetting Inference Rules]
|
||||
|
||||
%%
|
||||
|
||||
%% Identification
|
||||
%% Preliminary declarations
|
||||
|
||||
\RequirePackage {keyval}
|
||||
|
||||
%% Options
|
||||
%% More declarations
|
||||
|
||||
%% PART I: Typesetting maths in paragraphe mode
|
||||
|
||||
%% \newdimen \mpr@tmpdim
|
||||
%% Dimens are a precious ressource. Uses seems to be local.
|
||||
\let \mpr@tmpdim \@tempdima
|
||||
|
||||
% To ensure hevea \hva compatibility, \hva should expands to nothing
|
||||
% in mathpar or in inferrule
|
||||
\let \mpr@hva \empty
|
||||
|
||||
%% normal paragraph parametters, should rather be taken dynamically
|
||||
\def \mpr@savepar {%
|
||||
\edef \MathparNormalpar
|
||||
{\noexpand \lineskiplimit \the\lineskiplimit
|
||||
\noexpand \lineskip \the\lineskip}%
|
||||
}
|
||||
|
||||
\def \mpr@rulelineskip {\lineskiplimit=0.3em\lineskip=0.2em plus 0.1em}
|
||||
\def \mpr@lesslineskip {\lineskiplimit=0.6em\lineskip=0.5em plus 0.2em}
|
||||
\def \mpr@lineskip {\lineskiplimit=1.2em\lineskip=1.2em plus 0.2em}
|
||||
\let \MathparLineskip \mpr@lineskip
|
||||
\def \mpr@paroptions {\MathparLineskip}
|
||||
\let \mpr@prebindings \relax
|
||||
|
||||
\newskip \mpr@andskip \mpr@andskip 2em plus 0.5fil minus 0.5em
|
||||
|
||||
\def \mpr@goodbreakand
|
||||
{\hskip -\mpr@andskip \penalty -1000\hskip \mpr@andskip}
|
||||
\def \mpr@and {\hskip \mpr@andskip}
|
||||
\def \mpr@andcr {\penalty 50\mpr@and}
|
||||
\def \mpr@cr {\penalty -10000\mpr@and}
|
||||
\def \mpr@eqno #1{\mpr@andcr #1\hskip 0em plus -1fil \penalty 10}
|
||||
|
||||
\def \mpr@bindings {%
|
||||
\let \and \mpr@andcr
|
||||
\let \par \mpr@andcr
|
||||
\let \\\mpr@cr
|
||||
\let \eqno \mpr@eqno
|
||||
\let \hva \mpr@hva
|
||||
}
|
||||
\let \MathparBindings \mpr@bindings
|
||||
|
||||
% \@ifundefined {ignorespacesafterend}
|
||||
% {\def \ignorespacesafterend {\aftergroup \ignorespaces}
|
||||
|
||||
\newenvironment{mathpar}[1][]
|
||||
{$$\mpr@savepar \parskip 0em \hsize \linewidth \centering
|
||||
\vbox \bgroup \mpr@prebindings \mpr@paroptions #1\ifmmode $\else
|
||||
\noindent $\displaystyle\fi
|
||||
\MathparBindings}
|
||||
{\unskip \ifmmode $\fi\egroup $$\ignorespacesafterend}
|
||||
|
||||
\newenvironment{mathparpagebreakable}[1][]
|
||||
{\begingroup
|
||||
\par
|
||||
\mpr@savepar \parskip 0em \hsize \linewidth \centering
|
||||
\mpr@prebindings \mpr@paroptions #1%
|
||||
\vskip \abovedisplayskip \vskip -\lineskip%
|
||||
\ifmmode \else $\displaystyle\fi
|
||||
\MathparBindings
|
||||
}
|
||||
{\unskip
|
||||
\ifmmode $\fi \par\endgroup
|
||||
\vskip \belowdisplayskip
|
||||
\noindent
|
||||
\ignorespacesafterend}
|
||||
|
||||
% \def \math@mathpar #1{\setbox0 \hbox {$\displaystyle #1$}\ifnum
|
||||
% \wd0 < \hsize $$\box0$$\else \bmathpar #1\emathpar \fi}
|
||||
|
||||
%%% HOV BOXES
|
||||
|
||||
\def \mathvbox@ #1{\hbox \bgroup \mpr@normallineskip
|
||||
\vbox \bgroup \tabskip 0em \let \\ \cr
|
||||
\halign \bgroup \hfil $##$\hfil\cr #1\crcr \egroup \egroup
|
||||
\egroup}
|
||||
|
||||
\def \mathhvbox@ #1{\setbox0 \hbox {\let \\\qquad $#1$}\ifnum \wd0 < \hsize
|
||||
\box0\else \mathvbox {#1}\fi}
|
||||
|
||||
|
||||
%% Part II -- operations on lists
|
||||
|
||||
\newtoks \mpr@lista
|
||||
\newtoks \mpr@listb
|
||||
|
||||
\long \def\mpr@cons #1\mpr@to#2{\mpr@lista {\\{#1}}\mpr@listb \expandafter
|
||||
{#2}\edef #2{\the \mpr@lista \the \mpr@listb}}
|
||||
|
||||
\long \def\mpr@snoc #1\mpr@to#2{\mpr@lista {\\{#1}}\mpr@listb \expandafter
|
||||
{#2}\edef #2{\the \mpr@listb\the\mpr@lista}}
|
||||
|
||||
\long \def \mpr@concat#1=#2\mpr@to#3{\mpr@lista \expandafter {#2}\mpr@listb
|
||||
\expandafter {#3}\edef #1{\the \mpr@listb\the\mpr@lista}}
|
||||
|
||||
\def \mpr@head #1\mpr@to #2{\expandafter \mpr@head@ #1\mpr@head@ #1#2}
|
||||
\long \def \mpr@head@ #1#2\mpr@head@ #3#4{\def #4{#1}\def#3{#2}}
|
||||
|
||||
\def \mpr@flatten #1\mpr@to #2{\expandafter \mpr@flatten@ #1\mpr@flatten@ #1#2}
|
||||
\long \def \mpr@flatten@ \\#1\\#2\mpr@flatten@ #3#4{\def #4{#1}\def #3{\\#2}}
|
||||
|
||||
\def \mpr@makelist #1\mpr@to #2{\def \mpr@all {#1}%
|
||||
\mpr@lista {\\}\mpr@listb \expandafter {\mpr@all}\edef \mpr@all {\the
|
||||
\mpr@lista \the \mpr@listb \the \mpr@lista}\let #2\empty
|
||||
\def \mpr@stripof ##1##2\mpr@stripend{\def \mpr@stripped{##2}}\loop
|
||||
\mpr@flatten \mpr@all \mpr@to \mpr@one
|
||||
\expandafter \mpr@snoc \mpr@one \mpr@to #2\expandafter \mpr@stripof
|
||||
\mpr@all \mpr@stripend
|
||||
\ifx \mpr@stripped \empty \let \mpr@isempty 0\else \let \mpr@isempty 1\fi
|
||||
\ifx 1\mpr@isempty
|
||||
\repeat
|
||||
}
|
||||
|
||||
\def \mpr@rev #1\mpr@to #2{\let \mpr@tmp \empty
|
||||
\def \\##1{\mpr@cons ##1\mpr@to \mpr@tmp}#1\let #2\mpr@tmp}
|
||||
|
||||
%% Part III -- Type inference rules
|
||||
|
||||
\newif \if@premisse
|
||||
\newbox \mpr@hlist
|
||||
\newbox \mpr@vlist
|
||||
\newif \ifmpr@center \mpr@centertrue
|
||||
\def \mpr@htovlist {%
|
||||
\setbox \mpr@hlist
|
||||
\hbox {\strut
|
||||
\ifmpr@center \hskip -0.5\wd\mpr@hlist\fi
|
||||
\unhbox \mpr@hlist}%
|
||||
\setbox \mpr@vlist
|
||||
\vbox {\if@premisse \box \mpr@hlist \unvbox \mpr@vlist
|
||||
\else \unvbox \mpr@vlist \box \mpr@hlist
|
||||
\fi}%
|
||||
}
|
||||
% OLD version
|
||||
% \def \mpr@htovlist {%
|
||||
% \setbox \mpr@hlist
|
||||
% \hbox {\strut \hskip -0.5\wd\mpr@hlist \unhbox \mpr@hlist}%
|
||||
% \setbox \mpr@vlist
|
||||
% \vbox {\if@premisse \box \mpr@hlist \unvbox \mpr@vlist
|
||||
% \else \unvbox \mpr@vlist \box \mpr@hlist
|
||||
% \fi}%
|
||||
% }
|
||||
|
||||
\def \mpr@item #1{$\displaystyle #1$}
|
||||
\def \mpr@sep{2em}
|
||||
\def \mpr@blank { }
|
||||
\def \mpr@hovbox #1#2{\hbox
|
||||
\bgroup
|
||||
\ifx #1T\@premissetrue
|
||||
\else \ifx #1B\@premissefalse
|
||||
\else
|
||||
\PackageError{mathpartir}
|
||||
{Premisse orientation should either be T or B}
|
||||
{Fatal error in Package}%
|
||||
\fi \fi
|
||||
\def \@test {#2}\ifx \@test \mpr@blank\else
|
||||
\setbox \mpr@hlist \hbox {}%
|
||||
\setbox \mpr@vlist \vbox {}%
|
||||
\if@premisse \let \snoc \mpr@cons \else \let \snoc \mpr@snoc \fi
|
||||
\let \@hvlist \empty \let \@rev \empty
|
||||
\mpr@tmpdim 0em
|
||||
\expandafter \mpr@makelist #2\mpr@to \mpr@flat
|
||||
\if@premisse \mpr@rev \mpr@flat \mpr@to \@rev \else \let \@rev \mpr@flat \fi
|
||||
\def \\##1{%
|
||||
\def \@test {##1}\ifx \@test \empty
|
||||
\mpr@htovlist
|
||||
\mpr@tmpdim 0em %%% last bug fix not extensively checked
|
||||
\else
|
||||
\setbox0 \hbox{\mpr@item {##1}}\relax
|
||||
\advance \mpr@tmpdim by \wd0
|
||||
%\mpr@tmpdim 1.02\mpr@tmpdim
|
||||
\ifnum \mpr@tmpdim < \hsize
|
||||
\ifnum \wd\mpr@hlist > 0
|
||||
\if@premisse
|
||||
\setbox \mpr@hlist
|
||||
\hbox {\unhbox0 \hskip \mpr@sep \unhbox \mpr@hlist}%
|
||||
\else
|
||||
\setbox \mpr@hlist
|
||||
\hbox {\unhbox \mpr@hlist \hskip \mpr@sep \unhbox0}%
|
||||
\fi
|
||||
\else
|
||||
\setbox \mpr@hlist \hbox {\unhbox0}%
|
||||
\fi
|
||||
\else
|
||||
\ifnum \wd \mpr@hlist > 0
|
||||
\mpr@htovlist
|
||||
\mpr@tmpdim \wd0
|
||||
\fi
|
||||
\setbox \mpr@hlist \hbox {\unhbox0}%
|
||||
\fi
|
||||
\advance \mpr@tmpdim by \mpr@sep
|
||||
\fi
|
||||
}%
|
||||
\@rev
|
||||
\mpr@htovlist
|
||||
\ifmpr@center \hskip \wd\mpr@vlist\fi \box \mpr@vlist
|
||||
\fi
|
||||
\egroup
|
||||
}
|
||||
|
||||
%%% INFERENCE RULES
|
||||
|
||||
\@ifundefined{@@over}{%
|
||||
\let\@@over\over % fallback if amsmath is not loaded
|
||||
\let\@@overwithdelims\overwithdelims
|
||||
\let\@@atop\atop \let\@@atopwithdelims\atopwithdelims
|
||||
\let\@@above\above \let\@@abovewithdelims\abovewithdelims
|
||||
}{}
|
||||
|
||||
%% The default
|
||||
|
||||
\def \mpr@@fraction #1#2{\hbox {\advance \hsize by -0.5em
|
||||
$\displaystyle {#1\mpr@over #2}$}}
|
||||
\def \mpr@@nofraction #1#2{\hbox {\advance \hsize by -0.5em
|
||||
$\displaystyle {#1\@@atop #2}$}}
|
||||
|
||||
\let \mpr@fraction \mpr@@fraction
|
||||
|
||||
%% A generic solution to arrow
|
||||
|
||||
\def \mpr@make@fraction #1#2#3#4#5{\hbox {%
|
||||
\def \mpr@tail{#1}%
|
||||
\def \mpr@body{#2}%
|
||||
\def \mpr@head{#3}%
|
||||
\setbox1=\hbox{$#4$}\setbox2=\hbox{$#5$}%
|
||||
\setbox3=\hbox{$\mkern -3mu\mpr@body\mkern -3mu$}%
|
||||
\setbox3=\hbox{$\mkern -3mu \mpr@body\mkern -3mu$}%
|
||||
\dimen0=\dp1\advance\dimen0 by \ht3\relax\dp1\dimen0\relax
|
||||
\dimen0=\ht2\advance\dimen0 by \dp3\relax\ht2\dimen0\relax
|
||||
\setbox0=\hbox {$\box1 \@@atop \box2$}%
|
||||
\dimen0=\wd0\box0
|
||||
\box0 \hskip -\dimen0\relax
|
||||
\hbox to \dimen0 {$%
|
||||
\mathrel{\mpr@tail}\joinrel
|
||||
\xleaders\hbox{\copy3}\hfil\joinrel\mathrel{\mpr@head}%
|
||||
$}}}
|
||||
|
||||
%% Old stuff should be removed in next version
|
||||
\def \mpr@@nothing #1#2
|
||||
{$\lower 0.01pt \mpr@@nofraction {#1}{#2}$}
|
||||
\def \mpr@@reduce #1#2{\hbox
|
||||
{$\lower 0.01pt \mpr@@fraction {#1}{#2}\mkern -15mu\rightarrow$}}
|
||||
\def \mpr@@rewrite #1#2#3{\hbox
|
||||
{$\lower 0.01pt \mpr@@fraction {#2}{#3}\mkern -8mu#1$}}
|
||||
\def \mpr@infercenter #1{\vcenter {\mpr@hovbox{T}{#1}}}
|
||||
|
||||
\def \mpr@empty {}
|
||||
\def \mpr@inferrule
|
||||
{\bgroup
|
||||
\ifnum \linewidth<\hsize \hsize \linewidth\fi
|
||||
\mpr@rulelineskip
|
||||
\let \and \qquad
|
||||
\let \hva \mpr@hva
|
||||
\let \@rulename \mpr@empty
|
||||
\let \@rule@options \mpr@empty
|
||||
\let \mpr@over \@@over
|
||||
\mpr@inferrule@}
|
||||
\newcommand {\mpr@inferrule@}[3][]
|
||||
{\everymath={\displaystyle}%
|
||||
\def \@test {#2}\ifx \empty \@test
|
||||
\setbox0 \hbox {$\vcenter {\mpr@hovbox{B}{#3}}$}%
|
||||
\else
|
||||
\def \@test {#3}\ifx \empty \@test
|
||||
\setbox0 \hbox {$\vcenter {\mpr@hovbox{T}{#2}}$}%
|
||||
\else
|
||||
\setbox0 \mpr@fraction {\mpr@hovbox{T}{#2}}{\mpr@hovbox{B}{#3}}%
|
||||
\fi \fi
|
||||
\def \@test {#1}\ifx \@test\empty \box0
|
||||
\else \vbox
|
||||
%%% Suggestion de Francois pour les etiquettes longues
|
||||
%%% {\hbox to \wd0 {\RefTirName {#1}\hfil}\box0}\fi
|
||||
{\hbox {\DefTirName {#1}}\box0}\fi
|
||||
\egroup}
|
||||
|
||||
\def \mpr@vdotfil #1{\vbox to #1{\leaders \hbox{$\cdot$} \vfil}}
|
||||
|
||||
% They are two forms
|
||||
% \inferrule [label]{[premisses}{conclusions}
|
||||
% or
|
||||
% \inferrule* [options]{[premisses}{conclusions}
|
||||
%
|
||||
% Premisses and conclusions are lists of elements separated by \\
|
||||
% Each \\ produces a break, attempting horizontal breaks if possible,
|
||||
% and vertical breaks if needed.
|
||||
%
|
||||
% An empty element obtained by \\\\ produces a vertical break in all cases.
|
||||
%
|
||||
% The former rule is aligned on the fraction bar.
|
||||
% The optional label appears on top of the rule
|
||||
% The second form to be used in a derivation tree is aligned on the last
|
||||
% line of its conclusion
|
||||
%
|
||||
% The second form can be parameterized, using the key=val interface. The
|
||||
% folloiwng keys are recognized:
|
||||
%
|
||||
% width set the width of the rule to val
|
||||
% narrower set the width of the rule to val\hsize
|
||||
% before execute val at the beginning/left
|
||||
% lab put a label [Val] on top of the rule
|
||||
% lskip add negative skip on the right
|
||||
% left put a left label [Val]
|
||||
% Left put a left label [Val], ignoring its width
|
||||
% right put a right label [Val]
|
||||
% Right put a right label [Val], ignoring its width
|
||||
% leftskip skip negative space on the left-hand side
|
||||
% rightskip skip negative space on the right-hand side
|
||||
% vdots lift the rule by val and fill vertical space with dots
|
||||
% after execute val at the end/right
|
||||
%
|
||||
% Note that most options must come in this order to avoid strange
|
||||
% typesetting (in particular leftskip must preceed left and Left and
|
||||
% rightskip must follow Right or right; vdots must come last
|
||||
% or be only followed by rightskip.
|
||||
%
|
||||
|
||||
%% Keys that make sence in all kinds of rules
|
||||
\def \mprset #1{\setkeys{mprset}{#1}}
|
||||
\define@key {mprset}{andskip}[]{\mpr@andskip=#1}
|
||||
\define@key {mprset}{lineskip}[]{\lineskip=#1}
|
||||
\define@key {mprset}{lessskip}[]{\mpr@lesslineskip}
|
||||
\define@key {mprset}{flushleft}[]{\mpr@centerfalse}
|
||||
\define@key {mprset}{center}[]{\mpr@centertrue}
|
||||
\define@key {mprset}{rewrite}[]{\let \mpr@fraction \mpr@@rewrite}
|
||||
\define@key {mprset}{atop}[]{\let \mpr@fraction \mpr@@nofraction}
|
||||
\define@key {mprset}{myfraction}[]{\let \mpr@fraction #1}
|
||||
\define@key {mprset}{fraction}[]{\def \mpr@fraction {\mpr@make@fraction #1}}
|
||||
\define@key {mprset}{sep}{\def\mpr@sep{#1}}
|
||||
|
||||
\newbox \mpr@right
|
||||
\define@key {mpr}{flushleft}[]{\mpr@centerfalse}
|
||||
\define@key {mpr}{center}[]{\mpr@centertrue}
|
||||
\define@key {mpr}{rewrite}[]{\let \mpr@fraction \mpr@@rewrite}
|
||||
\define@key {mpr}{myfraction}[]{\let \mpr@fraction #1}
|
||||
\define@key {mpr}{fraction}[]{\def \mpr@fraction {\mpr@make@fraction #1}}
|
||||
\define@key {mpr}{left}{\setbox0 \hbox {$\TirName {#1}\;$}\relax
|
||||
\advance \hsize by -\wd0\box0}
|
||||
\define@key {mpr}{width}{\hsize #1}
|
||||
\define@key {mpr}{sep}{\def\mpr@sep{#1}}
|
||||
\define@key {mpr}{before}{#1}
|
||||
\define@key {mpr}{lab}{\let \RefTirName \TirName \def \mpr@rulename {#1}}
|
||||
\define@key {mpr}{Lab}{\let \RefTirName \TirName \def \mpr@rulename {#1}}
|
||||
\define@key {mpr}{narrower}{\hsize #1\hsize}
|
||||
\define@key {mpr}{leftskip}{\hskip -#1}
|
||||
\define@key {mpr}{reduce}[]{\let \mpr@fraction \mpr@@reduce}
|
||||
\define@key {mpr}{rightskip}
|
||||
{\setbox \mpr@right \hbox {\unhbox \mpr@right \hskip -#1}}
|
||||
\define@key {mpr}{LEFT}{\setbox0 \hbox {$#1$}\relax
|
||||
\advance \hsize by -\wd0\box0}
|
||||
\define@key {mpr}{left}{\setbox0 \hbox {$\TirName {#1}\;$}\relax
|
||||
\advance \hsize by -\wd0\box0}
|
||||
\define@key {mpr}{Left}{\llap{$\TirName {#1}\;$}}
|
||||
\define@key {mpr}{right}
|
||||
{\setbox0 \hbox {$\;\TirName {#1}$}\relax \advance \hsize by -\wd0
|
||||
\setbox \mpr@right \hbox {\unhbox \mpr@right \unhbox0}}
|
||||
\define@key {mpr}{RIGHT}
|
||||
{\setbox0 \hbox {$#1$}\relax \advance \hsize by -\wd0
|
||||
\setbox \mpr@right \hbox {\unhbox \mpr@right \unhbox0}}
|
||||
\define@key {mpr}{Right}
|
||||
{\setbox \mpr@right \hbox {\unhbox \mpr@right \rlap {$\;\TirName {#1}$}}}
|
||||
\define@key {mpr}{vdots}{\def \mpr@vdots {\@@atop \mpr@vdotfil{#1}}}
|
||||
\define@key {mpr}{after}{\edef \mpr@after {\mpr@after #1}}
|
||||
|
||||
\newcommand \mpr@inferstar@ [3][]{\setbox0
|
||||
\hbox {\let \mpr@rulename \mpr@empty \let \mpr@vdots \relax
|
||||
\setbox \mpr@right \hbox{}%
|
||||
$\setkeys{mpr}{#1}%
|
||||
\ifx \mpr@rulename \mpr@empty \mpr@inferrule {#2}{#3}\else
|
||||
\mpr@inferrule [{\mpr@rulename}]{#2}{#3}\fi
|
||||
\box \mpr@right \mpr@vdots$}
|
||||
\setbox1 \hbox {\strut}
|
||||
\@tempdima \dp0 \advance \@tempdima by -\dp1
|
||||
\raise \@tempdima \box0}
|
||||
|
||||
\def \mpr@infer {\@ifnextchar *{\mpr@inferstar}{\mpr@inferrule}}
|
||||
\newcommand \mpr@err@skipargs[3][]{}
|
||||
\def \mpr@inferstar*{\ifmmode
|
||||
\let \@do \mpr@inferstar@
|
||||
\else
|
||||
\let \@do \mpr@err@skipargs
|
||||
\PackageError {mathpartir}
|
||||
{\string\inferrule* can only be used in math mode}{}%
|
||||
\fi \@do}
|
||||
|
||||
|
||||
%%% Exports
|
||||
|
||||
% Envirnonment mathpar
|
||||
|
||||
\let \inferrule \mpr@infer
|
||||
|
||||
% make a short name \infer is not already defined
|
||||
\@ifundefined {infer}{\let \infer \mpr@infer}{}
|
||||
|
||||
\def \TirNameStyle #1{\small \textsc{#1}}
|
||||
\def \tir@name #1{\hbox {\small \TirNameStyle{#1}}}
|
||||
\let \TirName \tir@name
|
||||
\let \DefTirName \TirName
|
||||
\let \RefTirName \TirName
|
||||
|
||||
%%% Other Exports
|
||||
|
||||
% \let \listcons \mpr@cons
|
||||
% \let \listsnoc \mpr@snoc
|
||||
% \let \listhead \mpr@head
|
||||
% \let \listmake \mpr@makelist
|
||||
|
||||
|
||||
|
||||
|
||||
\endinput
|
Loading…
Reference in New Issue
Block a user