[ Prev ] [ Index ] [ Next ]

Attachments

Pages can have attachments, these are e.g. image files for images that are part of the page, but can also be documents that are referred to in the page.

Attachments are typically stored in the folder one level below the page with the text of the page. This folder can be opened with the menu item "Tools → Open Attachments Folder". To directly copy a file to the attachment folder and insert a link use the menu item "Tools → Attach File"

Attachments can be created, modified, and deleted with regular applications. To link them in a zim page, just drag and drop from the window manager to the editor.

Note: For images that are shown in the page, you may need to refresh the page before changes become visible. Use <ctrl>R or the menu item "View → Reload".

See also: Plugins:Attachment Browser

File Templates

There is also a menu item "Insert → New Attachment". This item has a submenu that is based on a folder with file templates. Clicking any of the file templates will create a new attachment which is a copy of that file and insert a link to the new attachment, or, if it is an image, inserts it as an image. This is a convenient way to create new documents in the notebook and start editing them. The file is not opened directly, so to start editing you need to click the link or right click on the image.

By default the folder where the templates are located is ~/Templates, but you can change it in the preferences. To manage the templates, click the last menu item ("File Templates...") to open the folder. Now create a new file that is a blank file of the file type that you would like to be able to insert into zim. Note that the file extension is removed in the menu, so give is a clear name, e.g an SVG file could be called "SVG_Drawing.svg".

Be aware that in order to edit the file, it usually must be a valid file of the specific file type. If you just create an empty text file and rename it to "Image.png" most image editing applications will not consider it a valid PNG image. So it is better to start an image editor and save a real blank image as template.

Of course it is perfectly fine to have multiple templates of the same file type.

Note that this feature tries to be compatible with the "Create new document" menu in the Gnome file browser.

Вложения
===========

Страницы могут иметь вложения, например, файлы изображений для изображений, которые являются частью страницы, но также могут быть документами, на которые есть ссылки на странице.

Вложения обычно хранятся в папке на один уровень ниже страницы с текстом страницы. Эту папку можно открыть с помощью пункта меню «Инструменты → Открыть папку вложений». Чтобы напрямую скопировать файл в папку вложения и вставить ссылку, используйте пункт меню «Инструменты → Прикрепить файл»

Вложения могут быть созданы, изменены и удалены с помощью обычных приложений. Чтобы связать их на странице ZIM, просто перетащите из оконного менеджера в редактор.

Примечание. Для изображений, отображаемых на странице, может потребоваться обновить страницу, прежде чем изменения станут видимыми. Используйте <ctrl> R или пункт меню «Вид → Перезагрузить».

Смотрите также: Плагины: Браузер вложений

Шаблоны файлов
--------------
Также есть пункт меню «Вставить → Новое вложение». Этот элемент имеет подменю, основанное на папке с шаблонами файлов. Щелчок по любому из шаблонов файлов создаст новое вложение, которое является копией этого файла, и вставит ссылку на новое вложение, или, если это изображение, вставит его как изображение. Это удобный способ создания новых документов в блокноте и начала их редактирования. Файл не открывается напрямую, поэтому для начала редактирования нужно щелкнуть ссылку или щелкнуть правой кнопкой мыши по изображению.

По умолчанию папка, в которой расположены шаблоны, - ~ / Templates, но вы можете изменить ее в настройках. Чтобы управлять шаблонами, щелкните последний пункт меню («Шаблоны файлов ...»), чтобы открыть папку. Теперь создайте новый файл, который является пустым файлом того типа, который вы хотели бы вставить в zim. Обратите внимание, что расширение файла удалено в меню, поэтому дайте четкое имя, например, файл SVG может называться "SVG_Drawing.svg".

Помните, что для редактирования файла это обычно должен быть действительный файл определенного типа. Если вы просто создадите пустой текстовый файл и переименуете его в «Image.png», большинство приложений для редактирования изображений не сочтут его действительным изображением PNG. Поэтому лучше запустить редактор изображений и сохранить реальное пустое изображение в качестве шаблона.

Конечно, прекрасно иметь несколько шаблонов одного и того же типа файла.

Обратите внимание, что эта функция пытается быть совместимой с меню «Создать новый документ» в браузере файлов Gnome.


Backlinks: Plugins:Version Control FAQ Help:Custom Tools Help:Export Help:Menu Items Help:Pages Help:Preferences Help:Templates