-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Square Brackets in Definition Lists #129
Comments
This may be a case of "be careful what you wish for".... My first reaction was that this was more of a LaTeX problem than a MMD problem per se, but then it occurred to me that you are right. This is a bug in MMD. MMD is not properly escaping square brackets in LaTeX. So in that sense it is somewhat related to what you describe in #128. But what it actually does is shed additional light on the proper fix (that you alluded to previously). Which is to wrap all instances of However, it also "properly" fixes your list example:
becomes:
In this case, the fix was not absolutely necessary, since the square brackets were already protected by the Good news: this means that MMD can again use Good news part 2: This means that HTML and LaTeX output of your list constructs now match. Bad news (for you): This means that the loophole you used in MMD-5 for custom latex list numbering is still closed, and will require a slightly more advanced regexp to change, should you choose to do so. Bad news (for you) part 2: This means that HTML and LaTeX output of your list constructs now match. |
While I’d like to have a way for me to handle my LaTeX list labels in MMD, I also value consistency. So even with the bad news for me, it’s still good news, in a way. I have still two good news, then, I believe:
Which with your new fix should result in the desired LaTeX-code, right? EDIT: I think it’s better to also provide the desired LaTeX-code:
|
The The Note, however, that this would not work (as it puts us right back where we were at the top of this issue):
But if you write me to say that is broken and needs fixing, then screw you.... ;) |
PS> I'm still not enamored with the idea of a special metadata option for the lists. And in light of the alternative syntax I suggested, I don't think it's necessary. |
I got it confused with the code block that has the
This is not a problem because of the So, to be honest, this would make me happy. For the LaTeX export, I mainly use Scrivener. Those inconveniences I can easily avoid with their new Styles. What I cannot avoid are curly brackets MMD puts after
Fair point. I could still use this, though:
Thank you so much! |
You can just use the original:
It's only if you try to get clever and escape the brackets inside the definition that there are problems. (FYI -- these changes are pushed into the development branch already, so are available there now, or will be in the next release version as well.) |
Yes. there is. I use labels to number my examples, in best academic fashion. Those numbers need to be consistent throughout the text. So if I have some examples in list A and use the same examples in a list B, the numbers need to be the same in lists A and B. Even if this means that list B looks more like this:
Using labels is an easy and convenient way to do that. In Scrivener even more so, since I can use variables that number those examples automatically. |
Hello! I think this is related to #128, but I thought it might be best to open a new ticket.
Regarding LaTeX export: When creating a Definition List, the definiendum cannot be in square brackets, because then the closing square bracket
]
is interpreted by LaTeX as the first line of the definiens, while the actual definiens becomes the second line. Example:MMD:
LaTeX:
This is the result:
The text was updated successfully, but these errors were encountered: