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

Language consistency #21

Open
edwintorok opened this issue Oct 12, 2014 · 4 comments
Open

Language consistency #21

edwintorok opened this issue Oct 12, 2014 · 4 comments

Comments

@edwintorok
Copy link

  • no space before \cite and \see, but   before \sref (and other refs).

    The manual suggests that there should be no space before \cite and \see because the CSS already leaves a small space and you avoid using \mbox and  .
    However that is not the case for \sref and the other ref commands, where you should use sometext \sref{label}.
    I can easily define a macro for my documents that automatically add the nbsp and call \sref but perhaps there should be a built-in way to do that for consistency with \cite and \see.

  • all inline commands take their arguments with {}, except for \item in itemize which works just like in LaTeX (the variant with {} is reserved for description).

    For consistency it might've been better to have \item{foo} in itemize and \item{foo}{details of foo} in description, but its probably too late to change that, and it would be somewhat cumbersome.
    To have things consistent again you could explain in the manual that just like how a paragraph is started implicitly for you on a blank line (and you don't have to use \p{} all the time),
    a paragraph is started implicitly after \item and \item{definable} too.
    But then I'd like to be able to define macros of my own that act like \item, i.e. take the implicit paragraph as argument, perhaps by introducing \arg{p} like this:

    \newmacro{itemizelike}{0}{before stuff \arg{p} after stuff}
    \newmacro{descriptionlike}{1}{before stuff \arg{1} stuff \arg{p} after stuff}
    
  • inline equivalent of some block commands

    There should be inline equivalents of \begin{source} {you mentioned lang param for \code could act like this). Ditto for verbatim, probably \code without lang should be equivalent to this.
    And it was already mentioned in another bugreport that there should be inline footnotes.

  • block equivalent of some inline contexts

    This is mostly about tabular which supports only inline commands inside. It would be useful
    to have something that supports subpage inside a tabular-like layout.
    The float specifier helps somewhat, but I haven't figured how to create a 2-column layout with 2 subpages with the default CSS.

@darioteixeira
Copy link
Owner

About the spacing: I'm not following your sometext \sref{label} example. What would sometext actually consist of? Note that \sref already automatically adds the name of the entity.

About items: there's a good reason why \item in UL or OL does not take a parameter -- it actually has none. \item is used as a separator between each fragment (list of blocks).

About the inline equivalent of source and verbatim: my plan is for code to play that role.

About the block equivalent of some inline contexts: I would suggest using CSS to achieve 2-column layouts. Otherwise I fear over-complicating the language for very niche applications.

@edwintorok
Copy link
Author

Spacing example: 'Thus as shown in \sref{fig:1} you can do X'.

@darioteixeira
Copy link
Owner

In that example, \sref would already automatically add a nbsp between "Figure" and "1" (if it doesn't, that's a bug). Where else would you need the nbsp?

@edwintorok
Copy link
Author

I was under the impression that non-breaking spaces should be used before Figure too but I was wrong, so ignore the request about spacing.

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