Coder Social home page Coder Social logo

yforster / coqtheorem Goto Github PK

View Code? Open in Web Editor NEW
14.0 14.0 3.0 123 KB

A LaTeX package to make theorem names link to coqdoc webpages. Works with ntheorem, amsthm and the LLNCS and LIPIcs classes.

License: MIT License

TeX 100.00%
coq coq-ecosystem tex

coqtheorem's People

Stargazers

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

Watchers

 avatar  avatar  avatar

coqtheorem's Issues

\coqitem doesn't support \labels

I have a "meta"-lemma, where I actually enumerate coq-lemmas:

\begin{lemma}[Name of the lemma]
\label{lem:metalemma}~
\begin{enumerate}
\item \label{lem:lem1} bli
\item \label{lem:lem2} bla
\item \label{lem:lem3} blub
\end{enumerate}
\end{lemma}

In the proof, I refer to the items as "claims":

\begin{proof}
Claim~\ref{lem:lem1} follows by induction.  Claim~\ref{lem:lem2} is trivial.  Claim~\ref{lem:lem3} follows with claims~\ref{lem:lem1} and~\ref{lem:lem2}
\end{proof}

If I refer to (sub) lemma 1 somwhere, I use see Lemma~\ref{lem:metalemma}~(\ref{lem:lem1}).

This works as expected. However, if I replace \item with \coqitem[...], this doesn't work any more.
The reason for that is that, is that \item[name] doesn't support labels.

My work-around was to \coqlink the descriptions (\coqlink[...]{bli}), but there should be a more elegant solution.

See also this question on tex.sx for a possible solution to this problem. The accepted solution does what I would expect. It shouldn't be that hard to implement this for coqtheorem.

cref seems to be incompatible

Not sure why, but it appears cleverref doesn't know the labels of normal environments anymore. Probably you guys are nesting environments or something?

coqitem in itemize generates numbers

It should create dashes.

I think the problem is here:
{\newcommand{\coqitem}[1][]{\stepcounter{enumi}\item[{\coqlink[#1]{\labelenumi}}]}}
This should be \labelitemi (for the outermost environment, in case it is in an itemize). In fact, it's probably wrong to use always i too. No idea how to make it context-aware.

align* in LIPIcs

I had to comment out the line

% \let\c@theorem\relax

or else align* environments give off massive errors

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.