首页 \ 问答 \ 将标题或标题与图像对齐?(Align Title or Caption with Image?)

将标题或标题与图像对齐?(Align Title or Caption with Image?)

我在Ubuntu 13.04上使用DockBook 4.5和Apache FOP 1.1。 Docbook翻译由Ubuntu提供,FOP直接从Apache下载。

第一个问题:有人请告诉我如何确保图像的标题或标题与图像对齐? 例如:

 Figure X: YYYYYY
 +---------------+
 |               |
 |     Image     |
 |               |
 +---------------+

我知道我可以将imagedata与以下内容对齐:

<figure id="figure-xxx">
<title>YYYYY</title>

  <mediaobject>
    <imageobject>
      <imagedata align="center" fileref="xxx.png" scale="75"/>
    </imageobject>
    <caption>XXX/caption>
  </mediaobject>
</figure>

但是, align="center"会产生类似于:

 Figure X: YYYYYY
           +---------------+
           |               |
           |     Image     |
           |               |
           +---------------+

并且align="right"使情况变得更糟:

 Figure X: YYYYYY
                     +---------------+
                     |               |
                     |     Image     |
                     |               |
                     +---------------+

当我尝试将align标记添加到figuretitleimageobjectimageobjectcaption ,我得到类似于以下的错误:

element figure: validity error : No declaration for attribute align of element figure

和:

element mediaobject: validity error : No declaration for attribute align of element mediaobject

也许我又做错了。 尝试在图像周围流动文本( 块图像右侧和文本周围的文本? )并将标题与图像对齐(这个问题)后,我想知道DocBook是否可以在现实生活中使用图像。

所以我的第二个问题是:有人知道DocBook是否支持现实生活中的图像?

编辑:对于第二个问题的答案,问题是Apache FOP而不是DocBook。


I'm working with DockBook 4.5 and Apache FOP 1.1 on Ubuntu 13.04. The Docbook translation are provided by Ubuntu and FOP was downloaded directly from Apache.

First question: would someone please tell me how to ensure the title or caption of a image is aligned with the image? For example:

 Figure X: YYYYYY
 +---------------+
 |               |
 |     Image     |
 |               |
 +---------------+

I know I can align the imagedata with the following:

<figure id="figure-xxx">
<title>YYYYY</title>

  <mediaobject>
    <imageobject>
      <imagedata align="center" fileref="xxx.png" scale="75"/>
    </imageobject>
    <caption>XXX/caption>
  </mediaobject>
</figure>

However, align="center" produces something like:

 Figure X: YYYYYY
           +---------------+
           |               |
           |     Image     |
           |               |
           +---------------+

And align="right" makes it worse:

 Figure X: YYYYYY
                     +---------------+
                     |               |
                     |     Image     |
                     |               |
                     +---------------+

When I attempt to add the align tag to the figure, title, mediaobject, imageobject, or caption, I get an errors similar to:

element figure: validity error : No declaration for attribute align of element figure

and:

element mediaobject: validity error : No declaration for attribute align of element mediaobject

Perhaps I'm doing something wrong again. After trying to flow text around an image (Block Image Right and Flow Text Around It?) and align the caption to the image (this question), I'm left wondering if DocBook can work with images in real life.

So my second question: does anyone know if DocBook supports images in real life?

EDIT: for the answer to the second question, the problem is with Apache FOP and not DocBook.


原文:https://stackoverflow.com/questions/19773563
更新时间:2023-02-07 20:02

最满意答案

这可能是偏执狂模块中的一个错误(实际上它将在Mongoid的下一个主要版本中消失: http ://mongoid.org/en/mongoid/docs/extras.html#paranoia)。 如果您需要“复活”用户帐户,您可能需要添加自己的布尔字段,例如“已启用”,您可以将其设置为false以禁用帐户。


This may be a bug in the paranoia module (which is actually going to disappear in the next major version of Mongoid: http://mongoid.org/en/mongoid/docs/extras.html#paranoia). If you need user account to be "resurrected", you may want to add your own boolean field such as "enabled" which you can set to false to disable an account.

相关问答

更多
  • 以下是如何获取关联元数据。 Mongoid :: Relations :: Reflections#reflect_on_all_associations - 请参阅http://rdoc.info/github/mongoid/mongoid/Mongoid/Relations/Reflections 请注意,如果要提供多个宏作为当前写入的reflect_on_all_associations的参数,则宏必须是args。 如果要提供数组,则必须进行绘制,例如*宏,如下面的测试所示。 以下是“旧API”,因 ...
  • 这可能是偏执狂模块中的一个错误(实际上它将在Mongoid的下一个主要版本中消失: http ://mongoid.org/en/mongoid/docs/extras.html#paranoia)。 如果您需要“复活”用户帐户,您可能需要添加自己的布尔字段,例如“已启用”,您可以将其设置为false以禁用帐户。 This may be a bug in the paranoia module (which is actually going to disappear in the next major v ...
  • 那么它非常简单但棘手... 当你删除标签时,你需要重新加载父对象。 码 model.tags.delete_all model.reload model.tags.each do |tag| tag.delete end model.reload model.tags.destroy_all model.reload 这是您的模型重新加载的方式,您将获得正确的对象 Well Its very simple but tricky ... When you delete the tags , Y ...
  • 刚试了一下。 这是一个黑客,但它适用于搜索嵌入的文档,并返回持有它的父文档。 那是你要的吗? 如果是这样,那么就这样做。 定义方法,返回所需的嵌入字段作为数组,然后索引该数组。 假设你有班级公司,有嵌入式部门 searchable do # Your regular index # ... text :company_departments end def company_departments departments.map(&:name).join(" ") end 重新索引并尝试搜 ...
  • 如果目标是找到柏林航点地址的所有优惠,那么您有几个选择。 移动要嵌入要约内的航点。 执行两个查询,如下所示: 码: waypoints = Waypoint.where(:address => "Berlin").only(:offer_id).all offer_ids = waypoints.map(&:offer_id) offers = Offer.any_in(:_id => offer_ids).all If the goal is to find all Offers with a wayp ...
  • 3中删除了复合键支持,因为您现在可以轻松覆盖默认的_id字段并使用lambda设置默认值。 尝试以下方法: class Host include Mongoid::Document field :_id, type: String, default: -> { ip + ":" + port } ... end 然后,您可以验证此_id字段的唯一性。 有关详细信息,请参阅Mongoid 文档 。 Composite key support was removed in 3, since you ...
  • 你必须定义模型嵌入一个office对象,反之亦然,解释如下: http : //mongoid.org/en/mongoid/docs/relations.html 。 我猜你需要一个1-N关系,以便专业人士可以嵌入几个办公室? 在这种情况下,这样的事情应该有效。 专业模特 class Professional include Mongoid::Document field :first_name, type: String field :last_name, type: String fi ...
  • 如果为remote_id字段添加唯一索引,MongoDB将关注此字段的唯一性 index({ remote_id: 1 }, { unique: true }) 不要忘记运行create_indexes: rake db:mongoid:create_indexes 之后,您可以自由使用Article.collection.insert(batch) 。 If you add a unique indexing for remote_id field, MongoDB will take care the ...
  • 这似乎是Mongoid上的一个急切的负载问题..你可以去https://github.com/mongoid/mongoid/issues/new并打开一个新的问题,所以我们可以在发布之前解决它最终的4.0.0版本。 谢谢 That looks like to be a eager load issue on Mongoid.. Can you go to https://github.com/mongoid/mongoid/issues/new and open a new issue, so we ca ...
  • 你有两种方法可以做到这一点,一种是通过Mongoid,它是AFAIK,它会给所有物体充气。 就像是: Person.only("albums.photos").where(id: '1').albums.map(&:photos).flatten 或者您可以在Moped(驱动程序)中执行此操作,该操作仅返回一系列照片。 Person.collection.find(id: "1").select("albums.photos" => 1). first["albums"].map { |a| a["pho ...

相关文章

更多

最新问答

更多
  • 获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
  • 如何通过引用返回对象?(How is returning an object by reference possible?)
  • 矩阵如何存储在内存中?(How are matrices stored in memory?)
  • 每个请求的Java新会话?(Java New Session For Each Request?)
  • css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
  • 无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
  • xcode语法颜色编码解释?(xcode syntax color coding explained?)
  • 在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
  • 从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
  • 从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
  • 西安哪有PLC可控制编程的培训
  • 在Entity Framework中选择基类(Select base class in Entity Framework)
  • 在Android中出现错误“数据集和渲染器应该不为null,并且应该具有相同数量的系列”(Error “Dataset and renderer should be not null and should have the same number of series” in Android)
  • 电脑二级VF有什么用
  • Datamapper Ruby如何添加Hook方法(Datamapper Ruby How to add Hook Method)
  • 金华英语角.
  • 手机软件如何制作
  • 用于Android webview中图像保存的上下文菜单(Context Menu for Image Saving in an Android webview)
  • 注意:未定义的偏移量:PHP(Notice: Undefined offset: PHP)
  • 如何读R中的大数据集[复制](How to read large dataset in R [duplicate])
  • Unity 5 Heighmap与地形宽度/地形长度的分辨率关系?(Unity 5 Heighmap Resolution relationship to terrain width / terrain length?)
  • 如何通知PipedOutputStream线程写入最后一个字节的PipedInputStream线程?(How to notify PipedInputStream thread that PipedOutputStream thread has written last byte?)
  • python的访问器方法有哪些
  • DeviceNetworkInformation:哪个是哪个?(DeviceNetworkInformation: Which is which?)
  • 在Ruby中对组合进行排序(Sorting a combination in Ruby)
  • 网站开发的流程?
  • 使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
  • 条带格式类型格式模式编号无法正常工作(Stripes format type format pattern number not working properly)
  • 透明度错误IE11(Transparency bug IE11)
  • linux的基本操作命令。。。