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

Support for ruby text #76

Open
elenderg opened this issue Apr 5, 2019 · 2 comments
Open

Support for ruby text #76

elenderg opened this issue Apr 5, 2019 · 2 comments

Comments

@elenderg
Copy link

elenderg commented Apr 5, 2019

Would you be able to make mammoth recognize ruby text?

Warnings/errors from Mammoth conversion:
Message(type='warning', message='An unrecognised element was ignored: w:ruby')
@mwilliamson
Copy link
Owner

Could you provide a minimal example document, along with the HTML that's currently produced and the expected HTML?

@elenderg
Copy link
Author

elenderg commented Apr 11, 2019

ruby.docx

image

desired output would be like this:

<html>

<head>
<meta http-equiv=Content-Type content="text/html; charset=windows-1252">

</head>

<body>

<div> 

<p>
    <ruby style='ruby-align:distribute-space'>
        日本語
            <rt>
                にほんご
            </rt>
    </ruby>
(1-2-1 Alignment (distribute space); Yu Mincho, 24pt)
</p>

<p>
    <ruby>
        日
            <rt>
                に
            </rt>
    </ruby>
    <ruby>
        本
            <rt>
                ほん
            </rt>
    </ruby>
    <ruby>
        語
            <rt >
                ご
            </rt>
    </ruby>
 (mono/individual Alignment)
</p>

<p>
    <ruby style='ruby-align:left'>
        日本語
            <rt>
                にほんご
            </rt>
    </ruby>
(Left Alignment)
</p>


<p>
    <ruby style='ruby-align:center'>
        日本語
            <rt>
                にほんご
            </rt>
    </ruby>
(Center Alignment)
</p>



<p>
    <ruby style='ruby-align:right'>
        日本語
            <rt>
                にほんご
            </rt>
    </ruby>
(Center Alignment)
</p>

</div>

</body>

</html>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants