diff options
-rw-r--r-- | resources/custom.el | 2 | ||||
-rw-r--r-- | smart-documents.org | 161 | ||||
-rw-r--r-- | smart-documents.pdf | bin | 414911 -> 414911 bytes |
3 files changed, 97 insertions, 66 deletions
diff --git a/resources/custom.el b/resources/custom.el index fcd73ee..531aeb4 100644 --- a/resources/custom.el +++ b/resources/custom.el @@ -68,7 +68,7 @@ '(org-startup-align-all-tables t) '(org-table-convert-region-max-lines 3000) '(org-tags-column -66) - '(pdf-view-midnight-colors '("#DCDCCC" . "#383838")) + '(pdf-view-midnight-colors '("#DCDCCC" . "#383838")) '(save-place-mode t) '(send-mail-function 'smtpmail-send-it) '(show-paren-mode t) diff --git a/smart-documents.org b/smart-documents.org index 11a8889..64d6c5f 100644 --- a/smart-documents.org +++ b/smart-documents.org @@ -8,9 +8,9 @@ #+OPTIONS: html-style:nil #+MACRO: sd /Smart Documents/ # LaTeX setup -#+SETUPFILE: ~/.emacs.d/templates/documents/gnu-default.setup +#+SETUPFILE: ~/.emacs.d/resources/templates/documents/gnu-default.setup # Title page -#+INCLUDE: ~/.emacs.d/templates/documents/title-default.org +#+INCLUDE: ~/.emacs.d/resources/templates/documents/title-default.org #+LATEX_HEADER_EXTRA: \newfontfamily\garamond{EB Garamond} #+LATEX_HEADER_EXTRA: \newfontfamily\publicsans{Public Sans} @@ -159,45 +159,76 @@ We begin by defining a function to open this very file. (interactive) (find-file my/literate-config)) #+END_SRC - -** Definitions - -*** Usual paths +** Usual paths to files & directories This section defines the paths that structure the overall {{{sd}}} logic. -#+BEGIN_SRC emacs-lisp :tangle yes - (defcustom sd-path-meta - (concat user-emacs-directory "meta/") - "Directory containing the meta files.") +- File :: A collection of information recognized by a computer---to + us, a normal file appears as programs (source code or /executables/) + or data (an image, a video, a document...). It is usually stored in + a computer's memory or on a storage device (hard drive, USB + drive...) +- Path :: A description of a file's location from the user's + perspective. A path is program searches for a file or executable + program. +- Directory :: Synonymous with /folder/. From the computer's---and + Emacs'---perspective, a file which contains other files. These files + may themselves be directories. + +*** Resources + +All third-party resources are saved at the following location. - (defcustom sd-path-res - (concat user-emacs-directory "res/") +#+BEGIN_SRC emacs-lisp :tangle yes + (defcustom sd-path-resources + (concat user-emacs-directory "resources/") "Directory containing the third-party resources.") #+END_SRC -** Resources +**** Packages -All third-party resources are saved at the following location. +#+BEGIN_SRC emacs-lisp :tangle yes + (setq package-user-dir + (concat sd-path-resources "elpa")) +#+END_SRC -*** Packages +**** Themes #+BEGIN_SRC emacs-lisp :tangle yes - (setq package-user-dir - (concat sd-path-res - "elpa")) + (setq custom-theme-directory + (concat sd-path-resources "themes/")) #+END_SRC -*** Emojis +**** Snippets + +This path, specifically, is required to be in list form. + +#+BEGIN_SRC emacs-lisp :tangle yes + (setq yas-snippet-dirs + (list (concat sd-path-resources "snippets/"))) +#+END_SRC + +**** Emojis #+BEGIN_SRC emacs-lisp :tangle yes (setq emojify-emojis-dir - (concat sd-path-res - "emojis")) + (concat sd-path-resources "emojis")) +#+END_SRC + +**** Custom file + +Load settings created automatically by GNU Emacs Custom. (For example, +any clickable option/toggle is saved here.) Useful for fooling around +with ~M-x customize-group <package>~. + +#+NAME: custom-file-location +#+BEGIN_SRC emacs-lisp :tangle yes + (setq custom-file (concat sd-path-resources "custom.el")) + (load custom-file) #+END_SRC -** Meta-files +*** Files about files In this section, we'll be tidying up the =.emacs.d/= directory---by default, many Emacs packages create files useful for themselves in our @@ -209,34 +240,34 @@ file]]) The commonality between all these files is that they tend to reference... other files. Thus, I decided to refer to them as meta-files. -*** Recently visited files +#+BEGIN_SRC emacs-lisp :tangle yes + (defcustom sd-path-meta + (concat user-emacs-directory "meta/") + "Directory (files, really) containing files about files.") +#+END_SRC + +**** Recently visited files #+BEGIN_SRC emacs-lisp :tangle yes (setq recentf-save-file - (concat - sd-path-meta - "recentf")) + (concat sd-path-meta "recentf")) #+END_SRC -*** Projects' bookmarks +**** Projects' bookmarks #+BEGIN_SRC emacs-lisp :tangle yes (setq projectile-known-projects-file - (concat - sd-path-meta - "projectile-bookmarks.eld")) + (concat sd-path-meta "projectile-bookmarks.eld")) #+END_SRC -*** Location in previously visited file +**** Location in previously visited file #+BEGIN_SRC emacs-lisp :tangle yes (setq save-place-file - (concat - sd-path-meta - "places")) + (concat sd-path-meta "places")) #+END_SRC -*** Auto save file lists +**** Auto save file lists #+BEGIN_SRC emacs-lisp :tangle yes (setq auto-save-list-file-prefix @@ -244,18 +275,6 @@ meta-files. "auto-save-list/.saves-")) #+END_SRC -** Custom file - -Load settings created automatically by GNU Emacs Custom. (For example, -any clickable option/toggle is saved here.) Useful for fooling around -with ~M-x customize-group <package>~. - -#+NAME: custom-file-location -#+BEGIN_SRC emacs-lisp :tangle yes - (setq custom-file (concat user-emacs-directory "custom.el")) - (load custom-file) -#+END_SRC - ** Backups Backups are very important! @@ -458,7 +477,11 @@ It seems that starting with Emacs 27.1, Control + mousewheel works. (global-set-key (kbd "C-+") 'text-scale-increase) #+END_SRC -** TODO Navigation +** TODO COMMENT Navigation +# [2021-09-13 Mon] +# +# Kinda don't like this... This is some more text. And then some. And +# then some. =Alt= (=Meta=) is the privileged key for motion in a buffer. It is followed by an optional numerical argument, and a movement @@ -826,7 +849,7 @@ Yeah, a Telegram client exists for Emacs. -#+BEGIN_SRC ditaa :file img/ditaa.png +#+BEGIN_SRC ditaa :file resources/images/ditaa.png +-----------+ +-----------------+ | c06F | | c06F | | Create a | | Open the source | @@ -837,7 +860,7 @@ Yeah, a Telegram client exists for Emacs. #+END_SRC #+RESULTS: -[[file:img/ditaa.png]] +[[file:resources/images/ditaa.png]] *** TODO UML diagrams # Implement automatically downloading this kind of executable! @@ -846,13 +869,13 @@ Yeah, a Telegram client exists for Emacs. (require 'plantuml-mode) (setq plantuml-default-exec-mode 'jar - plantuml-jar-path (concat user-emacs-directory - "execs/plantuml.jar") - org-plantuml-jar-path (concat user-emacs-directory - "execs/plantuml.jar")) + plantuml-jar-path (concat sd-path-resources + "executables/plantuml.jar") + org-plantuml-jar-path (concat sd-path-resources + "executables/plantuml.jar")) #+END_SRC -#+BEGIN_SRC plantuml :file img/uml.png +#+BEGIN_SRC plantuml :file resources/images/uml.png @startuml doob.png !theme cerulean-outline title Example diagram with Plantuml @@ -874,8 +897,9 @@ Yeah, a Telegram client exists for Emacs. @enduml #+END_SRC +#+ATTR_LATEX: :width 0.8\textwidth #+RESULTS: -[[file:img/uml.png]] +[[file:resources/images/uml.png]] ** Coding languages @@ -1332,6 +1356,13 @@ This /letter/ template completes the other default LaTeX classes. (add-to-list 'org-latex-classes '("letter" "\\documentclass[11pt]{letter}" + ("\\section{%s}" . "\\section*{%s}") + ("\\subsection*{%s}" . "\\subsection*{%s}") + ("\\subsubsection*{%s}" . "\\subsubsection*{%s}"))) + + (add-to-list 'org-latex-classes + '("book-blendoit" + "\\documentclass[11pt]{book}" ("\\chapter{%s}" . "\\chapter*{%s}") ("\\section{%s}" . "\\section*{%s}") ("\\subsection*{%s}" . "\\subsection*{%s}") @@ -1430,7 +1461,7 @@ PDF. The binding is defined in Section [[Export to PDF]]. "Quick export for `ledger-mode' report buffers." (let ((old-buffer (current-buffer))) (with-output-to-temp-buffer "**SD Export**" - (print "#+SETUPFILE: ~/.emacs.d/templates/documents/default.org") + (print "#+SETUPFILE: ~/.emacs.d/resources/templates/documents/default.org") (newline) (insert-buffer-substring old-buffer) (forward-line 10) @@ -1612,7 +1643,7 @@ for UI elements which may be animated. #+BEGIN_SRC emacs-lisp :tangle yes (defcustom sd-icon-loading (create-image - (concat user-emacs-directory "img/icons/ellipsis.gif") + (concat user-emacs-directory "resources/images/icons/ellipsis.gif") 'gif nil :scale 0.4) "The GIF representing \"loading\". Not animated by default." @@ -1823,10 +1854,6 @@ unusable. Thus, we /describe/ two themes that were developed *purposefully* and iteratively. #+BEGIN_SRC emacs-lisp :tangle yes - (setq custom-theme-directory (concat user-emacs-directory "themes/")) -#+END_SRC - -#+BEGIN_SRC emacs-lisp :tangle no (load-theme 'sd-compagnon-dark) #+END_SRC @@ -1834,7 +1861,7 @@ unusable. Thus, we /describe/ two themes that were developed (load-theme 'molokai) #+END_SRC -#+BEGIN_SRC emacs-lisp :tangle yes +#+BEGIN_SRC emacs-lisp :tangle no (load-theme 'sd-light) #+END_SRC @@ -1974,8 +2001,8 @@ is greater than 1920\times1080. #+NAME: claude-garamont #+CAPTION[Claude Garamont, an icon of font design]: Claude Garamont, an icon of font design. World-renowned for his elegant typefaces, which inspired many generations of typographers. -#+ATTR_LATEX: :width 0.2\pagewidth -[[~/.emacs.d/img/smart-documents/ClaudeGaramond.jpeg]] +#+ATTR_LATEX: :width 0.4\textwidth +[[~/.emacs.d/resources/images/smart-documents/ClaudeGaramond.jpeg]] #+LATEX: \garamond \lettrine{G}{ood} golly, nobody wishes for a /pedestrian/ theme! Let @@ -2040,3 +2067,7 @@ the result of our profiling. In this configuration file, we described a series of customization steps taken to make Emacs more palatable to modern word processors users. + +# Local Variables: +# org-confirm-babel-evaluate: nil +# End: diff --git a/smart-documents.pdf b/smart-documents.pdf Binary files differindex 07265cc..be698f8 100644 --- a/smart-documents.pdf +++ b/smart-documents.pdf |