Damien Cassou wrote:
On Sun, Jun 1, 2014 at 6:10 PM, Ben Coman<b...@openinworld.com> wrote:
Yes. I am doing something similar. btw, is it a strong convention that Tex commands and
environments are all lowercase? That is, should I force the annotation label in
"\begin{note}" to lowercase, or should I pass that through unchanged.
I think you should not change anything. Is it up to the writer to do
something not stupid.
For Markdown, we should probably have the same solution as for HTML.
I had a hunt around and it seems that Markdown doesn't support paragraph
styles. And the workaround specified here...
http://stackoverflow.com/questions/1058933/can-i-define-a-class-name-on-paragraph-using-markdown
apparently does not work on github...
https://github.com/github/markup
in pillar we have both Markdown and GithubMarkdown as export options.
So we can have a solution dedicated to github if required.
But Hey! Check this out...
https://github.com/github/markup/blob/master/CONTRIBUTING.md
Maybe we could add a Pillar-->HTML processor to Github?
There should not be any technical problem to do that. Do you want to
try? I can help if you have problems.
"If your markup is in a language other than Ruby, drop a translator script in
lib/github/commands which accepts input on STDIN and returns HTML on STDOUT..."
https://github.com/github/markup/blob/master/lib/github/markups.rb
So it seems that Text and Markdown cannot produce different formatted
paragraphs.
for text it is clear. For Markdown I'm still not sure if it is
possible or not. Maybe a<div class=<annotation>> would work.
In those two cases, I still lean towards putting the annotation label in the
output, but I'm happy enough to leave it out.
for text I think we should not change the current export. For
Markdown, I leave the decision to you.
I've uploaded the updates to make annotations more consistent, and added
the \dothis LaTeX command being used in the PharoLaserGame tutorial.
source
annotation test
# item 1
@@note anno1
@@dothis anno2
## item 11
@@note anno3
## item 12
@@dothis anno4
## item 13
--to=pillar
annotation test
# item 1
@@note anno1
@@dothis anno2
#
## item 11
@@note anno3
#
## item 12
@@dothis anno4
#
## item 13
Now this output is not the same and the source. Should I try to fix this
the same as I did for comments.
--to=html
<div class="container">
<p>annotation test</p>
<ol><li> item 1 </li></ol>
<p class="note">anno1</p>
<p class="dothis">anno2</p>
<ol><li> <ol><li> item 11 </li></ol> </li></ol>
<p class="note">anno3</p>
<ol><li> <ol><li> item 12 </li></ol> </li></ol>
<p class="dothis">anno4</p>
<ol><li> <ol><li> item 13 </li></ol></li></ol>
</div>
--to=markdown
annotation test
1. item 1
^M ^M
<p class="note">anno1</p>^M ^M
<p class="dothis">anno2</p>^M ^M
1.
1. item 11
^M ^M
<p class="note">anno3</p>^M ^M
1.
1. item 12
^M ^M
<p class="dothis">anno4</p>^M ^M
1.
1. item 13
btw, what are all these non-break-spaces "^M ^M" for?
--to=markdown
\begin{document}^M^M
annotation test
\begin{enumerate}
\item item 1
\end{enumerate}
\begin{note}
anno1
\end{note}
\dothis{
anno2
}\begin{enumerate}
\item \begin{enumerate}
\item item 11
\end{enumerate}
\end{enumerate}
\begin{note}
anno3
\end{note}
\begin{enumerate}
\item \begin{enumerate}
\item item 12
\end{enumerate}
\end{enumerate}
\dothis{
anno4
}\begin{enumerate}
\item \begin{enumerate}
\item item 13
\end{enumerate}
\end{enumerate}
^M^M\end{document}^M
--to=text
annotation test
1. item 1
anno1
anno2
1.
1. item 11
anno3
1.
1. item 12
anno4
1.
1. item 13
cheers -ben