Support for section*/text* without explicit type annotation.

This commit is contained in:
Achim D. Brucker 2018-06-06 12:30:46 +01:00
parent e3e46e3b17
commit ac1709b34e
2 changed files with 16 additions and 3 deletions

View File

@ -104,17 +104,24 @@ object DofConverter {
}
tail match {
case CURLYOPEN::COMMAND("""\isacharcolon""")::CURLYCLOSE :: CURLYOPEN::COMMAND("""\isacharcolon""")::CURLYCLOSE :: tail => {
case CURLYOPEN::COMMAND("""\isacharcolon""")::CURLYCLOSE :: CURLYOPEN::COMMAND("""\isacharcolon""")::CURLYCLOSE :: tail => {
val (label, shead)= split(List(), head.reverse)
val (typ, stail) = split(List(), tail)
val (typ, stail) = split(List(), delSpace(tail))
val typstring = typ match {
case RAWTEXT(s)::Nil => s.capitalize
case _ => ""
}
(typstring,(shead.reverse)++List(RAWTEXT("""label={"""))++(label.reverse)++List(RAWTEXT("""}, type={"""))++typ++List(RAWTEXT("""}"""))++stail)
}
case CURLYOPEN::COMMAND("""\isacharbrackright""")::CURLYCLOSE :: tail => {
val (label, shead)= split(List(), head.reverse)
("",(shead.reverse)++List(RAWTEXT("""label={"""))++(label.reverse)++List(RAWTEXT("""}"""))++List(RAWTEXT("""]"""))++delSpace(tail))
}
case t::tail => convertType(head++List(t), tail)
case t => ("",t)
case Nil => {
val (label, shead)= split(List(), head.reverse)
("",(shead.reverse)++List(RAWTEXT("""label={"""))++(label.reverse)++List(RAWTEXT("""}"""))++List(RAWTEXT(""","""))++delSpace(tail))
}
}
}

View File

@ -52,3 +52,9 @@
\caption{#1}\label{\commandkey{label}}%
\end{figure}
}
\newkeycommand\isaDofText[label=][1]{%
\begin{isamarkuptext}%
#1
\end{isamarkuptext}%
}