Mercurial > emacs
comparison lisp/textmodes/org-export-latex.el @ 80467:1d830d9c60e0
* textmodes/org-export-latex.el: New file.
* textmodes/org-irc.el: New file.
* textmodes/org-mac-message.el: New file.
* textmodes/org-publish.el: New file.
* textmodes/org.el (org-agenda-collect-markers)
(org-create-marker-find-array)
(org-check-agenda-marker-table, org-extract-log-state-settings)
(org-nofm-to-completion, org-refile-goto-last-stored)
(org-export-html-convert-special-strings, org-first-list-item-p)
(org-imenu-new-marker, org-imenu-get-tree)
(org-speedbar-set-agenda-restriction)
(org-agenda-set-restriction-lock)
(org-agenda-remove-restriction-lock)
(org-agenda-maybe-redo, org-compute-latex-and-specials-regexp)
(org-do-latex-and-special-faces, org-read-date-display)
(org-select-remember-template, org-agenda-copy-local-variable)
(org-read-date-get-relative, org-columns-cleanup-item)
(org-find-entry-with-id)
(org-insert-columns-dblock, org-listtable-to-string)
(org-dblock-write:columnview, org-columns-capture-view)
(org-edit-headline, org-parse-local-options)
(org-in-clocktable-p, org-property-or-variable-value)
(org-get-tags-string, org-up-heading-safe)
(org-fast-todo-selection, org-get-wdays)
(org-switch-to-buffer-other-window, org-agenda-deadline-face)
(org-add-link-type, org-columns-content, org-columns-widen)
(org-columns-next-allowed-value, org-columns-edit-allowed)
(org-columns-store-format)
(org-columns-uncompile-format, org-columns-redo)
(org-columns-edit-attributes, org-delete-property)
(org-set-property, org-columns-update, org-columns-compute)
(org-columns-eval)
(org-columns-not-in-agenda, org-columns-compute-all)
(org-property-next-allowed-value)
(org-columns-compile-format, org-fill-paragraph-experimental)
(org-string-to-number, org-property-action, org-columns-move-left)
(org-columns-new)
(org-column-number-to-string, org-property-previous-allowed-value)
(org-at-property-p, org-columns-delete)
(org-columns-previous-allowed-value)
(org-columns-move-right, org-columns-narrow)
(org-property-get-allowed-values)
(org-verify-version, org-column-string-to-number)
(org-delete-property-globally)
(org-get-property-block, org-entry-properties, org-entry-get)
(org-entry-delete, org-entry-get-with-inheritance)
(org-entry-put, org-buffer-property-keys, org-new-column-overlay)
(org-overlay-columns)
(org-overlay-columns-title, org-remove-column-overlays)
(org-column-show-value, org-column-quit, org-column-edit)
(org-cached-entry-get, org-table-put-field-property)
(org-get-columns-autowidth-alist, turn-on-orgstruct)
(orgstruct-error, orgstruct-setup)
(orgstruct-make-binding, org-context-p, org-get-local-variables)
(org-run-like-in-org-mode)
(org-make-link-regexps, org-remove-keyword-keys)
(org-get-todo-face, org-export-get-title-from-subtree)
(org-assign-fast-keys, org-get-min-level)
(org-get-wdays, org-clock-find-position)
(org-clock-goto, org-fontify-priorities)
(org-get-date-from-calendar)
(org-entry-add-to-multivalued-property)
(org-entry-remove-from-multivalued-property)
(org-entry-member-in-multivalued-property)
(org-entry-is-todo-p, org-entry-is-done-p, org-get-todo-state)
(org-agenda-get-restriction-and-command)
(org-open-link-from-string, org-columns-open-link)
(org-go-to-remember-target, org-remember-insinuate)
(org-icalendar-cleanup-string, org-first-sibling-p)
(org-back-over-empty-lines, org-skip-whitespace)
(org-goto-local-auto-isearch)
(org-clocktable-steps, org-refile-get-location)
(org-kill-line, org-remove-timestamp-with-keyword)
(org-local-logging): New functions.
(org-agenda-marker-table, org-log-note-how)
(org-goto-local-auto-isearch-map)
(org-last-remember-storage-locations)
(org-imenu-markers, org-agenda-restriction-lock-overlay)
(org-speedbar-restriction-lock-overlay)
(org-massive-special-regexp)
(org-verbatim-re, org-read-date-display-live)
(org-agenda-file-regexp, org-complex-heading-regexp)
(org-completion-fallback-command, org-todo-log-states)
(org-goto-exit-command, org-goto-selected-point)
(org-todo-key-alist, org-todo-key-trigger, org-agenda-remove-date)
(org-agenda-after-show-hook, org-agenda-skip-unavailable-files)
(org-fast-tag-selection-can-set-todo-state, org-local-properties)
(org-store-link-functions, org-columns-top-level-marker)
(orgstruct-mode-map, org-entry-property-inherited-from)
(org-column-overlays, org-current-columns-fmt)
(org-current-columns-maxwidths, org-column-map)
(org-cached-props): New variables.
(org-special-ctrl-k, org-goto-auto-isearch)
(org-agenda-todo-keyword-format)
(org-remember-use-refile-when-interactive)
(org-imenu-depth, org-highlight-latex-fragments-and-specials)
(org-agenda-skip-scheduled-if-done, org-extend-today-until)
(org-agenda-window-frame-fractions, org-fontify-priorities)
(org-agenda-deadline-leaders, org-use-property-inheritance)
(org-clock-into-drawer, org-agenda-compact-blocks)
(org-use-fast-todo-selection, org-fast-tag-selection-include-todo)
(org-edit-timestamp-down-means-later, org-todo-keyword-faces)
(org-agenda-deadline-faces, org-remember-store-without-prompt)
(org-default-columns-format)
(org-agenda-default-appointment-duration)
(org-export-with-footnotes, org-clock-out-when-done)
(org-global-properties, org-todo-keyword-faces)
(org-archive-save-context-info)
(org-edit-timestamp-down-means-later)
(org-scheduled-past-days, org-export-with-drawers)
(org-read-date-prefer-future, org-hide-emphasis-markers)
(org-clock-heading-function, org-clock-in-switch-to-state)
(org-export-with-special-strings): New options.
(org-link-store, org-link-follow, org-latex)
(org-remember-templates, org-time-stamp-rounding-minutes)
(org-back-over-empty-lines, org-find-base-buffer-visiting)
(org-columns-new): Fix typos in docstrings.
(org-ctrl-c-star): Implement a missing branch in the decision
tree.
(org-select-remember-template): Clean the code.
(org-prepare-dblock): Add the extra :content parameter.
(org-write-agenda): New output type ".ics" files.
(org-write-agenda): Call `org-icalendar-verify-function', both for
time stamps and for TODO entries.
(org-export-as-html): Revert the change that killed the html
buffer. Side effects first need to be studied carefully.
(org-get-tags-at): Fix the structure of the condition-case
statement.
(org-ts-regexp0, org-repeat-re, org-display-custom-time)
(org-timestamp-change): Fix regulear expressions to swallow the
extra character for repeat-shift control.
(org-auto-repeat-maybe): Implement the new repeater mechanisms.
(org-get-legal-level): Alias to `org-get-valid-level'.
(org-dblock-write:clocktable): Add a :link parameter, linking
headlines to their location in the Org agenda files.
(org-get-tags-at): Bugfix: prevent `org-back-to-heading' from
throwing an error when getting tags before headlines.
(org-timestamp-change, org-modify-ts-extra)
(org-ts-regexp1): Fix timestamp editing.
(org-agenda-custom-commands-local-options): New constant.
(org-agenda-custom-commands): Use
`org-agenda-custom-commands-local-options' to improve customize
type. "htmlize": Removed hack to fix face problem with htmlize,
it no longer seem necessary.
(org-follow-link-hook): New hook.
(org-agenda-custom-commands): Add "Component" as a tag for each
item in a command serie.
(org-open-at-point): Run `org-follow-link-hook'.
(org-agenda-schedule): Bugfix: don't display marker type when it
is nil.
(org-store-link): org-irc required.
(org-set-regexps-and-options): Parse the new logging options.
(org-todo): Handle the new ways of recording state change stuff.
(org-columns-open-link): Fix bug with opening link in column view.
(org-todo): Make sure that LOGGING properties are honoured.
(org-todo-keywords): Improve docstring.
(org-startup-options): Cleanup startup options.
(org-set-regexps-and-options): Process the "!" markers.
(org-todo): Respect the new logging stuff.
(org-add-log-maybe): New parameter HOW that defines how logging
should be done and also overrides PURPOSE. Add a docstring.
(org-add-log-note): Check if we really need to ask for a note.
(org-get-current-options): Digest the new keyword.
(org-agenda-reset-markers): Rename from
`org-agenda-maybe-reset-markers'. Remove FORCE argument.
(org-diary, org-agenda-quit, org-prepare-agenda): Call the renamed
function, without force argument.
(org-buffer-property-keys): Bind local variables s and p.
(org-make-tags-matcher): Allow "" to match an empty or
non-existent property value.
(org-export-as-html): Join unsorted lists when they directly
follow each other. Such lists may be created by headlines that
are converted to lists.
(org-export-as-html): Use :html-extension instead of
org-export-html-extension.
(org-store-link): Support for links from `rmail-summary-mode'.
(org-columns-new, org-complete, org-set-property): Set the
`include-columns' argument in the call to
`org-buffer-property-keys'.
(org-buffer-property-keys): New argument `include-columns', to
include properties expected by any of the COLUMS formats in the
current buffer.
(org-cleaned-string-for-export): Get rid of drawers first, so that
they will be removed also in the text before the first headline.
(org-clock-report): Show the clocktable when found.
(org-refile): Fix positioning bug when `org-reverse-note-order' is
nil.
(org-version): With prefix argument, insert `org-version' at
point.
(org-agenda-goto): Recenter the window after finding the target
location, to make sure the correct position will be displayed.
(org-agenda-get-deadlines): Don't scale priority with the warning
period.
(org-insert-heading): Don't break line in the middle of the line.
(org-agenda-get-deadlines): Allow `org-deadline-warning-days' to
be 0.
(org-update-checkbox-count): Revamp to deal with hierarchical
beckboxes. This was a patch from Miguel A. Figueroa-Villanueva.
(org-schedule, org-deadline): Use
`org-remove-timestamp-with-keyword' to make sure all such time
stamps are removed.
(org-mode): Support for `align'.
(org-agenda-get-deadlines): Make sure priorities increase as the
due date approaches and is passed.
(org-remember-apply-template): Fix problem with tags that contain
"_" or "@".
(org-make-link-regexps): Improve the regular expression for plain
links.
(org-agenda-get-closed): List each clocking entry.
(org-set-tags): Only tabify before tags if indent-tabs-mode is t.
(org-archive-all-done): Fix incorrect number of stars in regexp.
(org-global-tags-completion-table): Add the value of org-tag-alist
in each buffer, to make sure that also unused tags will be
available for completion.
(org-columns-edit-value)
(org-columns-next-allowed-value): Only update if not in agenda.
(org-dblock-write:clocktable): Call `org-clocktable-steps'.
(org-archive-subtree): Add the outline tree context as a property.
(org-closest-date): New optional argument `prefer'.
(org-goto-map, org-get-location): Implement auto-isearch.
(org-goto-local-search-forward-headings)
(org-get-entries-from-diary): Require diary-lib.
(org-agenda-sunrise-sunset): Require solar.
(org-export-html-style): Doc fix.
(org-get-legal-level): New obsolete alias.
(org-get-valid-level): Rename from `org-get-legal-level'.
(org-promote, org-demote, org-archive-subtree)
(org-remember-handler, org-refile, org-put-clock-overlay): Use it.
(org-info): Use info rather than Info-goto-node.
(org-entry-properties): Let-bind `clocksum'.
(org-unmodified, org-cycle-emulate-tab)
(org-descriptive-links, org-link-file-path-type)
(org-remember-use-refile-when-interactive)
(org-agenda-skip-timestamp-if-done, org-agenda-scheduled-leaders)
(org-export-ascii-bullets, org-agenda-deadline-faces)
(turn-on-orgstruct++, orgtbl-to-texinfo, org-mhe-get-header)
(org-batch-agenda, org-batch-agenda-csv, org-fix-agenda-info)
(org-kill-note-or-show-branches): Fix typos in docstrings.
(org-html-do-expand): `org-export-html-convert-special-strings'
added to the list of conversion.
(org-infile-export-plist, org-get-current-options): Add support
for "-" in the #+OPTION line to let user switch on/off special
strings conversion.
(org-export-plist-vars): New :html-table-tag property.
(org-export-as-html, org-format-org-table-html)
(org-format-table-table-html) Use the :html-table-tag property
instead of the `org-export-html-table-tag' global value.
(org-additional-option-like-keywords): Add "TBLFM".
(org-entry-properties): Include the CLOCKSUM special property.
(org-columns-edit-value): Do not allow to edit the special
CLOCKSUM property.
(org-flag-drawer): Use the original value of `outline-regexp'.
(org-remember-handler): Add invisible-ok flag to call to
`org-end-of-subtree'.
(org-agenda-highlight-todo): Respect
`org-agenda-todo-keyword-format'.
(org-infile-export-plist): No restriction while searching for
options.
(org-remember-handler): Remove comments at the end of the buffer.
(org-table-sort-lines): Make sure sorting works on link
descritions only, and ignores the link.
(org-sort-entries-or-items): Make sure the end of the subtree is
included.
(org-refile-use-outline-path): New allowed values `file' and
`full-file-path'.
(org-get-refile-targets): Respect new values for
`org-refile-use-outline-path'.
(org-agenda-get-restriction-and-command): DEL goes back to initial
list.
(org-export-as-xoxo): Restore point when done.
(org-open-file): Allow multiple %s in command.
(org-get-refile-targets): Interpret the new maxlevel setting.
(org-refile-targets): New option `:maxlevel'.
(org-copy-subtree): Include empty lines before but not after
subtree.
(org-move-item-down, org-move-item-up): Include empty lines before
but not after item.
(org-remember-apply-template): Defaults, completions and history
for template prompts. Also, interpret new `%!' escape.
(org-context-choices): New constant.
(org-bound-and-true-p): New macro.
(org-agenda-restriction-lock): New face.
(org-open-at-point): Remove obsolete way to do redirection in
shell links.
(org-imenu-and-speedbar): New customization group.
(org-entry-properties): Return keyword-less time strings.
(org-clock-in): Use `org-clock-heading-function'.
(org-calendar-holiday): Try to use `calendar-check-holidays'
instead of the obsolete `check-calendar-holidays'.
(org-export-html-special-string-regexps): New constant.
(org-latex-and-export-specials): New face.
(org-link-escape-chars): Use characters instead of strings.
(org-link-escape-chars-browser, org-link-escape)
(org-link-unescape): Use characters instead of strings.
(org-export-html-convert-sub-super, org-html-do-expand): Check for
protected text.
(org-emphasis-alist): Additional `verbatim' flag.
(org-set-emph-re): Handle the verbatim flag and compute
`org-verbatim-re'.
(org-cleaned-string-for-export): Protect verbatim elements.
(org-additional-option-like-keywords): Add new keywords.
(org-get-entry): Rename from `org-get-cleaned-entry'.
(org-agenda-get-scheduled, org-agenda-get-blocks): Use
`org-agenda-skip-scheduled-if-done'.
(org-prepare-agenda-buffers): Allow buffers as arguments.
(org-entry-properties): Add CATEGORY as a special property.
(org-use-property-inheritance): Allow a list of properties as a
value.
(org-eval-in-calendar): No longer update the prompt.
(org-read-date-popup-calendar): Rename from
`org-popup-calendar-for-date-prompt'.
(org-remember-apply-template): Define `remember-finalize' if it is
not yet defined.
(org-read-date): Respect the setting of
`org-read-date-prefer-future'. Use `org-read-date-analyze'.
(org-set-font-lock-defaults): Use `org-archive-tag' instead of a
hardcoded string.
(org-remember-apply-template): Use `remember-finalize' instead of
`remember-buffer'.
(org-columns-compute, org-column-number-to-string)
(org-columns-uncompile-format, org-columns-compile-format)
(org-columns-compile-format): Handle printf format specifier.
(org-columns-new, org-column-number-to-string)
(org-columns-uncompile-format, org-columns-compile-format):
Support for new currency summary type.
(org-tree-to-indirect-buffer): Do not kill old buffer when
`org-indirect-buffer-display' is `new-frame'.
(org-indirect-buffer-display): Document that `new-frame' leads to
indiret buffer proliferation.
(org-agenda-list): Use `org-extend-today-until'.
(org-format-org-table-html): Use lower-case for <col> tag.
(org-agenda-execute): New command.
(org-agenda-mode-map): Keybindings of "g" "G", "e" modified.
(org-remember-apply-template): Use `org-select-remember-template'.
(org-region-active-p): Use `use-region-p'.
(org-cycle-hide-archived-subtrees)
(org-table-rotate-recalc-marks, org-mark-ring-push)
(org-follow-info-link, org-mhe-get-message-folder-from-index)
(org-auto-repeat-maybe, org-store-log-note, org-delete-property)
(org-evaluate-time-range, org-edit-agenda-file-list):
(org-paste-subtree):
(org-calendar-holiday): Use calendar-check-holidays instead of the
obsolete check-calendar-holidays.
(org-table-formula-substitute-names): Remove forgotten temporary
debugging code.
(org-agenda-get-restriction-and-command): Use `mapc' instead of
`mapcar'.
(org-agenda-list): Numeric prefix argument can specify the number
of days.
(remember-register, remember-buffer): Prevent byte compiler from
complaining.
(org-todo): Save and restore match data.
(org-no-warnings): New macro.
(org-columns-eval): Use `org-no-warnings'.
(org-version): Change to 5.13e.
(org-agenda-file-regexp): Fix typo in docstring.
(org-add-planning-info): Fix bug in parenthesis settings.
(org-scan-tags): Catch the case of indirect buffers with no
filename.
(org-fast-tag-selection, org-export-as-ascii, org-export-as-html):
Re-install switch to mapc, had been removed by accident.
(org-columns-map): New binding `C-c C-o'.
(org-columns-menu): Change menu text and added new entry.
(org-columns-eval): Document the use of `next-line'.
(org-columns-follow-link): Remove function.
(org-read-date-get-relative): Fix typo in docstring.
(org-read-date-get-relative): Leading +/- is not optional.
(org-agenda-get-restriction-and-command): Always resize window on
first loop cycle.
(org-agenda-open-link): Make sure the link abbreviations are
present in the agenda buffer.
(org-agenda-files): Allow directories in the variable.
(org-agenda): Use `org-agenda-get-restriction-and-command'.
(org-todo-blocker-hook, org-todo-trigger-hook): New hooks.
(org-remember-apply-template): Catch C-g and make sure window
configuration is restored.
(org-agenda-open-link): Make it work with several links in the
line.
(org-drawers, org-set-regexps-and-options)
(org-get-current-options): Add support for a DRAWERS in-buffer
option.
(org-fit-agenda-window): Use `org-agenda-window-frame-fractions'.
(org-agenda-to-appt): Require calendar.
(org-entry-get-with-inheritance): Widen for search.
(org-columns-display-here): Don't mark buffer as modified when
adding space characters to accomodate column overlays.
(org-export-as-html): Better formatting of tags in the toc.
(org-columns-display-here): Make the ITEM column as compact as
possible.
(org-remember-templates): Customization interface improved.
(org-export-with-property-drawer): Variable removed.
(org-sort-entries): Rewrite using `sort-subr'.
(org-set-property): More appropriate completion during interactive
use.
(org-sort-entries): Allow sorting by property.
(org-additional-option-like-keywords): Add more values.
(org-sort-entries-or-items): Rename from `org-sort-entries'.
(org-at-timestamp-p, org-timestamp-change)
(org-remember-templates): First element of each entry is now a
name for the template.
(org-store-log-note): Check for `org-note-abort'.
(org-kill-note-or-show-branches): New command.
(org-cut-subtree, org-copy-subtree): New argument N to act on N
sequential subtrees.
(org-paste-subtree): Fix the level at which a tree is pasted.
(org-fit-agenda-window): Limitations on window size removed.
(org-agenda-find-same-or-today-or-agenda): Rename from
`org-agenda-find-today-or-agenda'.
(org-agenda-scheduled-leaders)
(org-agenda-get-deadlines): Use `org-agenda-deadline-leaders'.
(org-agenda-get-scheduled): Use `org-agenda-scheduled-leaders'.
(org-export-with-tags, org-export-plist-vars)
(org-infile-export-plist): New "tags" option.
(org-cached-entry-get): Use `org-use-property-inheritance'.
(org-remember-apply-template): Fix typo.
(org-additional-option-like-keywords): New constant.
(org-complete): Use `org-additional-option-like-keywords'.
(org-clock-report): Only update the table at point, or insert a
new one.
(org-open-file): Use `start-process-shell-command' instead of
`shell-command' with an ampersand.
(org-deadline, org-schedule): New argument REMOVE to remove the
date from the entry.
(org-agenda-schedule, org-agenda-deadline): Pass the prefix
argument to `org-schedule' and `org-deadline'.
(org-trim): Use the correct expressions for beginning and end of
the string.
(org-get-cleaned-entry): Trim the string before returning it.
(org-agenda-tags-column): Rename from
`org-agenda-align-tags-to-column'.
(org-agenda-align-tags): Allow negative values for
`org-agenda-tags-column'.
(org-insert-labeled-timestamps-before-properties-drawer): Remove
var.
(org-agenda-to-appt): New optional argument FILTER.
(org-complete): Use `org-completion-fallback-command'.
(org-find-base-buffer-visiting): Catch the case that there is no
buffer visiting the file.
(org-todo): Use `org-property-or-variable-value'
(org-prepare-agenda, org-agenda-list): Use
`org-agenda-compact-blocks'.
(org-agenda-schedule, org-agenda-deadline): Call
`org-agenda-show-new-time'.
(org-agenda-show-new-time): New argument PREFIX.
(org-colgroup-info-to-vline-list): Fix but that cause a shift in
the vertical lines.
(org-buffer-property-keys): New argument INCLUDE-DEFAULTS.
(org-maybe-renumber-ordered-list, org-cycle-list-bullet)
(org-indent-item): No arg in call to `org-fix-bullet-type'.
(org-fix-bullet-type): Remove argument.
(org-read-date): Check for am/pm twice, to catch the end time.
(org-goto-map): Use `suppress-keymap'.
(org-remember-apply-template): Respect the dynamically scoped
selection character.
(org-kill-is-subtree-p): Use `org-outline-regexp'.
(org-outline-regexp): New constant.
(org-remember-handler): Throw error when the target file is not in
org-mode.
(org-cleaned-string-for-export): No longer call
`org-export-latex-cleaned-string' with an argument.
(org-get-tags): Returns now a list, not a string.
(org-archive-subtree): No need to split return of `org-get-tags'.
(org-set-tags, org-entry-properties): Call `org-get-tags-string'
instead of `org-get-tags'.
(org-agenda-format-date): Rename from `org-agenda-date-format'.
(org-time-from-absolute, org-agenda-format-date-aligned): New
funs.
(org-compatible-face): New argument INHERITS. Inherit from this
face if possible.
(org-level-1, org-level-2, org-level-3, org-level-4)
(org-level-5, org-level-6, org-level-7, org-level-8)
(org-special-keyword, org-drawer, org-column, org-warning)
(org-archived, org-todo, org-done, org-headline-done, org-table)
(org-formula, org-code, org-agenda-structure)
(org-scheduled-today, org-scheduled-previously)
(org-upcoming-deadline, org-time-grid): Call `org-compatible-face'
in the new way.
(org-get-heading): New argument NO-TAGS.
(org-fast-tag-selection-include-todo): Made defvar instead of
defcustom, feature is not deprecated.
(org-remember-store-without-prompt): New default value t.
(org-set-regexps-and-options): #+TODO is an alias for SEQ_TODO.
Compute the log states.
(org-goto-map): More commands copied from global map. Also bind
`org-occur'.
(org-goto): Made into a general lookup command.
(org-get-location): Complete rewrite.
(org-goto-ret, org-goto-left, org-goto-right, org-goto-quit): Set
the new variables.
(org-paste-subtree): Whitespace insertion strategy revised.
(org-remember-apply-template): Protect v-A from the possibility
that v-a might be nil.
(org-remember-handler): Insertion rules revised.
(org-todo): Respect org-todo-log-states.
(org-entry-get-with-inheritance): Use `org-up-heading-safe'.
(org-confirm-shell-link-function)
(org-confirm-elisp-link-function): Doc fixes.
(org-re): Also replace the :alpha: class.
(org-todo-tag-alist): Variable removed.
(org-log-done): Docstring fixed.
(org-deadline-warning-days): New default value 14.
(org-tag-alist): Docstring fixed.
(org-export-language-setup): New languages added.
(org-set-regexps-and-options): Compute the new variables.
(org-paste-subtree): Cleaning up.
(org-remember-apply-template): New escape %A.
(org-todo): Call fast TODO selection.
(org-add-log-note): Allow prefix for abort exit.
(org-at-property-p, org-entry-properties)
(org-columns-get-autowidth-alist): Use :alpha: class.
(org-agenda-get-deadlines): Use `org-get-wdays'.
(org-agenda-get-deadlines): Reverse ee before returning.
(org-format-agenda-item): New argument REMOVE-RE.
(org-agenda-convert-date): Baha'i calendar added.
(org-infile-export-plist): Also find DATE line.
(org-export-as-html, org-export-as-ascii): Use the date format.
(org-shiftup, org-shiftdown): Use.
`org-edit-timestamp-down-means-later'.
(org-columns-compile-format)
(org-columns-get-autowidth-alist, org-buffer-property-keys)
(org-entry-properties, org-at-property-p): Allow [:alnum:] in
property names.
(org-export-visible): Fix drawers before export.
(org-do-sort): Allow sorting by priority.
(org-agenda-files): Ignore non-existing files.
(org-ellipsis): All a face as value.
(org-mode): Interprete the face value of `org-ellipsis'.
(org-archive-subtree): Store context info in archived entry.
(org-fast-tag-selection): Allow setting TODO states through this
interface.
(org-cycle): Docstring updated.
(org-set-font-lock-defaults, org-agenda-highlight-todo): Use
`org-get-todo-face'.
(org-table-edit-field, org-table-show-reference)
(org-table-edit-formulas, org-add-log-note)
(org-fast-tag-selection, org-agenda, org-prepare-agenda)
(org-timeline): Use `org-switch-to-buffer-other-window' instead of
`switch-to-buffer-other-window' to make sure that the temporary
windows show up on the current frame.
(org-mhe-get-message-real-folder, org-batch-store-agenda-views)
(org-get-entries-from-diary, org-replace-region-by-html): Don't
allow pop-up frames.
(org-agenda-get-deadlines, org-agenda-get-scheduled): Fix problems
with time-of-day.
(org-agenda-get-scheduled, org-agenda-get-deadlines): Fix problems
with listing items that are DONE.
(org-change-tag-in-region): New command.
(org-agenda-skip-scheduled-if-done)
(org-agenda-skip-deadline-if-done): Docstring clarified.
(org-mode): Hide drawers on startup.
(org-set-regexps-and-options): Use `org-remove-keyword-keys'.
(org-agenda-skip): Allow a form for `org-agenda-skip-function'.
(org-agenda-redo): Re-use local settings.
(org-agenda): Store local settings.
(org-agenda-get-deadlines, org-agenda-get-scheduled): Also handle
entries on their due date.
(org-agenda-get-timestamps): No longer handle the due dates of
schedules and deadline items.
(org-insert-link-global, org-open-at-point-global): New commands.
(org-export-as-ascii): Call `org-cleaned-string-for-export' with a
:for-ascii parameter.
(org-skip-comments): Function removed.
(org-cleaned-string-for-export): Handle special table lines.
(org-entry-get-with-inheritance): Check global properties.
(org-set-regexps-and-options): Find the #+PROPERTY line.
(org-link-types): Change type into variable (was constant).
(org-link-re-with-space, org-link-re-with-space2)
(org-angle-link-re, org-plain-link-re, org-bracket-link-regexp)
(org-bracket-link-analytic-regexp, org-any-link-re): Creation of
these regular expressions happens now in the function
`org-make-link-regexps'.
(org-store-link): Call the functions in
`org-store-link-functions'.
(org-activate-tags): Force matches to be in headlines.
(org-batch-store-agenda-views): Fix bug with killing agenda
buffer.
(org-columns-display-here): Make sure this works in a narrowed
buffer by checking for point-min.
(org-columns-display-here): Make the rest of the line intangible,
so that point never can be there.
(org-cleaned-string-for-export): Use `with-current-buffer'.
(org-replace-region-by-html): Use `with-current-buffer'.
(org-unfontify-region, org-do-occur, org-columns-display-here)
(org-columns-remove-overlays, org-columns-quit)
(org-columns-edit-value, org-columns-next-allowed-value)
(org-eval-in-calendar, org-agenda-undo, org-no-read-only)
(org-finalize-agenda, org-remove-subtree-entries-from-agenda)
(org-agenda-todo, org-agenda-change-all-lines)
(org-agenda-align-tags, org-agenda-priority)
(org-agenda-set-tags, org-agenda-toggle-archive-tag)
(org-agenda-show-new-time, org-cleaned-string-for-export)
(org-export-grab-title-from-buffer)
(org-export-as-ascii, org-export-as-html): Use `inhibit-read-only'
instead of `buffer-read-only'.
(org-export-as-html): Set `coding-system-for-write'.
(org-archive-subtree): Fixed bug with modifying TODO keyword.
(org-beginning-of-line): Also treat C-a special in items.
(org-table-convert-refs-to-rc): Fixed problem with column
reference after "..".
(org-columns-compute): Don't mark buffer modified because of text
properties.
(org-batch-store-agenda-views): Use the variable
`default-directory', not the function.
(org-clock-out-if-current): Respect `org-clock-out-when-done'.
(org-html-entities): Added HTML entities for smileys.
(org-end-of-line): Move to end of line if in headline without
tags.
(org-agenda-day-view, org-agenda-week-view): Remember span as
default.
(org-columns-edit-value): Rename from `org-column-edit'.
(org-columns-display-here-title): Rename from
`org-overlay-columns-title'.
(org-columns-remove-overlays): Rename from
org-remove-column-overlays.
(org-columns-get-autowidth-alist): Rename from
`org-get-columns-autowidth-alist'.
(org-columns-display-here): Rename from `org-overlay-columns'.
(org-columns-new-overlay): Rename from `org-new-column-overlay'.
(org-columns-quit): Rename from `org-column-quit'.
(org-columns-show-value): Rename from `org-column-show-value'.
(org-columns-current-fmt): Rename from `org-current-columns-fmt'.
(org-columns-overlays): Rename from `org-column-overlays'.
(org-columns-map): Rename from `org-column-map'.
(org-columns-current-maxwidths): Rename from
`org-current-columns-maxwidths'.
(org-columns-begin-marker, org-columns-current-fmt-compiled)
(org-previous-header-line-format)
(org-columns-inhibit-recalculation)
(org-columns-default-format): Rename from
`org-default-columns-format'.
(org-property-re): New constant.
(orgstruct-mode): New minor mode.
(org-cycle-list-bullet): New command.
(org-special-properties, org-property-start-re)
(org-property-end-re): New constants.
(org-with-point-at): New macro.
(org-insert-property-drawer): New command.
(org-column): New face.
(org-column-menu): New menu.
(org-columns, org-agenda-columns): New commands.
(org-properties): New customize group.
(org-priority): Realign tags after changing priority.
(org-preserve-lc): New macro.
(org-update-checkbox-count): Catch case when there is no headline.
(org-agenda-quit): Remove any column overlays.
(org-beginning-of-item-list): Fixed bug when non-item line is
indented too deep.
(org-make-tags-matcher): Handle property matches.
(org-table-recalculate): Swap evaluation order: Field formula
first, then column formulas, but don't allow them to overwrite the
field formulas.
(org-table-eval-formula): New argument untouchable.
(org-export-as-html): Fix replacement bug for XEmacs.
author | Carsten Dominik <dominik@science.uva.nl> |
---|---|
date | Tue, 08 Apr 2008 07:44:50 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
80466:a2033c4f12af | 80467:1d830d9c60e0 |
---|---|
1 ;;; org-export-latex.el --- LaTeX exporter for org-mode | |
2 ;; | |
3 ;; Copyright (c) 2007, 2008 Free Software Foundation, Inc. | |
4 ;; | |
5 ;; Emacs Lisp Archive Entry | |
6 ;; Filename: org-export-latex.el | |
7 ;; Version: 5.23 | |
8 ;; Author: Bastien Guerry <bzg AT altern DOT org> | |
9 ;; Maintainer: Bastien Guerry <bzg AT altern DOT org> | |
10 ;; Keywords: org, wp, tex | |
11 ;; Description: Converts an org-mode buffer into LaTeX | |
12 ;; URL: http://www.cognition.ens.fr/~guerry/u/org-export-latex.el | |
13 ;; | |
14 ;; This file is part of GNU Emacs. | |
15 ;; | |
16 ;; GNU Emacs is free software; you can redistribute it and/or modify it | |
17 ;; under the terms of the GNU General Public License as published by the | |
18 ;; Free Software Foundation; either version 3, or (at your option) any | |
19 ;; later version. | |
20 ;; | |
21 ;; GNU Emacs is distributed in the hope that it will be useful, but | |
22 ;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
23 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
24 ;; General Public License for more details. | |
25 ;; | |
26 ;; You should have received a copy of the GNU General Public License | |
27 ;; along with GNU Emacs; see the file COPYING. If not, write to the Free | |
28 ;; Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | |
29 ;; MA 02110-1301, USA. | |
30 ;; | |
31 ;;; Commentary: | |
32 ;; | |
33 ;; This library implements a LaTeX exporter for org-mode. | |
34 ;; | |
35 ;; Put this file into your load-path and the following into your ~/.emacs: | |
36 ;; (require 'org-export-latex) | |
37 ;; | |
38 ;; The interactive functions are similar to those of the HTML exporter: | |
39 ;; | |
40 ;; M-x `org-export-as-latex' | |
41 ;; M-x `org-export-as-latex-batch' | |
42 ;; M-x `org-export-as-latex-to-buffer' | |
43 ;; M-x `org-export-region-as-latex' | |
44 ;; M-x `org-replace-region-by-latex' | |
45 ;; | |
46 ;;; Code: | |
47 | |
48 (eval-when-compile | |
49 (require 'cl)) | |
50 | |
51 (require 'footnote) | |
52 (require 'org) | |
53 | |
54 ;;; Variables: | |
55 (defvar org-export-latex-class nil) | |
56 (defvar org-export-latex-header nil) | |
57 (defvar org-export-latex-append-header nil) | |
58 (defvar org-export-latex-options-plist nil) | |
59 (defvar org-export-latex-todo-keywords-1 nil) | |
60 (defvar org-export-latex-all-targets-re nil) | |
61 (defvar org-export-latex-add-level 0) | |
62 (defvar org-export-latex-sectioning "") | |
63 (defvar org-export-latex-sectioning-depth 0) | |
64 (defvar org-export-latex-list-beginning-re | |
65 "^\\([ \t]*\\)\\([-+*]\\|[0-9]+[.)]\\) +?") | |
66 | |
67 (defvar org-export-latex-special-string-regexps | |
68 '(org-ts-regexp | |
69 org-scheduled-string | |
70 org-deadline-string | |
71 org-clock-string) | |
72 "A list of regexps to convert as special keywords.") | |
73 | |
74 (defvar latexp) ; dynamically scoped from org.el | |
75 (defvar re-quote) ; dynamically scoped from org.el | |
76 (defvar commentsp) ; dynamically scoped from org.el | |
77 | |
78 ;;; User variables: | |
79 | |
80 (defcustom org-export-latex-default-class "article" | |
81 "The default LaTeX class." | |
82 :group 'org-export-latex | |
83 :type '(string :tag "LaTeX class")) | |
84 | |
85 (defcustom org-export-latex-classes | |
86 '(("article" | |
87 "\\documentclass[11pt,a4paper]{article} | |
88 \\usepackage[utf8]{inputenc} | |
89 \\usepackage[T1]{fontenc} | |
90 \\usepackage{hyperref}" | |
91 ("\\section{%s}" . "\\section*{%s}") | |
92 ("\\subsection{%s}" . "\\subsection*{%s}") | |
93 ("\\subsubsection{%s}" . "\\subsubsection*{%s}") | |
94 ("\\paragraph{%s}" . "\\paragraph*{%s}") | |
95 ("\\subparagraph{%s}" . "\\subparagraph*{%s}")) | |
96 ("report" | |
97 "\\documentclass[11pt,a4paper]{report} | |
98 \\usepackage[utf8]{inputenc} | |
99 \\usepackage[T1]{fontenc} | |
100 \\usepackage{hyperref}" | |
101 ("\\part{%s}" . "\\part*{%s}") | |
102 ("\\chapter{%s}" . "\\chapter*{%s}") | |
103 ("\\section{%s}" . "\\section*{%s}") | |
104 ("\\subsection{%s}" . "\\subsection*{%s}") | |
105 ("\\subsubsection{%s}" . "\\subsubsection*{%s}")) | |
106 ("book" | |
107 "\\documentclass[11pt,a4paper]{book} | |
108 \\usepackage[utf8]{inputenc} | |
109 \\usepackage[T1]{fontenc} | |
110 \\usepackage{hyperref}" | |
111 ("\\part{%s}" . "\\part*{%s}") | |
112 ("\\chapter{%s}" . "\\chapter*{%s}") | |
113 ("\\section{%s}" . "\\section*{%s}") | |
114 ("\\subsection{%s}" . "\\subsection*{%s}") | |
115 ("\\subsubsection{%s}" . "\\subsubsection*{%s}"))) | |
116 "Alist of LaTeX classes and associated header and structure. | |
117 If #+LaTeX_CLASS is set in the buffer, use its value and the | |
118 associated information. Here is the structure of each cell: | |
119 | |
120 \(class-name | |
121 header-string | |
122 (unnumbered-section numbered-section\) | |
123 ...\) | |
124 | |
125 A %s formatter is mandatory in each section string and will be | |
126 replaced by the title of the section." | |
127 :group 'org-export-latex | |
128 :type '(repeat | |
129 (list (string :tag "LaTeX class") | |
130 (string :tag "LaTeX header") | |
131 (cons :tag "Level 1" | |
132 (string :tag "Numbered") | |
133 (string :tag "Unnumbered")) | |
134 (cons :tag "Level 2" | |
135 (string :tag "Numbered") | |
136 (string :tag "Unnumbered")) | |
137 (cons :tag "Level 3" | |
138 (string :tag "Numbered") | |
139 (string :tag "Unnumbered")) | |
140 (cons :tag "Level 4" | |
141 (string :tag "Numbered") | |
142 (string :tag "Unnumbered")) | |
143 (cons :tag "Level 5" | |
144 (string :tag "Numbered") | |
145 (string :tag "Unnumbered"))))) | |
146 | |
147 (defcustom org-export-latex-emphasis-alist | |
148 '(("*" "\\textbf{%s}" nil) | |
149 ("/" "\\emph{%s}" nil) | |
150 ("_" "\\underline{%s}" nil) | |
151 ("+" "\\texttt{%s}" nil) | |
152 ("=" "\\texttt{%s}" nil) | |
153 ("~" "\\texttt{%s}" t)) | |
154 "Alist of LaTeX expressions to convert emphasis fontifiers. | |
155 Each element of the list is a list of three elements. | |
156 The first element is the character used as a marker for fontification. | |
157 The second element is a formatting string to wrap fontified text with. | |
158 The third element decides whether to protect converted text from other | |
159 conversions." | |
160 :group 'org-export-latex | |
161 :type 'alist) | |
162 | |
163 (defcustom org-export-latex-title-command "\\maketitle" | |
164 "The command used to insert the title just after \\begin{document}. | |
165 If this string contains the formatting specification \"%s\" then | |
166 it will be used as a formatting string, passing the title as an | |
167 argument." | |
168 :group 'org-export-latex | |
169 :type 'string) | |
170 | |
171 (defcustom org-export-latex-date-format | |
172 "%d %B %Y" | |
173 "Format string for \\date{...}." | |
174 :group 'org-export-latex | |
175 :type 'string) | |
176 | |
177 (defcustom org-export-latex-tables-verbatim nil | |
178 "When non-nil, export tables as verbatim." | |
179 :group 'org-export-latex | |
180 :type 'boolean) | |
181 | |
182 (defcustom org-export-latex-tables-column-borders nil | |
183 "When non-nil, group of columns are surrounded with borders, | |
184 XSeven if these borders are the outside borders of the table." | |
185 :group 'org-export-latex | |
186 :type 'boolean) | |
187 | |
188 (defcustom org-export-latex-packages-alist nil | |
189 "Alist of packages to be inserted in the header. | |
190 Each cell is of the forma \( \"option\" . \"package\" \)." | |
191 :group 'org-export-latex | |
192 :type 'alist) | |
193 | |
194 (defcustom org-export-latex-low-levels 'description | |
195 "How to convert sections below the current level of sectioning, | |
196 as specified by `org-export-headline-levels' or the value of \"H:\" | |
197 in Org's #+OPTION line. | |
198 | |
199 This can be either nil (skip the sections), 'description (convert | |
200 the sections as descriptive lists) or a string to be used instead | |
201 of \\section{%s}. In this latter case, the %s stands here for the | |
202 inserted headline and is mandatory." | |
203 :group 'org-export-latex | |
204 :type '(choice (const :tag "Ignore" nil) | |
205 (symbol :tag "Convert as descriptive list" description) | |
206 (string :tag "Use a section string" :value "\\subparagraph{%s}"))) | |
207 | |
208 (defcustom org-export-latex-remove-from-headlines | |
209 '(:todo t :priority t :tags t) | |
210 "A plist of keywords to remove from headlines. | |
211 Non-nil means remove this keyword type from the headline. | |
212 | |
213 Don't remove the keys, just change their values." | |
214 :type 'plist | |
215 :group 'org-export-latex) | |
216 | |
217 (defcustom org-export-latex-image-default-option "width=10em" | |
218 "Default option for images." | |
219 :group 'org-export-latex | |
220 :type 'string) | |
221 | |
222 (defcustom org-export-latex-coding-system nil | |
223 "Coding system for the exported LaTex file." | |
224 :group 'org-export-latex | |
225 :type 'coding-system) | |
226 | |
227 (defcustom org-list-radio-list-templates | |
228 '((latex-mode "% BEGIN RECEIVE ORGLST %n | |
229 % END RECEIVE ORGLST %n | |
230 \\begin{comment} | |
231 #+ORGLST: SEND %n org-list-to-latex | |
232 | | | | |
233 \\end{comment}\n") | |
234 (texinfo-mode "@c BEGIN RECEIVE ORGLST %n | |
235 @c END RECEIVE ORGLST %n | |
236 @ignore | |
237 #+ORGLST: SEND %n org-list-to-texinfo | |
238 | | | | |
239 @end ignore\n") | |
240 (html-mode "<!-- BEGIN RECEIVE ORGLST %n --> | |
241 <!-- END RECEIVE ORGLST %n --> | |
242 <!-- | |
243 #+ORGLST: SEND %n org-list-to-html | |
244 | | | | |
245 -->\n")) | |
246 "Templates for radio lists in different major modes. | |
247 All occurrences of %n in a template will be replaced with the name of the | |
248 list, obtained by prompting the user." | |
249 :group 'org-plain-lists | |
250 :type '(repeat | |
251 (list (symbol :tag "Major mode") | |
252 (string :tag "Format")))) | |
253 | |
254 ;;; Autoload functions: | |
255 | |
256 ;;;###autoload | |
257 (defun org-export-as-latex-batch () | |
258 "Call `org-export-as-latex', may be used in batch processing as | |
259 emacs --batch | |
260 --load=$HOME/lib/emacs/org.el | |
261 --eval \"(setq org-export-headline-levels 2)\" | |
262 --visit=MyFile --funcall org-export-as-latex-batch" | |
263 (org-export-as-latex org-export-headline-levels 'hidden)) | |
264 | |
265 ;;;###autoload | |
266 (defun org-export-as-latex-to-buffer (arg) | |
267 "Call `org-exort-as-latex` with output to a temporary buffer. | |
268 No file is created. The prefix ARG is passed through to `org-export-as-latex'." | |
269 (interactive "P") | |
270 (org-export-as-latex arg nil nil "*Org LaTeX Export*") | |
271 (switch-to-buffer-other-window "*Org LaTeX Export*")) | |
272 | |
273 ;;;###autoload | |
274 (defun org-replace-region-by-latex (beg end) | |
275 "Replace the region from BEG to END with its LaTeX export. | |
276 It assumes the region has `org-mode' syntax, and then convert it to | |
277 LaTeX. This can be used in any buffer. For example, you could | |
278 write an itemized list in `org-mode' syntax in an LaTeX buffer and | |
279 then use this command to convert it." | |
280 (interactive "r") | |
281 (let (reg latex buf) | |
282 (save-window-excursion | |
283 (if (org-mode-p) | |
284 (setq latex (org-export-region-as-latex | |
285 beg end t 'string)) | |
286 (setq reg (buffer-substring beg end) | |
287 buf (get-buffer-create "*Org tmp*")) | |
288 (save-excursion | |
289 (set-buffer buf) | |
290 (erase-buffer) | |
291 (insert reg) | |
292 (org-mode) | |
293 (setq latex (org-export-region-as-latex | |
294 (point-min) (point-max) t 'string))) | |
295 (kill-buffer buf))) | |
296 (delete-region beg end) | |
297 (insert latex))) | |
298 | |
299 ;;;###autoload | |
300 (defun org-export-region-as-latex (beg end &optional body-only buffer) | |
301 "Convert region from BEG to END in `org-mode' buffer to LaTeX. | |
302 If prefix arg BODY-ONLY is set, omit file header, footer, and table of | |
303 contents, and only produce the region of converted text, useful for | |
304 cut-and-paste operations. | |
305 If BUFFER is a buffer or a string, use/create that buffer as a target | |
306 of the converted LaTeX. If BUFFER is the symbol `string', return the | |
307 produced LaTeX as a string and leave not buffer behind. For example, | |
308 a Lisp program could call this function in the following way: | |
309 | |
310 (setq latex (org-export-region-as-latex beg end t 'string)) | |
311 | |
312 When called interactively, the output buffer is selected, and shown | |
313 in a window. A non-interactive call will only retunr the buffer." | |
314 (interactive "r\nP") | |
315 (when (interactive-p) | |
316 (setq buffer "*Org LaTeX Export*")) | |
317 (let ((transient-mark-mode t) (zmacs-regions t) | |
318 rtn) | |
319 (goto-char end) | |
320 (set-mark (point)) ;; to activate the region | |
321 (goto-char beg) | |
322 (setq rtn (org-export-as-latex | |
323 nil nil nil | |
324 buffer body-only)) | |
325 (if (fboundp 'deactivate-mark) (deactivate-mark)) | |
326 (if (and (interactive-p) (bufferp rtn)) | |
327 (switch-to-buffer-other-window rtn) | |
328 rtn))) | |
329 | |
330 ;;;###autoload | |
331 (defun org-export-as-latex (arg &optional hidden ext-plist | |
332 to-buffer body-only pub-dir) | |
333 "Export current buffer to a LaTeX file. | |
334 If there is an active region, export only the region. The prefix | |
335 ARG specifies how many levels of the outline should become | |
336 headlines. The default is 3. Lower levels will be exported | |
337 depending on `org-export-latex-low-levels'. The default is to | |
338 convert them as description lists. When HIDDEN is non-nil, don't | |
339 display the LaTeX buffer. EXT-PLIST is a property list with | |
340 external parameters overriding org-mode's default settings, but | |
341 still inferior to file-local settings. When TO-BUFFER is | |
342 non-nil, create a buffer with that name and export to that | |
343 buffer. If TO-BUFFER is the symbol `string', don't leave any | |
344 buffer behind but just return the resulting LaTeX as a string. | |
345 When BODY-ONLY is set, don't produce the file header and footer, | |
346 simply return the content of \begin{document}...\end{document}, | |
347 without even the \begin{document} and \end{document} commands. | |
348 when PUB-DIR is set, use this as the publishing directory." | |
349 (interactive "P") | |
350 ;; Make sure we have a file name when we need it. | |
351 (when (and (not (or to-buffer body-only)) | |
352 (not buffer-file-name)) | |
353 (if (buffer-base-buffer) | |
354 (org-set-local 'buffer-file-name | |
355 (with-current-buffer (buffer-base-buffer) | |
356 buffer-file-name)) | |
357 (error "Need a file name to be able to export"))) | |
358 | |
359 (message "Exporting to LaTeX...") | |
360 (org-update-radio-target-regexp) | |
361 (org-export-latex-set-initial-vars ext-plist arg) | |
362 (let* ((wcf (current-window-configuration)) | |
363 (opt-plist org-export-latex-options-plist) | |
364 (region-p (org-region-active-p)) | |
365 (subtree-p | |
366 (when region-p | |
367 (save-excursion | |
368 (goto-char (region-beginning)) | |
369 (and (org-at-heading-p) | |
370 (>= (org-end-of-subtree t t) (region-end)))))) | |
371 (title (or (and subtree-p (org-export-get-title-from-subtree)) | |
372 (plist-get opt-plist :title) | |
373 (and (not | |
374 (plist-get opt-plist :skip-before-1st-heading)) | |
375 (org-export-grab-title-from-buffer)) | |
376 (file-name-sans-extension | |
377 (file-name-nondirectory buffer-file-name)))) | |
378 (filename (concat (file-name-as-directory | |
379 (or pub-dir | |
380 (org-export-directory :LaTeX ext-plist))) | |
381 (file-name-sans-extension | |
382 (file-name-nondirectory ;sans-extension | |
383 buffer-file-name)) ".tex")) | |
384 (filename (if (equal (file-truename filename) | |
385 (file-truename buffer-file-name)) | |
386 (concat filename ".tex") | |
387 filename)) | |
388 (buffer (if to-buffer | |
389 (cond | |
390 ((eq to-buffer 'string) (get-buffer-create | |
391 "*Org LaTeX Export*")) | |
392 (t (get-buffer-create to-buffer))) | |
393 (find-file-noselect filename))) | |
394 (odd org-odd-levels-only) | |
395 (header (org-export-latex-make-header title opt-plist)) | |
396 (skip (cond (subtree-p nil) | |
397 (region-p t) | |
398 ;; never skip first lines when exporting a subtree | |
399 (t (plist-get opt-plist :skip-before-1st-heading)))) | |
400 (text (plist-get opt-plist :text)) | |
401 (first-lines (if skip "" (org-export-latex-first-lines))) | |
402 (coding-system (and (boundp 'buffer-file-coding-system) | |
403 buffer-file-coding-system)) | |
404 (coding-system-for-write (or org-export-latex-coding-system | |
405 coding-system)) | |
406 (save-buffer-coding-system (or org-export-latex-coding-system | |
407 coding-system)) | |
408 (region (buffer-substring | |
409 (if region-p (region-beginning) (point-min)) | |
410 (if region-p (region-end) (point-max)))) | |
411 (string-for-export | |
412 (org-cleaned-string-for-export | |
413 region :emph-multiline t | |
414 :for-LaTeX t | |
415 :comments nil | |
416 :add-text (if (eq to-buffer 'string) nil text) | |
417 :skip-before-1st-heading skip | |
418 :LaTeX-fragments nil))) | |
419 | |
420 (set-buffer buffer) | |
421 (erase-buffer) | |
422 | |
423 (and (fboundp 'set-buffer-file-coding-system) | |
424 (set-buffer-file-coding-system coding-system-for-write)) | |
425 | |
426 ;; insert the header and initial document commands | |
427 (unless (or (eq to-buffer 'string) body-only) | |
428 (insert header)) | |
429 | |
430 ;; insert text found in #+TEXT | |
431 (when (and text (not (eq to-buffer 'string))) | |
432 (insert (org-export-latex-content | |
433 text '(lists tables fixed-width keywords)) | |
434 "\n\n")) | |
435 | |
436 ;; insert lines before the first headline | |
437 (unless (or skip (eq to-buffer 'string)) | |
438 (insert first-lines)) | |
439 | |
440 ;; handle the case where the region does not begin with a section | |
441 (when region-p | |
442 (insert (with-temp-buffer | |
443 (insert string-for-export) | |
444 (org-export-latex-first-lines)))) | |
445 | |
446 ;; export the content of headlines | |
447 (org-export-latex-global | |
448 (with-temp-buffer | |
449 (insert string-for-export) | |
450 (goto-char (point-min)) | |
451 (when (re-search-forward "^\\(\\*+\\) " nil t) | |
452 (let* ((asters (length (match-string 1))) | |
453 (level (if odd (- asters 2) (- asters 1)))) | |
454 (setq org-export-latex-add-level | |
455 (if odd (1- (/ (1+ asters) 2)) (1- asters))) | |
456 (org-export-latex-parse-global level odd))))) | |
457 | |
458 ;; finalization | |
459 (unless body-only (insert "\n\\end{document}")) | |
460 (or to-buffer (save-buffer)) | |
461 (goto-char (point-min)) | |
462 (message "Exporting to LaTeX...done") | |
463 (prog1 | |
464 (if (eq to-buffer 'string) | |
465 (prog1 (buffer-substring (point-min) (point-max)) | |
466 (kill-buffer (current-buffer))) | |
467 (current-buffer)) | |
468 (set-window-configuration wcf)))) | |
469 | |
470 ;;; Parsing functions: | |
471 | |
472 (defun org-export-latex-parse-global (level odd) | |
473 "Parse the current buffer recursively, starting at LEVEL. | |
474 If ODD is non-nil, assume the buffer only contains odd sections. | |
475 Return a list reflecting the document structure." | |
476 (save-excursion | |
477 (goto-char (point-min)) | |
478 (let* ((cnt 0) output | |
479 (depth org-export-latex-sectioning-depth)) | |
480 (while (re-search-forward | |
481 (concat "^\\(\\(?:\\*\\)\\{" | |
482 (number-to-string (+ (if odd 2 1) level)) | |
483 "\\}\\) \\(.*\\)$") | |
484 ;; make sure that there is no upper heading | |
485 (when (> level 0) | |
486 (save-excursion | |
487 (save-match-data | |
488 (re-search-forward | |
489 (concat "^\\(\\(?:\\*\\)\\{" | |
490 (number-to-string level) | |
491 "\\}\\) \\(.*\\)$") nil t)))) t) | |
492 (setq cnt (1+ cnt)) | |
493 (let* ((pos (match-beginning 0)) | |
494 (heading (match-string 2)) | |
495 (nlevel (if odd (/ (+ 3 level) 2) (1+ level)))) | |
496 (save-excursion | |
497 (narrow-to-region | |
498 (point) | |
499 (save-match-data | |
500 (if (re-search-forward | |
501 (concat "^\\(\\(?:\\*\\)\\{" | |
502 (number-to-string (+ (if odd 2 1) level)) | |
503 "\\}\\) \\(.*\\)$") nil t) | |
504 (match-beginning 0) | |
505 (point-max)))) | |
506 (goto-char (point-min)) | |
507 (setq output | |
508 (append output | |
509 (list | |
510 (list | |
511 `(pos . ,pos) | |
512 `(level . ,nlevel) | |
513 `(occur . ,cnt) | |
514 `(heading . ,heading) | |
515 `(content . ,(org-export-latex-parse-content)) | |
516 `(subcontent . ,(org-export-latex-parse-subcontent | |
517 level odd))))))) | |
518 (widen))) | |
519 (list output)))) | |
520 | |
521 (defun org-export-latex-parse-content () | |
522 "Extract the content of a section." | |
523 (let ((beg (point)) | |
524 (end (if (re-search-forward "^\\(\\*\\)+ .*$" nil t) | |
525 (progn (beginning-of-line) (point)) | |
526 (point-max)))) | |
527 (buffer-substring beg end))) | |
528 | |
529 (defun org-export-latex-parse-subcontent (level odd) | |
530 "Extract the subcontent of a section at LEVEL. | |
531 If ODD Is non-nil, assume subcontent only contains odd sections." | |
532 (if (not (re-search-forward | |
533 (concat "^\\(\\(?:\\*\\)\\{" | |
534 (number-to-string (+ (if odd 4 2) level)) | |
535 "\\}\\) \\(.*\\)$") | |
536 nil t)) | |
537 nil ; subcontent is nil | |
538 (org-export-latex-parse-global (+ (if odd 2 1) level) odd))) | |
539 | |
540 ;;; Rendering functions: | |
541 (defun org-export-latex-global (content) | |
542 "Export CONTENT to LaTeX. | |
543 CONTENT is an element of the list produced by | |
544 `org-export-latex-parse-global'." | |
545 (if (eq (car content) 'subcontent) | |
546 (mapc 'org-export-latex-sub (cdr content)) | |
547 (org-export-latex-sub (car content)))) | |
548 | |
549 (defun org-export-latex-sub (subcontent) | |
550 "Export the list SUBCONTENT to LaTeX. | |
551 SUBCONTENT is an alist containing information about the headline | |
552 and its content." | |
553 (let ((num (plist-get org-export-latex-options-plist :section-numbers))) | |
554 (mapc (lambda(x) (org-export-latex-subcontent x num)) subcontent))) | |
555 | |
556 (defun org-export-latex-subcontent (subcontent num) | |
557 "Export each cell of SUBCONTENT to LaTeX." | |
558 (let ((heading (org-export-latex-fontify-headline | |
559 (cdr (assoc 'heading subcontent)))) | |
560 (level (- (cdr (assoc 'level subcontent)) | |
561 org-export-latex-add-level)) | |
562 (occur (number-to-string (cdr (assoc 'occur subcontent)))) | |
563 (content (cdr (assoc 'content subcontent))) | |
564 (subcontent (cadr (assoc 'subcontent subcontent)))) | |
565 (cond | |
566 ;; Normal conversion | |
567 ((<= level org-export-latex-sectioning-depth) | |
568 (let ((sec (nth (1- level) org-export-latex-sectioning))) | |
569 (insert (format (if num (car sec) (cdr sec)) heading) "\n")) | |
570 (insert (org-export-latex-content content)) | |
571 (cond ((stringp subcontent) (insert subcontent)) | |
572 ((listp subcontent) (org-export-latex-sub subcontent)))) | |
573 ;; At a level under the hl option: we can drop this subsection | |
574 ((> level org-export-latex-sectioning-depth) | |
575 (cond ((eq org-export-latex-low-levels 'description) | |
576 (insert (format "\\begin{description}\n\n\\item[%s]\n\n" heading)) | |
577 (insert (org-export-latex-content content)) | |
578 (cond ((stringp subcontent) (insert subcontent)) | |
579 ((listp subcontent) (org-export-latex-sub subcontent))) | |
580 (insert "\\end{description}\n")) | |
581 ((stringp org-export-latex-low-levels) | |
582 (insert (format org-export-latex-low-levels heading) "\n") | |
583 (insert (org-export-latex-content content)) | |
584 (cond ((stringp subcontent) (insert subcontent)) | |
585 ((listp subcontent) (org-export-latex-sub subcontent))))))))) | |
586 | |
587 ;;; Exporting internals: | |
588 (defun org-export-latex-set-initial-vars (ext-plist level) | |
589 "Store org local variables required for LaTeX export. | |
590 EXT-PLIST is an optional additional plist. | |
591 LEVEL indicates the default depth for export." | |
592 (setq org-export-latex-todo-keywords-1 org-todo-keywords-1 | |
593 org-export-latex-all-targets-re | |
594 (org-make-target-link-regexp (org-all-targets)) | |
595 org-export-latex-options-plist | |
596 (org-combine-plists (org-default-export-plist) ext-plist | |
597 (org-infile-export-plist)) | |
598 org-export-latex-class | |
599 (save-excursion | |
600 (goto-char (point-min)) | |
601 (if (and (re-search-forward "^#\\+LaTeX_CLASS:[ \t]*\\([a-zA-Z]+\\)" nil t) | |
602 (assoc (match-string 1) org-export-latex-classes)) | |
603 (match-string 1) | |
604 org-export-latex-default-class)) | |
605 org-export-latex-header | |
606 (cadr (assoc org-export-latex-class org-export-latex-classes)) | |
607 org-export-latex-sectioning | |
608 (cddr (assoc org-export-latex-class org-export-latex-classes)) | |
609 org-export-latex-sectioning-depth | |
610 (or level | |
611 (let ((hl-levels | |
612 (plist-get org-export-latex-options-plist :headline-levels)) | |
613 (sec-depth (length org-export-latex-sectioning))) | |
614 (if (> hl-levels sec-depth) sec-depth hl-levels))))) | |
615 | |
616 (defun org-export-latex-make-header (title opt-plist) | |
617 "Make the LaTeX header and return it as a string. | |
618 TITLE is the current title from the buffer or region. | |
619 OPT-PLIST is the options plist for current buffer." | |
620 (let ((toc (plist-get opt-plist :table-of-contents)) | |
621 (author (plist-get opt-plist :author))) | |
622 (concat | |
623 (if (plist-get opt-plist :time-stamp-file) | |
624 (format-time-string "% Created %Y-%m-%d %a %H:%M\n")) | |
625 ;; insert LaTeX custom header | |
626 org-export-latex-header | |
627 "\n" | |
628 ;; insert information on LaTeX packages | |
629 (when org-export-latex-packages-alist | |
630 (mapconcat (lambda(p) | |
631 (if (equal "" (car p)) | |
632 (format "\\usepackage{%s}" (cadr p)) | |
633 (format "\\usepackage[%s]{%s}" | |
634 (car p) (cadr p)))) | |
635 org-export-latex-packages-alist "\n")) | |
636 ;; insert additional commands in the header | |
637 org-export-latex-append-header | |
638 ;; insert the title | |
639 (format | |
640 "\n\n\\title{%s}\n" | |
641 ;; convert the title | |
642 (org-export-latex-content | |
643 title '(lists tables fixed-width keywords))) | |
644 ;; insert author info | |
645 (if (plist-get opt-plist :author-info) | |
646 (format "\\author{%s}\n" | |
647 (or author user-full-name)) | |
648 (format "%%\\author{%s}\n" | |
649 (or author user-full-name))) | |
650 ;; insert the date | |
651 (format "\\date{%s}\n" | |
652 (format-time-string | |
653 (or (plist-get opt-plist :date) | |
654 org-export-latex-date-format))) | |
655 ;; beginning of the document | |
656 "\n\\begin{document}\n\n" | |
657 ;; insert the title command | |
658 (if (string-match "%s" org-export-latex-title-command) | |
659 (format org-export-latex-title-command title) | |
660 org-export-latex-title-command) | |
661 "\n\n" | |
662 ;; table of contents | |
663 (when (and org-export-with-toc | |
664 (plist-get opt-plist :section-numbers)) | |
665 (cond ((numberp toc) | |
666 (format "\\setcounter{tocdepth}{%s}\n\\tableofcontents\n\n" | |
667 (min toc (plist-get opt-plist :headline-levels)))) | |
668 (toc (format "\\setcounter{tocdepth}{%s}\n\\tableofcontents\n\n" | |
669 (plist-get opt-plist :headline-levels)))))))) | |
670 | |
671 (defun org-export-latex-first-lines (&optional comments) | |
672 "Export the first lines before first headline. | |
673 COMMENTS is either nil to replace them with the empty string or a | |
674 formatting string like %%%%s if we want to comment them out." | |
675 (save-excursion | |
676 (goto-char (point-min)) | |
677 (if (org-at-heading-p) (beginning-of-line 2)) | |
678 (let* ((pt (point)) | |
679 (end (if (and (re-search-forward "^\\* " nil t) | |
680 (not (eq pt (match-beginning 0)))) | |
681 (goto-char (match-beginning 0)) | |
682 (goto-char (point-max))))) | |
683 (org-export-latex-content | |
684 (org-cleaned-string-for-export | |
685 (buffer-substring (point-min) end) | |
686 :for-LaTeX t | |
687 :emph-multiline t | |
688 :add-text nil | |
689 :comments nil | |
690 :skip-before-1st-heading nil | |
691 :LaTeX-fragments nil))))) | |
692 | |
693 (defun org-export-latex-content (content &optional exclude-list) | |
694 "Convert CONTENT string to LaTeX. | |
695 Don't perform conversions that are in EXCLUDE-LIST. Recognized | |
696 conversion types are: quotation-marks, emphasis, sub-superscript, | |
697 links, keywords, lists, tables, fixed-width" | |
698 (with-temp-buffer | |
699 (insert content) | |
700 (unless (memq 'quotation-marks exclude-list) | |
701 (org-export-latex-quotation-marks)) | |
702 (unless (memq 'emphasis exclude-list) | |
703 (when (plist-get org-export-latex-options-plist :emphasize) | |
704 (org-export-latex-fontify))) | |
705 (unless (memq 'sub-superscript exclude-list) | |
706 (org-export-latex-special-chars | |
707 (plist-get org-export-latex-options-plist :sub-superscript))) | |
708 (unless (memq 'links exclude-list) | |
709 (org-export-latex-links)) | |
710 (unless (memq 'keywords exclude-list) | |
711 (org-export-latex-keywords | |
712 (plist-get org-export-latex-options-plist :timestamps))) | |
713 (unless (memq 'lists exclude-list) | |
714 (org-export-latex-lists)) | |
715 (unless (memq 'tables exclude-list) | |
716 (org-export-latex-tables | |
717 (plist-get org-export-latex-options-plist :tables))) | |
718 (unless (memq 'fixed-width exclude-list) | |
719 (org-export-latex-fixed-width | |
720 (plist-get org-export-latex-options-plist :fixed-width))) | |
721 ;; return string | |
722 (buffer-substring (point-min) (point-max)))) | |
723 | |
724 (defun org-export-latex-protect-string (s) | |
725 "Prevent further conversion for string S by adding the | |
726 org-protect property." | |
727 (add-text-properties 0 (length s) '(org-protected t) s) s) | |
728 | |
729 (defun org-export-latex-protect-char-in-string (char-list string) | |
730 "Add org-protected text-property to char from CHAR-LIST in STRING." | |
731 (with-temp-buffer | |
732 (save-match-data | |
733 (insert string) | |
734 (goto-char (point-min)) | |
735 (while (re-search-forward (regexp-opt char-list) nil t) | |
736 (add-text-properties (match-beginning 0) | |
737 (match-end 0) '(org-protected t))) | |
738 (buffer-string)))) | |
739 | |
740 (defun org-export-latex-keywords-maybe (remove-list) | |
741 "Maybe remove keywords depending on rules in REMOVE-LIST." | |
742 (goto-char (point-min)) | |
743 (let ((re-todo (mapconcat 'identity org-export-latex-todo-keywords-1 "\\|")) | |
744 (case-fold-search nil)) | |
745 ;; convert TODO keywords | |
746 (when (re-search-forward (concat "^\\(" re-todo "\\)") nil t) | |
747 (if (plist-get remove-list :todo) | |
748 (replace-match "") | |
749 (replace-match (format "\\texttt{%s}" (match-string 1)) t t))) | |
750 ;; convert priority string | |
751 (when (re-search-forward "\\[\\\\#.\\]" nil t) | |
752 (if (plist-get remove-list :priority) | |
753 (replace-match "") | |
754 (replace-match (format "\\texttt{%s}" (match-string 0)) t t))) | |
755 ;; convert tags | |
756 (when (re-search-forward "\\(:[a-zA-Z0-9]+\\)+:" nil t) | |
757 (if (or (not org-export-with-tags) | |
758 (plist-get remove-list :tags)) | |
759 (replace-match "") | |
760 (replace-match (format "\\texttt{%s}" (match-string 0)) t t))))) | |
761 | |
762 (defun org-export-latex-fontify-headline (string) | |
763 "Fontify special words in string." | |
764 (with-temp-buffer | |
765 ;; FIXME: org-inside-LaTeX-fragment-p doesn't work when the $...$ is at | |
766 ;; the beginning of the buffer - inserting "\n" is safe here though. | |
767 (insert "\n" string) | |
768 (goto-char (point-min)) | |
769 (when (plist-get org-export-latex-options-plist :emphasize) | |
770 (org-export-latex-fontify)) | |
771 (org-export-latex-special-chars | |
772 (plist-get org-export-latex-options-plist :sub-superscript)) | |
773 (org-export-latex-keywords-maybe | |
774 org-export-latex-remove-from-headlines) | |
775 (org-export-latex-links) | |
776 (org-trim (buffer-substring-no-properties (point-min) (point-max))))) | |
777 | |
778 (defun org-export-latex-quotation-marks () | |
779 "Export question marks depending on language conventions." | |
780 (let* ((lang (plist-get org-export-latex-options-plist :language)) | |
781 (quote-rpl (if (equal lang "fr") | |
782 '(("\\(\\s-\\)\"" "«~") | |
783 ("\\(\\S-\\)\"" "~»") | |
784 ("\\(\\s-\\)'" "`")) | |
785 '(("\\(\\s-\\)\"" "``") | |
786 ("\\(\\S-\\)\"" "''") | |
787 ("\\(\\s-\\)'" "`"))))) | |
788 (mapc (lambda(l) (goto-char (point-min)) | |
789 (while (re-search-forward (car l) nil t) | |
790 (let ((rpl (concat (match-string 1) (cadr l)))) | |
791 (org-export-latex-protect-string rpl) | |
792 (org-if-unprotected | |
793 (replace-match rpl t t))))) quote-rpl))) | |
794 | |
795 (defun org-export-latex-special-chars (sub-superscript) | |
796 "Export special characters to LaTeX. | |
797 If SUB-SUPERSCRIPT is non-nil, convert \\ and ^. | |
798 See the `org-export-latex.el' code for a complete conversion table." | |
799 (goto-char (point-min)) | |
800 (mapc (lambda(c) | |
801 (goto-char (point-min)) | |
802 (while (re-search-forward c nil t) | |
803 ;; Put the point where to check for org-protected | |
804 (unless (or (get-text-property (match-beginning 2) 'org-protected) | |
805 (org-at-table-p)) | |
806 (cond ((member (match-string 2) '("\\$" "$")) | |
807 (if (equal (match-string 2) "\\$") | |
808 (replace-match (concat (match-string 1) "$" | |
809 (match-string 3)) t t) | |
810 (replace-match (concat (match-string 1) "\\$" | |
811 (match-string 3)) t t))) | |
812 ((member (match-string 2) '("&" "%" "#")) | |
813 (if (equal (match-string 1) "\\") | |
814 (replace-match (match-string 2) t t) | |
815 (replace-match (concat (match-string 1) "\\" | |
816 (match-string 2)) t t))) | |
817 ((equal (match-string 2) "...") | |
818 (replace-match | |
819 (concat (match-string 1) | |
820 (org-export-latex-protect-string "\\ldots{}")) t t)) | |
821 ((equal (match-string 2) "~") | |
822 (cond ((equal (match-string 1) "\\") nil) | |
823 ((eq 'org-link (get-text-property 0 'face (match-string 2))) | |
824 (replace-match (concat (match-string 1) "\\~") t t)) | |
825 (t (replace-match | |
826 (org-export-latex-protect-string | |
827 (concat (match-string 1) "\\~{}")) t t)))) | |
828 ((member (match-string 2) '("{" "}")) | |
829 (unless (save-match-data (org-inside-LaTeX-fragment-p)) | |
830 (if (equal (match-string 1) "\\") | |
831 (replace-match (match-string 2) t t) | |
832 (replace-match (concat (match-string 1) "\\" | |
833 (match-string 2)) t t))))) | |
834 (unless (save-match-data (org-inside-LaTeX-fragment-p)) | |
835 (cond ((equal (match-string 2) "\\") | |
836 (replace-match (or (save-match-data | |
837 (org-export-latex-treat-backslash-char | |
838 (match-string 1) | |
839 (match-string 3))) "") t t)) | |
840 ((member (match-string 2) '("_" "^")) | |
841 (replace-match (or (save-match-data | |
842 (org-export-latex-treat-sub-super-char | |
843 sub-superscript | |
844 (match-string 1) | |
845 (match-string 2) | |
846 (match-string 3))) "") t t))))))) | |
847 '("^\\([^\n$]*?\\|^\\)\\(\\\\?\\$\\)\\([^\n$]*\\)$" | |
848 "\\([a-za-z0-9]+\\|[ \t\n]\\|\\b\\|\\\\\\)\\(_\\|\\^\\)\\([a-za-z0-9]+\\|[ \t\n]\\|[:punct:]\\|{[a-za-z0-9]+}\\|([a-za-z0-9]+)\\)" | |
849 "\\(.\\|^\\)\\(\\\\\\)\\([ \t\n]\\|[a-zA-Z&#%{}\"]+\\)" | |
850 "\\(.\\|^\\)\\(&\\)" | |
851 "\\(.\\|^\\)\\(#\\)" | |
852 "\\(.\\|^\\)\\(%\\)" | |
853 "\\(.\\|^\\)\\({\\)" | |
854 "\\(.\\|^\\)\\(}\\)" | |
855 "\\(.\\|^\\)\\(~\\)" | |
856 "\\(.\\|^\\)\\(\\.\\.\\.\\)" | |
857 ;; (?\< . "\\textless{}") | |
858 ;; (?\> . "\\textgreater{}") | |
859 ))) | |
860 | |
861 (defun org-export-latex-treat-sub-super-char | |
862 (subsup string-before char string-after) | |
863 "Convert the \"_\" and \"^\" characters to LaTeX. | |
864 SUBSUP corresponds to the ^: option in the #+OPTIONS line. | |
865 Convert CHAR depending on STRING-BEFORE and STRING-AFTER." | |
866 (cond ((equal string-before "\\") | |
867 (concat string-before char string-after)) | |
868 ;; this is part of a math formula | |
869 ((and (string-match "\\S-+" string-before) | |
870 (string-match "\\S-+" string-after)) | |
871 (cond ((eq 'org-link (get-text-property 0 'face char)) | |
872 (concat string-before "\\" char string-after)) | |
873 ((save-match-data (org-inside-LaTeX-fragment-p)) | |
874 (if subsup | |
875 (cond ((eq 1 (length string-after)) | |
876 (concat string-before char string-after)) | |
877 ((string-match "[({]?\\([^)}]+\\)[)}]?" string-after) | |
878 (format "%s%s{%s}" string-before char | |
879 (match-string 1 string-after)))))) | |
880 ((and subsup | |
881 (> (length string-after) 1) | |
882 (string-match "[({]?\\([^)}]+\\)[)}]?" string-after)) | |
883 (format "$%s%s{%s}$" string-before char | |
884 (match-string 1 string-after))) | |
885 (subsup (concat "$" string-before char string-after "$")) | |
886 (t (org-export-latex-protect-string | |
887 (concat string-before "\\" char "{}" string-after))))) | |
888 (t (org-export-latex-protect-string | |
889 (concat string-before "\\" char "{}" string-after))))) | |
890 | |
891 (defun org-export-latex-treat-backslash-char (string-before string-after) | |
892 "Convert the \"$\" special character to LaTeX. | |
893 The conversion is made depending of STRING-BEFORE and STRING-AFTER." | |
894 (cond ((member (list string-after) org-html-entities) | |
895 ;; backslash is part of a special entity (like "\alpha") | |
896 (concat string-before "$\\" | |
897 (or (cdar (member (list string-after) org-html-entities)) | |
898 string-after) "$")) | |
899 ((and (not (string-match "^[ \n\t]" string-after)) | |
900 (not (string-match "[ \t]\\'\\|^" string-before))) | |
901 ;; backslash is inside a word | |
902 (org-export-latex-protect-string | |
903 (concat string-before "\\textbackslash{}" string-after))) | |
904 ((not (or (equal string-after "") | |
905 (string-match "^[ \t\n]" string-after))) | |
906 ;; backslash might escape a character (like \#) or a user TeX | |
907 ;; macro (like \setcounter) | |
908 (org-export-latex-protect-string | |
909 (concat string-before "\\" string-after))) | |
910 ((and (string-match "^[ \t\n]" string-after) | |
911 (string-match "[ \t\n]\\'" string-before)) | |
912 ;; backslash is alone, convert it to $\backslash$ | |
913 (org-export-latex-protect-string | |
914 (concat string-before "\\textbackslash{}" string-after))) | |
915 (t (org-export-latex-protect-string | |
916 (concat string-before "\\textbackslash{}" string-after))))) | |
917 | |
918 (defun org-export-latex-keywords (timestamps) | |
919 "Convert special keywords to LaTeX. | |
920 Regexps are those from `org-export-latex-special-string-regexps'." | |
921 (let ((rg org-export-latex-special-string-regexps) r) | |
922 (while (setq r (pop rg)) | |
923 (goto-char (point-min)) | |
924 (while (re-search-forward (eval r) nil t) | |
925 (if (not timestamps) | |
926 (replace-match (format "\\\\texttt{%s}" (match-string 0)) t) | |
927 (replace-match "")))))) | |
928 | |
929 (defun org-export-latex-fixed-width (opt) | |
930 "When OPT is non-nil convert fixed-width sections to LaTeX." | |
931 (goto-char (point-min)) | |
932 (while (re-search-forward "^[ \t]*:" nil t) | |
933 (if opt | |
934 (progn (goto-char (match-beginning 0)) | |
935 (insert "\\begin{verbatim}\n") | |
936 (while (looking-at "^\\([ \t]*\\):\\(.*\\)$") | |
937 (replace-match (concat (match-string 1) | |
938 (match-string 2)) t t) | |
939 (forward-line)) | |
940 (insert "\\end{verbatim}\n\n")) | |
941 (progn (goto-char (match-beginning 0)) | |
942 (while (looking-at "^\\([ \t]*\\):\\(.*\\)$") | |
943 (replace-match (concat "%" (match-string 1) | |
944 (match-string 2)) t t) | |
945 (forward-line)))))) | |
946 | |
947 (defun org-export-latex-tables (insert) | |
948 "Convert tables to LaTeX and INSERT it." | |
949 (goto-char (point-min)) | |
950 (while (re-search-forward "^\\([ \t]*\\)|" nil t) | |
951 ;; FIXME really need to save-excursion? | |
952 (save-excursion (org-table-align)) | |
953 (let* ((beg (org-table-begin)) | |
954 (end (org-table-end)) | |
955 (raw-table (buffer-substring-no-properties beg end)) | |
956 fnum fields line lines olines gr colgropen line-fmt align) | |
957 (if org-export-latex-tables-verbatim | |
958 (let* ((tbl (concat "\\begin{verbatim}\n" raw-table | |
959 "\\end{verbatim}\n"))) | |
960 (apply 'delete-region (list beg end)) | |
961 (insert tbl)) | |
962 (progn | |
963 (setq lines (split-string raw-table "\n" t)) | |
964 (apply 'delete-region (list beg end)) | |
965 (when org-export-table-remove-special-lines | |
966 (setq lines (org-table-clean-before-export lines))) | |
967 ;; make a formatting string to reflect aligment | |
968 (setq olines lines) | |
969 (while (and (not line-fmt) (setq line (pop olines))) | |
970 (unless (string-match "^[ \t]*|-" line) | |
971 (setq fields (org-split-string line "[ \t]*|[ \t]*")) | |
972 (setq fnum (make-vector (length fields) 0)) | |
973 (setq line-fmt | |
974 (mapconcat | |
975 (lambda (x) | |
976 (setq gr (pop org-table-colgroup-info)) | |
977 (format "%s%%s%s" | |
978 (cond ((eq gr ':start) | |
979 (prog1 (if colgropen "|" "") | |
980 (setq colgropen t))) | |
981 ((eq gr ':startend) | |
982 (prog1 (if colgropen "|" "|") | |
983 (setq colgropen nil))) | |
984 (t "")) | |
985 (if (memq gr '(:end :startend)) | |
986 (progn (setq colgropen nil) "|") | |
987 ""))) | |
988 fnum "")))) | |
989 ;; fix double || in line-fmt | |
990 (setq line-fmt (replace-regexp-in-string "||" "|" line-fmt)) | |
991 ;; maybe remove the first and last "|" | |
992 (when (and (not org-export-latex-tables-column-borders) | |
993 (string-match "^\\(|\\)?\\(.+\\)|$" line-fmt)) | |
994 (setq line-fmt (match-string 2 line-fmt))) | |
995 ;; format alignment | |
996 (setq align (apply 'format | |
997 (cons line-fmt | |
998 (mapcar (lambda (x) (if x "r" "l")) | |
999 org-table-last-alignment)))) | |
1000 ;; prepare the table to send to orgtbl-to-latex | |
1001 (setq lines | |
1002 (mapcar | |
1003 (lambda(elem) | |
1004 (or (and (string-match "[ \t]*|-+" elem) 'hline) | |
1005 (split-string (org-trim elem) "|" t))) | |
1006 lines)) | |
1007 (when insert | |
1008 (insert (orgtbl-to-latex | |
1009 lines `(:tstart ,(concat "\\begin{tabular}{" align "}"))) | |
1010 "\n\n"))))))) | |
1011 | |
1012 (defun org-export-latex-fontify () | |
1013 "Convert fontification to LaTeX." | |
1014 (goto-char (point-min)) | |
1015 (while (re-search-forward org-emph-re nil t) | |
1016 ;; The match goes one char after the *string* | |
1017 (let ((emph (assoc (match-string 3) | |
1018 org-export-latex-emphasis-alist)) | |
1019 rpl) | |
1020 (unless (get-text-property (1- (point)) 'org-protected) | |
1021 (setq rpl (concat (match-string 1) | |
1022 (format (org-export-latex-protect-char-in-string | |
1023 '("\\" "{" "}") (cadr emph)) | |
1024 (match-string 4)) | |
1025 (match-string 5))) | |
1026 (if (caddr emph) | |
1027 (setq rpl (org-export-latex-protect-string rpl))) | |
1028 (replace-match rpl t t))) | |
1029 (backward-char))) | |
1030 | |
1031 (defun org-export-latex-links () | |
1032 ;; Make sure to use the LaTeX hyperref and graphicx package | |
1033 ;; or send some warnings. | |
1034 "Convert links to LaTeX." | |
1035 (goto-char (point-min)) | |
1036 (while (re-search-forward org-bracket-link-analytic-regexp nil t) | |
1037 (org-if-unprotected | |
1038 (goto-char (match-beginning 0)) | |
1039 (let* ((re-radio org-export-latex-all-targets-re) | |
1040 (remove (list (match-beginning 0) (match-end 0))) | |
1041 (type (match-string 2)) | |
1042 (raw-path (match-string 3)) | |
1043 (full-raw-path (concat (match-string 1) raw-path)) | |
1044 (desc (match-string 5)) | |
1045 imgp radiop | |
1046 ;; define the path of the link | |
1047 (path (cond | |
1048 ((member type '("http" "https" "ftp")) | |
1049 (concat type ":" raw-path)) | |
1050 ((and re-radio (string-match re-radio raw-path)) | |
1051 (setq radiop t)) | |
1052 ((equal type "mailto") | |
1053 (concat type ":" raw-path)) | |
1054 ((equal type "file") | |
1055 (if (and (or (org-file-image-p (expand-file-name raw-path)) | |
1056 (string-match "\\.eps$" raw-path)) | |
1057 (equal desc full-raw-path)) | |
1058 (setq imgp t) | |
1059 (progn (when (string-match "\\(.+\\)::.+" raw-path) | |
1060 (setq raw-path (match-string 1 raw-path))) | |
1061 (if (file-exists-p raw-path) | |
1062 (concat type "://" (expand-file-name raw-path)) | |
1063 (concat type "://" (org-export-directory | |
1064 :LaTeX org-export-latex-options-plist) | |
1065 raw-path)))))))) | |
1066 ;; process with link inserting | |
1067 (apply 'delete-region remove) | |
1068 (cond ((and imgp (plist-get org-export-latex-options-plist :inline-images)) | |
1069 (insert (format "\\includegraphics[%s]{%s}" | |
1070 ;; image option should be set be a comment line | |
1071 org-export-latex-image-default-option | |
1072 (expand-file-name raw-path)))) | |
1073 (radiop (insert (format "\\hyperref[%s]{%s}" raw-path desc))) | |
1074 (path (insert (format "\\href{%s}{%s}" path desc))) | |
1075 (t (insert "\\texttt{" desc "}"))))))) | |
1076 | |
1077 (defvar org-latex-entities) ; defined below | |
1078 | |
1079 (defun org-export-latex-cleaned-string () | |
1080 "Clean stuff in the LaTeX export." | |
1081 | |
1082 ;; Preserve line breaks | |
1083 (goto-char (point-min)) | |
1084 (while (re-search-forward "\\\\\\\\" nil t) | |
1085 (add-text-properties (match-beginning 0) (match-end 0) | |
1086 '(org-protected t))) | |
1087 | |
1088 ;; Convert LaTeX to \LaTeX{} | |
1089 (goto-char (point-min)) | |
1090 (let ((case-fold-search nil) rpl) | |
1091 (while (re-search-forward "\\([^+_]\\)LaTeX" nil t) | |
1092 (replace-match (org-export-latex-protect-string | |
1093 (concat (match-string 1) "\\LaTeX{}")) t t))) | |
1094 | |
1095 ;; Convert horizontal rules | |
1096 (goto-char (point-min)) | |
1097 (while (re-search-forward "^----+.$" nil t) | |
1098 (replace-match (org-export-latex-protect-string "\\hrule") t t)) | |
1099 | |
1100 ;; Protect LaTeX commands like \commad[...]{...} or \command{...} | |
1101 (goto-char (point-min)) | |
1102 (while (re-search-forward "\\\\[a-zA-Z]+\\(?:\\[.*\\]\\)?{.*}" nil t) | |
1103 (add-text-properties (match-beginning 0) (match-end 0) | |
1104 '(org-protected t))) | |
1105 | |
1106 ;; Protect LaTeX entities | |
1107 (goto-char (point-min)) | |
1108 (while (re-search-forward (regexp-opt org-latex-entities) nil t) | |
1109 (add-text-properties (match-beginning 0) (match-end 0) | |
1110 '(org-protected t))) | |
1111 | |
1112 ;; Replace radio links | |
1113 (goto-char (point-min)) | |
1114 (while (re-search-forward | |
1115 (concat "<<<?" org-export-latex-all-targets-re | |
1116 ">>>?\\((INVISIBLE)\\)?") nil t) | |
1117 (replace-match | |
1118 (org-export-latex-protect-string | |
1119 (format "\\label{%s}%s"(match-string 1) | |
1120 (if (match-string 2) "" (match-string 1)))) t t)) | |
1121 | |
1122 ;; Delete @<...> constructs | |
1123 ;; Thanks to Daniel Clemente for this regexp | |
1124 (goto-char (point-min)) | |
1125 (while (re-search-forward "@<\\(?:[^\"\n]\\|\".*\"\\)*?>" nil t) | |
1126 (replace-match "")) | |
1127 | |
1128 ;; When converting to LaTeX, replace footnotes | |
1129 ;; FIXME: don't protect footnotes from conversion | |
1130 (when (plist-get org-export-latex-options-plist :footnotes) | |
1131 (goto-char (point-min)) | |
1132 (while (re-search-forward "\\[[0-9]+\\]" nil t) | |
1133 (when (save-match-data | |
1134 (save-excursion (beginning-of-line) | |
1135 (looking-at "[^:|#]"))) | |
1136 (let ((foot-beg (match-beginning 0)) | |
1137 (foot-end (match-end 0)) | |
1138 (foot-prefix (match-string 0)) | |
1139 footnote footnote-rpl) | |
1140 (save-excursion | |
1141 (when (search-forward foot-prefix nil t) | |
1142 (replace-match "") | |
1143 (let ((end (save-excursion | |
1144 (if (re-search-forward "^$\\|^#.*$\\|\\[[0-9]+\\]" nil t) | |
1145 (match-beginning 0) (point-max))))) | |
1146 (setq footnote (concat (org-trim (buffer-substring (point) end)) | |
1147 " ")) ; prevent last } being part of a link | |
1148 (delete-region (point) end)) | |
1149 (goto-char foot-beg) | |
1150 (delete-region foot-beg foot-end) | |
1151 (unless (null footnote) | |
1152 (setq footnote-rpl (format "\\footnote{%s}" footnote)) | |
1153 (add-text-properties 0 10 '(org-protected t) footnote-rpl) | |
1154 (add-text-properties (1- (length footnote-rpl)) | |
1155 (length footnote-rpl) | |
1156 '(org-protected t) footnote-rpl) | |
1157 (insert footnote-rpl))))))) | |
1158 | |
1159 ;; Replace footnote section tag for LaTeX | |
1160 (goto-char (point-min)) | |
1161 (while (re-search-forward | |
1162 (concat "^" footnote-section-tag-regexp) nil t) | |
1163 (replace-match "")))) | |
1164 | |
1165 ;;; List handling: | |
1166 | |
1167 (defun org-export-latex-lists () | |
1168 "Replace plain text lists in current buffer into LaTeX lists." | |
1169 "Convert lists to LaTeX." | |
1170 (goto-char (point-min)) | |
1171 (while (re-search-forward org-export-latex-list-beginning-re nil t) | |
1172 (beginning-of-line) | |
1173 (insert (org-list-to-latex (org-list-parse-list t)) "\n"))) | |
1174 | |
1175 (defun org-list-parse-list (&optional delete) | |
1176 "Parse the list at point. | |
1177 Return a list containing first level items as strings and | |
1178 sublevels as a list of strings." | |
1179 (let ((start (org-list-item-begin)) | |
1180 (end (org-list-end)) | |
1181 output itemsep) | |
1182 (while (re-search-forward org-export-latex-list-beginning-re end t) | |
1183 (setq itemsep (if (save-match-data | |
1184 (string-match "^[0-9]" (match-string 2))) | |
1185 "[0-9]+\\(?:\\.\\|)\\)" "[-+]")) | |
1186 (let* ((indent1 (match-string 1)) | |
1187 (nextitem (save-excursion | |
1188 (save-match-data | |
1189 (or (and (re-search-forward | |
1190 (concat "^" indent1 itemsep " *?") end t) | |
1191 (match-beginning 0)) end)))) | |
1192 (item (buffer-substring | |
1193 (point) | |
1194 (or (and (re-search-forward | |
1195 org-export-latex-list-beginning-re end t) | |
1196 (goto-char (match-beginning 0))) | |
1197 (goto-char end)))) | |
1198 (nextindent (match-string 1)) | |
1199 (item (org-trim item)) | |
1200 (item (if (string-match "^\\[.+\\]" item) | |
1201 (replace-match "\\\\texttt{\\&}" | |
1202 t nil item) item))) | |
1203 (push item output) | |
1204 (when (> (length nextindent) | |
1205 (length indent1)) | |
1206 (narrow-to-region (point) nextitem) | |
1207 (push (org-list-parse-list) output) | |
1208 (widen)))) | |
1209 (when delete (delete-region start end)) | |
1210 (setq output (nreverse output)) | |
1211 (push (if (string-match "^\\[0" itemsep) | |
1212 'ordered 'unordered) output))) | |
1213 | |
1214 (defun org-list-item-begin () | |
1215 "Find the beginning of the list item and return its position." | |
1216 (save-excursion | |
1217 (if (not (or (looking-at org-export-latex-list-beginning-re) | |
1218 (re-search-backward | |
1219 org-export-latex-list-beginning-re nil t))) | |
1220 (progn (goto-char (point-min)) (point)) | |
1221 (match-beginning 0)))) | |
1222 | |
1223 (defun org-list-end () | |
1224 "Find the end of the list and return its position." | |
1225 (save-excursion | |
1226 (catch 'exit | |
1227 (while (or (looking-at org-export-latex-list-beginning-re) | |
1228 (looking-at "^[ \t]+\\|^$")) | |
1229 (if (eq (point) (point-max)) | |
1230 (throw 'exit (point-max))) | |
1231 (forward-line 1))) (point))) | |
1232 | |
1233 (defun org-list-insert-radio-list () | |
1234 "Insert a radio list template appropriate for this major mode." | |
1235 (interactive) | |
1236 (let* ((e (assq major-mode org-list-radio-list-templates)) | |
1237 (txt (nth 1 e)) | |
1238 name pos) | |
1239 (unless e (error "No radio list setup defined for %s" major-mode)) | |
1240 (setq name (read-string "List name: ")) | |
1241 (while (string-match "%n" txt) | |
1242 (setq txt (replace-match name t t txt))) | |
1243 (or (bolp) (insert "\n")) | |
1244 (setq pos (point)) | |
1245 (insert txt) | |
1246 (goto-char pos))) | |
1247 | |
1248 (defun org-list-send-list (&optional maybe) | |
1249 "Send a tranformed version of this list to the receiver position. | |
1250 With argument MAYBE, fail quietly if no transformation is defined for | |
1251 this list." | |
1252 (interactive) | |
1253 (catch 'exit | |
1254 (unless (org-at-item-p) (error "Not at a list")) | |
1255 (save-excursion | |
1256 (goto-char (org-list-item-begin)) | |
1257 (beginning-of-line 0) | |
1258 (unless (looking-at "#\\+ORGLST: *SEND +\\([a-zA-Z0-9_]+\\) +\\([^ \t\r\n]+\\)\\( +.*\\)?") | |
1259 (if maybe | |
1260 (throw 'exit nil) | |
1261 (error "Don't know how to transform this list")))) | |
1262 (let* ((name (match-string 1)) | |
1263 beg | |
1264 (transform (intern (match-string 2))) | |
1265 (txt (buffer-substring-no-properties | |
1266 (org-list-item-begin) | |
1267 (org-list-end))) | |
1268 (list (org-list-parse-list))) | |
1269 (unless (fboundp transform) | |
1270 (error "No such transformation function %s" transform)) | |
1271 (setq txt (funcall transform list)) | |
1272 ;; Find the insertion place | |
1273 (save-excursion | |
1274 (goto-char (point-min)) | |
1275 (unless (re-search-forward | |
1276 (concat "BEGIN RECEIVE ORGLST +" name "\\([ \t]\\|$\\)") nil t) | |
1277 (error "Don't know where to insert translated list")) | |
1278 (goto-char (match-beginning 0)) | |
1279 (beginning-of-line 2) | |
1280 (setq beg (point)) | |
1281 (unless (re-search-forward (concat "END RECEIVE ORGLST +" name) nil t) | |
1282 (error "Cannot find end of insertion region")) | |
1283 (beginning-of-line 1) | |
1284 (delete-region beg (point)) | |
1285 (goto-char beg) | |
1286 (insert txt "\n")) | |
1287 (message "List converted and installed at receiver location")))) | |
1288 | |
1289 (defun org-list-to-generic (list params) | |
1290 "Convert a LIST parsed through `org-list-parse-list' to other formats. | |
1291 | |
1292 Valid parameters are | |
1293 | |
1294 :ustart String to start an unordered list | |
1295 :uend String to end an unordered list | |
1296 | |
1297 :ostart String to start an ordered list | |
1298 :oend String to end an ordered list | |
1299 | |
1300 :splice When set to t, return only list body lines, don't wrap | |
1301 them into :[u/o]start and :[u/o]end. Default is nil. | |
1302 | |
1303 :istart String to start a list item | |
1304 :iend String to end a list item | |
1305 :isep String to separate items | |
1306 :lsep String to separate sublists" | |
1307 (interactive) | |
1308 (let* ((p params) sublist | |
1309 (splicep (plist-get p :splice)) | |
1310 (ostart (plist-get p :ostart)) | |
1311 (oend (plist-get p :oend)) | |
1312 (ustart (plist-get p :ustart)) | |
1313 (uend (plist-get p :uend)) | |
1314 (istart (plist-get p :istart)) | |
1315 (iend (plist-get p :iend)) | |
1316 (isep (plist-get p :isep)) | |
1317 (lsep (plist-get p :lsep))) | |
1318 (let ((wrapper | |
1319 (cond ((eq (car list) 'ordered) | |
1320 (concat ostart "\n%s" oend "\n")) | |
1321 ((eq (car list) 'unordered) | |
1322 (concat ustart "\n%s" uend "\n")))) | |
1323 rtn) | |
1324 (while (setq sublist (pop list)) | |
1325 (cond ((symbolp sublist) nil) | |
1326 ((stringp sublist) | |
1327 (setq rtn (concat rtn istart sublist iend isep))) | |
1328 (t | |
1329 (setq rtn (concat rtn ;; previous list | |
1330 lsep ;; list separator | |
1331 (org-list-to-generic sublist p) | |
1332 lsep ;; list separator | |
1333 ))))) | |
1334 (format wrapper rtn)))) | |
1335 | |
1336 (defun org-list-to-latex (list) | |
1337 "Convert LIST into a LaTeX list." | |
1338 (org-list-to-generic | |
1339 list '(:splicep nil :ostart "\\begin{enumerate}" :oend "\\end{enumerate}" | |
1340 :ustart "\\begin{itemize}" :uend "\\end{itemize}" | |
1341 :istart "\\item " :iend "" | |
1342 :isep "\n" :lsep "\n"))) | |
1343 | |
1344 (defun org-list-to-html (list) | |
1345 "Convert LIST into a HTML list." | |
1346 (org-list-to-generic | |
1347 list '(:splicep nil :ostart "<ol>" :oend "</ol>" | |
1348 :ustart "<ul>" :uend "</ul>" | |
1349 :istart "<li>" :iend "</li>" | |
1350 :isep "\n" :lsep "\n"))) | |
1351 | |
1352 (defun org-list-to-texinfo (list) | |
1353 "Convert LIST into a Texinfo list." | |
1354 (org-list-to-generic | |
1355 list '(:splicep nil :ostart "@itemize @minus" :oend "@end itemize" | |
1356 :ustart "@enumerate" :uend "@end enumerate" | |
1357 :istart "@item\n" :iend "" | |
1358 :isep "\n" :lsep "\n"))) | |
1359 | |
1360 (defconst org-latex-entities | |
1361 '("\\!" | |
1362 "\\'" | |
1363 "\\+" | |
1364 "\\," | |
1365 "\\-" | |
1366 "\\:" | |
1367 "\\;" | |
1368 "\\<" | |
1369 "\\=" | |
1370 "\\>" | |
1371 "\\Huge" | |
1372 "\\LARGE" | |
1373 "\\Large" | |
1374 "\\Styles" | |
1375 "\\\\" | |
1376 "\\`" | |
1377 "\\addcontentsline" | |
1378 "\\address" | |
1379 "\\addtocontents" | |
1380 "\\addtocounter" | |
1381 "\\addtolength" | |
1382 "\\addvspace" | |
1383 "\\alph" | |
1384 "\\appendix" | |
1385 "\\arabic" | |
1386 "\\author" | |
1387 "\\begin{array}" | |
1388 "\\begin{center}" | |
1389 "\\begin{description}" | |
1390 "\\begin{enumerate}" | |
1391 "\\begin{eqnarray}" | |
1392 "\\begin{equation}" | |
1393 "\\begin{figure}" | |
1394 "\\begin{flushleft}" | |
1395 "\\begin{flushright}" | |
1396 "\\begin{itemize}" | |
1397 "\\begin{list}" | |
1398 "\\begin{minipage}" | |
1399 "\\begin{picture}" | |
1400 "\\begin{quotation}" | |
1401 "\\begin{quote}" | |
1402 "\\begin{tabbing}" | |
1403 "\\begin{table}" | |
1404 "\\begin{tabular}" | |
1405 "\\begin{thebibliography}" | |
1406 "\\begin{theorem}" | |
1407 "\\begin{titlepage}" | |
1408 "\\begin{verbatim}" | |
1409 "\\begin{verse}" | |
1410 "\\bf" | |
1411 "\\bf" | |
1412 "\\bibitem" | |
1413 "\\bigskip" | |
1414 "\\cdots" | |
1415 "\\centering" | |
1416 "\\circle" | |
1417 "\\cite" | |
1418 "\\cleardoublepage" | |
1419 "\\clearpage" | |
1420 "\\cline" | |
1421 "\\closing" | |
1422 "\\dashbox" | |
1423 "\\date" | |
1424 "\\ddots" | |
1425 "\\dotfill" | |
1426 "\\em" | |
1427 "\\fbox" | |
1428 "\\flushbottom" | |
1429 "\\fnsymbol" | |
1430 "\\footnote" | |
1431 "\\footnotemark" | |
1432 "\\footnotesize" | |
1433 "\\footnotetext" | |
1434 "\\frac" | |
1435 "\\frame" | |
1436 "\\framebox" | |
1437 "\\hfill" | |
1438 "\\hline" | |
1439 "\\hrulespace" | |
1440 "\\hspace" | |
1441 "\\huge" | |
1442 "\\hyphenation" | |
1443 "\\include" | |
1444 "\\includeonly" | |
1445 "\\indent" | |
1446 "\\input" | |
1447 "\\it" | |
1448 "\\kill" | |
1449 "\\label" | |
1450 "\\large" | |
1451 "\\ldots" | |
1452 "\\line" | |
1453 "\\linebreak" | |
1454 "\\linethickness" | |
1455 "\\listoffigures" | |
1456 "\\listoftables" | |
1457 "\\location" | |
1458 "\\makebox" | |
1459 "\\maketitle" | |
1460 "\\mark" | |
1461 "\\mbox" | |
1462 "\\medskip" | |
1463 "\\multicolumn" | |
1464 "\\multiput" | |
1465 "\\newcommand" | |
1466 "\\newcounter" | |
1467 "\\newenvironment" | |
1468 "\\newfont" | |
1469 "\\newlength" | |
1470 "\\newline" | |
1471 "\\newpage" | |
1472 "\\newsavebox" | |
1473 "\\newtheorem" | |
1474 "\\nocite" | |
1475 "\\nofiles" | |
1476 "\\noindent" | |
1477 "\\nolinebreak" | |
1478 "\\nopagebreak" | |
1479 "\\normalsize" | |
1480 "\\onecolumn" | |
1481 "\\opening" | |
1482 "\\oval" | |
1483 "\\overbrace" | |
1484 "\\overline" | |
1485 "\\pagebreak" | |
1486 "\\pagenumbering" | |
1487 "\\pageref" | |
1488 "\\pagestyle" | |
1489 "\\par" | |
1490 "\\parbox" | |
1491 "\\put" | |
1492 "\\raggedbottom" | |
1493 "\\raggedleft" | |
1494 "\\raggedright" | |
1495 "\\raisebox" | |
1496 "\\ref" | |
1497 "\\rm" | |
1498 "\\roman" | |
1499 "\\rule" | |
1500 "\\savebox" | |
1501 "\\sc" | |
1502 "\\scriptsize" | |
1503 "\\setcounter" | |
1504 "\\setlength" | |
1505 "\\settowidth" | |
1506 "\\sf" | |
1507 "\\shortstack" | |
1508 "\\signature" | |
1509 "\\sl" | |
1510 "\\small" | |
1511 "\\smallskip" | |
1512 "\\sqrt" | |
1513 "\\tableofcontents" | |
1514 "\\telephone" | |
1515 "\\thanks" | |
1516 "\\thispagestyle" | |
1517 "\\tiny" | |
1518 "\\title" | |
1519 "\\tt" | |
1520 "\\twocolumn" | |
1521 "\\typein" | |
1522 "\\typeout" | |
1523 "\\underbrace" | |
1524 "\\underline" | |
1525 "\\usebox" | |
1526 "\\usecounter" | |
1527 "\\value" | |
1528 "\\vdots" | |
1529 "\\vector" | |
1530 "\\verb" | |
1531 "\\vfill" | |
1532 "\\vline" | |
1533 "\\vspace") | |
1534 "A list of LaTeX commands to be protected when performing conversion.") | |
1535 | |
1536 (provide 'org-export-latex) | |
1537 | |
1538 ;; arch-tag: 23c2b87d-da04-4c2d-ad2d-1eb6487bc3ad | |
1539 ;;; org-export-latex.el ends here |