-
Notifications
You must be signed in to change notification settings - Fork 386
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
Indentation sub-mode for moodle.sty
documents
#2020
Comments
From all of this, I find your last sentence quite covering:
That is, to allow a special itemize type environment like this: \begin{env}[opts]
Initial text
\item's
\end{env} This is not possible currently, as all itemize type environments assumes the first element is an Alternatively: I could change the current itemize indent to allow an initial text, then you could simply add to the existing |
Yes, this is a quite nice possibility --- but the pattern should be \begin{env}[opts]{optional braced argument}
Initial text
\item's
\end{env} and the name... well... The alternate possibility sound good too, if it accepts the possible argument. As an aside: I just notice that \begin{itemize}
\item uno
\item due
\item tre
quattro
cinque
\item sei
\end{itemize} is indented with the extra paragraphs in the |
Great. I'll look into this when I get the time. I'll start by making it optional in a separate branch, then consider to merge it with default behaviour before merging.
Yes it is expected. And yes, in a way I agree that aligning on the first character would look good, but it becomes much harder to achieve. The current behaviour is to always work with adding or removing indents based on
Personally, I very much agree that VimTeX indentation is quite far from ideal. Your current example is just one of many cases where I think the indentation could look better. But when I was working on these things, I realized it was very hard to make it work reliable when I tried to be "fancy", so I decided to be pragmatic and instead make it just good enough to be useful. |
100% agree |
Sorry about the large delay here; I've pushed a minor update that simply avoids the deindent on the first |
Tested, works ok! |
This is a very low priority indentation request. The objective is to support
moodle.sty
, a package used to prepare tests and quizzes that can be automatically added to the online-teaching platform Moodle.Basically, there are two types of environments. The first one is a simple
into which all the other environments are to be embedded, and can be used as a flag to activate all the other environments. I would probably prefer NOT to indent its content, as it happens for
document
, because it can be only top-level.The other environments are mostly of the form:
where
type
can be one ofmulti
,essay
,truefalse
,numerical
,shortanswer
,matching
.As an exception, the environment
cloze
has the same general structure, but instead of enclosing directly the\item
s, it allows for nestedmulti
,numerical
orshortanswer
but without the{Title}
argument.Finally, inside
quiz
, thedescription
environment is redefined asI add a file here with an example of (in my opinion!) a well-indented document and the current indentation:
moodle_examples_indents.zip
One possible solution is to have a kind of "extended" itemize-type environment that can accept a first paragraph that is not
\item
-ized.The text was updated successfully, but these errors were encountered: