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

line feeds in proofs #18

Closed
davidfarmer opened this issue Jul 1, 2016 · 3 comments
Closed

line feeds in proofs #18

davidfarmer opened this issue Jul 1, 2016 · 3 comments

Comments

@davidfarmer
Copy link
Contributor

davidfarmer commented Jul 1, 2016

How should the following be translated to MBX?

Do you think that your use of "backslash backslash" (which I translate to
but MBX does not
allow that any more) is primarily used in proofs? If so, then I can probably automate
the translation and you won't need to change your LaTeX.

\begin{proof}
Let $P(n)$ be the statement ``a tree graph $T_n$ with $n$ vertices has $n-1$ edges.
Base Case: Draw a tree with three vertices. Clearly you have only 2 edges (otherwise you would have a cycle).
Inductive Case: Assume $P(k)$ is true for some arbitrary $3<k<n$.
NTS: $P(k+1)$ is true. That is $T_{k+1}$ has $k$ edges.
Let $T_{k+1}$ be a tree graph with $k+1$ vertices. By part (b) we know that every tree with at least 3 vertices has a leaf, so cut that one leaf off of $T_{k+1}$. Then our tree graph has only $k$ vertices, and by our inductive case has $k-1$ edges. Well, if we let that leaf regrow we will add both one edge and one vertex, which means that we will have a tree graph with $k+1$ vertices and $k-1+1=k$ edges. TBTPOMI we have shown that $P(n)$ is true.

\end{proof}

@davidfarmer
Copy link
Contributor Author

Is this legal in MBX?

<title>Base Case:</title>Draw a tree with three vertices. Clearly you have only 2 edges (otherwise you would have a cycle)

@oscarlevin
Copy link
Owner

I don't understand your second comment about legality, but I think I have an answer to your original question.

In the LaTeX code, I used the double backslash to create new lines purely for the sake of presentation (to avoid overful boxes, for example), and as a cheap way to create a list (without bullets, for example as I did in the answer to question 5 of section 5.5 (in the web version).

I don't use this primarily in proofs, although it is almost always in proofs, examples, exercises and answers. So really anything where I might need to display things not in regular sized paragraphs.

Perhaps the most reasonable approach to this would be to treat each occurrence as a paragraph break. So if it occurs inside a paragraph, then replacing the double backslash with </p> <p> should work. Outside of paragraphs (like inside a <li>) I don't really know what the best approach would be. Can you have paragraphs inside list items? If so, that would work, but it would require backtracking to the start of the line to add a <p> element, and then adding a </p> at the end of the line.

This does not take care of the instances where I put the backslashes to fix formating bugs, but those should be fairly rare and easy to spot and fix in the mbx code.

@davidfarmer
Copy link
Contributor Author

I will try replacing all double backslashes in text by double
line feeds. I should be able to do that after all the environments
are separated (so I know which blocks are math and can leave them
alone) but before I break into paragraphs.

MBX should (or does or will) have markup for "cases"
in a proof, which you will have to add by hand.

On Fri, 1 Jul 2016, Oscar Levin wrote:

I don't understand your second comment about legality, but I think I have an answer
to your original question.

In the LaTeX code, I used the double backslash to create new lines purely for the
sake of presentation (to avoid overful boxes, for example), and as a cheap way to
create a list (without bullets, for example as I did in the answer to question 5 of
section 5.5 (in the web version).

I don't use this primarily in proofs, although it is almost always in proofs,
examples, exercises and answers. So really anything where I might need to display
things not in regular sized paragraphs.

Perhaps the most reasonable approach to this would be to treat each occurrence as a
paragraph break. So if it occurs inside a paragraph, then replacing the double
backslash with

should work. Outside of paragraphs (like inside a

  • ) I
    don't really know what the best approach would be. Can you have paragraphs inside
    list items? If so, that would work, but it would require backtracking to the start
    of the line to add a

    element, and then adding a

    at the end of the line.

    This does not take care of the instances where I put the backslashes to fix
    formating bugs, but those should be fairly rare and easy to spot and fix in the mbx
    code.


    You are receiving this because you authored the thread.
    Reply to this email directly, view it on GitHub, or mute the
    thread.[AAM6LDVZ6qKNF_PMH_dAiweZdQTfMuTGks5qRX0egaJpZM4JDNX6.gif]

  • 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

    No branches or pull requests

    2 participants