-
Notifications
You must be signed in to change notification settings - Fork 4
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
Command to output the content in selected language #127
Comments
hello @kwkwan this looks very similar to the template i have been using to paste in the content to the "Notes property" ; what is do we need to support the case that only one language is present, and in that case would the [lang xx] indicator still be required? just wondering |
I have discussed with @opoudjis a few days ago about this syntax. There are basically 2 ways we can embed AsciiDoc content in an external plain text field:
In addition, the header line of Individual AsciiDoc document
Sample: = Content (title is unnecessary)
[lang=ja]
== Content (clause heading is unnecessary)
(Japanese content)
[lang=en]
== Content (clause heading is unnecessary)
(English content) AsciiDoc snippet
Sample [lang=ja]
--
(Japanese content)
--
[lang=en]
--
(English content)
-- Identifier for encoding of rich textWe need to come up with a "magic format recognizing phrase" that differentiates AsciiDoc from other rich text formats. If we use approach 1, then the initial The other approach being used is the YAML front matter format that is used by Jekyll, i.e. ---
format: asciidoc
---
= blah
... NextApproach 1 is definitely easier to implement because the grammar is well defined. This is the "give me all" approach, and for elements that are not supported in the user's case (e.g. if this is to be inserted in a table cell), the user will have to tailor the content to fit. Approach 2 requires defining a "AsciiDoc profile", possibly via #74, but enumerating the possible values can be difficult. However, it will save the user from the trouble in filtering out unsupported elements. I think both Approach 1 and 2 tell us that #74 is absolutely necessary for this task, either way. Thoughts @hmdne ? |
We could add a filter system to Coradoc, which would convert a Coradoc tree before outputting the result. Then we could use that in command line like so:
We have file extensions and/or mime types. Anything more, I'm afraid, will not be used by majority of documents. This kind of feels like UTF-8 BOM to me. If we want to deduce a type of some embedded text, I'd rather suggest extending the format of embedding to contain a mime type. |
We've recently done away with it as unused, but the Relaton grammar had MIME types for text it would find (and it never used them): Metanorma XML and Asciidoc, of course, are custom formats.
|
Assume I have content in both Japanese and English looks like the following:
I would like to have a command to selectively output the content like:
The text was updated successfully, but these errors were encountered: