Comments (15)
no, why?
from mmark.
I think you should just use a subfigure in this case:
Just take a look at
!---
![alt](context.svg "context")
!---
this image
This works and doesn't create the complexities an image creates
from mmark.
update the code and docs to make this work, but you'll still need an subimage.
from mmark.
name should probably be the last element of the url or file being referenced.
from mmark.
I'd really like to use this feature. For me, when I include ![alt](img.svg "title")
the rendered output in the xml is
<t>
<artwork src="img.svg" alt="alt" name="title"/>
</t>
which gives an error with xml2rfc 2.12.3
Warning: No 'type' attribute value provided for <artwork>, cannot process source img.svg
Warning: No image data found in source img.svg
Error: Expected ascii-art artwork for <artwork type="">, but found <artwork xmlns:xi="http://www.w3.org/2001/XInclude" src="img.svg" alt="alt" name="title" alig...
but when I remove the alt flag and add a type flag such as <artwork type="svg" name="title" src="img.svg"/>
then the xml works in xml2rfc works as expected.
from mmark.
Just wanted to note that piping the mmark output through sed to change the artwork attribute is working for me, such as:
mmark test.md | sed 's|alt="alt"|type="svg"|g' > output.xml
However my next issue is that when I convert that output.xml to html with xml2rfc, the first svg looks good but the subsequent ones seem like a malformed version of that svg mixed with the first svg.
from mmark.
Just noting that I have this working without needing to remove the alt
attribute. Also I fixed the malformed looking non-first svg issue but ensuring that the id attributes in each svg are unique. So in general, using svg works if type="svg"
is added.
from mmark.
ok, but this is just using the HTML fall-through, that works because HTML ~= XML. Good to know though.
from mmark.
Any progress on this issue?
from mmark.
Using svg in the form of ![alt](context.svg "context")
works for me; however, I have to:
- change the resulting
alt="alt"
totype="svg"
- remove any parent
<t>
elements.<artwork>
is not permitted as a child of<t>
but is allowed to be a child of<section>
and some others.
So by using xmlstarlet to edit the mmark xml output with those two changes, then I can get xml2rfc to render the rfc.
from mmark.
Getting type type from the file and using that doesn't seem too hard to implement.
from mmark.
Ok, having this:
Just take a look at
![alt](context.svg "context")
this image
resuts into this now:
<t>Just take a look at
<artwork src="context.svg" type="alt" name="context"/>
this image</t>
which apart from the <t>
s should be good. Stripping those <t>
is doable but may only make sense if an image is the only thing in the paragraph? Alternatively a image may surround itself with closing and opening <t>
from mmark.
Am I missing something? - Using mmark 2.0.45 with xml2rfc 2.22.3. image.md is yours.
$ mmark image.md > imaged.xml
$ xml2rfc --v3 imaged.xml
Parsing file imaged.xml
Converting v2 to v3: imaged.xml
Traceback (most recent call last):
File "/usr/local/bin/xml2rfc", line 10, in <module>
sys.exit(main())
File "/usr/local/lib/python3.7/site-packages/xml2rfc/run.py", line 545, in main
xmlrfc.tree = v2v3.convert2to3()
File "/usr/local/lib/python3.7/site-packages/xml2rfc/writers/v2v3.py", line 334, in convert2to3
func(e, e.getparent())
File "/usr/local/lib/python3.7/site-packages/xml2rfc/writers/v2v3.py", line 610, in element_rfc
series = front.xpath('seriesInfo')
AttributeError: 'NoneType' object has no attribute 'xpath
It looks like it's missing the header stuff, seriesInfo
and what have you.
from mmark.
from mmark.
Merged this, the <t>
will be outputted, unless you use a subfigure.
from mmark.
Related Issues (20)
- Enhancement: Using CDATA rather than entity escape codes in the sourcecode element HOT 5
- Use of anchor or id for referencing HOT 1
- fix releasing HOT 3
- bibliography.go should use bib.ietf.org URLs
- Incorrect GitHub Organization URL HOT 1
- Error referencing internet draft by version HOT 6
- Error referencing RFC drafts HOT 4
- Normative and Informative references are not wrapped in References section HOT 2
- Support more `rfc` attributes HOT 5
- `consensus` attribute applies to more than the IETF stream HOT 3
- Section citations hard-code `relative="#"` HOT 3
- Prebuilt binaries are missing HOT 2
- ref to BCP HOT 2
- Do not render `<area>` element from IRTF documents HOT 3
- Omit `day` attribute in `<date>` boilerplate element for RFCs HOT 3
- Warn on non-ASCII punctuation HOT 3
- Provide release notes HOT 3
- Is it possible to specify metadata using YAML? HOT 3
- Extra linefeed at the end of codeblocks in HTML output of xml2rfc
- Version needs to be updated HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mmark.