DITA Experts
In my dita, there servaral table who has fn insides.
I wish to create fn for each table
1. fn number starts from 1 for each tabel
2. fn list is under its table, not at the bottom of a pages.
What I have done:
rewrite topic/fn template make is only shows fn number in table, but not fn contents in page.
rewrite topic/table, wish to touch the fn in table and show its related contents. but now, can't touch it.
blow are code which I want to touch for test.
<fo:block xsl:use-attribute-sets="table">
<xsl:choose>
<xsl:when test="contains(#class, ' topic/fn ')">
<xsl:text>]</xsl:text>
</xsl:when>
<xsl:otherwise>
</xsl:otherwise>
</xsl:choose>
</fo:block>
Would any of you share any clue for me where to start.
Thanks a lot
Related
Environment:
emacs 24.3 (9) for os x with org-mode version: 8.2.1.21
I used org-mode to convert org files with tables into html tables format. However, the html files always include the following snippets whenever a table exists:
<colgroup>
<col class="left" />
<col class="right" />
<col class="right" />
</colgroup>
I have tried several ways to eliminate that snippet output but those tags just won't go way; some include
M-x customize-variable
1. org-html-*
2. org-export-table-*
3. org-export-html-*
4. org-table-*
I can see that snippet may be generated by ox-html.el but I cannot nil that action.
I just want to have plain HTML tables exported from my org files. Nothings else. No extra default attribute, no other default HTML tags, no css, etc. How can I achieve that?
There's currently no customization options to remove <colgroup>.
But you can do this if you know that you don't want them at all:
(defun org-export-table-cell-starts-colgroup-p (table-cell info))
(defun org-export-table-cell-ends-colgroup-p (table-cell info))
I wanted to have a block of text aligned to the right, which takes up less horizontal space then the rest of the text on that page. How'd I go about it?
The problem with it being completed in literal HTML is that org-mode automatically puts any text outside the sections into a <p> tag (and it is not a block element, so floating inside of it isn't generally a good thing etc.)
Here's how I have it now (and it displays fine, so I'd like it to be more or less like that):
#+BEGIN_HTML
<div style="width:100%;height:84pt">
<p class="epigraph">
<em>
I have not increased nor diminished the measure,<br/>
I have not diminished the palm,<br/>
I have not encroached upon fields,<br/>
I have not added to the balance weights,<br/>
I have not tempered with the plumb bob of the balance.</em>
<br/>
<span style="text-align:right;width:100%;display:block">
<b style="line-height:24pt;font-weight:bold">
The Book of the Dead, Spell 125.</b>
</span>
</p></div>
#+END_HTML
Plus I have this CSS:
.epigraph {
float:right;
font-size:10pt;
font-family:serif;
line-height:12pt;
color: #aaa
}
But I'd rather it be automatic...
OK, I think I found something that worked similar enough to what I wanted:
#+BEGIN_VERSE
I have not increased nor diminished the measure,
I have not diminished the palm,
I have not encroached upon fields,
I have not added to the balance weights,
I have not tempered with the plumb bob of the balance.
-- The Book of the Dead, Spell 125.
#+END_VERSE
This generates HTML that later with some use of CSS is possible to format in the way it would look more or less like an epigraph. Not perfect, but will do.
I want do to word by word animation on a document. My document may be .doc .html .ppt. I think a macro in .doc may do a better job.
When the document is displayed I want to animate word by word by highlighting a word.
When I am speaking word should highlight and move to next word. This way I can sync my voice with the words.
I tried animation in PowerPoint but it displays word by word and it does not allow whole text to appear and then move around words.
Linking an animation such as highlighting of text to a sound file is allowed in epub 3.0; details can be found in the IDPF's spec, in the Media Overlay section. The first thing that you will need to do is mark up the text at your required level of granularity--by word, it sounds like. So the xhtml should look like:
<p><span id="word1>This</span> <span id="word2">is</span> <span id="word3">a</span> <span id="word4">sample</span>.</p>
You'll also need the audio file in the epub, of course, and then a .smil file to link the two together. The .smil file looks like:
<par id="first">
<text src="book.xhtml#word1"/>
<audio src="audio/audio.mp3" clipBegin="0s" clipEnd="0.65s"/>
</par>
<par id="second">
<text src="book.xhtml#word2"/>
<audio src="audio/audio.mp3" clipBegin="0.66s" clipEnd="1.4s"/>
</par>
...
You'll have to include the media-overlay attribute for the xhtml file in the manifest in the content.opf as well:
<manifest>
<item id="book" href="book.xhtml" media-type="application/zhtml+xml" media-overlay="smil-file"/>
<item id="smil-file" href="book_audio.smil" media-type="application/smil+xml"/>
I want foo foo foo ... to be aligned next to be an image, but for bar bar bar ... start a new block of text which is not aligned with fig.jpg. Can this be arranged with some special syntax in org-mode?
#+ATTR_HTML: height="100" align="left"
[[./img/fig.jpg]]
foo foo foo ...
bar bar bar ...
Edit
Just wanted to add that when bar bar bar ... is also another section heading, for instance ** Section 2 or something similar, it seems like a new section should not be wrapped with the previous figure by default, but perhaps there is some org-syntax to specify this?
Upon HTML export, the image is wrapped in a <div class="figure">...</div> environment. The org-mode #+ATTR_HTML: informatio gets added specifically to the <img> tag within the <div>.
If you are wanting all of your figures to be "floating" such that the text wraps it, you need to modify the style used in the HTML. This can be done manually in the default style sheet added to the top of the exported HTML file. A better option is to specify the style you want within the .org file itself. Something like:
#+STYLE: <style type="text/css">
#+STYLE:<!--/*--><![CDATA[/*><!--*/
#+STYLE: div.figure { float:left; }
#+STYLE: /*]]>*/-->
#+STYLE: </style>
at the beginning of your .org file. This will set the style of all <div class="figure"> elements to be floating on the left with text wrapping around on the right hand side. The following text after the figure will also be wrapped to the right, so you'll want to clear the style with something like a <br style="clear:both;" /> statement.
This worg page has a lot of information about figure placement with captions and word wrapping. There is more detailed information there.
Using the Open XML SDK I've been successful in programatically finding bookmarks or text strings in a word document and inserting new content. I'm using OpenXmlPowerTools.SearchAndReplacer to do the text search and replace and this post's answer for the bookmarks Replace bookmark text in Word file using Open XML SDK
This all fails when the bookmark or the text I am trying to replace is located inside a Textbox.
Why does neither approach work within a Textbox? The Word documents I am trying to replace content within use Texboxes for layout and I can't work out what the problem is.
Does anybody have suggestions as to what might be the problem? Thanks
I did this - it works on text boxes in the case where there are not multiple runs with text (like 1 word bolded
Dim searchQuery = From tx In mainPart.Document.Body.Descendants(Of Text)()
Where tx.Text.Contains(replaceData.OldText)
Dim i As Integer
For i = 0 To searchQuery.Count - 1
searchQuery(i).Text = searchQuery(i).Text.Replace(replaceData.OldText, replaceData.NewText)
Next
Here is the XML for a simple textbox with the word test in it:
<w:pict xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main">
<v:shapetype id="_x0000_t202" coordsize="21600,21600" o:spt="202" path="m,l,21600r21600,l21600,xe" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:v="urn:schemas-microsoft-com:vml">
<v:stroke joinstyle="miter" />
<v:path gradientshapeok="t" o:connecttype="rect" />
</v:shapetype>
<v:shape id="_x0000_s1027" style="position:absolute;margin-left:0;margin-top:0;width:186.35pt;height:110.6pt;z-index:251660288;mso-width-percent:400;mso-height-percent:200;mso-position-horizontal:center;mso-width-percent:400;mso-height-percent:200;mso-width-relative:margin;mso-height-relative:margin" type="#_x0000_t202" xmlns:v="urn:schemas-microsoft-com:vml">
<v:textbox style="mso-fit-shape-to-text:t">
<w:txbxContent>
<w:p w:rsidR="00B558B5" w:rsidRDefault="00B558B5">
<w:proofErr w:type="gramStart" />
<w:r>
<w:t>test</w:t>
</w:r>
<w:proofErr w:type="gramEnd" />
</w:p>
</w:txbxContent>
</v:textbox>
</v:shape>
</w:pict>
You can see the structure is different then when searching for text within a bookmark since a textbox is actually stored as a picture. If you adjust your searching algorithm to deal with this different structure then you should be able to find the text and replace it.