-
Notifications
You must be signed in to change notification settings - Fork 31
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
Add the \markdownImportSnippets
LaTeX command
#107
Comments
Some LaTeX themes may define snippets with conflicting unqualified names: \markdownSetupSnippet{arabic1}{snippet=jdoe/verylongpackagename/lists/arabic}
\markdownSetupSnippet{arabic2}{snippet=jdoe/anotherlongpackagename/lists/arabic}
\markdownSetupSnippet{roman}{snippet=jdoe/verylongpackagename/lists/roman}
\markdownSetupSnippet{alphabetic}{snippet=jdoe/verylongpackagename/lists/alphabetic} Our syntactic sugar may tackle this using the \markdownImportSnippets{jdoe/verylongpackagename/lists}{arabic as arabic1, roman, alphabetic}
\markdownImportSnippets{jdoe/anotherlongpackagename/lists}{arabic as arabic2} |
Here is an alternative syntax that does not require a separate command: \markdownSetup{
importSnippets = {
jdoe/longpackagename/lists = {
arabic as arabic1,
roman,
alphabetic,
}, jdoe/anotherlongpackagename/lists = {
arabic as arabic2,
},
},
} |
Here is an alternative syntax that combines loading themes and snippets under a single interface, deprecates the LaTeX Here is the current way you would load themes and import snippets from them: \markdownSetup{theme=jdoe/verylongpackagename/lists}
\markdownSetupSnippet{arabic1}{snippet=jdoe/verylongpackagename/lists/arabic}
\markdownSetupSnippet{roman}{snippet=jdoe/verylongpackagename/lists/roman}
\markdownSetupSnippet{alphabetic}{snippet=jdoe/verylongpackagename/lists/alphabetic}
\markdownSetup{theme=jdoe/anotherlongpackagename/lists}
\markdownSetupSnippet{arabic2}{snippet=jdoe/anotherlongpackagename/lists/arabic}
\markdownSetup{theme=jdoe/yetanotherlongpackagename} Here is the alternative syntax that gives the same result: \markdownSetup{
import = {
jdoe/longpackagename/lists = {
arabic as arabic1,
roman,
alphabetic,
},
jdoe/anotherlongpackagename/lists = {
arabic as arabic2,
},
jdoe/yetanotherlongpackagename,
},
} |
Suppose the
jdoe/verylongpackagename/lists
LaTeX theme defines thearabic
,roman
, andalphabetic
setup snippets. If we want to access these snippets by their unqualified names, we must import them:This is quite long and prone to typos. We may want to provide syntactic sugar:
\markdownImportSnippets{jdoe/verylongpackagename/lists}{arabic, roman, alphabetic}
The text was updated successfully, but these errors were encountered: