【问题标题】:How to make inline images responsive in org-mode?如何使内联图像在 org 模式下响应?
【发布时间】:2016-07-27 17:26:26
【问题描述】:

当我使用显示图像的org-toggle-inline-images 切换内联图像时。但是,当图像太大时,它会溢出编辑器的框架(见下面的截图)。

如何使图像具有响应性,这意味着图像的最大尺寸不应超过窗口大小的宽度。

当然,我可以使用下面的代码来固定图像的大小。但我真正想要的是某种响应式图像显示。

(setq org-mode-actual-width 600)

感谢您抽出宝贵时间查看此问题。

【问题讨论】:

    标签: emacs org-mode


    【解决方案1】:

    来自org-image-actual-width的文档:

    Documentation:
    Should we use the actual width of images when inlining them?
    
    When set to t, always use the image width.
    
    When set to a number, use imagemagick (when available) to set
    the image's width to this value.
    
    When set to a number in a list, try to get the width from any
    #+ATTR.* keyword if it matches a width specification like
    
      #+ATTR_HTML: :width 300px
    
    and fall back on that number if none is found.
    
    When set to nil, try to get the width from an #+ATTR.* keyword
    and fall back on the original width if none is found.
    

    所以你可以使用属性#+ATTR_HTML 来指定宽度。它必须手动指定。这反应够吗?

    【讨论】:

    猜你喜欢
    • 2013-03-02
    • 1970-01-01
    • 2013-04-17
    • 2012-07-25
    • 1970-01-01
    • 2020-09-14
    • 2012-10-11
    • 1970-01-01
    • 2013-12-04
    相关资源
    最近更新 更多