mirror of
https://github.com/kristoferssolo/SoloVim.git
synced 2025-10-21 20:10:41 +00:00
Added LaTeX templates and more
This commit is contained in:
parent
5f9133e67d
commit
39d3cbc3cf
1
after/ftplugin/lua.lua
Normal file
1
after/ftplugin/lua.lua
Normal file
@ -0,0 +1 @@
|
||||
vim.opt_local.expandtab = false
|
||||
2
after/ftplugin/markdown.lua
Normal file
2
after/ftplugin/markdown.lua
Normal file
@ -0,0 +1,2 @@
|
||||
vim.opt_local.wrap = true
|
||||
vim.opt_local.spell = true
|
||||
3
after/ftplugin/sql.lua
Normal file
3
after/ftplugin/sql.lua
Normal file
@ -0,0 +1,3 @@
|
||||
vim.opt_local.tabstop = 2
|
||||
vim.opt_local.shiftwidth = 2
|
||||
vim.opt_local.softtabstop = 2
|
||||
2
after/ftplugin/tex.lua
Normal file
2
after/ftplugin/tex.lua
Normal file
@ -0,0 +1,2 @@
|
||||
vim.opt_local.wrap = true
|
||||
vim.opt_local.spell = true
|
||||
5
after/ftplugin/vimwiki.lua
Normal file
5
after/ftplugin/vimwiki.lua
Normal file
@ -0,0 +1,5 @@
|
||||
vim.opt_local.wrap = true
|
||||
vim.opt_local.spell = true
|
||||
vim.opt_local.tabstop = 2
|
||||
vim.opt_local.shiftwidth = 2
|
||||
vim.opt_local.softtabstop = 2
|
||||
@ -5,34 +5,6 @@ end
|
||||
local dap = require("dap")
|
||||
local dapui = require("dapui")
|
||||
|
||||
vim.keymap.set("n", "<leader>dd", function()
|
||||
dap.toggle_breakpoint()
|
||||
end)
|
||||
vim.keymap.set("n", "<leader>dc", function()
|
||||
dap.continue()
|
||||
end)
|
||||
vim.keymap.set("n", "<leader>di", function()
|
||||
dap.step_into()
|
||||
end)
|
||||
vim.keymap.set("n", "<leader>dp", function()
|
||||
dap.step_over()
|
||||
end)
|
||||
vim.keymap.set("n", "<leader>dO", function()
|
||||
dap.step_out()
|
||||
end)
|
||||
vim.keymap.set("n", "<leader>dI", function()
|
||||
dap.repl.open()
|
||||
end)
|
||||
vim.keymap.set("n", "<leader>dk", function()
|
||||
dap.terminate()
|
||||
end)
|
||||
vim.keymap.set("n", "<leader>dl", function()
|
||||
dap.run_last()
|
||||
end)
|
||||
vim.keymap.set("n", "<leader>du", function()
|
||||
dapui.toggle()
|
||||
end)
|
||||
|
||||
vim.fn.sign_define("DapBreakpoint", { text = "", texthl = "DiagnosticSignError", linehl = "", numhl = "" })
|
||||
|
||||
dap.listeners.after.event_initialized["dapui_config"] = function()
|
||||
@ -47,40 +19,39 @@ dap.listeners.before.event_exited["dapui_config"] = function()
|
||||
dapui.close()
|
||||
end
|
||||
|
||||
local mason_registry = require("mason-registry")
|
||||
|
||||
vim.keymap.set("n", "<F5>", dap.continue)
|
||||
vim.keymap.set("n", "<F10>", dap.step_over)
|
||||
vim.keymap.set("n", "<F11>", dap.step_into)
|
||||
vim.keymap.set("n", "<F12>", dap.step_out)
|
||||
|
||||
dapui.setup()
|
||||
require("nvim-dap-virtual-text").setup({})
|
||||
|
||||
-- Python
|
||||
dap.adapters.python = {
|
||||
type = "executable",
|
||||
command = vim.fn.stdpath("data") .. "/mason/bin/debugpy-adapter",
|
||||
}
|
||||
dap.configurations.python = {
|
||||
{
|
||||
-- The first three options are required by nvim-dap
|
||||
type = "python", -- the type here established the link to the adapter definition: `dap.adapters.python`
|
||||
request = "launch",
|
||||
name = "Launch file",
|
||||
-- Options below are for debugpy, see https://github.com/microsoft/debugpy/wiki/Debug-configuration-settings for supported options
|
||||
local debugpy = mason_registry.get_package("debugpy")
|
||||
local debugpy_path = debugpy:get_install_path() .. "/venv/bin/python"
|
||||
require("dap-python").setup(debugpy_path)
|
||||
|
||||
program = "${file}", -- This configuration will launch the current file if used.
|
||||
pythonPath = function()
|
||||
-- debugpy supports launching an application with a different interpreter then the one used to launch debugpy itself.
|
||||
-- The code below looks for a `venv` or `.venv` folder in the current directly and uses the python within.
|
||||
-- You could adapt this - to for example use the `VIRTUAL_ENV` environment variable.
|
||||
local cwd = vim.fn.getcwd()
|
||||
if vim.fn.executable(cwd .. "/venv/bin/python") == 1 then
|
||||
return cwd .. "/venv/bin/python"
|
||||
elseif vim.fn.executable(cwd .. "/.venv/bin/python") == 1 then
|
||||
return cwd .. "/.venv/bin/python"
|
||||
else
|
||||
return "/usr/bin/python"
|
||||
end
|
||||
end,
|
||||
local codelldb = mason_registry.get_package("codelldb")
|
||||
local codelldb_path = codelldb:get_install_path() .. "/codelldb"
|
||||
local liblldb_path = codelldb:get_install_path() .. "/extension/lldb/lib/liblldb.so"
|
||||
|
||||
-- Rust
|
||||
require("rust-tools").setup({
|
||||
dap = {
|
||||
adapter = require("rust-tools.dap").get_codelldb_adapter(codelldb_path, liblldb_path),
|
||||
},
|
||||
}
|
||||
})
|
||||
|
||||
-- C/C++/Rust
|
||||
-- dap.configurations.rust = {}
|
||||
|
||||
-- C/C++
|
||||
-- FIX: not working
|
||||
dap.adapters.lldb = {
|
||||
type = "executable",
|
||||
command = vim.fn.stdpath("data") .. "/mason/packages/codelldb/codelldb", -- adjust as needed, must be absolute path
|
||||
command = codelldb_path,
|
||||
name = "lldb",
|
||||
}
|
||||
dap.configurations.cpp = {
|
||||
@ -112,61 +83,3 @@ dap.configurations.cpp = {
|
||||
-- If you want to use this for Rust and C, add something like this:
|
||||
|
||||
dap.configurations.c = dap.configurations.cpp
|
||||
dap.configurations.rust = dap.configurations.cpp
|
||||
|
||||
-- JavaScript
|
||||
dap.adapters.firefox = {
|
||||
type = "executable",
|
||||
command = "node",
|
||||
args = { vim.fn.stdpath("data") .. "/mason/packages/firefox-debug-adapter/dist/adapter.bundle.js" },
|
||||
}
|
||||
dap.configurations.typescript = {
|
||||
{
|
||||
name = "Debug with Librewolf",
|
||||
type = "firefox",
|
||||
request = "launch",
|
||||
reAttach = true,
|
||||
url = "http://localhost:3000",
|
||||
webRoot = "${workspaceFolder}",
|
||||
firefoxExecutable = "/usr/bin/librewolf",
|
||||
},
|
||||
}
|
||||
dap.configurations.javascript = {
|
||||
{
|
||||
name = "Debug with Librewolf",
|
||||
type = "firefox",
|
||||
request = "launch",
|
||||
reAttach = true,
|
||||
url = "http://localhost:3000",
|
||||
webRoot = "${workspaceFolder}",
|
||||
firefoxExecutable = "/usr/bin/librewolf",
|
||||
},
|
||||
}
|
||||
|
||||
-- Bash
|
||||
dap.adapters.bashdb = {
|
||||
type = "executable",
|
||||
command = vim.fn.stdpath("data") .. "/mason/packages/bash-debug-adapter/bash-debug-adapter",
|
||||
name = "bashdb",
|
||||
}
|
||||
dap.configurations.sh = {
|
||||
{
|
||||
type = "bashdb",
|
||||
request = "launch",
|
||||
name = "Launch file",
|
||||
showDebugOutput = true,
|
||||
pathBashdb = vim.fn.stdpath("data") .. "/mason/packages/bash-debug-adapter/extension/bashdb_dir/bashdb",
|
||||
pathBashdbLib = vim.fn.stdpath("data") .. "/mason/packages/bash-debug-adapter/extension/bashdb_dir",
|
||||
trace = true,
|
||||
file = "${file}",
|
||||
program = "${file}",
|
||||
cwd = "${workspaceFolder}",
|
||||
pathCat = "bat",
|
||||
pathBash = "/bin/zash",
|
||||
pathMkfifo = "mkfifo",
|
||||
pathPkill = "pkill",
|
||||
args = {},
|
||||
env = {},
|
||||
terminalKind = "integrated",
|
||||
},
|
||||
}
|
||||
|
||||
@ -1,15 +1,10 @@
|
||||
vim.keymap.set("n", "<leader>wc", function()
|
||||
require("telescope").extensions.git_worktree.git_worktrees()
|
||||
end)
|
||||
if not pcall(require, "git-worktree") then
|
||||
return
|
||||
end
|
||||
|
||||
vim.keymap.set("n", "<leader>wn", function()
|
||||
require("telescope").extensions.git_worktree.create_git_worktree()
|
||||
end)
|
||||
|
||||
local Worktree = require("git-worktree")
|
||||
|
||||
Worktree.on_tree_change(function(op, metadata)
|
||||
if op == Worktree.Operations.Switch then
|
||||
local worktree = require("git-worktree")
|
||||
worktree.on_tree_change(function(op, metadata)
|
||||
if op == worktree.Operations.Switch then
|
||||
print("Switched from " .. metadata.prev_path .. " to " .. metadata.path)
|
||||
end
|
||||
end)
|
||||
|
||||
@ -2,10 +2,6 @@ if not pcall(require, "gitsigns") then
|
||||
return
|
||||
end
|
||||
|
||||
vim.keymap.set("n", "<leader>gb", function()
|
||||
vim.cmd.Gitsigns("blame_line")
|
||||
end)
|
||||
|
||||
require("gitsigns").setup({
|
||||
signs = {
|
||||
add = { hl = "GitSignsAdd", text = "▎", numhl = "GitSignsAddNr", linehl = "GitSignsAddLn" },
|
||||
|
||||
@ -2,10 +2,7 @@ if not pcall(require, "harpoon") then
|
||||
return
|
||||
end
|
||||
|
||||
local mark = require("harpoon.mark")
|
||||
local ui = require("harpoon.ui")
|
||||
vim.keymap.set("n", "<leader>a", mark.add_file)
|
||||
vim.keymap.set("n", "<C-e>", ui.toggle_quick_menu)
|
||||
|
||||
vim.keymap.set("n", "<F1>", function()
|
||||
ui.nav_file(1)
|
||||
|
||||
@ -49,6 +49,9 @@ require("illuminate").configure({
|
||||
-- min_count_to_highlight: minimum number of matches required to perform highlighting
|
||||
min_count_to_highlight = 1,
|
||||
})
|
||||
local bind = vim.keymap.set
|
||||
bind("n", "<A-n>", "<cmd>lua require('illuminate').goto_next_reference(wrap)<cr>", { noremap = true })
|
||||
bind("n", "<A-p>", "<cmd>lua require('illuminate').goto_prev_reference(wrap)<cr>", { noremap = true })
|
||||
vim.keymap.set("n", "<A-n>", function()
|
||||
require("illuminate").goto_next_reference()
|
||||
end, { noremap = true })
|
||||
vim.keymap.set("n", "<A-p>", function()
|
||||
require("illuminate").goto_prev_reference()
|
||||
end, { noremap = true })
|
||||
|
||||
@ -1 +0,0 @@
|
||||
vim.keymap.set("n", "<leader>gg", vim.cmd.LazyGit)
|
||||
@ -9,7 +9,7 @@ local lsp = require("lsp-zero").preset({
|
||||
setup_servers_on_start = true,
|
||||
set_lsp_keymaps = {
|
||||
preserve_mappings = false,
|
||||
omit = { "<F2>", "<F3>", "<F4>" },
|
||||
omit = { "<F1>", "<F2>", "<F3>", "<F4>", "<F5>" },
|
||||
},
|
||||
manage_nvim_cmp = {
|
||||
set_sources = "recommended",
|
||||
@ -21,27 +21,25 @@ local lsp = require("lsp-zero").preset({
|
||||
},
|
||||
})
|
||||
|
||||
lsp.on_attach(function(client, bufnr)
|
||||
lsp.on_attach(function(_, bufnr)
|
||||
-- see :help lsp-zero-keybindings
|
||||
-- to learn the available actions
|
||||
lsp.default_keymaps({ buffer = bufnr })
|
||||
local opts = { buffer = bufnr }
|
||||
vim.keymap.set("n", "gd", function()
|
||||
vim.lsp.buf.definition()
|
||||
end, opts)
|
||||
vim.keymap.set("n", "gD", function()
|
||||
vim.lsp.buf.declaration()
|
||||
end, opts)
|
||||
vim.keymap.set("n", "K", function()
|
||||
vim.lsp.buf.hover()
|
||||
end, opts)
|
||||
vim.keymap.set("n", "gi", function()
|
||||
vim.lsp.buf.implementation()
|
||||
end, opts)
|
||||
vim.keymap.set("n", "gr", "<cmd>lua require('telescope.builtin').lsp_references()<cr>", opts)
|
||||
vim.keymap.set("n", "gl", function()
|
||||
vim.diagnostic.open_float()
|
||||
end, opts)
|
||||
|
||||
-- lsp.default_keymaps({ buffer = bufnr })
|
||||
local nmap = function(keys, func, desc)
|
||||
if desc then
|
||||
desc = "LSP: " .. desc
|
||||
end
|
||||
vim.keymap.set("n", keys, func, { buffer = bufnr, desc = desc })
|
||||
end
|
||||
|
||||
nmap("gd", vim.lsp.buf.definition, "[G]oto [D]efinition")
|
||||
nmap("gr", require("telescope.builtin").lsp_references, "[G]oto [R]eferences")
|
||||
nmap("gI", vim.lsp.buf.implementation, "[G]oto [I]mplementation")
|
||||
nmap("K", vim.lsp.buf.hover, "Hover Documentation")
|
||||
nmap("<C-k>", vim.lsp.buf.signature_help, "Signature Documentation")
|
||||
|
||||
nmap("gD", vim.lsp.buf.declaration, "[G]oto [D]eclaration")
|
||||
end)
|
||||
|
||||
lsp.ensure_installed({
|
||||
@ -54,7 +52,6 @@ lsp.ensure_installed({
|
||||
"jedi_language_server",
|
||||
"jsonls",
|
||||
"lua_ls",
|
||||
"ruff_lsp",
|
||||
"sqlls",
|
||||
"tailwindcss",
|
||||
"taplo",
|
||||
@ -122,6 +119,7 @@ lsp.configure("texlab", {
|
||||
},
|
||||
})
|
||||
|
||||
require("neodev").setup()
|
||||
require("lspconfig").lua_ls.setup(lsp.nvim_lua_ls({
|
||||
settings = {
|
||||
Lua = {
|
||||
@ -187,7 +185,9 @@ null_ls.setup({
|
||||
"strict",
|
||||
},
|
||||
}),
|
||||
-- formatting.remark.with({ extra_filetypes = { "vimwiki" } }), -- FIX: indentation level
|
||||
formatting.markdownlint.with({
|
||||
extra_filetypes = { "vimwiki" },
|
||||
}),
|
||||
formatting.markdown_toc.with({ extra_filetypes = { "vimwiki" } }),
|
||||
-- formatting.shellharden.with({ extra_filetypes = { "bash", "csh", "ksh", "zsh" } }),
|
||||
-- formatting.shfmt.with({ extra_filetypes = { "bash", "csh", "ksh", "zsh" } }),
|
||||
@ -198,24 +198,21 @@ null_ls.setup({
|
||||
-- https://github.com/jay-babu/mason-null-ls.nvim#setup
|
||||
require("mason-null-ls").setup({
|
||||
ensure_installed = {
|
||||
"cmake_lint",
|
||||
"codespell",
|
||||
"cpplint",
|
||||
"luacheck",
|
||||
"misspell",
|
||||
"mypy",
|
||||
"black",
|
||||
"cbfmt",
|
||||
"clang_format",
|
||||
"cmake_format",
|
||||
"cmake_lint",
|
||||
"cpplint",
|
||||
"djlint",
|
||||
"google_java_format",
|
||||
"phpcbf",
|
||||
"prettier",
|
||||
"remark",
|
||||
"luacheck",
|
||||
"markdown_toc",
|
||||
"mypy",
|
||||
"stylua",
|
||||
"usort",
|
||||
"yamlfmt",
|
||||
"rustywind",
|
||||
},
|
||||
automatic_installation = true,
|
||||
handlers = {
|
||||
|
||||
@ -4,25 +4,9 @@ end
|
||||
|
||||
require("lualine").setup({
|
||||
options = {
|
||||
icons_enabled = true,
|
||||
theme = "auto",
|
||||
component_separators = { left = "|", right = "|" },
|
||||
section_separators = { left = "", right = "" },
|
||||
disabled_filetypes = {
|
||||
statusline = { "dashboard" },
|
||||
winbar = {},
|
||||
},
|
||||
ignore_focus = {},
|
||||
always_divide_middle = false,
|
||||
globalstatus = true,
|
||||
refresh = {
|
||||
statusline = 1000,
|
||||
tabline = 1000,
|
||||
winbar = 1000,
|
||||
},
|
||||
},
|
||||
--[[ Available components
|
||||
|
||||
`branch` (git branch)
|
||||
`buffers` (shows currently available buffers)
|
||||
`diagnostics` (diagnostics count from your preferred source)
|
||||
@ -48,14 +32,4 @@ require("lualine").setup({
|
||||
lualine_y = { "progress" },
|
||||
lualine_z = { "location" },
|
||||
},
|
||||
inactive_sections = {
|
||||
lualine_a = {},
|
||||
lualine_b = {},
|
||||
lualine_c = { "filename" },
|
||||
lualine_x = { "location" },
|
||||
lualine_y = {},
|
||||
lualine_z = {},
|
||||
},
|
||||
tabline = {},
|
||||
extensions = {},
|
||||
})
|
||||
|
||||
@ -17,11 +17,11 @@ require("obsidian").setup({
|
||||
["gf"] = require("obsidian.mapping").gf_passthrough(),
|
||||
},
|
||||
|
||||
templates = {
|
||||
subdir = "university/templates",
|
||||
date_format = "%Y.%m.%d",
|
||||
time_format = "%H:%M:%S",
|
||||
},
|
||||
-- templates = {
|
||||
-- subdir = "university/templates",
|
||||
-- date_format = "%Y.%m.%d",
|
||||
-- time_format = "%H:%M:%S",
|
||||
-- },
|
||||
|
||||
backlinks = {
|
||||
height = 10,
|
||||
|
||||
@ -4,12 +4,6 @@ end
|
||||
|
||||
require("rust-tools").setup({
|
||||
tools = {
|
||||
-- how to execute terminal commands
|
||||
-- options right now: termopen / quickfix
|
||||
-- executor = require("rust-tools.executors").termopen,
|
||||
|
||||
-- callback to execute once rust-analyzer is done initializing the workspace
|
||||
-- The callback receives one parameter indicating the `health` of the server: "ok" | "warning" | "error"
|
||||
on_initialized = function()
|
||||
vim.api.nvim_create_autocmd({ "BufEnter", "CursorHold", "InsertLeave", "BufWritePost" }, {
|
||||
group = vim.api.nvim_create_augroup("InitializeRustAnalyzer", { clear = true }),
|
||||
@ -19,152 +13,18 @@ require("rust-tools").setup({
|
||||
end,
|
||||
})
|
||||
end,
|
||||
|
||||
-- automatically call RustReloadWorkspace when writing to a Cargo.toml file.
|
||||
reload_workspace_from_cargo_toml = true,
|
||||
|
||||
-- These apply to the default RustSetInlayHints command
|
||||
inlay_hints = {
|
||||
-- automatically set inlay hints (type hints)
|
||||
-- default: true
|
||||
auto = true,
|
||||
-- Only show inlay hints for the current line
|
||||
only_current_line = false,
|
||||
-- whether to show parameter hints with the inlay hints or not
|
||||
-- default: true
|
||||
show_parameter_hints = true,
|
||||
-- prefix for parameter hints
|
||||
-- default: "<-"
|
||||
parameter_hints_prefix = " <- ",
|
||||
-- prefix for all the other hints (type, chaining)
|
||||
-- default: "=>"
|
||||
other_hints_prefix = " => ",
|
||||
-- whether to align to the length of the longest line in the file
|
||||
max_len_align = false,
|
||||
-- padding from the left if max_len_align is true
|
||||
max_len_align_padding = 1,
|
||||
-- whether to align to the extreme right or not
|
||||
right_align = false,
|
||||
-- padding from the right if right_align is true
|
||||
right_align_padding = 7,
|
||||
-- The color of the hints
|
||||
highlight = "Comment",
|
||||
},
|
||||
-- options same as lsp hover / vim.lsp.util.open_floating_preview()
|
||||
hover_actions = {
|
||||
-- the border that is used for the hover window
|
||||
-- see vim.api.nvim_open_win()
|
||||
border = {
|
||||
{ "╭", "FloatBorder" },
|
||||
{ "─", "FloatBorder" },
|
||||
{ "╮", "FloatBorder" },
|
||||
{ "│", "FloatBorder" },
|
||||
{ "╯", "FloatBorder" },
|
||||
{ "─", "FloatBorder" },
|
||||
{ "╰", "FloatBorder" },
|
||||
{ "│", "FloatBorder" },
|
||||
},
|
||||
-- Maximal width of the hover window. Nil means no max.
|
||||
max_width = nil,
|
||||
-- Maximal height of the hover window. Nil means no max.
|
||||
max_height = nil,
|
||||
-- whether the hover action window gets automatically focused
|
||||
-- default: false
|
||||
auto_focus = false,
|
||||
},
|
||||
-- settings for showing the crate graph based on graphviz and the dot
|
||||
-- command
|
||||
crate_graph = {
|
||||
-- Backend used for displaying the graph
|
||||
-- see: https://graphviz.org/docs/outputs/
|
||||
-- default: x11
|
||||
backend = "x11",
|
||||
-- where to store the output, nil for no output stored (relative
|
||||
-- path from pwd)
|
||||
-- default: nil
|
||||
output = nil,
|
||||
-- true for all crates.io and external crates, false only the local
|
||||
-- crates
|
||||
-- default: true
|
||||
full = true,
|
||||
|
||||
-- List of backends found on: https://graphviz.org/docs/outputs/
|
||||
-- Is used for input validation and autocompletion
|
||||
-- Last updated: 2021-08-26
|
||||
enabled_graphviz_backends = {
|
||||
"bmp",
|
||||
"cgimage",
|
||||
"canon",
|
||||
"dot",
|
||||
"gv",
|
||||
"xdot",
|
||||
"xdot1.2",
|
||||
"xdot1.4",
|
||||
"eps",
|
||||
"exr",
|
||||
"fig",
|
||||
"gd",
|
||||
"gd2",
|
||||
"gif",
|
||||
"gtk",
|
||||
"ico",
|
||||
"cmap",
|
||||
"ismap",
|
||||
"imap",
|
||||
"cmapx",
|
||||
"imap_np",
|
||||
"cmapx_np",
|
||||
"jpg",
|
||||
"jpeg",
|
||||
"jpe",
|
||||
"jp2",
|
||||
"json",
|
||||
"json0",
|
||||
"dot_json",
|
||||
"xdot_json",
|
||||
"pdf",
|
||||
"pic",
|
||||
"pct",
|
||||
"pict",
|
||||
"plain",
|
||||
"plain-ext",
|
||||
"png",
|
||||
"pov",
|
||||
"ps",
|
||||
"ps2",
|
||||
"psd",
|
||||
"sgi",
|
||||
"svg",
|
||||
"svgz",
|
||||
"tga",
|
||||
"tiff",
|
||||
"tif",
|
||||
"tk",
|
||||
"vml",
|
||||
"vmlz",
|
||||
"wbmp",
|
||||
"webp",
|
||||
"xlib",
|
||||
"x11",
|
||||
},
|
||||
},
|
||||
|
||||
-- all the opts to send to nvim-lspconfig
|
||||
-- these override the defaults set by rust-tools.nvim
|
||||
-- see https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#rust_analyzer
|
||||
server = {
|
||||
-- standalone file support
|
||||
-- setting it to false may improve startup time
|
||||
standalone = true,
|
||||
}, -- rust-analyzer options
|
||||
|
||||
-- debugging stuff
|
||||
dap = {
|
||||
adapter = {
|
||||
type = "executable",
|
||||
command = "codelldb",
|
||||
name = "rt_lldb",
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
@ -1 +0,0 @@
|
||||
vim.keymap.set("n", "<leader>t", vim.cmd.TagbarToggle)
|
||||
@ -3,15 +3,8 @@ if not pcall(require, "telescope") then
|
||||
end
|
||||
|
||||
local builtin = require("telescope.builtin")
|
||||
local themes = require("telescope.themes")
|
||||
|
||||
vim.keymap.set("n", "<leader>f", function()
|
||||
builtin.find_files(themes.get_dropdown({ previewer = false }))
|
||||
end, {})
|
||||
vim.keymap.set("n", "<C-p>", builtin.git_files, {})
|
||||
vim.keymap.set("n", "<leader>t", "<cmd>Telescope live_grep<cr>")
|
||||
vim.keymap.set("n", "<leader>qf", "<cmd>Telescope quickfix<cr>")
|
||||
vim.keymap.set("n", "<leader>d", "<cmd>Telescope diagnostics<cr>")
|
||||
|
||||
local telescope = require("telescope")
|
||||
local actions = require("telescope.actions")
|
||||
@ -91,10 +84,11 @@ telescope.setup({
|
||||
},
|
||||
},
|
||||
})
|
||||
telescope.load_extension("fzf")
|
||||
telescope.load_extension("media_files")
|
||||
telescope.load_extension("emoji")
|
||||
telescope.load_extension("ui-select")
|
||||
telescope.load_extension("color_names")
|
||||
telescope.load_extension("git_worktree")
|
||||
telescope.load_extension("lazygit")
|
||||
pcall(telescope.load_extension, "fzf")
|
||||
pcall(telescope.load_extension, "media_files")
|
||||
pcall(telescope.load_extension, "emoji")
|
||||
pcall(telescope.load_extension, "ui-select")
|
||||
pcall(telescope.load_extension, "color_names")
|
||||
pcall(telescope.load_extension, "git_worktree")
|
||||
pcall(telescope.load_extension, "lazygit")
|
||||
pcall(telescope.load_extension, "dap")
|
||||
|
||||
@ -1,26 +1,45 @@
|
||||
if not pcall(require, "nvim-treesitter") then
|
||||
return
|
||||
end
|
||||
vim.keymap.set("n", "[d", function()
|
||||
vim.diagnostic.goto_next()
|
||||
vim.cmd("norm zz")
|
||||
end, { desc = "Goto next diagnostic" })
|
||||
vim.keymap.set("n", "]d", function()
|
||||
vim.diagnostic.goto_prev()
|
||||
vim.cmd("norm zz")
|
||||
end, { desc = "Goto prev diagnostic" })
|
||||
|
||||
require("nvim-treesitter.configs").setup({
|
||||
-- A list of parser names, or "all" (the five listed parsers should always be installed)
|
||||
ensure_installed = { "cpp", "lua", "rust", "python", "markdown", "markdown_inline" }, -- one of "all" or a list of languages
|
||||
ensure_installed = { "cpp", "lua", "rust", "python", "markdown" }, -- one of "all" or a list of languages
|
||||
-- Install parsers synchronously (only applied to `ensure_installed`)
|
||||
sync_install = false,
|
||||
-- Automatically install missing parsers when entering buffer
|
||||
-- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally
|
||||
auto_install = true,
|
||||
-- List of parsers to ignore installing (for "all")
|
||||
-- ignore_install = { "" },
|
||||
ignore_install = { "latex" },
|
||||
modules = {},
|
||||
|
||||
highlight = {
|
||||
enable = true,
|
||||
disable = {},
|
||||
-- Setting this to true will run `:h syntax` and tree-sitter at the same time.
|
||||
-- Set this to `true` if you depend on 'syntax' being enabled (like for indentation).
|
||||
-- Using this option may slow down your editor, and you may see some duplicate highlights.
|
||||
-- Instead of true it can also be a list of languages
|
||||
additional_vim_regex_highlighting = { "markdown" },
|
||||
|
||||
disable = function(lang, buf)
|
||||
local max_filesize = 100 * 1024 -- 100 KB
|
||||
local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(buf))
|
||||
if ok and stats and stats.size > max_filesize then
|
||||
return true
|
||||
end
|
||||
end,
|
||||
},
|
||||
indent = {
|
||||
enable = true,
|
||||
},
|
||||
autopairs = {
|
||||
enable = true,
|
||||
@ -47,7 +66,15 @@ require("nvim-treesitter.configs").setup({
|
||||
"hbs",
|
||||
},
|
||||
},
|
||||
indent = { enable = true, disable = { "" } },
|
||||
-- incremenral_selection = {
|
||||
-- enable = true,
|
||||
-- keymaps = {
|
||||
-- init_selection = "<C-space>",
|
||||
-- node_selection = "<C-space>",
|
||||
-- scope_selection = "<C-space>",
|
||||
-- node_deselection = "<C-backspace>",
|
||||
-- },
|
||||
-- },
|
||||
rainbow = {
|
||||
enable = true,
|
||||
-- disable = { "jsx", "cpp" }, list of languages you want to disable the plugin for
|
||||
|
||||
@ -1 +0,0 @@
|
||||
vim.keymap.set("n", "<leader>u", vim.cmd.UndotreeToggle)
|
||||
321
after/plugin/whichkey.lua
Normal file
321
after/plugin/whichkey.lua
Normal file
@ -0,0 +1,321 @@
|
||||
if not pcall(require, "which-key") then
|
||||
return
|
||||
end
|
||||
|
||||
local which_key = require("which-key")
|
||||
local builtin = require("telescope.builtin")
|
||||
local setup = {
|
||||
plugins = {
|
||||
marks = true, -- shows a list of your marks on " and `
|
||||
registers = true, -- shows your registers on " in NORMAL or <C-r> in INSERT mode
|
||||
spelling = {
|
||||
enabled = true, -- enabling this will show WhichKey when pressing z= to select spelling suggestions
|
||||
suggestions = 20, -- how many suggestions should be shown in the list?
|
||||
},
|
||||
-- the presets plugin, adds help for a bunch of default keybindings in Neovim
|
||||
-- No actual key bindings are created
|
||||
presets = {
|
||||
operators = false, -- adds help for operators like d, y, ... and registers them for motion / text object completion
|
||||
motions = true, -- adds help for motions
|
||||
text_objects = true, -- help for text objects triggered after entering an operator
|
||||
windows = true, -- default bindings on <c-w>
|
||||
nav = true, -- misc bindings to work with windows
|
||||
z = true, -- bindings for folds, spelling and others prefixed with z
|
||||
g = true, -- bindings for prefixed with g
|
||||
},
|
||||
},
|
||||
-- add operators that will trigger motion and text object completion
|
||||
-- to enable all native operators, set the preset / operators plugin above
|
||||
-- operators = { gc = "Comments" },
|
||||
key_labels = {
|
||||
-- override the label used to display some keys. It doesn"t effect WK in any other way.
|
||||
-- For example:
|
||||
-- ["<space>"] = "SPC",
|
||||
-- ["<cr>"] = "RET",
|
||||
-- ["<tab>"] = "TAB",
|
||||
},
|
||||
icons = {
|
||||
breadcrumb = "»", -- symbol used in the command line area that shows your active key combo
|
||||
separator = "➜", -- symbol used between a key and it"s label
|
||||
group = "+", -- symbol prepended to a group
|
||||
},
|
||||
popup_mappings = {
|
||||
scroll_down = "<c-d>", -- binding to scroll down inside the popup
|
||||
scroll_up = "<c-u>", -- binding to scroll up inside the popup
|
||||
},
|
||||
window = {
|
||||
border = "rounded", -- none, single, double, shadow
|
||||
position = "bottom", -- bottom, top
|
||||
margin = { 1, 0, 1, 0 }, -- extra window margin [top, right, bottom, left]
|
||||
padding = { 2, 2, 2, 2 }, -- extra window padding [top, right, bottom, left]
|
||||
winblend = 0,
|
||||
},
|
||||
layout = {
|
||||
height = { min = 4, max = 25 }, -- min and max height of the columns
|
||||
width = { min = 20, max = 50 }, -- min and max width of the columns
|
||||
spacing = 3, -- spacing between columns
|
||||
align = "left", -- align columns left, center or right
|
||||
},
|
||||
ignore_missing = true, -- enable this to hide mappings for which you didn"t specify a label
|
||||
hidden = { "<silent>", "<cmd>", "<Cmd>", "<cr>", "call", "lua", "^:", "^ " }, -- hide mapping boilerplate
|
||||
show_help = true, -- show help message on the command line when the popup is visible
|
||||
triggers = "auto", -- automatically setup triggers
|
||||
-- triggers = {"<leader>"} -- or specify a list manually
|
||||
triggers_blacklist = {
|
||||
-- list of mode / prefixes that should never be hooked by WhichKey
|
||||
-- this is mostly relevant for key maps that start with a native binding
|
||||
-- most people should not need to change this
|
||||
i = { "j", "k" },
|
||||
v = { "j", "k" },
|
||||
},
|
||||
}
|
||||
|
||||
local opts = {
|
||||
mode = "n", -- NORMAL mode
|
||||
prefix = "<leader>",
|
||||
buffer = nil, -- Global mappings. Specify a buffer number for buffer local mappings
|
||||
silent = true, -- use `silent` when creating keymaps
|
||||
noremap = true, -- use `noremap` when creating keymaps
|
||||
nowait = true, -- use `nowait` when creating keymaps
|
||||
}
|
||||
local vopts = {
|
||||
mode = "v", -- VISUAL mode
|
||||
prefix = "<leader>",
|
||||
buffer = nil, -- Global mappings. Specify a buffer number for buffer local mappings
|
||||
silent = true, -- use `silent` when creating keymaps
|
||||
noremap = true, -- use `noremap` when creating keymaps
|
||||
nowait = true, -- use `nowait` when creating keymaps
|
||||
}
|
||||
-- NOTE: Prefer using : over <cmd> as the latter avoids going back in normal-mode.
|
||||
-- see https://neovim.io/doc/user/map.html#:map-cmd
|
||||
local vmappings = {}
|
||||
|
||||
local mappings = {
|
||||
c = { vim.cmd.bdelete, "[C]lose Buffer" },
|
||||
x = { "<cmd>!chmod +x %<cr>", "chmod & run" },
|
||||
mr = { "<cmd>CellularAutomaton make_it_rain<cr>", "[M]ake it [R]ain" },
|
||||
u = { vim.cmd.UndotreeToggle, "Toggle [U]ndoTree" },
|
||||
b = { vim.cmd.TagbarToggle, "Toggle Tag[B]ar" },
|
||||
e = { vim.cmd.Ex, "Open [E]xplorer" },
|
||||
["/"] = {
|
||||
function()
|
||||
builtin.current_buffer_fuzzy_find(require("telescope.themes").get_dropdown({ previewer = false }))
|
||||
end,
|
||||
"Current Buffer Fuzzy",
|
||||
},
|
||||
f = {
|
||||
name = "[F]ind",
|
||||
f = {
|
||||
function()
|
||||
builtin.find_files(require("telescope.themes").get_dropdown({ previewer = false }))
|
||||
end,
|
||||
"[F]iles",
|
||||
},
|
||||
t = { builtin.live_grep, "[T]ext" },
|
||||
b = { builtin.buffers, "[B]uffers" },
|
||||
},
|
||||
h = {
|
||||
name = "[H]arpoon",
|
||||
a = { require("harpoon.mark").add_file, "[A]dd File" },
|
||||
m = { require("harpoon.ui").toggle_quick_menu, "[M]enu" },
|
||||
},
|
||||
t = {
|
||||
name = "[T]elescope",
|
||||
d = { builtin.diagnostic, "[D]iagnostics" },
|
||||
b = { builtin.git_branches, "Checkout [B]ranch" },
|
||||
h = { builtin.help_tags, "Find [H]elp" },
|
||||
H = { builtin.highlights, "Find [H]ighlight Groups" },
|
||||
M = { builtin.man_pages, "[M]an Pages" },
|
||||
r = { builtin.oldfiles, "Open [R]ecent Files" },
|
||||
R = { builtin.registers, "[R]egisters" },
|
||||
g = { builtin.live_grep, "Live [G]rep" },
|
||||
k = { builtin.keymaps, "[K]eymaps" },
|
||||
C = { builtin.commands, "[C]ommands" },
|
||||
t = { vim.cmd.TodoTelescope, "[T]odo" },
|
||||
m = { require("telescope").extensions.media_files.media_files, "[M]edia" },
|
||||
c = {
|
||||
function()
|
||||
builtin.colorscheme({ enable_preview = true })
|
||||
end,
|
||||
"[C]olorscheme with Preview",
|
||||
},
|
||||
},
|
||||
g = {
|
||||
name = "[G]it",
|
||||
g = { vim.cmd.LazyGit, "Lazygit" },
|
||||
b = {
|
||||
function()
|
||||
vim.cmd.Gitsigns("blame_line")
|
||||
end,
|
||||
"[B]lame",
|
||||
},
|
||||
c = { require("telescope").extensions.git_worktree.git_worktrees, "[C]hange Worktree" },
|
||||
n = { require("telescope").extensions.git_worktree.create_git_worktree, "Create [N]ew Worktree" },
|
||||
},
|
||||
l = {
|
||||
name = "[L]SP",
|
||||
ca = { vim.lsp.buf.code_action, "[C]ode [A]ction" },
|
||||
D = { vim.lsp.buf.type_definition, "Type [D]efinitions" },
|
||||
f = {
|
||||
function()
|
||||
vim.lsp.buf.format({ async = true })
|
||||
end,
|
||||
"[F]ormat",
|
||||
},
|
||||
o = { vim.diagnostic.open_float, "[O]pen Float" },
|
||||
s = { vim.diagnostic.setloclist, "[S]etloclist" },
|
||||
j = {
|
||||
function()
|
||||
vim.diagnostic.goto_next()
|
||||
vim.cmd("norm zz")
|
||||
end,
|
||||
"Next Diagnostic",
|
||||
},
|
||||
k = {
|
||||
function()
|
||||
vim.diagnostic.goto_prev()
|
||||
vim.cmd("norm zz")
|
||||
end,
|
||||
"Prev Diagnostic",
|
||||
},
|
||||
r = { vim.lsp.buf.rename, "[R]ename" },
|
||||
ds = { builtin.lsp_document_symbols, "[D]ocument [S]ymbols" },
|
||||
w = {
|
||||
d = { builtin.diagnostics, "[W]orkspace [D]iagnostics" },
|
||||
s = { builtin.lsp_dynamic_workspace_symbols, "[W]orkspace [S]ymbols" },
|
||||
a = { vim.lsp.buf.add_workspace_folder, "[W]orkspace [A]dd Folder" },
|
||||
r = { vim.lsp.buf.remove_workspace_folder, "[W]orkspace [R]emove Folder" },
|
||||
l = {
|
||||
function()
|
||||
print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
|
||||
end,
|
||||
"[W]orkspace [L]ist Folder",
|
||||
},
|
||||
},
|
||||
q = { builtin.quickfix, "Telescope [Q]uickfix" },
|
||||
},
|
||||
r = {
|
||||
name = "[R]ust",
|
||||
e = { vim.cmd.RustExpandMacro, "[E]xpand macro" },
|
||||
c = { vim.cmd.RustOpenCargo, "Open [C]argo.toml" },
|
||||
p = { vim.cmd.RustParentModule, "[P]arent module" },
|
||||
h = { vim.cmd.RustHoverActions, "[H]over actions" },
|
||||
g = { vim.cmd.RustViewCrateGraph, "View Create [G]raph" },
|
||||
d = { vim.cmd.RustOpenExternalDocs, "Open External [D]ocs" },
|
||||
r = { vim.cmd.RustRunnables, "Open [R]unnables" },
|
||||
ca = { vim.cmd.RustCodeAction, "[C]ode [A]ction Groups" },
|
||||
},
|
||||
L = {
|
||||
name = "[L]anguage settings",
|
||||
c = { "<cmd>setlocal formatoptions-=cro<cr>", "Disable autocomment" },
|
||||
C = { "<cmd>setlocal formatoptions=cro<cr>", "Enable autocomment" },
|
||||
s = { "<cmd>setlocal spell!<cr>", "Toggle spellchecker" },
|
||||
e = { "<cmd>setlocal spell spelllang=en_us<cr>", "Enable English spellchecker" },
|
||||
l = { "<cmd>setlocal spell spelllang=lv_LV<cr>", "Enable Lavian spellchecker" },
|
||||
I = { "<cmd>setlocal autoindent<cr>", "Enable autoindent" },
|
||||
i = { "<cmd>setlocal noautoindent<cr>", "Disable autoindent" },
|
||||
},
|
||||
d = {
|
||||
name = "[D]AP",
|
||||
d = { require("dap").toggle_breakpoint, "Set breakpoint" },
|
||||
D = {
|
||||
function()
|
||||
require("dap").set_breakpoint(vim.fn.input("Breakpoint condition: "))
|
||||
end,
|
||||
"Set Breakpoint with Condition",
|
||||
},
|
||||
p = {
|
||||
name = "[P]ython",
|
||||
m = { require("dap-python").test_method, "Test [M]ethod" },
|
||||
c = { require("dap-python").test_class, "Test [C]lass" },
|
||||
s = { require("dap-python").debug_selection, "Debug [S]election" },
|
||||
},
|
||||
r = {
|
||||
name = "[R]ust",
|
||||
d = { vim.cmd.RustDebuggables, "[D]ebug" },
|
||||
},
|
||||
t = { require("dapui").toggle, "[T]oggle DAP-UI" },
|
||||
c = { require("dap").continue, "Launch Debug Sessions and Resume Execution" },
|
||||
i = { require("dap").step_into, "Step [I]nto Code" },
|
||||
o = { require("dap").step_over, "Step [O]ver Code" },
|
||||
O = { require("dap").step_out, "Step [O]ut of Code" },
|
||||
T = { require("dap").terminate, "[T]erminate" },
|
||||
l = { require("dap").run_last, "Run [L]ast" },
|
||||
h = { require("dap.ui.widgets").hover, "[H]over" },
|
||||
P = { require("dap.ui.widgets").preview, "[P]review" },
|
||||
f = {
|
||||
function()
|
||||
local widgets = require("dap.ui.widgets")
|
||||
widgets.centered_float(widgets.frames)
|
||||
end,
|
||||
"[F]rames",
|
||||
},
|
||||
s = {
|
||||
function()
|
||||
local widgets = require("dap.ui.widgets")
|
||||
widgets.centered_float(widgets.scopes)
|
||||
end,
|
||||
"[S]copes",
|
||||
},
|
||||
},
|
||||
w = {
|
||||
name = "Vim[W]iki",
|
||||
w = { vim.cmd.VimwikiIndex, "Open index file" },
|
||||
t = { vim.cmd.VimwikiTabIndex, "Open Index File in New [T]ab" },
|
||||
s = { vim.cmd.VimwikiUISelect, "Display List of Wikis" },
|
||||
i = { vim.cmd.VimwikiDiaryIndex, "Open Diary Index" },
|
||||
h = { vim.cmd.Vimwiki2HTML, "Convert File to HTML" },
|
||||
H = { vim.cmd.Vimwiki2HTMLBrowse, "Convert File to HTML and open in Browser" },
|
||||
n = { vim.cmd.VimwikiGoto, "Goto link provided by an argument" },
|
||||
d = { vim.cmd.VimwikiDeleteFile, "Rename file" },
|
||||
r = { vim.cmd.VimwikiRenameFile, "Delete file" },
|
||||
},
|
||||
v = {
|
||||
name = "[V]imTex",
|
||||
b = { vim.cmd.VimtexCompile, "[B]uild" },
|
||||
v = { vim.cmd.VimtexView, "[V]iew" },
|
||||
w = { vim.cmd.VimtexCountWords, "[W]ord Count" },
|
||||
t = { vim.cmd.VimtexTocToggle, "[T]able of Contents" },
|
||||
c = { vim.cmd.VimtexClean, "[C]lean aux" },
|
||||
e = { vim.cmd.VimtexErrors, "Report [E]rrors" },
|
||||
i = { vim.cmd.VimtexInfo, "[I]nfo" },
|
||||
},
|
||||
T = {
|
||||
name = "[T]emplates",
|
||||
p = {
|
||||
"<cmd>read ~/.config/nvim/templates/PhilPaper.tex<cr>",
|
||||
"PhilPaper.tex",
|
||||
},
|
||||
l = {
|
||||
"<cmd>read ~/.config/nvim/templates/Letter.tex<cr>",
|
||||
"Letter.tex",
|
||||
},
|
||||
g = {
|
||||
"<cmd>read ~/.config/nvim/templates/Glossary.tex<cr>",
|
||||
"Glossary.tex",
|
||||
},
|
||||
h = {
|
||||
"<cmd>read ~/.config/nvim/templates/HandOut.tex<cr>",
|
||||
"HandOut.tex",
|
||||
},
|
||||
b = {
|
||||
"<cmd>read ~/.config/nvim/templates/PhilBeamer.tex<cr>",
|
||||
"PhilBeamer.tex",
|
||||
},
|
||||
s = {
|
||||
"<cmd>read ~/.config/nvim/templates/SubFile.tex<cr>",
|
||||
"SubFile.tex",
|
||||
},
|
||||
r = {
|
||||
"<cmd>read ~/.config/nvim/templates/Root.tex<cr>",
|
||||
"Root.tex",
|
||||
},
|
||||
m = {
|
||||
"<cmd>read ~/.config/nvim/templates/MultipleAnswer.tex<cr>",
|
||||
"MultipleAnswer.tex",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
which_key.setup(setup)
|
||||
which_key.register(mappings, opts, vopts, vmappings)
|
||||
31
ftplugin/tex.lua
Normal file
31
ftplugin/tex.lua
Normal file
@ -0,0 +1,31 @@
|
||||
vim.g.vimtex_view_method = "zathura"
|
||||
vim.g.vimtex_context_pdf_viewer = "zathura"
|
||||
vim.g.vimtex_quickfix_mode = 0
|
||||
vim.g.vimtex_mappings_enabled = 0
|
||||
vim.g.vimtex_indent_enabled = 1
|
||||
vim.g.vimtex_log_ignore = {
|
||||
"Underfull",
|
||||
"Overfull",
|
||||
"specifier changed to",
|
||||
"Token not allowed in a PDF string",
|
||||
}
|
||||
vim.g.vimtex_compiler_latexmk_engines = {
|
||||
["_"] = "-xelatex",
|
||||
}
|
||||
vim.g.vimtex_compiler_latexmk = {
|
||||
aux_dir = "target",
|
||||
out_dir = "target/build",
|
||||
callback = 1,
|
||||
continuous = 1,
|
||||
executable = "latexmk",
|
||||
hooks = {},
|
||||
options = {
|
||||
"-verbose",
|
||||
"-file-line-error",
|
||||
"-synctex=1",
|
||||
"-interaction=nonstopmode",
|
||||
"-shell-escape",
|
||||
},
|
||||
}
|
||||
vim.g.vimtex_complete_enabled = 1
|
||||
vim.g.vimtex_complete_close_braces = 1
|
||||
@ -1,42 +1,45 @@
|
||||
{
|
||||
"Comment.nvim": { "branch": "master", "commit": "0236521ea582747b58869cb72f70ccfa967d2e89" },
|
||||
"DAPInstall.nvim": { "branch": "main", "commit": "8798b4c36d33723e7bba6ed6e2c202f84bb300de" },
|
||||
"LuaSnip": { "branch": "master", "commit": "c4d6298347f7707e9757351b2ee03d0c00da5c20" },
|
||||
"ccc.nvim": { "branch": "main", "commit": "4a0ddaf787cc82796e84ab8a7f70d086f250aeb6" },
|
||||
"cellular-automaton.nvim": { "branch": "main", "commit": "679943b8e1e5ef79aaeeaf4b00782c52eb4e928f" },
|
||||
"clangd_extensions.nvim": { "branch": "main", "commit": "323b00de2ee18cad1ac45eb95e680386c4ff4366" },
|
||||
"cloak.nvim": { "branch": "main", "commit": "ff5e746e787de14675396beb642bf5010b8bc96d" },
|
||||
"cmake-tools.nvim": { "branch": "master", "commit": "011c2641e39fba67260b1af56cb7328d43438133" },
|
||||
"cmake-tools.nvim": { "branch": "master", "commit": "d1600ed7a9a13bdbcb7be9d3745d0a59b589c65d" },
|
||||
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
||||
"cmp-nvim-lsp": { "branch": "main", "commit": "44b16d11215dce86f253ce0c30949813c0a90765" },
|
||||
"cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" },
|
||||
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
||||
"cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" },
|
||||
"crates.nvim": { "branch": "main", "commit": "d5caf28aba49e81ac4099426231f3cf3c151013a" },
|
||||
"diffview.nvim": { "branch": "main", "commit": "7e5a85c186027cab1e825d018f07c350177077fc" },
|
||||
"distant.nvim": { "branch": "v0.3", "commit": "17bcd37f8d91dcb987456be456d8a95db1a772ba" },
|
||||
"friendly-snippets": { "branch": "main", "commit": "00e191fea2cfbbdd378243f35b5953296537a116" },
|
||||
"git-worktree.nvim": { "branch": "master", "commit": "d7f4e2584e81670154f07ca9fa5dd791d9c1b458" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "d8590288417fef2430f85bc8b312fae8b1cf2c40" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "44adf808ace6cb65a3353bd61fa585a2d8fe0db3" },
|
||||
"harpoon": { "branch": "master", "commit": "21f4c47c6803d64ddb934a5b314dcb1b8e7365dc" },
|
||||
"indent-blankline.nvim": { "branch": "master", "commit": "9637670896b68805430e2f72cf5d16be5b97a22a" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "2a9354c7d2368d78cbd5575a51a2af5bd8a6ad01" },
|
||||
"lazygit.nvim": { "branch": "main", "commit": "22e51e03268fabe068a77e2bd316ac25ff2084f9" },
|
||||
"lsp-zero.nvim": { "branch": "v2.x", "commit": "f084f4a6a716f55bf9c4026e73027bb24a0325a3" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "45e27ca739c7be6c49e5496d14fcf45a303c3a63" },
|
||||
"markdown-preview.nvim": { "branch": "master", "commit": "02cc3874738bc0f86e4b91f09b8a0ac88aef8e96" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "dfdd771b792fbb4bad8e057d72558255695aa1a7" },
|
||||
"mason-null-ls.nvim": { "branch": "main", "commit": "ae0c5fa57468ac65617f1bf821ba0c3a1e251f0c" },
|
||||
"mason-nvim-dap.nvim": { "branch": "main", "commit": "6148b51db945b55b3b725da39eaea6441e59dff8" },
|
||||
"mason.nvim": { "branch": "main", "commit": "c811fbf09c7642eebb37d6694f1a016a043f6ed3" },
|
||||
"mason.nvim": { "branch": "main", "commit": "0942198fb9a998b6ccee36fb8dd7495eb8ba659c" },
|
||||
"neodev.nvim": { "branch": "main", "commit": "183f5a7357397260b631d6cccceccc3621b50f78" },
|
||||
"neogen": { "branch": "main", "commit": "cb1f384df804c1bf729332c4f728253fe17962d4" },
|
||||
"nightfly": { "branch": "master", "commit": "06eaaaa8717538a7ce96b13c137da8c9eaa84ec8" },
|
||||
"null-ls.nvim": { "branch": "main", "commit": "0010ea927ab7c09ef0ce9bf28c2b573fc302f5a7" },
|
||||
"nvim-autopairs": { "branch": "master", "commit": "ae5b41ce880a6d850055e262d6dfebd362bb276e" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "5dce1b778b85c717f6614e3f4da45e9f19f54435" },
|
||||
"nvim-colorizer.lua": { "branch": "master", "commit": "dde3084106a70b9a79d48f426f6d6fec6fd203f7" },
|
||||
"nvim-dap": { "branch": "master", "commit": "4377a05b9476587b7b485d6a9d9745768c4e4b37" },
|
||||
"nvim-dap": { "branch": "master", "commit": "31e1ece773e10448dcb616d5144290946a6264b7" },
|
||||
"nvim-dap-python": { "branch": "master", "commit": "37b4cba02e337a95cb62ad1609b3d1dccb2e5d42" },
|
||||
"nvim-dap-ui": { "branch": "master", "commit": "85b16ac2309d85c88577cd8ee1733ce52be8227e" },
|
||||
"nvim-dap-virtual-text": { "branch": "master", "commit": "57f1dbd0458dd84a286b27768c142e1567f3ce3b" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "a27356f1ef9c11e1f459cc96a3fcac5c265e72d6" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "d94e1ad9575cc211b5726f09b28ca9454aba22fe" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "9361484fa465529b0e646f947fe07bc7e80bfa62" },
|
||||
"nvim-ts-context-commentstring": { "branch": "main", "commit": "9bff161dfece6ecf3459e6e46ca42e49f9ed939f" },
|
||||
"nvim-ts-rainbow": { "branch": "master", "commit": "ef95c15a935f97c65a80e48e12fe72d49aacf9b9" },
|
||||
"obsidian.nvim": { "branch": "main", "commit": "6b17ee6cbd81f5f091712a59473b4257007ae336" },
|
||||
@ -49,14 +52,15 @@
|
||||
"sqls.nvim": { "branch": "main", "commit": "4b1274b5b44c48ce784aac23747192f5d9d26207" },
|
||||
"tagbar": { "branch": "master", "commit": "402e3e117fc7b47e43dbb87c51064daae3bc3bf3" },
|
||||
"telescope-color-names.nvim": { "branch": "main", "commit": "95b372b9a8ba0fc7cf6a67be637ee37453f322da" },
|
||||
"telescope-dap.nvim": { "branch": "master", "commit": "313d2ea12ae59a1ca51b62bf01fc941a983d9c9c" },
|
||||
"telescope-emoji.nvim": { "branch": "master", "commit": "86248d97be84a1ce83f0541500ef9edc99ea2aa1" },
|
||||
"telescope-frecency.nvim": { "branch": "master", "commit": "fbda5d91d6e787f5977787fa4a81da5c8e22160a" },
|
||||
"telescope-fzf-native.nvim": { "branch": "main", "commit": "9bc8237565ded606e6c366a71c64c0af25cd7a50" },
|
||||
"telescope-media-files.nvim": { "branch": "master", "commit": "0826c7a730bc4d36068f7c85cf4c5b3fd9fb570a" },
|
||||
"telescope-ui-select.nvim": { "branch": "master", "commit": "62ea5e58c7bbe191297b983a9e7e89420f581369" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "1dfa66b845673effc8771f9ebe511bb36a09f560" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "2c1ed33a6f6f2db3b69f5421f6b405eda1b07748" },
|
||||
"todo-comments.nvim": { "branch": "main", "commit": "3094ead8edfa9040de2421deddec55d3762f64d1" },
|
||||
"tokyonight.nvim": { "branch": "main", "commit": "1ee11019f8a81dac989ae1db1a013e3d582e2033" },
|
||||
"tokyonight.nvim": { "branch": "main", "commit": "9a01eada39558dc3243278e6805d90e8dff45dc0" },
|
||||
"undotree": { "branch": "master", "commit": "0e11ba7325efbbb3f3bebe06213afa3e7ec75131" },
|
||||
"vim-be-good": { "branch": "master", "commit": "c290810728a4f75e334b07dc0f3a4cdea908d351" },
|
||||
"vim-closetag": { "branch": "master", "commit": "d0a562f8bdb107a50595aefe53b1a690460c3822" },
|
||||
@ -64,5 +68,7 @@
|
||||
"vim-illuminate": { "branch": "master", "commit": "76f28e858f1caae87bfa45fb4fd09e4b053fc45b" },
|
||||
"vim-log-highlighting": { "branch": "master", "commit": "1037e26f3120e6a6a2c0c33b14a84336dee2a78f" },
|
||||
"vim-tmux-navigator": { "branch": "master", "commit": "addb64a772cb4a3ae1f1363583012b2cada2cd66" },
|
||||
"vimwiki": { "branch": "dev", "commit": "f0fe154ede6b11e3db9b058b930005a056a3d1c6" }
|
||||
"vimtex": { "branch": "master", "commit": "ad17583ce399b6830b4c2888ef2a12d52c5eb607" },
|
||||
"vimwiki": { "branch": "dev", "commit": "f0fe154ede6b11e3db9b058b930005a056a3d1c6" },
|
||||
"which-key.nvim": { "branch": "main", "commit": "7ccf476ebe0445a741b64e36c78a682c1c6118b7" }
|
||||
}
|
||||
@ -1,6 +1,6 @@
|
||||
-- Use 'q' to quit from common plugins
|
||||
vim.api.nvim_create_autocmd({ "FileType" }, {
|
||||
pattern = { "qf", "help", "man", "lspinfo", "spectre_panel", "lir", "git" },
|
||||
pattern = { "qf", "help", "man", "lspinfo", "spectre_panel", "lir", "git", "dap-float" },
|
||||
callback = function()
|
||||
vim.cmd([[ nnoremap <silent> <buffer> q :close<cr>
|
||||
set nobuflisted
|
||||
@ -8,17 +8,6 @@ vim.api.nvim_create_autocmd({ "FileType" }, {
|
||||
end,
|
||||
})
|
||||
|
||||
-- Set wrap and spell in markdown and gitcommit
|
||||
vim.api.nvim_create_autocmd({ "FileType" }, {
|
||||
pattern = { "gitcommit", "markdown", "vimwiki" },
|
||||
callback = function()
|
||||
vim.opt_local.wrap = true
|
||||
-- vim.opt_local.spell = true
|
||||
end,
|
||||
})
|
||||
|
||||
vim.cmd("autocmd BufEnter * ++nested if winnr('$') == 1 && bufname() == 'NvimTree_' . tabpagenr() | quit | endif")
|
||||
|
||||
-- Fixes Autocomment
|
||||
vim.api.nvim_create_autocmd({ "BufWinEnter" }, {
|
||||
callback = function()
|
||||
@ -36,7 +25,11 @@ vim.api.nvim_create_autocmd({ "TextYankPost" }, {
|
||||
-- Format File on Save
|
||||
vim.api.nvim_create_autocmd({ "BufWritePre" }, {
|
||||
callback = function()
|
||||
if vim.lsp.buf.format then
|
||||
vim.lsp.buf.format({ async = true })
|
||||
else
|
||||
vim.lsp.buf.format()
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
@ -47,24 +40,6 @@ vim.api.nvim_create_autocmd({ "InsertEnter" }, {
|
||||
end,
|
||||
})
|
||||
|
||||
-- Disable `expandtab` (don't replace tab with spaces)
|
||||
vim.api.nvim_create_autocmd({ "FileType" }, {
|
||||
pattern = { "lua" },
|
||||
callback = function()
|
||||
vim.opt_local.expandtab = false
|
||||
end,
|
||||
})
|
||||
|
||||
-- Set tab size for the following file types to 2
|
||||
vim.api.nvim_create_autocmd({ "FileType" }, {
|
||||
pattern = { "vimwiki", "sql" },
|
||||
callback = function()
|
||||
vim.opt_local.ts = 2
|
||||
vim.opt_local.sw = 2
|
||||
vim.opt_local.sts = 2
|
||||
end,
|
||||
})
|
||||
|
||||
-- Autocommand that reloads waybar whenever you save the ~/.config/waybar/config file
|
||||
vim.api.nvim_create_autocmd({ "BufWritePost" }, {
|
||||
group = vim.api.nvim_create_augroup("AutoReloadWaybar", { clear = true }),
|
||||
@ -93,7 +68,7 @@ vim.api.nvim_create_autocmd({ "BufWritePost" }, {
|
||||
-- end,
|
||||
-- })
|
||||
|
||||
-- Run lazy on file save
|
||||
-- Run `Lazy` on file save
|
||||
-- vim.api.nvim_create_autocmd({ "BufWritePost" }, {
|
||||
-- group = vim.api.nvim_create_augroup("AutoPackerSync", { clear = true }),
|
||||
-- pattern = { "**/lua/plugins/*" },
|
||||
@ -102,10 +77,10 @@ vim.api.nvim_create_autocmd({ "BufWritePost" }, {
|
||||
-- end,
|
||||
-- })
|
||||
|
||||
-- Set vertical column for all files
|
||||
-- Set vertical column for specific files
|
||||
-- vim.api.nvim_create_autocmd({ "FileType" }, {
|
||||
-- group = vim.api.nvim_create_augroup("SetColorColumn", { clear = true }),
|
||||
-- pattern = { "" },
|
||||
-- pattern = { "lua" },
|
||||
-- callback = function()
|
||||
-- vim.cmd.setlocal("colorcolumn=120")
|
||||
-- end,
|
||||
43
lua/config/autosave.lua
Normal file
43
lua/config/autosave.lua
Normal file
@ -0,0 +1,43 @@
|
||||
local attach_on_buffer = function(output_bufnr, pattern, command)
|
||||
vim.api.nvim_create_autocmd("BufWritePost", {
|
||||
group = vim.api.nvim_create_augroup("autosave", { clear = true }),
|
||||
pattern = pattern,
|
||||
callback = function()
|
||||
local append_data = function(_, data)
|
||||
if data then
|
||||
vim.api.nvim_buf_set_lines(output_bufnr, -1, -1, false, data)
|
||||
end
|
||||
end
|
||||
|
||||
local file_path = vim.api.nvim_buf_get_name(vim.api.nvim_get_current_buf())
|
||||
vim.api.nvim_buf_set_lines(output_bufnr, 0, -1, false, { file_path })
|
||||
vim.fn.jobstart(command, {
|
||||
stdout_buffered = true,
|
||||
on_stdout = append_data,
|
||||
on_stderr = append_data,
|
||||
})
|
||||
end,
|
||||
})
|
||||
end
|
||||
|
||||
-- vim.api.nvim_create_user_command("AutoRun", function()
|
||||
-- print("AutoRun starts now...")
|
||||
-- local bufnr = vim.api.nvim_get_current_buf()
|
||||
-- local command = vim.fn.input("Command: ")
|
||||
-- local pattern = vim.split(vim.fn.input("Pattern: "), " ")
|
||||
-- attach_on_buffer(tonumber(bufnr), pattern, command)
|
||||
-- end, {})
|
||||
--
|
||||
-- vim.api.nvim_create_user_command("AutoStop", function()
|
||||
-- vim.api.nvim_create_augroup("autosave", { clear = true })
|
||||
-- end, {})
|
||||
|
||||
vim.api.nvim_create_user_command("AutoRun", function()
|
||||
local bufnr = vim.api.nvim_create_buf(true, true)
|
||||
vim.api.nvim_buf_set_name(bufnr, "Test")
|
||||
vim.cmd.vsplit(bufnr)
|
||||
vim.api.nvim_win_set_width(0, 50)
|
||||
-- local command = vim.fn.input("Command: ")
|
||||
-- local pattern = vim.split(vim.fn.input("Pattern: "), " ")
|
||||
-- attach_on_buffer(tonumber(bufnr), pattern, command)
|
||||
end, {})
|
||||
7
lua/config/init.lua
Normal file
7
lua/config/init.lua
Normal file
@ -0,0 +1,7 @@
|
||||
require("config.options")
|
||||
-- require("config.mappings")
|
||||
require("config.keymaps")
|
||||
require("config.vimwiki")
|
||||
require("config.lazy")
|
||||
require("config.autocmds")
|
||||
require("config.autosave")
|
||||
49
lua/config/keymaps.lua
Normal file
49
lua/config/keymaps.lua
Normal file
@ -0,0 +1,49 @@
|
||||
local nmap = require("config.mappings").nmap
|
||||
local xmap = require("config.mappings").xmap
|
||||
local tmap = require("config.mappings").tmap
|
||||
local vmap = require("config.mappings").vmap
|
||||
|
||||
vim.keymap.set("", "<space>", "<nop>")
|
||||
nmap("Q", "<nop>")
|
||||
nmap("q", "<nop>")
|
||||
nmap("<C-space>", "<nop>")
|
||||
|
||||
nmap("J", "mzJ`z")
|
||||
nmap("<C-d>", "<C-d>zz")
|
||||
nmap("<C-u>", "<C-u>zz")
|
||||
nmap("n", "nzzzv")
|
||||
nmap("N", "Nzzzv")
|
||||
|
||||
nmap("<C-h>", vim.cmd.TmuxNavigateLeft, "Focus window left")
|
||||
nmap("<C-j>", vim.cmd.TmuxNavigateDown, "Focus window down")
|
||||
nmap("<C-k>", vim.cmd.TmuxNavigateUp, "Focus window up")
|
||||
nmap("<C-l>", vim.cmd.TmuxNavigateRight, "Focus window right")
|
||||
|
||||
nmap("<C-Up>", "<cmd>resize -2<cr>", "Resize window up")
|
||||
nmap("<C-Down>", "<cmd>resize +2<cr>", "Resize window down")
|
||||
nmap("<C-Left>", "<cmd>vertical resize -2<cr>", "Resize window left")
|
||||
nmap("<C-Right>", "<cmd>vertical resize +2<cr>", "Resize window right")
|
||||
|
||||
nmap("<C-f>", "<cmd>!tmux neww tmux-sessionizer<cr>", "Open tmux sessionizer")
|
||||
|
||||
nmap("<A-k>", "<cmd>m .-2<cr>==", "Move line up")
|
||||
nmap("<A-j>", "<cmd>m .+1<cr>==", "Move line down")
|
||||
|
||||
nmap("<A-s>", ":%s/\\<<C-r><C-w>\\>/<C-r><C-w>/gI<Left><Left><Left>", "Substitute word")
|
||||
-- nmap("<C-b>", "<cmd>w!<cr><cmd>!compiler '%:p'<cr>")
|
||||
-- nmap("<C-o>", "<cmd>w!<cr><cmd>!opout '%:p'<cr>")
|
||||
|
||||
xmap("p", '"_dP')
|
||||
|
||||
vim.keymap.set("c", "<C-j>", 'pumvisible() ? "\\<C-n>" : "\\<C-j>"', { expr = true, noremap = true })
|
||||
vim.keymap.set("c", "<C-k>", 'pumvisible() ? "\\<C-p>" : "\\<C-k>"', { expr = true, noremap = true })
|
||||
|
||||
vmap(">", ">gv", "Right Indent")
|
||||
vmap("<", "<gv", "Left Indent")
|
||||
vmap("<A-k>", ":m '<-2<cr>gv=gv", "Move lines up")
|
||||
vmap("<A-j>", ":m '>+1<cr>gv=gv", "Move lines down")
|
||||
|
||||
-- tmap("<C-h>", "<C-\\><C-N><C-w>h")
|
||||
-- tmap("<C-j>", "<C-\\><C-N><C-w>j")
|
||||
-- tmap("<C-k>", "<C-\\><C-N><C-w>k")
|
||||
-- tmap("<C-l>", "<C-\\><C-N><C-w>l")
|
||||
14
lua/config/lazy.lua
Normal file
14
lua/config/lazy.lua
Normal file
@ -0,0 +1,14 @@
|
||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
if not vim.loop.fs_stat(lazypath) then
|
||||
vim.fn.system({
|
||||
"git",
|
||||
"clone",
|
||||
"--filter=blob:none",
|
||||
"https://github.com/folke/lazy.nvim.git",
|
||||
"--branch=stable", -- latest stable release
|
||||
lazypath,
|
||||
})
|
||||
end
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
|
||||
require("lazy").setup("plugins")
|
||||
35
lua/config/mappings.lua
Normal file
35
lua/config/mappings.lua
Normal file
@ -0,0 +1,35 @@
|
||||
local M = {}
|
||||
|
||||
-- Modes
|
||||
-- normal_mode = "n",
|
||||
-- insert_mode = "i",
|
||||
-- visual_mode = "v",
|
||||
-- visual_block_mode = "x",
|
||||
-- term_mode = "t",
|
||||
-- command_mode = "c",
|
||||
--
|
||||
|
||||
M.nmap = function(keys, func, desc)
|
||||
vim.keymap.set("n", keys, func, { desc = desc })
|
||||
end
|
||||
|
||||
M.imap = function(keys, func, desc)
|
||||
vim.keymap.set("i", keys, func, { desc = desc })
|
||||
end
|
||||
|
||||
M.vmap = function(keys, func, desc)
|
||||
vim.keymap.set("v", keys, func, { desc = desc })
|
||||
end
|
||||
|
||||
M.xmap = function(keys, func, desc)
|
||||
vim.keymap.set("x", keys, func, { desc = desc })
|
||||
end
|
||||
|
||||
M.tmap = function(keys, func, desc)
|
||||
vim.keymap.set("t", keys, func, { desc = desc })
|
||||
end
|
||||
|
||||
M.cmap = function(keys, func, desc)
|
||||
vim.keymap.set("c", keys, func, { desc = desc })
|
||||
end
|
||||
return M
|
||||
63
lua/config/options.lua
Normal file
63
lua/config/options.lua
Normal file
@ -0,0 +1,63 @@
|
||||
vim.opt.backup = false -- creates a backup file
|
||||
vim.opt.breakindent = true -- Enable break indent
|
||||
vim.opt.clipboard = "unnamedplus" -- allows neovim to access the system clipboard
|
||||
vim.opt.cmdheight = 1 -- more space in the neovim command line for displaying messages
|
||||
vim.opt.colorcolumn = "120"
|
||||
vim.opt.completeopt = { "menuone", "noselect" } -- mostly just for cmp
|
||||
vim.opt.conceallevel = 0 -- so that `` is visible in markdown files
|
||||
vim.opt.cursorcolumn = true -- highlight the current column
|
||||
vim.opt.cursorline = true -- highlight the current line
|
||||
vim.opt.expandtab = true -- convert tabs to spaces
|
||||
vim.opt.fileencoding = "utf-8" -- the encoding written to a file
|
||||
vim.opt.fillchars.eob = " "
|
||||
vim.opt.foldmethod = "manual"
|
||||
vim.opt.guifont = "JetBrainsMono NF:h11" -- the font used in graphical neovim applications
|
||||
vim.opt.hlsearch = false -- highlight all matches on previous search pattern
|
||||
vim.opt.ignorecase = true -- ignore case in search patterns
|
||||
vim.opt.incsearch = true
|
||||
vim.opt.isfname:append("@-@")
|
||||
vim.opt.iskeyword:append("-")
|
||||
vim.opt.laststatus = 3
|
||||
vim.opt.mouse = "a" -- allow the mouse to be used in neovim
|
||||
vim.opt.number = true -- set numbered lines
|
||||
vim.opt.numberwidth = 4 -- set number column width to 4 {default 4}
|
||||
vim.opt.pumheight = 10 -- pop up menu height
|
||||
vim.opt.relativenumber = true -- set relative numbered lines
|
||||
vim.opt.ruler = false
|
||||
vim.opt.scrolloff = 8 -- is one of my fav
|
||||
vim.opt.shiftwidth = 4 -- the number of spaces inserted for each indentation
|
||||
vim.opt.shortmess:append("c")
|
||||
vim.opt.showcmd = false
|
||||
vim.opt.showmode = false -- we don't need to see things like -- INSERT -- anymore
|
||||
vim.opt.showtabline = 0 -- disable tabs
|
||||
vim.opt.sidescrolloff = 8
|
||||
vim.opt.signcolumn = "yes" -- always show the sign column otherwise it would shift the text each time
|
||||
vim.opt.smartcase = true -- smart case
|
||||
vim.opt.smartindent = true -- make indenting smarter again
|
||||
vim.opt.softtabstop = 4
|
||||
vim.opt.spell = false
|
||||
vim.opt.spelloptions:append("camel")
|
||||
vim.opt.splitbelow = true -- force all horizontal splits to go below current window
|
||||
vim.opt.splitright = true -- force all vertical splits to go to the right of current window
|
||||
vim.opt.swapfile = false -- creates a swapfile
|
||||
vim.opt.tabstop = 4 -- insert 4 spaces for a tab
|
||||
vim.opt.termguicolors = true -- set term gui colors (most terminals support this)
|
||||
vim.opt.timeoutlen = 250 -- time to wait for a mapped sequence to complete (in milliseconds)
|
||||
vim.opt.undodir = vim.fn.stdpath("data") .. "/nvim/undodir"
|
||||
vim.opt.undofile = true -- enable persistent undo
|
||||
vim.opt.updatetime = 50 -- faster completion (4000ms default)
|
||||
vim.opt.whichwrap:append("<,>,[,],h,l")
|
||||
vim.opt.wrap = false -- display lines as one long line
|
||||
vim.opt.writebackup = false -- if a file is being edited by another program (or was written to file while editing with another program) it is not allowed to be edit
|
||||
|
||||
vim.opt_local.path:prepend(vim.fn.stdpath("config") .. "/lua")
|
||||
vim.opt_local.suffixesadd:prepend(".lua")
|
||||
vim.opt_local.suffixesadd:prepend("init.lua")
|
||||
|
||||
vim.g.mapleader = " "
|
||||
vim.g.maplocalleader = " "
|
||||
vim.g.netrw_banner = 0
|
||||
vim.g.netrw_browse_split = 0
|
||||
vim.g.netrw_keepdir = 0
|
||||
vim.g.netrw_localcopydircmd = "cp -r"
|
||||
vim.g.netrw_winsize = 30
|
||||
@ -1,17 +1,4 @@
|
||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
if not vim.loop.fs_stat(lazypath) then
|
||||
vim.fn.system({
|
||||
"git",
|
||||
"clone",
|
||||
"--filter=blob:none",
|
||||
"https://github.com/folke/lazy.nvim.git",
|
||||
"--branch=stable", -- latest stable release
|
||||
lazypath,
|
||||
})
|
||||
end
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
|
||||
require("lazy").setup({
|
||||
return {
|
||||
-- core
|
||||
{ "folke/lazy.nvim" },
|
||||
{ "nvim-lua/plenary.nvim" }, -- Useful lua functions used by lots of plugins
|
||||
@ -32,7 +19,8 @@ require("lazy").setup({
|
||||
end,
|
||||
},
|
||||
{ "laytan/cloak.nvim" },
|
||||
"numToStr/Comment.nvim",
|
||||
{ "numToStr/Comment.nvim" },
|
||||
{ "folke/which-key.nvim", lazy = true },
|
||||
|
||||
-- lsp
|
||||
{
|
||||
@ -41,8 +29,21 @@ require("lazy").setup({
|
||||
dependencies = {
|
||||
-- LSP Support
|
||||
{ "neovim/nvim-lspconfig" },
|
||||
{ "williamboman/mason.nvim" },
|
||||
{ "williamboman/mason-lspconfig.nvim" },
|
||||
{
|
||||
"williamboman/mason.nvim",
|
||||
opts = {
|
||||
ui = {
|
||||
border = "single",
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
opts = {
|
||||
automatic_installation = true,
|
||||
automatic_setup = true,
|
||||
},
|
||||
},
|
||||
|
||||
-- Autocompletion
|
||||
{
|
||||
@ -66,9 +67,18 @@ require("lazy").setup({
|
||||
{ "saadparwaiz1/cmp_luasnip" },
|
||||
},
|
||||
},
|
||||
{
|
||||
"folke/neodev.nvim",
|
||||
opts = {
|
||||
library = { plugins = { "nvim-dap-ui" }, types = true },
|
||||
},
|
||||
dependencies = {
|
||||
"rcarriga/nvim-dap-ui",
|
||||
},
|
||||
},
|
||||
{ "nanotee/sqls.nvim", lazy = true },
|
||||
{ "p00f/clangd_extensions.nvim", ft = { "cpp", "c" } },
|
||||
{ "Civitasv/cmake-tools.nvim", ft = { "cpp", "c" }, dependencies = { "nvim-lua/plenary.nvim" } },
|
||||
{ "Civitasv/cmake-tools.nvim", ft = { "cpp", "c", "cmake" }, dependencies = { "nvim-lua/plenary.nvim" } },
|
||||
{
|
||||
"simrat39/rust-tools.nvim",
|
||||
dependencies = {
|
||||
@ -77,7 +87,6 @@ require("lazy").setup({
|
||||
ft = "rust",
|
||||
},
|
||||
{
|
||||
|
||||
"Saecki/crates.nvim",
|
||||
ft = { "rust", "toml" },
|
||||
dependencies = {
|
||||
@ -109,22 +118,31 @@ require("lazy").setup({
|
||||
-- debuggers
|
||||
{
|
||||
"rcarriga/nvim-dap-ui",
|
||||
dependencies = { "jayp0521/mason-nvim-dap.nvim" },
|
||||
},
|
||||
{
|
||||
"jayp0521/mason-nvim-dap.nvim",
|
||||
dependencies = {
|
||||
{
|
||||
"williamboman/mason.nvim",
|
||||
opts = {
|
||||
automatic_installation = true,
|
||||
automatic_setup = true,
|
||||
},
|
||||
},
|
||||
"mfussenegger/nvim-dap",
|
||||
},
|
||||
},
|
||||
{ "ravenxrz/DAPInstall.nvim", lazy = true },
|
||||
{ "theHamsta/nvim-dap-virtual-text" },
|
||||
{
|
||||
"jayp0521/mason-nvim-dap.nvim",
|
||||
opts = {
|
||||
ensure_installed = {
|
||||
"debugpy",
|
||||
"codelldb",
|
||||
},
|
||||
},
|
||||
dependencies = {
|
||||
"williamboman/mason.nvim",
|
||||
},
|
||||
},
|
||||
{
|
||||
"mfussenegger/nvim-dap-python",
|
||||
ft = "python",
|
||||
dependencies = {
|
||||
"mfussenegger/nvim-dap",
|
||||
"rcarriga/nvim-dap-ui",
|
||||
},
|
||||
},
|
||||
|
||||
-- treesitter
|
||||
{
|
||||
@ -150,6 +168,9 @@ require("lazy").setup({
|
||||
{ "nvim-telescope/telescope-ui-select.nvim" },
|
||||
{ "nvim-telescope/telescope-fzf-native.nvim", build = "make" },
|
||||
{ "nat-418/telescope-color-names.nvim" },
|
||||
{ "nvim-telescope/telescope-dap.nvim", dependencies = {
|
||||
"nvim-dap",
|
||||
} },
|
||||
},
|
||||
},
|
||||
|
||||
@ -190,6 +211,7 @@ require("lazy").setup({
|
||||
{ "tpope/vim-fugitive" },
|
||||
{ "lewis6991/gitsigns.nvim" },
|
||||
{ "ThePrimeagen/git-worktree.nvim" },
|
||||
{ "sindrets/diffview.nvim" },
|
||||
|
||||
-- text
|
||||
{ "vimwiki/vimwiki" },
|
||||
@ -201,9 +223,18 @@ require("lazy").setup({
|
||||
"BufReadPre " .. vim.fn.expand("~") .. "/obsidian/**/*.md",
|
||||
},
|
||||
},
|
||||
{ "lervag/vimtex" },
|
||||
{
|
||||
"iamcco/markdown-preview.nvim",
|
||||
ft = { "markdown", "vimwiki" },
|
||||
build = "cd app && yarn install",
|
||||
init = function()
|
||||
vim.g.mkdp_filetypes = { "markdown", "vimwiki" }
|
||||
end,
|
||||
},
|
||||
|
||||
-- fun
|
||||
{ "andweeb/presence.nvim" },
|
||||
{ "ThePrimeagen/vim-be-good", lazy = true },
|
||||
{ "eandrju/cellular-automaton.nvim" },
|
||||
})
|
||||
}
|
||||
@ -1,33 +0,0 @@
|
||||
local attach_on_buffer = function(output_bufnr, pattern, command)
|
||||
vim.api.nvim_create_autocmd("BufWritePost", {
|
||||
group = vim.api.nvim_create_augroup("autosave", { clear = true }),
|
||||
pattern = pattern,
|
||||
callback = function()
|
||||
local append_data = function(_, data)
|
||||
if data then
|
||||
vim.api.nvim_buf_set_lines(output_bufnr, -1, -1, false, data)
|
||||
end
|
||||
end
|
||||
|
||||
local file_path = vim.api.nvim_buf_get_name(vim.api.nvim_get_current_buf())
|
||||
vim.api.nvim_buf_set_lines(output_bufnr, 0, -1, false, { file_path })
|
||||
vim.fn.jobstart(command, {
|
||||
stdout_buffered = true,
|
||||
on_stdout = append_data,
|
||||
on_stderr = append_data,
|
||||
})
|
||||
end,
|
||||
})
|
||||
end
|
||||
|
||||
vim.api.nvim_create_user_command("AutoRun", function()
|
||||
print("AutoRun starts now...")
|
||||
local bufnr = vim.api.nvim_get_current_buf()
|
||||
local command = vim.fn.input("Command: ")
|
||||
local pattern = vim.split(vim.fn.input("Pattern: "), " ")
|
||||
attach_on_buffer(tonumber(bufnr), pattern, command)
|
||||
end, {})
|
||||
|
||||
vim.api.nvim_create_user_command("AutoStop", function()
|
||||
vim.api.nvim_create_augroup("autosave", { clear = true })
|
||||
end, {})
|
||||
@ -1,6 +0,0 @@
|
||||
require("solo.options")
|
||||
require("solo.keymaps")
|
||||
require("solo.vimwiki")
|
||||
require("solo.plugins")
|
||||
require("solo.autocommands")
|
||||
require("solo.autosave")
|
||||
@ -1,71 +0,0 @@
|
||||
--Remap space as leader key
|
||||
vim.g.mapleader = " "
|
||||
vim.keymap.set("", "<Space>", "<nop>")
|
||||
vim.keymap.set("n", "Q", "<nop>")
|
||||
vim.keymap.set("n", "q", "<nop>")
|
||||
|
||||
-- Modes
|
||||
-- normal_mode = "n",
|
||||
-- insert_mode = "i",
|
||||
-- visual_mode = "v",
|
||||
-- visual_block_mode = "x",
|
||||
-- term_mode = "t",
|
||||
-- command_mode = "c",
|
||||
|
||||
vim.keymap.set("n", "<leader>n", vim.cmd.Ex)
|
||||
|
||||
vim.keymap.set("v", "<A-j>", ":m '>+1<cr>gv=gv")
|
||||
vim.keymap.set("v", "<A-k>", ":m '<-2<cr>gv=gv")
|
||||
|
||||
vim.keymap.set("n", "J", "mzJ`z")
|
||||
vim.keymap.set("n", "<C-d>", "<C-d>zz")
|
||||
vim.keymap.set("n", "<C-u>", "<C-u>zz")
|
||||
vim.keymap.set("n", "n", "nzzzv")
|
||||
vim.keymap.set("n", "N", "Nzzzv")
|
||||
|
||||
vim.keymap.set("n", "<C-h>", "<cmd>TmuxNavigateLeft<cr>")
|
||||
vim.keymap.set("n", "<C-j>", "<cmd>TmuxNavigateDown<cr>")
|
||||
vim.keymap.set("n", "<C-k>", "<cmd>TmuxNavigateUp<cr>")
|
||||
vim.keymap.set("n", "<C-l>", "<cmd>TmuxNavigateRight<cr>")
|
||||
|
||||
vim.keymap.set("n", "<C-Up>", "<cmd>resize -2<cr>")
|
||||
vim.keymap.set("n", "<C-Down>", "<cmd>resize +2<cr>")
|
||||
vim.keymap.set("n", "<C-Left>", "<cmd>vertical resize -2<cr>")
|
||||
vim.keymap.set("n", "<C-Right>", "<cmd>vertical resize +2<cr>")
|
||||
|
||||
vim.keymap.set("x", "<leader>p", '"_dP')
|
||||
|
||||
vim.keymap.set("n", "<C-f>", "<cmd>!tmux neww tmux-sessionizer<cr>")
|
||||
|
||||
vim.keymap.set("n", "<A-j>", "<cmd>m .+1<cr>==")
|
||||
vim.keymap.set("n", "<A-k>", "<cmd>m .-2<cr>==")
|
||||
|
||||
vim.keymap.set("n", "<leader>j", "<cmd>lua vim.diagnostic.goto_next()<cr>zz")
|
||||
vim.keymap.set("n", "<leader>k", "<cmd>lua vim.diagnostic.goto_prev()<cr>zz")
|
||||
vim.keymap.set("n", "<leader>r", function()
|
||||
vim.lsp.buf.rename()
|
||||
end)
|
||||
|
||||
vim.keymap.set("n", "<leader>s", ":%s/\\<<C-r><C-w>\\>/<C-r><C-w>/gI<Left><Left><Left>")
|
||||
vim.keymap.set("n", "<leader>x", "<cmd>!chmod +x %<cr>", { silent = true })
|
||||
|
||||
vim.keymap.set("i", "<A-Up>", "<C-\\><C-N><C-w>k")
|
||||
vim.keymap.set("i", "<A-Down>", "<C-\\><C-N><C-w>j")
|
||||
vim.keymap.set("i", "<A-Left>", "<C-\\><C-N><C-w>h")
|
||||
vim.keymap.set("i", "<A-Right>", "<C-\\><C-N><C-w>l")
|
||||
|
||||
vim.keymap.set("v", ">", ">gv")
|
||||
vim.keymap.set("v", "<", "<gv")
|
||||
|
||||
vim.keymap.set("c", "<C-j>", 'pumvisible() ? "\\<C-n>" : "\\<C-j>"', { expr = true, noremap = true })
|
||||
vim.keymap.set("c", "<C-k>", 'pumvisible() ? "\\<C-p>" : "\\<C-k>"', { expr = true, noremap = true })
|
||||
|
||||
vim.keymap.set("t", "<C-h>", "<C-\\><C-N><C-w>h")
|
||||
vim.keymap.set("t", "<C-j>", "<C-\\><C-N><C-w>j")
|
||||
vim.keymap.set("t", "<C-k>", "<C-\\><C-N><C-w>k")
|
||||
vim.keymap.set("t", "<C-l>", "<C-\\><C-N><C-w>l")
|
||||
|
||||
vim.keymap.set("n", "<C-b>", "<cmd>w!<cr><cmd>!compiler '%:p'<cr>")
|
||||
vim.keymap.set("n", "<C-o>", "<cmd>w!<cr><cmd>!opout '%:p'<cr>")
|
||||
|
||||
vim.keymap.set("n", "<leader>mr", "<cmd>CellularAutomaton make_it_rain<cr>")
|
||||
@ -1,66 +0,0 @@
|
||||
local options = {
|
||||
backup = false, -- creates a backup file
|
||||
clipboard = "unnamedplus", -- allows neovim to access the system clipboard
|
||||
cmdheight = 1, -- more space in the neovim command line for displaying messages
|
||||
completeopt = { "menuone", "noselect" }, -- mostly just for cmp
|
||||
conceallevel = 0, -- so that `` is visible in markdown files
|
||||
fileencoding = "utf-8", -- the encoding written to a file
|
||||
hlsearch = false, -- highlight all matches on previous search pattern
|
||||
incsearch = true,
|
||||
ignorecase = true, -- ignore case in search patterns
|
||||
mouse = "a", -- allow the mouse to be used in neovim
|
||||
pumheight = 10, -- pop up menu height,
|
||||
showmode = false, -- we don't need to see things like -- INSERT -- anymore
|
||||
showtabline = 0, -- disable tabs
|
||||
smartcase = true, -- smart case
|
||||
smartindent = true, -- make indenting smarter again
|
||||
splitbelow = true, -- force all horizontal splits to go below current window
|
||||
splitright = true, -- force all vertical splits to go to the right of current window
|
||||
swapfile = false, -- creates a swapfile
|
||||
termguicolors = true, -- set term gui colors (most terminals support this)
|
||||
timeoutlen = 250, -- time to wait for a mapped sequence to complete (in milliseconds)
|
||||
undofile = true, -- enable persistent undo
|
||||
undodir = vim.fn.stdpath("data") .. "/nvim/undodir",
|
||||
updatetime = 50, -- faster completion (4000ms default)
|
||||
writebackup = false, -- if a file is being edited by another program (or was written to file while editing with another program), it is not allowed to be edited
|
||||
expandtab = true, -- convert tabs to spaces
|
||||
shiftwidth = 4, -- the number of spaces inserted for each indentation
|
||||
tabstop = 4, -- insert 4 spaces for a tab
|
||||
cursorcolumn = true, -- highlight the current column
|
||||
cursorline = true, -- highlight the current line
|
||||
number = true, -- set numbered lines
|
||||
relativenumber = true, -- set relative numbered lines
|
||||
laststatus = 3,
|
||||
showcmd = false,
|
||||
ruler = false,
|
||||
numberwidth = 4, -- set number column width to 4 {default 4}
|
||||
signcolumn = "yes", -- always show the sign column, otherwise it would shift the text each time
|
||||
wrap = false, -- display lines as one long line
|
||||
scrolloff = 10, -- is one of my fav
|
||||
sidescrolloff = 10,
|
||||
guifont = "JetBrainsMono NF:h11", -- the font used in graphical neovim applications
|
||||
spell = false,
|
||||
foldmethod = "manual",
|
||||
breakindent = true, -- Enable break indent
|
||||
}
|
||||
|
||||
vim.opt.fillchars.eob = " "
|
||||
vim.opt.shortmess:append("c")
|
||||
vim.opt.whichwrap:append("<,>,[,],h,l")
|
||||
vim.opt.iskeyword:append("-")
|
||||
vim.opt.isfname:append("@-@")
|
||||
|
||||
for k, v in pairs(options) do
|
||||
vim.opt[k] = v
|
||||
end
|
||||
vim.opt.spelloptions:append("camel")
|
||||
|
||||
vim.g.mapleader = " "
|
||||
vim.g.maplocalleader = " "
|
||||
vim.g.netrw_browse_split = 0
|
||||
vim.g.netrw_banner = 0
|
||||
vim.g.netrw_winsize = 25
|
||||
|
||||
vim.opt_local.suffixesadd:prepend(".lua")
|
||||
vim.opt_local.suffixesadd:prepend("init.lua")
|
||||
vim.opt_local.path:prepend(vim.fn.stdpath("config") .. "/lua")
|
||||
144
templates/Glossary.tex
Normal file
144
templates/Glossary.tex
Normal file
@ -0,0 +1,144 @@
|
||||
%%% GLOSSARY %%%
|
||||
|
||||
% Add to main file
|
||||
|
||||
% \usepackage[automake,nogroupskip,
|
||||
% postpunc={dot},% full stop after description
|
||||
% nostyles,% don't load default style packages
|
||||
% % load glossaries-extra-stylemods.sty and glossary-tree.sty:
|
||||
% stylemods={tree}
|
||||
% ]{glossaries-extra}
|
||||
% % \usepackage{glossary-superragged}
|
||||
% \loadglsentries{Glossary}
|
||||
% \newcommand{\g}{\glssymbol*}
|
||||
% \makeglossaries
|
||||
|
||||
% \printglossary[style={index}]
|
||||
|
||||
%%% ENTRIES %%%
|
||||
\newglossaryentry{Q}{% settings:
|
||||
name = {Operator},
|
||||
symbol = {\ensuremath{\mathcal{Q}}},
|
||||
description = {stands for any $n$-place sentential operator.}
|
||||
}
|
||||
|
||||
\newglossaryentry{L}{% settings:
|
||||
name = {Language},
|
||||
symbol = {\ensuremath{\mathcal{L}}},
|
||||
description = {includes a set of sentence letters and operators}
|
||||
}
|
||||
|
||||
\newglossaryentry{part}{% settings:
|
||||
name = {Proper parthood},
|
||||
symbol = {\ensuremath{\sqsubset}},
|
||||
description = {is defined in terms of improper parthood}
|
||||
}
|
||||
|
||||
\newglossaryentry{wfas}{% settings:
|
||||
name = {Well-formed atomic sentences},
|
||||
symbol = {\ensuremath{\operatorname{\texttt{wfas}}}},
|
||||
description = {generated from a stock of sentence letters}
|
||||
}
|
||||
|
||||
\newglossaryentry{wfs}{% settings:
|
||||
name = {Well-formed sentences},
|
||||
symbol = {\ensuremath{\operatorname{\texttt{wfs}}}},
|
||||
description = {generated from a stock of sentence letters}
|
||||
}
|
||||
|
||||
\newglossaryentry{ext}{% settings:
|
||||
name = {Extensional sentences},
|
||||
symbol = {\ensuremath{\operatorname{\texttt{ext}}}},
|
||||
description = {generated from a stock of sentence letters}
|
||||
}
|
||||
|
||||
\newglossaryentry{id}{% settings:
|
||||
name = {Identity sentences},
|
||||
symbol = {\ensuremath{\operatorname{\texttt{id}}}},
|
||||
description = {generated from a stock of sentence letters}
|
||||
}
|
||||
|
||||
\newglossaryentry{nid}{% settings:
|
||||
name = {Non-identity sentences},
|
||||
symbol = {\ensuremath{\operatorname{\texttt{nid}}}},
|
||||
description = {generated from a stock of sentence letters}
|
||||
}
|
||||
|
||||
\newglossaryentry{eq}{% settings:
|
||||
name = {Equivalence sentences},
|
||||
symbol = {\ensuremath{\operatorname{\texttt{eq}}}},
|
||||
description = {generated from a stock of sentence letters}
|
||||
}
|
||||
|
||||
\newglossaryentry{comp}{% settings:
|
||||
name = {Complexity},
|
||||
symbol = {\ensuremath{\operatorname{\texttt{comp}}}},
|
||||
description = {of a sentence}
|
||||
}
|
||||
|
||||
\newglossaryentry{lit}{% settings:
|
||||
name = {Sentence letters},
|
||||
symbol = {\ensuremath{\mathbb{L}}},
|
||||
description = {make up the atoms of the language}
|
||||
}
|
||||
|
||||
\newglossaryentry{glb}{% settings:
|
||||
name = {Greatest lower bound},
|
||||
symbol = {\ensuremath{\operatorname{\texttt{glb}}}},
|
||||
description = {with respect to a given order}
|
||||
}
|
||||
|
||||
\newglossaryentry{lub}{% settings:
|
||||
name = {Least upper bound},
|
||||
symbol = {\ensuremath{\operatorname{\texttt{lub}}}},
|
||||
description = {with respect to a given order}
|
||||
}
|
||||
|
||||
\newglossaryentry{s}{% settings:
|
||||
name = {State space},
|
||||
symbol = {\ensuremath{\mathcal{S}}},
|
||||
description = {consisting of a set of states and partial order}
|
||||
}
|
||||
|
||||
\newglossaryentry{M}{% settings:
|
||||
name = {Model},
|
||||
symbol = {\ensuremath{\mathcal{M}}},
|
||||
description = {of the language assigns sentence letters to propositions}
|
||||
}
|
||||
|
||||
\newglossaryentry{N}{% settings:
|
||||
name = {Normal models},
|
||||
symbol = {\ensuremath{\mathcal{N}}},
|
||||
description = {is the class of all models in which sentence letter are assigned to normal propositions}
|
||||
}
|
||||
|
||||
\newglossaryentry{C}{% settings:
|
||||
name = {Contents},
|
||||
symbol = {\ensuremath{\mathbb{C}}},
|
||||
description = {defined over a state space}
|
||||
}
|
||||
|
||||
\newglossaryentry{P}{% settings:
|
||||
name = {Propositions},
|
||||
symbol = {\ensuremath{\mathbb{P}}},
|
||||
description = {defined over a state space}
|
||||
}
|
||||
|
||||
\newglossaryentry{B}{% settings:
|
||||
name = {Bilattice},
|
||||
symbol = {\ensuremath{\mathcal{B}}},
|
||||
description = {of propositions defined over a state space}
|
||||
}
|
||||
|
||||
\newglossaryentry{R}{% settings:
|
||||
name = {Regular models},
|
||||
symbol = {\ensuremath{\mathcal{R}}},
|
||||
description = {is the class of all models in which sentence letter are assigned to regular propositions}
|
||||
}
|
||||
|
||||
\newglossaryentry{parteq}{% settings:
|
||||
name = {Improper parthood},
|
||||
symbol = {\ensuremath{\sqsubseteq}},
|
||||
description = {is a partial order over a space of states}
|
||||
}
|
||||
|
||||
81
templates/HandOut.tex
Normal file
81
templates/HandOut.tex
Normal file
@ -0,0 +1,81 @@
|
||||
|
||||
\documentclass[a4paper, 11pt]{article} % Font size (can be 10pt, 11pt or 12pt) and paper size (remove a4paper for US letter paper)
|
||||
|
||||
\usepackage[protrusion=true,expansion=true]{microtype} % Better typography
|
||||
\usepackage{graphicx} % Required for including pictures
|
||||
\usepackage{wrapfig} % Allows in-line images
|
||||
\usepackage{enumitem} %%Enables control over enumerate and itemize environments
|
||||
\usepackage{setspace}
|
||||
\usepackage{amssymb, amsmath, mathrsfs} %%Math packages
|
||||
\usepackage{stmaryrd}
|
||||
\usepackage{mathtools}
|
||||
\usepackage{mathpazo} % Use the Palatino font
|
||||
\usepackage[T1]{fontenc} % Required for accented characters
|
||||
\usepackage{array}
|
||||
\usepackage{bibentry}
|
||||
\usepackage[round]{natbib} %%Or change 'round' to 'square' for square backers
|
||||
\setcitestyle{aysep={}}
|
||||
|
||||
\linespread{1.05} % Change line spacing here, Palatino benefits from a slight increase by default
|
||||
|
||||
\newcommand{\corner}[1]{\ulcorner#1\urcorner} %%Corner quotes
|
||||
\newcommand{\tuple}[1]{\langle#1\rangle} %%Angle brackets
|
||||
\newcommand{\set}[1]{\lbrace#1\rbrace} %%Set brackets
|
||||
\newcommand{\interpret}[1]{\llbracket#1\rrbracket} %%Double brackets
|
||||
%\DeclarePairedDelimiter\ceil{\lceil}{\rceil}
|
||||
|
||||
\makeatletter
|
||||
\renewcommand\@biblabel[1]{\textbf{#1.}} % Change the square brackets for each bibliography item from '[1]' to '1.'
|
||||
\renewcommand{\@listI}{\itemsep=0pt} % Reduce the space between items in the itemize and enumerate environments and the bibliography
|
||||
|
||||
\renewcommand{\maketitle}{ % Customize the title - do not edit title and author name here, see the TITLE block below
|
||||
\begin{flushright} % Right align
|
||||
{\LARGE\@title} % Increase the font size of the title
|
||||
|
||||
\vspace{10pt} % Some vertical space between the title and author name
|
||||
|
||||
{\@author} % Author name
|
||||
\\\@date % Date
|
||||
|
||||
\vspace{30pt} % Some vertical space between the author block and abstract
|
||||
\end{flushright}
|
||||
}
|
||||
|
||||
%----------------------------------------------------------------------------------------
|
||||
% TITLE
|
||||
%----------------------------------------------------------------------------------------
|
||||
|
||||
\title{\textbf{Handout Title}} % Subtitle
|
||||
|
||||
\author{\textsc{CLASS OR TOPIC}\\ \em Benjamin Brast-McKie} % Institution
|
||||
|
||||
\date{\today} % Date
|
||||
|
||||
%----------------------------------------------------------------------------------------
|
||||
|
||||
\begin{document}
|
||||
|
||||
\maketitle % Print the title section
|
||||
|
||||
\thispagestyle{empty}
|
||||
|
||||
%----------------------------------------------------------------------------------------
|
||||
|
||||
\section*{First Section}
|
||||
|
||||
\begin{enumerate}[leftmargin=1.2in,labelsep=.15in] %,label=(\arabic*)]%,label=\roman*]
|
||||
\item[\bf Definition:] Begin definition\dots
|
||||
\end{enumerate}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
\vfill
|
||||
|
||||
\bibliographystyle{Phil_Review} %%bib style found in bst folder, in bibtex folder, in texmf folder.
|
||||
\bibliography{Zotero} %%bib database found in bib folder, in bibtex folder
|
||||
|
||||
|
||||
\end{document}
|
||||
65
templates/Letter.tex
Normal file
65
templates/Letter.tex
Normal file
@ -0,0 +1,65 @@
|
||||
|
||||
\documentclass[a4paper, 11pt]{article} % Font size (can be 10pt, 11pt or 12pt) and paper size (remove a4paper for US letter paper)
|
||||
|
||||
\usepackage[protrusion=true,expansion=true]{microtype} % Better typography
|
||||
\usepackage{graphicx} % Required for including pictures
|
||||
\usepackage{wrapfig} % Allows in-line images
|
||||
\usepackage[top=1.25in, bottom=1in, left=1.65in, right=1.65in]{geometry} %%Margins
|
||||
\usepackage{mathpazo} % Use the Palatino font
|
||||
\usepackage[T1]{fontenc} % Required for accented characters
|
||||
\linespread{1.05} % Change line spacing here, Palatino benefits from a slight increase by default
|
||||
|
||||
\makeatletter
|
||||
\renewcommand\@biblabel[1]{\textbf{#1.}} % Change the square brackets for each bibliography item from '[1]' to '1.'
|
||||
\renewcommand{\@listI}{\itemsep=0pt} % Reduce the space between items in the itemize and enumerate environments and the bibliography
|
||||
|
||||
\renewcommand{\maketitle}{ % Customize the title - do not edit title and author name here, see the TITLE block below
|
||||
\begin{flushright}
|
||||
{\large\@author} % Author name
|
||||
\\\@date % Date
|
||||
\end{flushright}
|
||||
|
||||
\begin{flushleft} % Right align
|
||||
{\Large\@title} % Increase the font size of the title
|
||||
\end{flushleft}
|
||||
}
|
||||
|
||||
%----------------------------------------------------------------------------------------
|
||||
% TITLE
|
||||
%----------------------------------------------------------------------------------------
|
||||
|
||||
\title{\textbf{Dear NAME,}} % Subtitle
|
||||
|
||||
\author{DATE} % Author
|
||||
|
||||
\date{} % Date
|
||||
|
||||
%----------------------------------------------------------------------------------------
|
||||
|
||||
\begin{document}
|
||||
|
||||
\maketitle % Print the title section
|
||||
|
||||
%----------------------------------------------------------------------------------------
|
||||
% ABSTRACT AND KEYWORDS
|
||||
%----------------------------------------------------------------------------------------
|
||||
|
||||
%\renewcommand{\abstractname}{Summary} % Uncomment to change the name of the abstract to something else
|
||||
|
||||
\pagenumbering{gobble}
|
||||
\vspace{0pt} % Some vertical space between the abstract and first section
|
||||
|
||||
\noindent Begin document...
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
\end{document}
|
||||
169
templates/MacPhilArticle.tex
Normal file
169
templates/MacPhilArticle.tex
Normal file
@ -0,0 +1,169 @@
|
||||
%%%%%%%%%%%%%%%%%%%%%%%% PREAMBLE %%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
%%% FORMATTING %%%
|
||||
\documentclass[11pt]{article} %%Font size and document presets
|
||||
\usepackage[top=1in, bottom=1in, left=1.25in, right=1.25in]{geometry} %%Margins
|
||||
\usepackage[protrusion=true,expansion=true]{microtype} %% Makes subtle line spacing shifts
|
||||
\usepackage{enumitem} %%Enables control over enumerate and itemize environments
|
||||
\setenumerate{label=(\arabic*), wide=\parindent} %%Changes enumeration style: use \begin{enumerate}
|
||||
\usepackage{setspace} %%Enables \doublespacing command for double linespacing
|
||||
\expandafter\def\expandafter\quote\expandafter{\quote\onehalfspacing} %%Makes 1.5 quote spacing
|
||||
%\usepackage{mdwlist} %% Compressed lists, use star: \begin{enumerate*} \end{'' *}
|
||||
%\usepackage{indentfirst} %%Indents first line of first paragraph of each section
|
||||
%\raggedbottom %% Lose the constraint on equalising page content
|
||||
%\frenchspacing %%Makes the sentence spacing single spaced
|
||||
%\usepackage{multicol} %% Use \begin{multicols}{3} for three columns and \end{multicols} after
|
||||
|
||||
|
||||
%%% HEADER %%%
|
||||
\usepackage{fancyhdr} %%Permits \pagestyle{fancy}
|
||||
\pagestyle{fancy} %%Header style
|
||||
\usepackage{titlesec} %%Header style
|
||||
\titlespacing*{\subsection}{\parindent}{.25in}{\wordsep}% Reduces spacing after headings
|
||||
\rhead{Benjamin Brast-McKie} %%Right header
|
||||
\renewcommand{\sectionmark}[1]{\markright{$\S$\thesection\ #1}} %%Left header command
|
||||
\lhead{\nouppercase{$\S$\rightmark}} %%Left header
|
||||
|
||||
|
||||
%%% SECTIONS %%%
|
||||
\usepackage{hyperref}
|
||||
%\renewcommand\thesubsubsection{P\arabic{subsubsection}}
|
||||
\usepackage{tocloft}%change alignment of subsubsection in toc
|
||||
\cftsetindents{subsubsection}{0.228in}{0.346in} %change alignment of subsubsection in toc
|
||||
\newcommand{\hypsection}[1]{\section[#1]{\hyperlink{toc}{#1}}} %%use to jump back to toc
|
||||
\newcommand{\hypsubsection}[1]{\subsection[#1]{\hyperlink{toc}{#1}}} %%use to jump back to toc
|
||||
\newcommand{\hypsubsubsection}[1]{\subsubsection[#1]{\hyperlink{toc}{#1}}} %%use to jump back to toc
|
||||
|
||||
|
||||
%%% FOOTNOTES %%%
|
||||
\usepackage{scrextend} %%Allows for changes to foodnotes
|
||||
\deffootnote[1em]{0in}{1em}{\textsuperscript{\thefootnotemark \ }} %%Footnote style
|
||||
\setlength{\footnotesep}{0.125in} %%Space between footnotes
|
||||
|
||||
|
||||
%%% SYMBOLS %%%
|
||||
\usepackage{amssymb, amsmath, mathrsfs} %%Math packages
|
||||
\usepackage{stmaryrd} %%Use \llbracket and \rrbracket for double brackets
|
||||
%\usepackage{cancel} %%\cancel strikes out text diagonally
|
||||
%\usepackage{fitch}
|
||||
%\usepackage{turnstile}
|
||||
%\usepackage{linguex}
|
||||
%\usepackage{schemata}
|
||||
|
||||
|
||||
%%% GRAPHICS %%%
|
||||
%\usepackage{graphicx}
|
||||
%\DeclareGraphicsExtensions{.pdf,.jpeg,.jpg}
|
||||
%\usepackage{fancybox}
|
||||
%\begin{figure}[ht]
|
||||
%\shadowbox{\includegraphics{figure-file}}}
|
||||
%\end{figure}
|
||||
|
||||
|
||||
%%% CITATIONS %%%
|
||||
%\usepackage{bibentry} %%Replace \bibliography{} with \nobibliography{} for no bib
|
||||
%\usepackage{epigraph} %%Use \epigraph{text}{citation}
|
||||
\usepackage[round]{natbib} %%Or change 'round' to 'square' for square backers
|
||||
\setcitestyle{aysep={}}
|
||||
% \citet{key} ==>> Jones et al. (1990)
|
||||
% \citet*{key} ==>> Jones, Baker, and Smith (1990)
|
||||
% \citep{key} ==>> (Jones et al., 1990)
|
||||
% \citep*{key} ==>> (Jones, Baker, and Smith, 1990)
|
||||
% \citep[chap. 2]{key} ==>> (Jones et al., 1990, chap. 2)
|
||||
% \citep[e.g.][]{key} ==>> (e.g. Jones et al., 1990)
|
||||
% \citep[e.g.][p. 32]{key} ==>> (e.g. Jones et al., p. 32)
|
||||
% \citeauthor{key} ==>> Jones et al.
|
||||
% \citeauthor*{key} ==>> Jones, Baker, and Smith
|
||||
% \citeyear{key} ==>> 1990
|
||||
\usepackage{etoolbox} %%For \citepos
|
||||
\usepackage{xstring} %%For \citepos
|
||||
|
||||
\makeatletter %definition of \citepos
|
||||
%\patchcmd{\NAT@test}{\else \NAT@nm}{\else \NAT@nmfmt{\NAT@nm}}{}{} %turn on for numeric citations
|
||||
\DeclareRobustCommand\citepos % define \citepos
|
||||
{\begingroup
|
||||
\let\NAT@nmfmt\NAT@posfmt% same as for citet except with a different name format
|
||||
\NAT@swafalse\let\NAT@ctype\z@\NAT@partrue
|
||||
\@ifstar{\NAT@fulltrue\NAT@citetp}{\NAT@fullfalse\NAT@citetp}}
|
||||
|
||||
\let\NAT@orig@nmfmt\NAT@nmfmt %makes adapt to last names ending with an 's'.
|
||||
\def\NAT@posfmt#1{%
|
||||
\StrRemoveBraces{#1}[\NAT@temp]%
|
||||
\IfEndWith{\NAT@temp}{s}
|
||||
{\NAT@orig@nmfmt{#1'}}
|
||||
{\NAT@orig@nmfmt{#1's}}}
|
||||
\makeatother
|
||||
|
||||
|
||||
%%% DEFINITIONS FOR LOGICAL SYMBOLS AND QUOTES %%%
|
||||
%\newcommand{\corner}[1]{\ulcorner#1\urcorner} %%Corner quotes
|
||||
%\newcommand{\tuple}[1]{\langle#1\rangle} %%Angle brackets
|
||||
%\newcommand{\ttuple}[1]{$\langle$#1$\rangle$} %%Angle brackets
|
||||
%\newcommand{\set}[1]{\lbrace#1\rbrace} %%Set brackets
|
||||
%\newcommand{\interpret}[1]{\llbracket#1\rrbracket} %%Double brackets
|
||||
%\newcommand{\sq}[1]{`#1'} %%Proper opened-closed single quotation marks
|
||||
%\newcommand{\dq}[1]{``#1"} %%Proper opened-closed double quotation marks
|
||||
%\newcommand{\qed}[0]{$\hfill\square$} %%Box at end of proofs
|
||||
%\newcommand{\qed}[0]{$\hfill\Box$} %%Box at end of proofs
|
||||
%\newcommand{\parteq}[0]{\sqsubseteq}
|
||||
%\renewcommand{\part}[0]{\sqsubset}
|
||||
%\newcommand{\ceil}[1]{\lceil#1\rceil} %%Corner quotes
|
||||
%\newcommand{\lrceil}[1]{\llceil#1\rrceil} %%Corner quotes
|
||||
%\DeclareSymbolFont{symbolsC}{U}{txsyc}{m}{n} %%For strictif
|
||||
%\DeclareMathSymbol{\strictif}{\mathrel}{symbolsC}{74} %%For strictif
|
||||
%\newcommand{\M}[0]{\mathcal{M}}
|
||||
%\renewcommand{\L}[0]{\mathcal{L}}
|
||||
|
||||
|
||||
%%% ENVIRONMENTS %%%
|
||||
%\newenvironment{senum}[2][topsep=0in, itemsep=.05in]{\begin{enumerate}[#1,topsep=0in, itemsep=.05in]\begin{singlespace}#2}{\end{singlespace}\end{enumerate}\vspace{.175in}}
|
||||
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%% TITLE %%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
|
||||
\begin{document}
|
||||
\title{TITLE}
|
||||
\author{Benjamin Brast-McKie}
|
||||
\date{\today}
|
||||
\maketitle
|
||||
\thispagestyle{empty}
|
||||
|
||||
\begin{abstract}
|
||||
\noindent BEGIN ABSTRACT
|
||||
\end{abstract}
|
||||
|
||||
\doublespacing
|
||||
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%% NOTES %%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%% DOCUMENT %%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
|
||||
\section{Section Title}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%% BIBLIOGRAPHY %%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
|
||||
\newpage
|
||||
\begin{small} %%Makes bib small text size
|
||||
\singlespacing %%Makes single spaced
|
||||
\bibliographystyle{Analysis} %%bib style found in bst folder, in bibtex folder, in texmf folder.
|
||||
%\setlength{\bibsep}{0.5pt} %%Changes spacing between bib entries
|
||||
\bibliography{Zotero} %%bib database found in bib folder, in bibtex folder
|
||||
\thispagestyle{empty} %%Removes page numbers
|
||||
\end{small} %%End makes bib small text size
|
||||
|
||||
\end{document}
|
||||
147
templates/MultipleAnswer.tex
Normal file
147
templates/MultipleAnswer.tex
Normal file
@ -0,0 +1,147 @@
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% Short Sectioned Assignment
|
||||
% LaTeX Template
|
||||
% Version 1.0 (5/5/12)
|
||||
%
|
||||
% This template has been downloaded from:
|
||||
% http://www.LaTeXTemplates.com
|
||||
%
|
||||
% Original author:
|
||||
% Frits Wenneker (http://www.howtotex.com)
|
||||
%
|
||||
% License:
|
||||
% CC BY-NC-SA 3.0 (http://creativecommons.org/licenses/by-nc-sa/3.0/)
|
||||
%
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
%----------------------------------------------------------------------------------------
|
||||
% PACKAGES AND OTHER DOCUMENT CONFIGURATIONS
|
||||
%----------------------------------------------------------------------------------------
|
||||
|
||||
\documentclass[paper=a4, fontsize=11pt]{scrartcl} % A4 paper and 11pt font size
|
||||
|
||||
\usepackage[T1]{fontenc} % Use 8-bit encoding that has 256 glyphs
|
||||
\usepackage{fourier} % Use the Adobe Utopia font for the document - comment this line to return to the LaTeX default
|
||||
\usepackage[english]{babel} % English language/hyphenation
|
||||
\usepackage{amsmath,amsfonts,amsthm} % Math packages
|
||||
|
||||
\usepackage{lipsum} % Used for inserting dummy 'Lorem ipsum' text into the template
|
||||
|
||||
\usepackage{sectsty} % Allows customizing section commands
|
||||
\allsectionsfont{\centering \normalfont\scshape} % Make all sections centered, the default font and small caps
|
||||
|
||||
\usepackage{fancyhdr} % Custom headers and footers
|
||||
\pagestyle{fancyplain} % Makes all pages in the document conform to the custom headers and footers
|
||||
\fancyhead{} % No page header - if you want one, create it in the same way as the footers below
|
||||
\fancyfoot[L]{} % Empty left footer
|
||||
\fancyfoot[C]{} % Empty center footer
|
||||
\fancyfoot[R]{\thepage} % Page numbering for right footer
|
||||
\renewcommand{\headrulewidth}{0pt} % Remove header underlines
|
||||
\renewcommand{\footrulewidth}{0pt} % Remove footer underlines
|
||||
\setlength{\headheight}{13.6pt} % Customize the height of the header
|
||||
|
||||
\numberwithin{equation}{section} % Number equations within sections (i.e. 1.1, 1.2, 2.1, 2.2 instead of 1, 2, 3, 4)
|
||||
\numberwithin{figure}{section} % Number figures within sections (i.e. 1.1, 1.2, 2.1, 2.2 instead of 1, 2, 3, 4)
|
||||
\numberwithin{table}{section} % Number tables within sections (i.e. 1.1, 1.2, 2.1, 2.2 instead of 1, 2, 3, 4)
|
||||
|
||||
\setlength\parindent{0pt} % Removes all indentation from paragraphs - comment this line for an assignment with lots of text
|
||||
|
||||
%----------------------------------------------------------------------------------------
|
||||
% TITLE SECTION
|
||||
%----------------------------------------------------------------------------------------
|
||||
|
||||
\newcommand{\horrule}[1]{\rule{\linewidth}{#1}} % Create horizontal rule command with 1 argument of height
|
||||
|
||||
\title{
|
||||
\normalfont \normalsize
|
||||
\textsc{university, school or department name} \\ [25pt] % Your university, school and/or department name(s)
|
||||
\horrule{0.5pt} \\[0.4cm] % Thin top horizontal rule
|
||||
\huge Assignment Title \\ % The assignment title
|
||||
\horrule{2pt} \\[0.5cm] % Thick bottom horizontal rule
|
||||
}
|
||||
|
||||
\author{John Smith} % Your name
|
||||
|
||||
\date{\normalsize\today} % Today's date or a custom date
|
||||
|
||||
\begin{document}
|
||||
|
||||
\maketitle % Print the title
|
||||
|
||||
%----------------------------------------------------------------------------------------
|
||||
% PROBLEM 1
|
||||
%----------------------------------------------------------------------------------------
|
||||
|
||||
\section{Problem title}
|
||||
|
||||
\lipsum[2] % Dummy text
|
||||
|
||||
\begin{align}
|
||||
\begin{split}
|
||||
(x+y)^3 &= (x+y)^2(x+y)\\
|
||||
&=(x^2+2xy+y^2)(x+y)\\
|
||||
&=(x^3+2x^2y+xy^2) + (x^2y+2xy^2+y^3)\\
|
||||
&=x^3+3x^2y+3xy^2+y^3
|
||||
\end{split}
|
||||
\end{align}
|
||||
|
||||
Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies
|
||||
|
||||
%------------------------------------------------
|
||||
|
||||
\subsection{Heading on level 2 (subsection)}
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
|
||||
\begin{align}
|
||||
A =
|
||||
\begin{bmatrix}
|
||||
A_{11} & A_{21} \\
|
||||
A_{21} & A_{22}
|
||||
\end{bmatrix}
|
||||
\end{align}
|
||||
Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem.
|
||||
|
||||
%------------------------------------------------
|
||||
|
||||
\subsubsection{Heading on level 3 (subsubsection)}
|
||||
|
||||
\lipsum[3] % Dummy text
|
||||
|
||||
\paragraph{Heading on level 4 (paragraph)}
|
||||
|
||||
\lipsum[6] % Dummy text
|
||||
|
||||
%----------------------------------------------------------------------------------------
|
||||
% PROBLEM 2
|
||||
%----------------------------------------------------------------------------------------
|
||||
|
||||
\section{Lists}
|
||||
|
||||
%------------------------------------------------
|
||||
|
||||
\subsection{Example of list (3*itemize)}
|
||||
\begin{itemize}
|
||||
\item First item in a list
|
||||
\begin{itemize}
|
||||
\item First item in a list
|
||||
\begin{itemize}
|
||||
\item First item in a list
|
||||
\item Second item in a list
|
||||
\end{itemize}
|
||||
\item Second item in a list
|
||||
\end{itemize}
|
||||
\item Second item in a list
|
||||
\end{itemize}
|
||||
|
||||
%------------------------------------------------
|
||||
|
||||
\subsection{Example of list (enumerate)}
|
||||
\begin{enumerate}
|
||||
\item First item in a list
|
||||
\item Second item in a list
|
||||
\item Third item in a list
|
||||
\end{enumerate}
|
||||
|
||||
%----------------------------------------------------------------------------------------
|
||||
|
||||
\end{document}
|
||||
63
templates/NiceArticle.tex
Normal file
63
templates/NiceArticle.tex
Normal file
@ -0,0 +1,63 @@
|
||||
|
||||
\documentclass[a4paper, 11pt]{article} % Font size (can be 10pt, 11pt or 12pt) and paper size (remove a4paper for US letter paper)
|
||||
|
||||
\usepackage[protrusion=true,expansion=true]{microtype} % Better typography
|
||||
\usepackage{graphicx} % Required for including pictures
|
||||
\usepackage{wrapfig} % Allows in-line images
|
||||
|
||||
\usepackage{mathpazo} % Use the Palatino font
|
||||
\usepackage[T1]{fontenc} % Required for accented characters
|
||||
\linespread{1.05} % Change line spacing here, Palatino benefits from a slight increase by default
|
||||
|
||||
\makeatletter
|
||||
\renewcommand\@biblabel[1]{\textbf{#1.}} % Change the square brackets for each bibliography item from '[1]' to '1.'
|
||||
\renewcommand{\@listI}{\itemsep=0pt} % Reduce the space between items in the itemize and enumerate environments and the bibliography
|
||||
|
||||
\renewcommand{\maketitle}{ % Customize the title - do not edit title and author name here, see the TITLE block below
|
||||
\begin{flushright} % Right align
|
||||
{\LARGE\@title} % Increase the font size of the title
|
||||
|
||||
\vspace{50pt} % Some vertical space between the title and author name
|
||||
|
||||
{\large\@author} % Author name
|
||||
\\\@date % Date
|
||||
|
||||
\vspace{40pt} % Some vertical space between the author block and abstract
|
||||
\end{flushright}
|
||||
}
|
||||
|
||||
%----------------------------------------------------------------------------------------
|
||||
% TITLE
|
||||
%----------------------------------------------------------------------------------------
|
||||
|
||||
\title{\textbf{Unnecessarily Long Essay Title}\\ % Title
|
||||
Focused and Deliciously Witty Subtitle} % Subtitle
|
||||
|
||||
\author{\textsc{Ford Prefect} % Author
|
||||
\\{\textit{Interstellar University}}} % Institution
|
||||
|
||||
\date{\today} % Date
|
||||
|
||||
%----------------------------------------------------------------------------------------
|
||||
|
||||
\begin{document}
|
||||
|
||||
\maketitle % Print the title section
|
||||
|
||||
%----------------------------------------------------------------------------------------
|
||||
% ABSTRACT AND KEYWORDS
|
||||
%----------------------------------------------------------------------------------------
|
||||
|
||||
%\renewcommand{\abstractname}{Summary} % Uncomment to change the name of the abstract to something else
|
||||
|
||||
\begin{abstract}
|
||||
|
||||
\end{abstract}
|
||||
|
||||
\hspace*{3,6mm}\textit{Keywords:}% Keywords
|
||||
|
||||
\vspace{30pt} % Some vertical space between the abstract and first section
|
||||
|
||||
|
||||
|
||||
\end{document}
|
||||
168
templates/PhilBeamer.tex
Normal file
168
templates/PhilBeamer.tex
Normal file
@ -0,0 +1,168 @@
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% Beamer Presentation
|
||||
% LaTeX Template
|
||||
% Version 1.0 (10/11/12)
|
||||
%
|
||||
% This template has been downloaded from:
|
||||
% http://www.LaTeXTemplates.com
|
||||
%
|
||||
% License:
|
||||
% CC BY-NC-SA 3.0 (http://creativecommons.org/licenses/by-nc-sa/3.0/)
|
||||
%
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
%----------------------------------------------------------------------------------------
|
||||
% PACKAGES AND THEMES
|
||||
%----------------------------------------------------------------------------------------
|
||||
|
||||
\documentclass{beamer}
|
||||
|
||||
\mode<presentation> {
|
||||
|
||||
% The Beamer class comes with a number of default slide themes
|
||||
% which change the colors and layouts of slides. Below this is a list
|
||||
% of all the themes, uncomment each in turn to see what they look like.
|
||||
|
||||
%\usetheme{default}
|
||||
%\usetheme{AnnArbor}
|
||||
%\usetheme{Antibes}
|
||||
%\usetheme{Bergen}
|
||||
%\usetheme{Berkeley}
|
||||
%\usetheme{Berlin}
|
||||
%\usetheme{Boadilla}
|
||||
%\usetheme{CambridgeUS}
|
||||
%\usetheme{Copenhagen}
|
||||
%\usetheme{Darmstadt} %Nice
|
||||
%\usetheme{Dresden} %Nice
|
||||
\usetheme{Frankfurt} %Nice
|
||||
%\usetheme{Goettingen} %Sidebar
|
||||
%\usetheme{Hannover}
|
||||
%\usetheme{Ilmenau}
|
||||
%\usetheme{JuanLesPins}
|
||||
%\usetheme{Luebeck}
|
||||
%\usetheme{Madrid}
|
||||
%\usetheme{Malmoe}
|
||||
%\usetheme{Marburg}
|
||||
%\usetheme{Montpellier}
|
||||
%\usetheme{PaloAlto}
|
||||
%\usetheme{Pittsburgh}
|
||||
%\usetheme{Rochester}
|
||||
%\usetheme{Singapore}
|
||||
%\usetheme{Szeged}
|
||||
%\usetheme{Warsaw}
|
||||
|
||||
% As well as themes, the Beamer class has a number of color themes
|
||||
% for any slide theme. Uncomment each of these in turn to see how it
|
||||
% changes the colors of your current slide theme.
|
||||
|
||||
%\usecolortheme{albatross}
|
||||
%\usecolortheme{beaver}
|
||||
%\usecolortheme{beetle}
|
||||
%\usecolortheme{crane}
|
||||
%\usecolortheme{dolphin}
|
||||
%\usecolortheme{dove}
|
||||
%\usecolortheme{fly}
|
||||
%\usecolortheme{lily}
|
||||
%\usecolortheme{orchid}
|
||||
%\usecolortheme{rose}
|
||||
%\usecolortheme{seagull}
|
||||
%\usecolortheme{seahorse}
|
||||
%\usecolortheme{whale}
|
||||
%\usecolortheme{wolverine}
|
||||
|
||||
%\setbeamertemplate{footline} % To remove the footer line in all slides uncomment this line
|
||||
%\setbeamertemplate{footline}[page number] % To replace the footer line in all slides with a simple slide count uncomment this line
|
||||
|
||||
%\setbeamertemplate{navigation symbols}{} % To remove the navigation symbols from the bottom of all slides uncomment this line
|
||||
}
|
||||
|
||||
%%% SYMBOLS AND STYLES %%%
|
||||
|
||||
\DeclareSymbolFont{symbolsC}{U}{txsyc}{m}{n}
|
||||
\DeclareMathSymbol{\strictif}{\mathrel}{symbolsC}{74}
|
||||
\usepackage{multicol}
|
||||
\newcommand{\tuple}[1]{\langle#1\rangle} %%Angle brackets
|
||||
\setbeamercovered{transparent}
|
||||
\usepackage{graphicx}
|
||||
|
||||
|
||||
%%% CITATIONS %%%
|
||||
\usepackage[round]{natbib} %%Or change 'round' to 'square' for square backers
|
||||
\setcitestyle{aysep={}}
|
||||
\newcommand\citeapl[2][]{\citeauthor{#2}'s#1} %%Use \citeapl is for possessive author name only.
|
||||
\newcommand\citea[2][]{\citeauthor{#2}#1} %%Use \citea is for author name only, with optional page numbers.
|
||||
\newcommand\citepl[2][]{\citeauthor{#2}'s (\citeyear[#1]{#2})}%%The command \citepl is for possessive citations.
|
||||
\usepackage{bibentry}
|
||||
|
||||
\usepackage{graphicx} % Allows including images
|
||||
\usepackage{booktabs} % Allows the use of \toprule, \midrule and \bottomrule in tables
|
||||
|
||||
%----------------------------------------------------------------------------------------
|
||||
% TITLE PAGE
|
||||
%----------------------------------------------------------------------------------------
|
||||
|
||||
\title[Short title]{Early Interpretations of the Barcan Formula} % The short title appears at the bottom of every slide, the full title is only on the title page
|
||||
|
||||
\author{Benjamin Brast-McKie} % Your name
|
||||
\institute[Oxford] % Your institution as it will appear on the bottom of every slide, may be shorthand to save space
|
||||
{
|
||||
University of Oxford \\ % Your institution for the title page
|
||||
\medskip
|
||||
\textit{benjamin.brast-mckie@philosophy.ox.ac.uk} % Your email address
|
||||
}
|
||||
\date{\today} % Date, can be changed to a custom date
|
||||
|
||||
\begin{document}
|
||||
|
||||
\begin{frame}
|
||||
\titlepage % Print the title page as the first slide
|
||||
\end{frame}
|
||||
|
||||
\begin{frame}
|
||||
\frametitle{Plan}
|
||||
|
||||
\tableofcontents[hideallsubsections]
|
||||
|
||||
\end{frame}
|
||||
|
||||
%----------------------------------------------------------------------------------------
|
||||
% PRESENTATION SLIDES
|
||||
%----------------------------------------------------------------------------------------
|
||||
|
||||
%%% NOTES %%%
|
||||
|
||||
%Recall: \pause for
|
||||
|
||||
%Recall: ITEMIZE
|
||||
|
||||
%\begin{itemize}
|
||||
%\item<1->
|
||||
%\end{itemize}
|
||||
|
||||
%\onslide<1->{ SLIDE }
|
||||
|
||||
%\begin{itemize}[<+(1)->]
|
||||
%\begin{itemize}[<+->]
|
||||
|
||||
%------------------------------------------------
|
||||
\section{FIRST}
|
||||
%------------------------------------------------
|
||||
|
||||
\subsection{FIRST SUB}
|
||||
|
||||
\begin{frame}
|
||||
\frametitle{FRAME TITLE}
|
||||
|
||||
|
||||
|
||||
\end{frame}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
%----------------------------------------------------------------------------------------
|
||||
\nobibliography{Zotero}
|
||||
\bibliographystyle{Phil_Review}
|
||||
|
||||
\end{document}
|
||||
245
templates/PhilPaper.tex
Normal file
245
templates/PhilPaper.tex
Normal file
@ -0,0 +1,245 @@
|
||||
%%%%%%%%%%%%%%%%%%%%%%%% PREAMBLE %%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
%%% FORMATTING %%%
|
||||
\documentclass[11pt]{article} %%Font size and document presets
|
||||
\usepackage[a4paper, margin=4cm]{geometry} %Annina style
|
||||
\usepackage[protrusion=true,expansion=true]{microtype} %% Makes subtle line spacing shifts
|
||||
\usepackage{enumitem} %%Enables control over enumerate and itemize environments
|
||||
\setenumerate{label=(\arabic*), wide=\parindent} %%Changes enumeration style: use \begin{enumerate}
|
||||
\usepackage{setspace} %%Enables \doublespacing command for double linespacing
|
||||
% \usepackage{multicol} %% Use \begin{multicols}{3} for three columns and \end{multicols} after
|
||||
% \usepackage{adjmulticol}
|
||||
\usepackage{verbatim} %% Enables \begin{comment} ... \end{comment}
|
||||
% \usepackage{rotating} %% Enables rotating symbols
|
||||
% \usepackage{lplfitch} %% logic package
|
||||
% \usepackage{bold-extra} %% bold+small caps
|
||||
% \usepackage{bussproofs}
|
||||
|
||||
|
||||
%%% HEADER %%%
|
||||
\usepackage{fancyhdr} %%Permits \pagestyle{fancy}
|
||||
\pagestyle{fancy} %%Header style
|
||||
\usepackage{titlesec} %%Header style
|
||||
\titlespacing*{\subsection}{\parindent}{.25in}{\wordsep}% Reduces spacing after headings
|
||||
\rhead{Benjamin Brast-McKie} %%Right header
|
||||
\renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}} %%Left header command
|
||||
\lhead{\nouppercase{$\S$\rightmark}} %%Left header
|
||||
|
||||
|
||||
%%% SECTIONS %%%
|
||||
\usepackage{hyperref}
|
||||
% \usepackage{tocloft}%change alignment of subsubsection in toc
|
||||
% \cftsetindents{subsubsection}{0.228in}{0.346in} %change alignment of subsubsection in toc
|
||||
\newcommand{\hypsection}[1]{\section[#1]{\hyperlink{toc}{#1}}} %%use to jump back to toc
|
||||
\newcommand{\hypsubsection}[1]{\subsection[#1]{\hyperlink{toc}{#1}}} %%use to jump back to toc
|
||||
\newcommand{\hypsubsubsection}[1]{\subsubsection[#1]{\hyperlink{toc}{#1}}} %%use to jump back to toc
|
||||
|
||||
|
||||
%%% FOOTNOTES %%%
|
||||
\usepackage{scrextend} %%Allows for changes to foodnotes
|
||||
\deffootnote[1em]{0in}{1em}{\textsuperscript{\thefootnotemark \ }} %%Footnote style
|
||||
\setlength{\footnotesep}{0.125in} %%Space between footnotes
|
||||
|
||||
|
||||
%%% SYMBOLS %%%
|
||||
\usepackage{amssymb,amsmath,mathrsfs,mathabx,colonequals} %%Math packages
|
||||
\usepackage{tipa}
|
||||
%%% GLOSSARY %%%
|
||||
% \usepackage[automake,%builds index
|
||||
% nogroupskip,% makes spacing of entries uniform
|
||||
% postpunc={dot},% full stop after description
|
||||
% nostyles,% don't load default style packages
|
||||
% % load glossaries-extra-stylemods.sty and glossary-tree.sty:
|
||||
% stylemods={tree}
|
||||
% ]{glossaries-extra}
|
||||
% \loadglsentries{Glossary}% sources file from local project folder
|
||||
% \newcommand{\g}{\glssymbol*}% unstar to allow hyperlinks
|
||||
% \makeglossaries
|
||||
|
||||
% \printglossary[style={index}] %Add to end
|
||||
|
||||
|
||||
%%% GRAPHICS %%%
|
||||
% \usepackage{graphicx}
|
||||
% \DeclareGraphicsExtensions{.pdf,.jpeg,.jpg}
|
||||
% \usepackage{fancybox}
|
||||
% \begin{figure}[ht]
|
||||
% \shadowbox{\includegraphics{figure-file}}}
|
||||
% \end{figure}
|
||||
|
||||
|
||||
%%% CITATIONS %%%
|
||||
% \usepackage{bibentry} %%Replace \bibliography{} with \nobibliography{} for no bib
|
||||
\usepackage[round]{natbib} %%Or change 'round' to 'square' for square backers
|
||||
\setcitestyle{aysep={}}
|
||||
% \citet{key} ==>> Jones et al. (1990)
|
||||
% \citet*{key} ==>> Jones, Baker, and Smith (1990)
|
||||
% \citep{key} ==>> (Jones et al., 1990)
|
||||
% \citep*{key} ==>> (Jones, Baker, and Smith, 1990)
|
||||
% \citep[chap. 2]{key} ==>> (Jones et al., 1990, chap. 2)
|
||||
% \citep[e.g.][]{key} ==>> (e.g. Jones et al., 1990)
|
||||
% \citep[e.g.][p. 32]{key} ==>> (e.g. Jones et al., p. 32)
|
||||
% \citeauthor{key} ==>> Jones et al.
|
||||
% \citeauthor*{key} ==>> Jones, Baker, and Smith
|
||||
% \citeyear{key} ==>> 1990
|
||||
\usepackage{etoolbox} %%For \citepos
|
||||
\usepackage{xstring} %%For \citepos
|
||||
|
||||
\makeatletter %definition of \citepos
|
||||
% \patchcmd{\NAT@test}{\else \NAT@nm}{\else \NAT@nmfmt{\NAT@nm}}{}{} %turn on for numeric citations
|
||||
\DeclareRobustCommand\citepos% define \citepos
|
||||
{\begingroup
|
||||
\let\NAT@nmfmt\NAT@posfmt% same as for citet except with a different name format
|
||||
\NAT@swafalse\let\NAT@ctype\z@\NAT@partrue
|
||||
\@ifstar{\NAT@fulltrue\NAT@citetp}{\NAT@fullfalse\NAT@citetp}
|
||||
}
|
||||
|
||||
\let\NAT@orig@nmfmt\NAT@nmfmt %makes adapt to last names ending with an 's'.
|
||||
\def\NAT@posfmt#1{%
|
||||
\StrRemoveBraces{#1}[\NAT@temp]%
|
||||
\IfEndWith{\NAT@temp}{s}
|
||||
{\NAT@orig@nmfmt{#1'}}
|
||||
{\NAT@orig@nmfmt{#1's}}}
|
||||
\makeatother
|
||||
|
||||
%%% DEFINITIONS FOR LOGICAL SYMBOLS AND QUOTES %%%
|
||||
% \newcommand{\corner}[1]{\ulcorner#1\urcorner} %%Corner quotes
|
||||
% \newcommand{\tuple}[1]{\langle#1\rangle} %%Angle brackets
|
||||
% \newcommand{\set}[1]{\lbrace#1\rbrace} %%Set brackets
|
||||
% \newcommand{\qedp}[0]{$\hfill\Diamond$} %%Box at end of proofs
|
||||
% \newcommand{\ceil}[1]{\lceil#1\rceil} %%Corner quotes
|
||||
% \newcommand{\floor}[1]{\lfloor#1\rfloor} %%Corner quotes
|
||||
|
||||
|
||||
%%% ENVIRONMENTS %%%
|
||||
\usepackage{amsthm}
|
||||
|
||||
\newtheoremstyle{theorem}
|
||||
{} % Space above
|
||||
{} % Space below
|
||||
{\normalfont} % Theorem body font % (default is "\upshape")
|
||||
{} % Indent amount
|
||||
{\bfseries} % Theorem head font % (default is \mdseries)
|
||||
{} % Punctuation after theorem head % default: no punctuation
|
||||
{.18in} % Space after theorem head
|
||||
{} % Theorem head spec
|
||||
\theoremstyle{theorem}
|
||||
\newtheorem{theorem}{}% theorem counter resets every \subsection
|
||||
\renewcommand{\thetheorem}{T\arabic{theorem}}% Remove subsection from theorem counter representation
|
||||
|
||||
|
||||
\newtheoremstyle{Lthm}
|
||||
{} % Space above
|
||||
{} % Space below
|
||||
{\normalfont} % Theorem body font % (default is "\upshape")
|
||||
{} % Indent amount
|
||||
{\bfseries} % Theorem head font % (default is \mdseries)
|
||||
{} % Punctuation after theorem head % default: no punctuation
|
||||
{.18in} % Space after theorem head
|
||||
{} % Theorem head spec
|
||||
\theoremstyle{Lthm}
|
||||
\newtheorem{Lthm}{}[subsection]% theorem counter resets every \subsection
|
||||
\renewcommand{\theLthm}{L\arabic{Lthm}}% Remove subsection from theorem counter representation
|
||||
|
||||
\newtheoremstyle{Pthm}
|
||||
{} % Space above
|
||||
{} % Space below
|
||||
{\normalfont} % Theorem body font % (default is "\upshape")
|
||||
{} % Indent amount
|
||||
{\bfseries} % Theorem head font % (default is \mdseries)
|
||||
{} % Punctuation after theorem head % default: no punctuation
|
||||
{.18in} % Space after theorem head
|
||||
{} % Theorem head spec
|
||||
\theoremstyle{Pthm}
|
||||
\newtheorem{Pthm}{}[subsection]% theorem counter resets every \subsection
|
||||
\renewcommand{\thePthm}{P\arabic{Pthm}}% Remove subsection from theorem counter representation
|
||||
|
||||
\usepackage{calc}
|
||||
\makeatletter
|
||||
\newcommand{\labelalign@original@item}{}
|
||||
\let\labelalign@original@item\item
|
||||
\newcommand*{\labelalign@envir}{labelalign}
|
||||
\newlength{\labelalign@totalleftmargin}
|
||||
\newlength{\labelalign@linewidth}
|
||||
\newcommand{\labelalign@makelabel}[1]{\llap{#1}}%
|
||||
\newcommand{\labelalign@item}[1][]{%
|
||||
\setlength{\@totalleftmargin}%
|
||||
{\labelalign@totalleftmargin+\widthof{\textbf{#1 }}+.25in-\leftmargin}%
|
||||
\setlength{\linewidth}
|
||||
{\labelalign@linewidth-\widthof{\textbf{#1 }}-.25in+\leftmargin}%
|
||||
\par\parshape \@ne \@totalleftmargin \linewidth
|
||||
\labelalign@original@item[\textbf{#1}]%
|
||||
}
|
||||
\newenvironment{labelalign}
|
||||
{\list{}{\setlength{\labelwidth}{0in}%
|
||||
\let\makelabel\labelalign@makelabel}%
|
||||
\setlength{\labelalign@totalleftmargin}{\@totalleftmargin}%
|
||||
\setlength{\labelalign@linewidth}{\linewidth}%
|
||||
\renewcommand{\item}{\ifx\@currenvir\labelalign@envir
|
||||
\expandafter\labelalign@item
|
||||
\else
|
||||
\expandafter\labelalign@original@item
|
||||
\fi}}
|
||||
{\endlist}
|
||||
\makeatother
|
||||
|
||||
%%% CROSS REFERENCES %%%
|
||||
\newcounter{acount}
|
||||
\newcommand{\aitem}[1]{%
|
||||
\item[\bf #1] \refstepcounter{acount}\label{#1}
|
||||
}
|
||||
\newcommand{\aref}[1]{\hyperref[#1]{#1}}
|
||||
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%% TITLE %%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
|
||||
\begin{document}
|
||||
\title{\sc TITLE} %\thanks{}
|
||||
\author{\it Benjamin Brast-McKie}
|
||||
\date{\today}
|
||||
\maketitle
|
||||
\thispagestyle{empty}
|
||||
% \vspace{.1in}
|
||||
|
||||
|
||||
\begin{abstract}
|
||||
\noindent
|
||||
ABSTRACT
|
||||
\end{abstract}
|
||||
|
||||
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%% DOCUMENT %%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
\hypsection{Introduction}\label{Intro}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%% GLOSSARY %%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
% \printglossary[style={index}] %Add to end
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%% BIBLIOGRAPHY %%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
|
||||
\newpage
|
||||
\begin{footnotesize} %%Makes bib footnotesize text size
|
||||
\singlespacing %%Makes single spaced
|
||||
\bibliographystyle{Phil_Review} %%bib style found in bst folder, in bibtex folder, in texmf folder.
|
||||
\setlength{\bibsep}{5pt} %%Changes spacing between bib entries
|
||||
\bibliography{Zotero} %%bib database found in bib folder, in bibtex folder
|
||||
\thispagestyle{empty} %%Removes page numbers
|
||||
\end{footnotesize} %%End makes bib small text size
|
||||
|
||||
\end{document}
|
||||
207
templates/Root.tex
Normal file
207
templates/Root.tex
Normal file
@ -0,0 +1,207 @@
|
||||
%%%%%%%%%%%%%%%%%%%%%%%% PREAMBLE %%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
%%% FORMATTING %%%
|
||||
\documentclass[11pt]{report} %%Font size and document presets
|
||||
\usepackage[top=1in, bottom=1in, left=1.25in, right=1.25in]{geometry} %%Margins
|
||||
\usepackage[protrusion=true,expansion=true]{microtype} %% Makes subtle line spacing shifts
|
||||
\usepackage{enumitem} %%Enables control over enumerate and itemize environments
|
||||
\setenumerate{label=(\arabic*), wide=\parindent} %%Changes enumeration style: use \begin{enumerate}
|
||||
\usepackage{setspace} %%Enables \doublespacing command for double linespacing
|
||||
\expandafter\def\expandafter\quote\expandafter{\quote\onehalfspacing} %%Makes 1.5 quote spacing
|
||||
%\usepackage{mdwlist} %% Compressed lists, use star: \begin{enumerate*} \end{'' *}
|
||||
%\usepackage{indentfirst} %%Indents first line of first paragraph of each section
|
||||
%\raggedbottom %% Lose the constraint on equalising page content
|
||||
%\frenchspacing %%Makes the sentence spacing single spaced
|
||||
%\usepackage{multicol} %% Use \begin{multicols}{3} for three columns and \end{multicols} after
|
||||
|
||||
|
||||
%%% MULTIPLE FILES %%%
|
||||
\usepackage{subfiles}
|
||||
\usepackage{hyperref}
|
||||
\usepackage{bibentry}
|
||||
|
||||
|
||||
%%% HYPER SECTIONS %%%
|
||||
\usepackage{bold-extra} %% bold+small caps
|
||||
\usepackage{titlesec}
|
||||
\usepackage{tocloft} %% change alignment of subsubsection in toc
|
||||
%\cftsetindents{subsubsubsection}{0.228in}{0.346in} %change alignment of subsubsection in toc
|
||||
\newcommand{\hypsection}[1]{\section[\bfseries{\scshape{#1}}]{\hyperlink{toc}{\sc \textbf{#1}}}} %%use to jump back to toc
|
||||
\newcommand{\schapter}[1]{\chapter[\bfseries{\scshape{#1}}]{\hyperlink{toc}{\LARGE#1}}} %%use to jump back to toc
|
||||
\newcommand{\hypsubsection}[1]{\subsection[#1]{\hyperlink{toc}{#1}}} %%use to jump back to toc
|
||||
\newcommand{\hypsubsubsection}[1]{\subsubsection[#1]{\hyperlink{toc}{#1}}} %%use to jump back to toc
|
||||
\newcommand{\hypasubsubsection}[1]{\subsubsection[#1]{\hyperlink{toc}{#1}}} %%use to jump back to toc
|
||||
\newcommand{\Psubsection}[2][]{\subsubsubsection[\normalfont{#2}]{\hyperlink{#1}{\normalfont{#2}}}\label{#1}} %%use to jump back to toc
|
||||
\newcommand{\Lsubsection}[2][]{\Lthm[\normalfont{#2}]{\hyperlink{#1}{\normalfont{#2}}}\label{#1}} %%use to jump back to toc
|
||||
% \renewcommand{\href}[1]{\hypertarget{#1}{\ref{#1}}} %%use to jump back to toc
|
||||
\makeatletter
|
||||
\renewcommand{\href}[1]{\Hy@raisedlink{\hypertarget{#1}{}}\ref{#1}}
|
||||
\makeatother
|
||||
|
||||
|
||||
\titleclass{\subsubsubsection}{straight}[\subsection]
|
||||
\newcounter{subsubsubsection}[subsubsection]
|
||||
\renewcommand\thesubsubsubsection{\arabic{section}.\arabic{subsubsubsection}}
|
||||
\renewcommand\theparagraph{\arabic{section}.\arabic{paragraph}} % optional; useful if paragraphs are to be numbered
|
||||
|
||||
\titleformat{\subsubsubsection}
|
||||
{\normalfont\normalsize\bfseries}{\thesubsubsubsection}{1em}{}
|
||||
|
||||
\titlespacing*{\subsubsubsection}
|
||||
{0pt}{3.25ex plus 1ex minus .2ex}{1.5ex plus .2ex}
|
||||
|
||||
\titleformat{\paragraph}
|
||||
{\normalfont\normalsize\bfseries}{\theparagraph}{1em}{}
|
||||
|
||||
\titlespacing*{\paragraph}
|
||||
{0pt}{3.25ex plus 1ex minus .2ex}{1.5ex plus .2ex}
|
||||
|
||||
\makeatletter
|
||||
\renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}%
|
||||
{-2.5ex\@plus -1ex \@minus -.25ex}%
|
||||
{1.25ex \@plus .25ex}%
|
||||
{\normalfont\normalsize\bfseries}}
|
||||
\def\toclevel@subsubsubsection{2}
|
||||
\def\toclevel@paragraph{4}
|
||||
\def\l@subsubsubsection{\@dottedtocline{2}{1.5em}{2.3em}}
|
||||
\def\l@paragraph{\@dottedtocline{4}{10em}{5em}}
|
||||
\makeatother
|
||||
|
||||
\setcounter{secnumdepth}{2}
|
||||
\setcounter{secnumdepth}{4}
|
||||
\setcounter{tocdepth}{1}
|
||||
%\renewcommand\thesection{\sc\LARGE Chapter \arabic{section}:}
|
||||
%\renewcommand\thesubsection{\arabic{section}.\arabic{subsection}}
|
||||
\renewcommand\thesubsubsubsection{P\arabic{subsubsubsection}}
|
||||
\renewcommand\theparagraph{L\arabic{paragraph}}
|
||||
|
||||
|
||||
|
||||
%%% HEADER %%%
|
||||
\usepackage{fancyhdr} %%Permits \pagestyle{fancy}
|
||||
\pagestyle{fancy} %%Header style
|
||||
\usepackage{titlesec} %%Header style
|
||||
\titlespacing*{\subsection}{\parindent}{.25in}{\wordsep}% Reduces spacing after headings
|
||||
\rhead{Benjamin Brast-McKie} %%Right header
|
||||
\renewcommand{\sectionmark}[1]{\markright{$\S$\thesection\ #1}} %%Left header command
|
||||
\renewcommand{\chaptermark}[1]{\markright{#1}{}}
|
||||
\lhead{\nouppercase{\rightmark}} %%Left header
|
||||
|
||||
|
||||
%%% FOOTNOTES %%%
|
||||
\usepackage{scrextend} %%Allows for changes to foodnotes
|
||||
\deffootnote[1em]{0in}{1em}{\textsuperscript{\thefootnotemark \ }} %%Footnote style
|
||||
\setlength{\footnotesep}{0.125in} %%Space between footnotes
|
||||
|
||||
%%% SYMBOLS %%%
|
||||
\usepackage{amssymb, amsmath, mathrsfs} %%Math packages
|
||||
\usepackage{stmaryrd} %%Use \llbracket and \rrbracket for double brackets
|
||||
%\usepackage{cancel} %%\cancel strikes out text diagonally
|
||||
%\usepackage{fitch}
|
||||
%\usepackage{turnstile}
|
||||
%\usepackage{linguex}
|
||||
%\usepackage{schemata}
|
||||
|
||||
%%% GRAPHICS %%%
|
||||
%\usepackage{graphicx}
|
||||
%\DeclareGraphicsExtensions{.pdf,.jpeg,.jpg}
|
||||
%\usepackage{fancybox}
|
||||
%\begin{figure}[ht]
|
||||
%\shadowbox{\includegraphics{figure-file}}}
|
||||
%\end{figure}
|
||||
|
||||
%%% CITATIONS %%%
|
||||
%\usepackage{bibentry} %%Replace \bibliography{} with \nobibliography{} for no bib
|
||||
%\usepackage{epigraph} %%Use \epigraph{text}{citation}
|
||||
\usepackage[round]{natbib} %%Or change 'round' to 'square' for square backers
|
||||
\setcitestyle{aysep={}}
|
||||
\newcommand\citepl[2][]{\citeauthor{#2}'s (\citeyear[#1]{#2})} %%Use \citepl for possessive citation.
|
||||
\newcommand\citea[2][]{\citeauthor{#2}#1} %%Use \citea is for author name only, with optional page numbers.
|
||||
\newcommand\citeapl[2][]{\citeauthor{#2}'s#1} %%Use \citeapl is for possessive author name only.
|
||||
% \citet{key} ==>> Jones et al. (1990)
|
||||
% \citet*{key} ==>> Jones, Baker, and Smith (1990)
|
||||
% \citep{key} ==>> (Jones et al., 1990)
|
||||
% \citep*{key} ==>> (Jones, Baker, and Smith, 1990)
|
||||
% \citep[chap. 2]{key} ==>> (Jones et al., 1990, chap. 2)
|
||||
% \citep[e.g.][]{key} ==>> (e.g. Jones et al., 1990)
|
||||
% \citep[e.g.][p. 32]{key} ==>> (e.g. Jones et al., p. 32)
|
||||
% \citeauthor{key} ==>> Jones et al.
|
||||
% \citeauthor*{key} ==>> Jones, Baker, and Smith
|
||||
% \citeyear{key} ==>> 1990
|
||||
|
||||
|
||||
%%% DEFINITIONS FOR LOGICAL SYMBOLS AND QUOTES %%%
|
||||
%\newcommand{\corner}[1]{\ulcorner#1\urcorner} %%Corner quotes
|
||||
%\newcommand{\tuple}[1]{\langle#1\rangle} %%Angle brackets
|
||||
%\newcommand{\ttuple}[1]{$\langle$#1$\rangle$} %%Angle brackets
|
||||
%\newcommand{\set}[1]{\lbrace#1\rbrace} %%Set brackets
|
||||
%\newcommand{\interpret}[1]{\llbracket#1\rrbracket} %%Double brackets
|
||||
%\newcommand{\sq}[1]{`#1'} %%Proper opened-closed single quotation marks
|
||||
%\newcommand{\dq}[1]{``#1"} %%Proper opened-closed double quotation marks
|
||||
%\newcommand{\qed}[0]{$\hfill\square$} %%Box at end of proofs
|
||||
|
||||
|
||||
%%% ENVIRONMENTS %%%
|
||||
%\newenvironment{senum}[2][topsep=0in, itemsep=.05in]{\begin{enumerate}[#1,topsep=0in, itemsep=.05in]\begin{singlespace}#2}{\end{singlespace}\end{enumerate}\vspace{.175in}}
|
||||
|
||||
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%% TITLE %%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
|
||||
\begin{document}
|
||||
\title{TITLE}
|
||||
\author{Benjamin Brast-McKie}
|
||||
\date{\today}
|
||||
\maketitle
|
||||
\thispagestyle{empty}
|
||||
|
||||
\begin{abstract}
|
||||
\noindent BEGIN ABSTRACT
|
||||
\end{abstract}
|
||||
|
||||
\setlength\cftaftertoctitleskip{10pt}
|
||||
\addtocontents{toc}{\protect\hypertarget{toc}{}}
|
||||
\renewcommand{\contentsname}{\LARGE\sc Table of Contents}
|
||||
|
||||
\strut\vspace{-50pt}
|
||||
\tableofcontents
|
||||
\thispagestyle{empty}
|
||||
|
||||
\pagebreak
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%% DOCUMENT %%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
\doublespacing
|
||||
|
||||
% \section*{Introduction} % Turn on to included introduction in TOC
|
||||
% \addcontentsline{toc}{chapter}{\protect\numberline{}Introduction}%
|
||||
|
||||
\subfile{Chapters/Ch1/Ch1}
|
||||
|
||||
\subfile{Chapters/Ch2/Ch2}
|
||||
|
||||
% \section*{Conclusion}
|
||||
% \addcontentsline{toc}{chapter}{\protect\numberline{}Conclusion}%
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%% BIBLIOGRAPHY %%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
|
||||
\newpage
|
||||
\begin{small} %%Makes bib small text size
|
||||
\singlespacing %%Makes single spaced
|
||||
\bibliographystyle{Phil_Review} %%bib style found in bst folder, in bibtex folder, in texmf folder.
|
||||
%\setlength{\bibsep}{0.5pt} %%Changes spacing between bib entries
|
||||
\bibliography{Zotero} %%bib database found in bib folder, in bibtex folder
|
||||
\thispagestyle{empty} %%Removes page numbers
|
||||
\end{small} %%End makes bib small text size
|
||||
|
||||
\end{document}
|
||||
43
templates/SubFile.tex
Normal file
43
templates/SubFile.tex
Normal file
@ -0,0 +1,43 @@
|
||||
%NOTE: to be used with \usepackage{subfiles} in the main file.
|
||||
%Subfiles go in folders which live with the main file.
|
||||
%Bibliography and preamble go in the main file.
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%% PREAMBLE %%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
\documentclass[../../Root.tex]{subfiles} %Each instance of `../' elevates one folder to find the main file
|
||||
|
||||
\begin{document}
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%% DOCUMENT %%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
% \tableofcontents % Can be useful to load a TOC while writing
|
||||
|
||||
\doublespacing
|
||||
|
||||
\schapter{TITLE}
|
||||
|
||||
\hypsection{TITLE}
|
||||
|
||||
\hypsubsection{TITLE}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
\bibliographystyle{Phil_Review} %%bib style found in bst folder, in bibtex folder, in texmf folder.
|
||||
\nobibliography{Zotero} %%bib database found in bib folder, in bibtex folder
|
||||
|
||||
\end{document}
|
||||
41
templates/Subfiles/Chapters/Ch1/Ch1.tex
Normal file
41
templates/Subfiles/Chapters/Ch1/Ch1.tex
Normal file
@ -0,0 +1,41 @@
|
||||
%NOTE: to be used with \usepackage{subfiles} in the main file.
|
||||
%Subfiles go in folders which live with the main file.
|
||||
%Bibliography and preamble go in the main file.
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%% PREAMBLE %%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
\documentclass[../../Root.tex]{subfiles} %Each instance of `../' elevates one folder to find the main file
|
||||
|
||||
\begin{document}
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%% DOCUMENT %%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
\tableofcontents
|
||||
|
||||
\doublespacing
|
||||
|
||||
\section{TITLE}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
\bibliographystyle{Phil_Review} %%bib style found in bst folder, in bibtex folder, in texmf folder.
|
||||
\nobibliography{Zotero} %%bib database found in bib folder, in bibtex folder
|
||||
|
||||
\end{document}
|
||||
43
templates/Subfiles/Chapters/Ch2/Ch2.tex
Normal file
43
templates/Subfiles/Chapters/Ch2/Ch2.tex
Normal file
@ -0,0 +1,43 @@
|
||||
%NOTE: to be used with \usepackage{subfiles} in the main file.
|
||||
%Subfiles go in folders which live with the main file.
|
||||
%Bibliography and preamble go in the main file.
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%% PREAMBLE %%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
\documentclass[../../Root.tex]{subfiles} %Each instance of `../' elevates one folder to find the main file
|
||||
|
||||
\begin{document}
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%% DOCUMENT %%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
\tableofcontents
|
||||
|
||||
\doublespacing
|
||||
|
||||
\schapter{TITLE}
|
||||
|
||||
\section{TITLE}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
\bibliographystyle{Phil_Review} %%bib style found in bst folder, in bibtex folder, in texmf folder.
|
||||
\nobibliography{Zotero} %%bib database found in bib folder, in bibtex folder
|
||||
|
||||
\end{document}
|
||||
155
templates/Subfiles/Root.tex
Normal file
155
templates/Subfiles/Root.tex
Normal file
@ -0,0 +1,155 @@
|
||||
%%%%%%%%%%%%%%%%%%%%%%%% PREAMBLE %%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
%%% FORMATTING %%%
|
||||
\documentclass[11pt]{report} %%Font size and document presets
|
||||
\usepackage[top=1in, bottom=1in, left=1.25in, right=1.25in]{geometry} %%Margins
|
||||
\usepackage[protrusion=true,expansion=true]{microtype} %% Makes subtle line spacing shifts
|
||||
\usepackage{enumitem} %%Enables control over enumerate and itemize environments
|
||||
\setenumerate{label=(\arabic*), wide=\parindent} %%Changes enumeration style: use \begin{enumerate}
|
||||
\usepackage{setspace} %%Enables \doublespacing command for double linespacing
|
||||
\expandafter\def\expandafter\quote\expandafter{\quote\onehalfspacing} %%Makes 1.5 quote spacing
|
||||
%\usepackage{mdwlist} %% Compressed lists, use star: \begin{enumerate*} \end{'' *}
|
||||
%\usepackage{indentfirst} %%Indents first line of first paragraph of each section
|
||||
%\raggedbottom %% Lose the constraint on equalising page content
|
||||
%\frenchspacing %%Makes the sentence spacing single spaced
|
||||
%\usepackage{multicol} %% Use \begin{multicols}{3} for three columns and \end{multicols} after
|
||||
|
||||
|
||||
%%% MULTIPLE FILES %%%
|
||||
\usepackage{subfiles}
|
||||
\usepackage{hyperref}
|
||||
\usepackage{bibentry}
|
||||
|
||||
|
||||
%%% HYPER SECTIONS %%%
|
||||
\usepackage{bold-extra} %% bold+small caps
|
||||
\usepackage{titlesec}
|
||||
\usepackage{tocloft} %% change alignment of subsubsection in toc
|
||||
%\cftsetindents{subsubsubsection}{0.228in}{0.346in} %change alignment of subsubsection in toc
|
||||
\newcommand{\hypsection}[1]{\section[\bfseries{\scshape{#1}}]{\hyperlink{toc}{\sc \textbf{#1}}}} %%use to jump back to toc
|
||||
\newcommand{\schapter}[1]{\chapter[\bfseries{\scshape{#1}}]{\hyperlink{toc}{\LARGE#1}}} %%use to jump back to toc
|
||||
\newcommand{\hypsubsection}[1]{\subsection[#1]{\hyperlink{toc}{#1}}} %%use to jump back to toc
|
||||
\newcommand{\hypsubsubsection}[1]{\subsubsection[#1]{\hyperlink{toc}{#1}}} %%use to jump back to toc
|
||||
|
||||
|
||||
%%% HEADER %%%
|
||||
\usepackage{fancyhdr} %%Permits \pagestyle{fancy}
|
||||
\pagestyle{fancy} %%Header style
|
||||
\usepackage{titlesec} %%Header style
|
||||
\titlespacing*{\subsection}{\parindent}{.25in}{\wordsep}% Reduces spacing after headings
|
||||
\rhead{Benjamin Brast-McKie} %%Right header
|
||||
\renewcommand{\sectionmark}[1]{\markright{$\S$\thesection\ #1}} %%Left header command
|
||||
\lhead{\nouppercase{\rightmark}} %%Left header
|
||||
|
||||
%%% FOOTNOTES %%%
|
||||
\usepackage{scrextend} %%Allows for changes to foodnotes
|
||||
\deffootnote[1em]{0in}{1em}{\textsuperscript{\thefootnotemark \ }} %%Footnote style
|
||||
\setlength{\footnotesep}{0.125in} %%Space between footnotes
|
||||
|
||||
%%% SYMBOLS %%%
|
||||
\usepackage{amssymb, amsmath, mathrsfs} %%Math packages
|
||||
\usepackage{stmaryrd} %%Use \llbracket and \rrbracket for double brackets
|
||||
%\usepackage{cancel} %%\cancel strikes out text diagonally
|
||||
%\usepackage{fitch}
|
||||
%\usepackage{turnstile}
|
||||
%\usepackage{linguex}
|
||||
%\usepackage{schemata}
|
||||
|
||||
%%% GRAPHICS %%%
|
||||
%\usepackage{graphicx}
|
||||
%\DeclareGraphicsExtensions{.pdf,.jpeg,.jpg}
|
||||
%\usepackage{fancybox}
|
||||
%\begin{figure}[ht]
|
||||
%\shadowbox{\includegraphics{figure-file}}}
|
||||
%\end{figure}
|
||||
|
||||
%%% CITATIONS %%%
|
||||
%\usepackage{bibentry} %%Replace \bibliography{} with \nobibliography{} for no bib
|
||||
%\usepackage{epigraph} %%Use \epigraph{text}{citation}
|
||||
\usepackage[round]{natbib} %%Or change 'round' to 'square' for square backers
|
||||
\setcitestyle{aysep={}}
|
||||
\newcommand\citepl[2][]{\citeauthor{#2}'s (\citeyear[#1]{#2})} %%Use \citepl for possessive citation.
|
||||
\newcommand\citea[2][]{\citeauthor{#2}#1} %%Use \citea is for author name only, with optional page numbers.
|
||||
\newcommand\citeapl[2][]{\citeauthor{#2}'s#1} %%Use \citeapl is for possessive author name only.
|
||||
% \citet{key} ==>> Jones et al. (1990)
|
||||
% \citet*{key} ==>> Jones, Baker, and Smith (1990)
|
||||
% \citep{key} ==>> (Jones et al., 1990)
|
||||
% \citep*{key} ==>> (Jones, Baker, and Smith, 1990)
|
||||
% \citep[chap. 2]{key} ==>> (Jones et al., 1990, chap. 2)
|
||||
% \citep[e.g.][]{key} ==>> (e.g. Jones et al., 1990)
|
||||
% \citep[e.g.][p. 32]{key} ==>> (e.g. Jones et al., p. 32)
|
||||
% \citeauthor{key} ==>> Jones et al.
|
||||
% \citeauthor*{key} ==>> Jones, Baker, and Smith
|
||||
% \citeyear{key} ==>> 1990
|
||||
|
||||
|
||||
%%% DEFINITIONS FOR LOGICAL SYMBOLS AND QUOTES %%%
|
||||
%\newcommand{\corner}[1]{\ulcorner#1\urcorner} %%Corner quotes
|
||||
%\newcommand{\tuple}[1]{\langle#1\rangle} %%Angle brackets
|
||||
%\newcommand{\ttuple}[1]{$\langle$#1$\rangle$} %%Angle brackets
|
||||
%\newcommand{\set}[1]{\lbrace#1\rbrace} %%Set brackets
|
||||
%\newcommand{\interpret}[1]{\llbracket#1\rrbracket} %%Double brackets
|
||||
%\newcommand{\sq}[1]{`#1'} %%Proper opened-closed single quotation marks
|
||||
%\newcommand{\dq}[1]{``#1"} %%Proper opened-closed double quotation marks
|
||||
%\newcommand{\qed}[0]{$\hfill\square$} %%Box at end of proofs
|
||||
|
||||
|
||||
%%% ENVIRONMENTS %%%
|
||||
%\newenvironment{senum}[2][topsep=0in, itemsep=.05in]{\begin{enumerate}[#1,topsep=0in, itemsep=.05in]\begin{singlespace}#2}{\end{singlespace}\end{enumerate}\vspace{.175in}}
|
||||
|
||||
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%% TITLE %%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
|
||||
\begin{document}
|
||||
\title{TITLE}
|
||||
\author{Benjamin Brast-McKie}
|
||||
\date{\today}
|
||||
\maketitle
|
||||
\thispagestyle{empty}
|
||||
|
||||
\begin{abstract}
|
||||
\noindent BEGIN ABSTRACT
|
||||
\end{abstract}
|
||||
|
||||
\tableofcontents
|
||||
|
||||
\pagebreak
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%% DOCUMENT %%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
\doublespacing
|
||||
|
||||
\section*{Introduction}
|
||||
\addcontentsline{toc}{section}{\protect\numberline{}Introduction}%
|
||||
|
||||
|
||||
\subfile{Chapters/Ch1/Ch1}
|
||||
|
||||
\subfile{Chapters/Ch2/Ch2}
|
||||
|
||||
\section*{Conclusion}
|
||||
\addcontentsline{toc}{section}{\protect\numberline{}Conclusion}%
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%% BIBLIOGRAPHY %%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
|
||||
\newpage
|
||||
\begin{small} %%Makes bib small text size
|
||||
\singlespacing %%Makes single spaced
|
||||
\bibliographystyle{PhilReview} %%bib style found in bst folder, in bibtex folder, in texmf folder.
|
||||
%\setlength{\bibsep}{0.5pt} %%Changes spacing between bib entries
|
||||
\bibliography{Zotero} %%bib database found in bib folder, in bibtex folder
|
||||
\thispagestyle{empty} %%Removes page numbers
|
||||
\end{small} %%End makes bib small text size
|
||||
|
||||
\end{document}
|
||||
154
templates/Thesis.tex
Normal file
154
templates/Thesis.tex
Normal file
@ -0,0 +1,154 @@
|
||||
%%%%%%%%%%%%%%%%%%%%%%%% PREAMBLE %%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
%%% FORMATTING %%%
|
||||
\documentclass[11pt]{report} %%Font size and document presets
|
||||
\usepackage[top=1in, bottom=1in, left=1.25in, right=1.25in]{geometry} %%Margins
|
||||
\usepackage[protrusion=true,expansion=true]{microtype} %% Makes subtle line spacing shifts
|
||||
\usepackage{enumitem} %%Enables control over enumerate and itemize environments
|
||||
\setenumerate{label=(\arabic*), wide=\parindent} %%Changes enumeration style: use \begin{enumerate}
|
||||
\usepackage{setspace} %%Enables \doublespacing command for double linespacing
|
||||
\expandafter\def\expandafter\quote\expandafter{\quote\onehalfspacing} %%Makes 1.5 quote spacing
|
||||
%\usepackage{mdwlist} %% Compressed lists, use star: \begin{enumerate*} \end{'' *}
|
||||
%\usepackage{indentfirst} %%Indents first line of first paragraph of each section
|
||||
%\raggedbottom %% Lose the constraint on equalising page content
|
||||
%\frenchspacing %%Makes the sentence spacing single spaced
|
||||
%\usepackage{multicol} %% Use \begin{multicols}{3} for three columns and \end{multicols} after
|
||||
|
||||
|
||||
%%% MULTIPLE FILES %%%
|
||||
\usepackage{subfiles}
|
||||
\usepackage{hyperref}
|
||||
\usepackage{bibentry}
|
||||
|
||||
|
||||
%%% HYPER SECTIONS %%%
|
||||
\usepackage{bold-extra} %% bold+small caps
|
||||
\usepackage{titlesec}
|
||||
\usepackage{tocloft} %% change alignment of subsubsection in toc
|
||||
%\cftsetindents{subsubsubsection}{0.228in}{0.346in} %change alignment of subsubsection in toc
|
||||
\newcommand{\hypsection}[1]{\section[\bfseries{\scshape{#1}}]{\hyperlink{toc}{\sc \textbf{#1}}}} %%use to jump back to toc
|
||||
\newcommand{\hypsubsection}[1]{\subsection[#1]{\hyperlink{toc}{#1}}} %%use to jump back to toc
|
||||
\newcommand{\hypsubsubsection}[1]{\subsubsection[#1]{\hyperlink{toc}{#1}}} %%use to jump back to toc
|
||||
|
||||
|
||||
%%% HEADER %%%
|
||||
\usepackage{fancyhdr} %%Permits \pagestyle{fancy}
|
||||
\pagestyle{fancy} %%Header style
|
||||
\usepackage{titlesec} %%Header style
|
||||
\titlespacing*{\subsection}{\parindent}{.25in}{\wordsep}% Reduces spacing after headings
|
||||
\rhead{Benjamin Brast-McKie} %%Right header
|
||||
\renewcommand{\sectionmark}[1]{\markright{$\S$\thesection\ #1}} %%Left header command
|
||||
\lhead{\nouppercase{\rightmark}} %%Left header
|
||||
|
||||
%%% FOOTNOTES %%%
|
||||
\usepackage{scrextend} %%Allows for changes to foodnotes
|
||||
\deffootnote[1em]{0in}{1em}{\textsuperscript{\thefootnotemark \ }} %%Footnote style
|
||||
\setlength{\footnotesep}{0.125in} %%Space between footnotes
|
||||
|
||||
%%% SYMBOLS %%%
|
||||
\usepackage{amssymb, amsmath, mathrsfs} %%Math packages
|
||||
\usepackage{stmaryrd} %%Use \llbracket and \rrbracket for double brackets
|
||||
%\usepackage{cancel} %%\cancel strikes out text diagonally
|
||||
%\usepackage{fitch}
|
||||
%\usepackage{turnstile}
|
||||
%\usepackage{linguex}
|
||||
%\usepackage{schemata}
|
||||
|
||||
%%% GRAPHICS %%%
|
||||
%\usepackage{graphicx}
|
||||
%\DeclareGraphicsExtensions{.pdf,.jpeg,.jpg}
|
||||
%\usepackage{fancybox}
|
||||
%\begin{figure}[ht]
|
||||
%\shadowbox{\includegraphics{figure-file}}}
|
||||
%\end{figure}
|
||||
|
||||
%%% CITATIONS %%%
|
||||
%\usepackage{bibentry} %%Replace \bibliography{} with \nobibliography{} for no bib
|
||||
%\usepackage{epigraph} %%Use \epigraph{text}{citation}
|
||||
\usepackage[round]{natbib} %%Or change 'round' to 'square' for square backers
|
||||
\setcitestyle{aysep={}}
|
||||
\newcommand\citepl[2][]{\citeauthor{#2}'s (\citeyear[#1]{#2})} %%Use \citepl for possessive citation.
|
||||
\newcommand\citea[2][]{\citeauthor{#2}#1} %%Use \citea is for author name only, with optional page numbers.
|
||||
\newcommand\citeapl[2][]{\citeauthor{#2}'s#1} %%Use \citeapl is for possessive author name only.
|
||||
% \citet{key} ==>> Jones et al. (1990)
|
||||
% \citet*{key} ==>> Jones, Baker, and Smith (1990)
|
||||
% \citep{key} ==>> (Jones et al., 1990)
|
||||
% \citep*{key} ==>> (Jones, Baker, and Smith, 1990)
|
||||
% \citep[chap. 2]{key} ==>> (Jones et al., 1990, chap. 2)
|
||||
% \citep[e.g.][]{key} ==>> (e.g. Jones et al., 1990)
|
||||
% \citep[e.g.][p. 32]{key} ==>> (e.g. Jones et al., p. 32)
|
||||
% \citeauthor{key} ==>> Jones et al.
|
||||
% \citeauthor*{key} ==>> Jones, Baker, and Smith
|
||||
% \citeyear{key} ==>> 1990
|
||||
|
||||
|
||||
%%% DEFINITIONS FOR LOGICAL SYMBOLS AND QUOTES %%%
|
||||
%\newcommand{\corner}[1]{\ulcorner#1\urcorner} %%Corner quotes
|
||||
%\newcommand{\tuple}[1]{\langle#1\rangle} %%Angle brackets
|
||||
%\newcommand{\ttuple}[1]{$\langle$#1$\rangle$} %%Angle brackets
|
||||
%\newcommand{\set}[1]{\lbrace#1\rbrace} %%Set brackets
|
||||
%\newcommand{\interpret}[1]{\llbracket#1\rrbracket} %%Double brackets
|
||||
%\newcommand{\sq}[1]{`#1'} %%Proper opened-closed single quotation marks
|
||||
%\newcommand{\dq}[1]{``#1"} %%Proper opened-closed double quotation marks
|
||||
%\newcommand{\qed}[0]{$\hfill\square$} %%Box at end of proofs
|
||||
|
||||
|
||||
%%% ENVIRONMENTS %%%
|
||||
%\newenvironment{senum}[2][topsep=0in, itemsep=.05in]{\begin{enumerate}[#1,topsep=0in, itemsep=.05in]\begin{singlespace}#2}{\end{singlespace}\end{enumerate}\vspace{.175in}}
|
||||
|
||||
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%% TITLE %%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
|
||||
\begin{document}
|
||||
\title{TITLE}
|
||||
\author{Benjamin Brast-McKie}
|
||||
\date{\today}
|
||||
\maketitle
|
||||
\thispagestyle{empty}
|
||||
|
||||
\begin{abstract}
|
||||
\noindent BEGIN ABSTRACT
|
||||
\end{abstract}
|
||||
|
||||
\tableofcontents
|
||||
|
||||
\pagebreak
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%% DOCUMENT %%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
\doublespacing
|
||||
|
||||
\section*{Introduction}
|
||||
\addcontentsline{toc}{section}{\protect\numberline{}Introduction}%
|
||||
|
||||
|
||||
\subfile{Chapters/Ch1/FirstFile}
|
||||
|
||||
\subfile{Chapters/Ch2/SecondFile}
|
||||
|
||||
\section*{Conclusion}
|
||||
\addcontentsline{toc}{section}{\protect\numberline{}Conclusion}%
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%% BIBLIOGRAPHY %%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
|
||||
\newpage
|
||||
\begin{small} %%Makes bib small text size
|
||||
\singlespacing %%Makes single spaced
|
||||
\bibliographystyle{Phil_Review} %%bib style found in bst folder, in bibtex folder, in texmf folder.
|
||||
%\setlength{\bibsep}{0.5pt} %%Changes spacing between bib entries
|
||||
\bibliography{Zotero} %%bib database found in bib folder, in bibtex folder
|
||||
\thispagestyle{empty} %%Removes page numbers
|
||||
\end{small} %%End makes bib small text size
|
||||
|
||||
\end{document}
|
||||
243
templates/TikZArc.tex
Normal file
243
templates/TikZArc.tex
Normal file
@ -0,0 +1,243 @@
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
%%%%%%%%% TikZ Example %%%%%%%%%
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
\documentclass[11pt]{article}
|
||||
|
||||
%################################################
|
||||
%######## Packages ########
|
||||
%################################################
|
||||
|
||||
\usepackage{tikz} % Diagrams
|
||||
\usetikzlibrary{positioning,arrows,shadows,shapes,patterns,decorations.pathmorphing} % Some TikZ libraries
|
||||
|
||||
%>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
|
||||
%>>>>>> Setup >>>>>>
|
||||
%>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
|
||||
|
||||
\tikzset{
|
||||
modal/.style={
|
||||
>=stealth',
|
||||
shorten >=1pt,
|
||||
shorten <=1pt,
|
||||
auto,
|
||||
node distance=2cm,
|
||||
semithick
|
||||
},
|
||||
state/.style={
|
||||
circle,
|
||||
draw,
|
||||
minimum size=0.5cm,
|
||||
fill=gray!15
|
||||
},
|
||||
point/.style={
|
||||
circle,
|
||||
draw,
|
||||
inner sep=0.5mm,
|
||||
fill=black
|
||||
},
|
||||
sees/.style={
|
||||
->
|
||||
},
|
||||
seen/.style={
|
||||
<-
|
||||
},
|
||||
seens/.style={
|
||||
<->
|
||||
},
|
||||
rfl/.style={
|
||||
->,
|
||||
in=120,
|
||||
out=60,
|
||||
loop,
|
||||
looseness=5
|
||||
}}
|
||||
|
||||
\newcommand{\stack}[1]{{\def\arraystretch{0.6}\begin{array}{c} #1 \end{array}}}
|
||||
|
||||
%::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
%:::::: Front Matter ::::::
|
||||
%::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
|
||||
\begin{document}
|
||||
|
||||
\textbf{Example 1:}
|
||||
|
||||
\begin{center}
|
||||
\begin{tikzpicture}[modal, node distance=1cm]
|
||||
\node[point] (p1) [label=above:$p_1$] {};
|
||||
\node[point] (p2) [right of=p1, label=above:$\stack{p_1 \\ p_2}$] {};
|
||||
\node[point] (p3) [right of=p2, label=above:$\stack{p_1 \\ p_2 \\ p_3}$] {};
|
||||
\node[point] (r) [below of=p2, label=below:$t_\mathsf{root}$] {};
|
||||
\node (con) [right of=p3] {$\cdots$};
|
||||
\node[point] (pw) [right of=con, label=above:$\stack{p_1 \\ p_2 \\ p_3 \\ \vdots}$, label=right:``$t_\omega$''] {};
|
||||
\node (T') [below of=r] {$\mathcal{T}$};
|
||||
|
||||
\path (r) edge[sees] (p1);
|
||||
\path (r) edge[sees] (p2);
|
||||
\path (r) edge[sees] (p3);
|
||||
\path (r) edge[sees,dashed, bend right=25] (pw);
|
||||
\end{tikzpicture}
|
||||
\end{center}
|
||||
|
||||
\textbf{Example 2:}
|
||||
|
||||
\begin{center}
|
||||
\begin{tikzpicture}[modal, node distance=1.5cm]
|
||||
\node[point] (0) [label=above:$p_1$, label=below:$0$] {};
|
||||
\node[point] (1) [right of=0, label=above:$p_2$, label=below:$1$] {};
|
||||
\node[point] (2) [right of=1, label=above:$p_1$, label=below:$2$] {};
|
||||
\node[point] (3) [right of=2, label=above:$p_2$, label=below:$3$] {};
|
||||
\node (r) [right of=3] {$\cdots$};
|
||||
\node[point] (-1) [left of=0, label=above:$p_2$, label=below:$-1$] {};
|
||||
\node[point] (-2) [left of=-1, label=above:$p_1$, label=below:$-2$] {};
|
||||
\node[point] (-3) [left of=-2, label=above:$p_2$, label=below:$-3$] {};
|
||||
\node (l) [left of=-3] {$\cdots$};
|
||||
|
||||
\path (l) edge[sees] (-3);
|
||||
\path (-3) edge[sees] (-2);
|
||||
\path (-2) edge[sees] (-1);
|
||||
\path (-1) edge[sees] (0);
|
||||
\path (0) edge[sees] (1);
|
||||
\path (1) edge[sees] (2);
|
||||
\path (2) edge[sees] (3);
|
||||
\path (3) edge[sees] (r);
|
||||
\end{tikzpicture}
|
||||
\end{center}
|
||||
|
||||
\textbf{Example 3:}
|
||||
|
||||
\begin{center}
|
||||
\begin{tikzpicture}[modal, node distance=1.5cm]
|
||||
\node[point] (e) [label=above:$p_1$, label=below:$e$] {};
|
||||
\node[point] (m) [right of=e, label=below:$m$] {};
|
||||
\node[point] (o) [right of=m, label=above:$p_2$, label=below:$o$] {};
|
||||
|
||||
\path (e) edge[sees, bend left=25] (m);
|
||||
\path (m) edge[sees, bend left=25] (e);
|
||||
\path (o) edge[sees, bend left=25] (m);
|
||||
\path (m) edge[sees, bend left=25] (o);
|
||||
\path (m) edge[rfl, in=60, out=120, looseness=30] (m);
|
||||
\end{tikzpicture}
|
||||
\end{center}
|
||||
|
||||
\textbf{Example 4:}
|
||||
|
||||
\begin{center}
|
||||
\begin{tikzpicture}[modal]
|
||||
\node (r) {$t_\mathsf{root}$};
|
||||
\node (1p1) [above left=5mm of r] {$p_1$};
|
||||
\node (1p2) [above left=5mm of 1p1] {$p_2$};
|
||||
\node (1p3) [above left=5mm of 1p2] {$p_3$};
|
||||
\node (1pd) [above left=-2mm of 1p3] {\rotatebox[origin=c]{-10}{$\ddots$}};
|
||||
|
||||
\node (2p1) [above=5mm of r] {$p_1$};
|
||||
\node (2p2) [above=5mm of 2p1] {$p_1$};
|
||||
\node (2p3) [above=5mm of 2p2] {$p_2$};
|
||||
\node (2p4) [above=5mm of 2p3] {$p_3$};
|
||||
\node (2pd) [above=1mm of 2p4] {$\vdots$};
|
||||
|
||||
\node (3p1) [above right=5mm of r] {$p_1$};
|
||||
\node (3p2) [above right=5mm of 3p1] {$p_1$};
|
||||
\node (3p3) [above right=5mm of 3p2] {$p_1$};
|
||||
\node (3p4) [above right=5mm of 3p3] {$p_2$};
|
||||
\node (3p5) [above right=5mm of 3p4] {$p_3$};
|
||||
\node (3pd) [above right=-2mm of 3p5] {\rotatebox[origin=c]{80}{$\ddots$}};
|
||||
|
||||
\node (con) [below right=1mm of 3p3] {$\ddots$};
|
||||
\node (cont) [below right=1mm of con] {$\vdots$};
|
||||
|
||||
\node (wp1) [right=5mm of r] {$p_1$};
|
||||
\node (wp2) [right=5mm of wp1] {$p_1$};
|
||||
\node (wp3) [right=5mm of wp2] {$p_1$};
|
||||
\node (wp4) [right=5mm of wp3] {$p_1$};
|
||||
\node (wpd) [right=0mm of wp4] {$\dots$};
|
||||
|
||||
|
||||
\path (r) edge[sees] (1p1);
|
||||
\path (r) edge[sees] (2p1);
|
||||
\path (r) edge[sees] (3p1);
|
||||
\path (r) edge[sees] (wp1);
|
||||
|
||||
\path (1p1) edge[sees] (1p2);
|
||||
\path (1p2) edge[sees] (1p3);
|
||||
|
||||
\path (2p1) edge[sees] (2p2);
|
||||
\path (2p2) edge[sees] (2p3);
|
||||
\path (2p3) edge[sees] (2p4);
|
||||
|
||||
\path (3p1) edge[sees] (3p2);
|
||||
\path (3p2) edge[sees] (3p3);
|
||||
\path (3p3) edge[sees] (3p4);
|
||||
\path (3p4) edge[sees] (3p5);
|
||||
|
||||
\path (wp1) edge[sees] (wp2);
|
||||
\path (wp2) edge[sees] (wp3);
|
||||
\path (wp3) edge[sees] (wp4);
|
||||
\end{tikzpicture}
|
||||
\end{center}
|
||||
|
||||
\pagebreak
|
||||
\textbf{Example 5:}
|
||||
|
||||
\begin{center}
|
||||
\begin{tikzpicture}[modal]
|
||||
\node[state] (h1) {H};
|
||||
\node[state] (h2) [right of = h1] {H};
|
||||
\node[state] (h3) [right of = h2] {H};
|
||||
\node[state] (t1) [above right of = h1] {T};
|
||||
\node[state] (t2) [above right of = h2] {T};
|
||||
\node[state] (t3) [above right of = h3] {T};
|
||||
\node (e) [right of = h3] {\dots};
|
||||
|
||||
\path (h1) edge[rfl, in=150, out=210] (h1);
|
||||
\path (t1) edge[rfl] (t1);
|
||||
|
||||
\path (h1) edge[sees] (h2);
|
||||
\path (h2) edge[sees] (h3);
|
||||
\path (h3) edge[sees] (e);
|
||||
|
||||
\path (h1) edge[sees,dashed] (t1);
|
||||
\path (h2) edge[sees,dashed] (t2);
|
||||
\path (h3) edge[sees,dashed] (t3);
|
||||
\end{tikzpicture}
|
||||
\end{center}
|
||||
|
||||
\textbf{Example 6:}
|
||||
|
||||
\begin{center}
|
||||
\begin{tikzpicture}[node distance=1ex]
|
||||
\node (A->B) {$A \rightarrow B$};
|
||||
\node (A&-B) [below=of A->B] {$A \wedge \neg B$};
|
||||
\node (-A) [below left=7mm of A&-B] {$\neg A$};
|
||||
\node (A) [below=of -A] {$A$};
|
||||
\node (x-A) [below=of A] {$\times$};
|
||||
\node (B) [below right=7mm of A&-B] {$B$};
|
||||
\node (A2) at (x-A -| B) [yshift=-7mm] {$A$};
|
||||
\node (-B) [below=of A2] {$\neg B$};
|
||||
\node (x-B) [below=of -B] {$\times$};
|
||||
|
||||
\path (A&-B) edge[-] (-A);
|
||||
\path (A&-B) edge[-] (B);
|
||||
\path (B) edge[-] (A2);
|
||||
|
||||
\node (1) [left=2cm of A->B] {1.};
|
||||
\node (2) at (1 |- A&-B) {2.};
|
||||
\node (3) at (1 |- -A) {3.};
|
||||
\node (4) at (1 |- A) {4.};
|
||||
\node (5) at (1 |- A2) {5.};
|
||||
\node (6) at (1 |- -B) {6.};
|
||||
|
||||
\path (5) edge[-,dashed] (A2);
|
||||
\path (6) edge[-,dotted] (-B);
|
||||
|
||||
\node (r1) [right=2cm of A->B] {P};
|
||||
\node (r2) at (r1 |- A&-B) {P};
|
||||
\node (r3) at (r1 |- -A) {($\rightarrow$), 1};
|
||||
\node (r4) at (r1 |- A) {($\wedge$), 2};
|
||||
\node (r5) at (r1 |- A2) {($\wedge$), 2};
|
||||
\node (r6) at (r1 |- -B) {($\wedge$), 2};
|
||||
\end{tikzpicture}
|
||||
\end{center}
|
||||
|
||||
|
||||
\end{document}
|
||||
300
templates/TuftsSample.tex
Normal file
300
templates/TuftsSample.tex
Normal file
@ -0,0 +1,300 @@
|
||||
\documentclass{tufte-handout}
|
||||
|
||||
%\geometry{showframe}% for debugging purposes -- displays the margins
|
||||
|
||||
\usepackage{amsmath}
|
||||
|
||||
% Set up the images/graphics package
|
||||
\usepackage{graphicx}
|
||||
\setkeys{Gin}{width=\linewidth,totalheight=\textheight,keepaspectratio}
|
||||
\graphicspath{{graphics/}}
|
||||
|
||||
\title{An Example of the Usage of the Tufte-Handout Style\thanks{Inspired by Edward~R. Tufte!}}
|
||||
\author[The Tufte-LaTeX Developers]{The Tufte-\LaTeX\ Developers}
|
||||
\date{24 January 2009} % if the \date{} command is left out, the current date will be used
|
||||
|
||||
% The following package makes prettier tables. We're all about the bling!
|
||||
\usepackage{booktabs}
|
||||
|
||||
% The units package provides nice, non-stacked fractions and better spacing
|
||||
% for units.
|
||||
\usepackage{units}
|
||||
|
||||
% The fancyvrb package lets us customize the formatting of verbatim
|
||||
% environments. We use a slightly smaller font.
|
||||
\usepackage{fancyvrb}
|
||||
\fvset{fontsize=\normalsize}
|
||||
|
||||
% Small sections of multiple columns
|
||||
\usepackage{multicol}
|
||||
|
||||
% Provides paragraphs of dummy text
|
||||
\usepackage{lipsum}
|
||||
|
||||
% These commands are used to pretty-print LaTeX commands
|
||||
\newcommand{\doccmd}[1]{\texttt{\textbackslash#1}}% command name -- adds backslash automatically
|
||||
\newcommand{\docopt}[1]{\ensuremath{\langle}\textrm{\textit{#1}}\ensuremath{\rangle}}% optional command argument
|
||||
\newcommand{\docarg}[1]{\textrm{\textit{#1}}}% (required) command argument
|
||||
\newenvironment{docspec}{\begin{quote}\noindent}{\end{quote}}% command specification environment
|
||||
\newcommand{\docenv}[1]{\textsf{#1}}% environment name
|
||||
\newcommand{\docpkg}[1]{\texttt{#1}}% package name
|
||||
\newcommand{\doccls}[1]{\texttt{#1}}% document class name
|
||||
\newcommand{\docclsopt}[1]{\texttt{#1}}% document class option name
|
||||
|
||||
\begin{document}
|
||||
|
||||
\maketitle% this prints the handout title, author, and date
|
||||
|
||||
\begin{abstract}
|
||||
\noindent This document describes the Tufte handout \LaTeX\ document style.
|
||||
It also provides examples and comments on the style's use. Only a brief
|
||||
overview is presented here; for a complete reference, see the sample book.
|
||||
\end{abstract}
|
||||
|
||||
%\printclassoptions
|
||||
|
||||
The Tufte-\LaTeX\ document classes define a style similar to the
|
||||
style Edward Tufte uses in his books and handouts. Tufte's style is known
|
||||
for its extensive use of sidenotes, tight integration of graphics with
|
||||
text, and well-set typography. This document aims to be at once a
|
||||
demonstration of the features of the Tufte-\LaTeX\ document classes
|
||||
and a style guide to their use.
|
||||
|
||||
\section{Page Layout}\label{sec:page-layout}
|
||||
\subsection{Headings}\label{sec:headings}
|
||||
This style provides \textsc{a}- and \textsc{b}-heads (that is,
|
||||
\Verb|\section| and \Verb|\subsection|), demonstrated above.
|
||||
|
||||
The Tufte-\LaTeX\ classes will emit an error if you try to use
|
||||
\linebreak\Verb|\subsubsection| and smaller headings.
|
||||
|
||||
% let's start a new thought -- a new section
|
||||
\newthought{In his later books},\cite{Tufte2006} Tufte
|
||||
starts each section with a bit of vertical space, a non-indented paragraph,
|
||||
and sets the first few words of the sentence in \textsc{small caps}. To
|
||||
accomplish this using this style, use the \Verb|\newthought| command:
|
||||
\begin{docspec}
|
||||
\doccmd{newthought\{In his later books\}, Tufte starts\ldots}
|
||||
\end{docspec}
|
||||
|
||||
\subsection{Sidenotes}\label{sec:sidenotes}
|
||||
One of the most prominent and distinctive features of this style is the
|
||||
extensive use of sidenotes. There is a wide margin to provide ample room
|
||||
for sidenotes and small figures. Any \Verb|\footnote|s will automatically
|
||||
be converted to sidenotes.\footnote{This is a sidenote that was entered
|
||||
using the \texttt{\textbackslash footnote} command.} If you'd like to place ancillary
|
||||
information in the margin without the sidenote mark (the superscript
|
||||
number), you can use the \Verb|\marginnote| command.\marginnote{This is a
|
||||
margin note. Notice that there isn't a number preceding the note, and
|
||||
there is no number in the main text where this note was written.}
|
||||
|
||||
The specification of the \Verb|\sidenote| command is:
|
||||
\begin{docspec}
|
||||
\doccmd{sidenote[\docopt{number}][\docopt{offset}]\{\docarg{Sidenote text.}\}}
|
||||
\end{docspec}
|
||||
|
||||
Both the \docopt{number} and \docopt{offset} arguments are optional. If you
|
||||
provide a \docopt{number} argument, then that number will be used as the
|
||||
sidenote number. It will change of the number of the current sidenote only and
|
||||
will not affect the numbering sequence of subsequent sidenotes.
|
||||
|
||||
Sometimes a sidenote may run over the top of other text or graphics in the
|
||||
margin space. If this happens, you can adjust the vertical position of the
|
||||
sidenote by providing a dimension in the \docopt{offset} argument. Some
|
||||
examples of valid dimensions are:
|
||||
\begin{docspec}
|
||||
\ttfamily 1.0in \qquad 2.54cm \qquad 254mm \qquad 6\Verb|\baselineskip|
|
||||
\end{docspec}
|
||||
If the dimension is positive it will push the sidenote down the page; if the
|
||||
dimension is negative, it will move the sidenote up the page.
|
||||
|
||||
While both the \docopt{number} and \docopt{offset} arguments are optional, they
|
||||
must be provided in order. To adjust the vertical position of the sidenote
|
||||
while leaving the sidenote number alone, use the following syntax:
|
||||
\begin{docspec}
|
||||
\doccmd{sidenote[][\docopt{offset}]\{\docarg{Sidenote text.}\}}
|
||||
\end{docspec}
|
||||
The empty brackets tell the \Verb|\sidenote| command to use the default
|
||||
sidenote number.
|
||||
|
||||
If you \emph{only} want to change the sidenote number, however, you may
|
||||
completely omit the \docopt{offset} argument:
|
||||
\begin{docspec}
|
||||
\doccmd{sidenote[\docopt{number}]\{\docarg{Sidenote text.}\}}
|
||||
\end{docspec}
|
||||
|
||||
The \Verb|\marginnote| command has a similar \docarg{offset} argument:
|
||||
\begin{docspec}
|
||||
\doccmd{marginnote[\docopt{offset}]\{\docarg{Margin note text.}\}}
|
||||
\end{docspec}
|
||||
|
||||
\subsection{References}
|
||||
References are placed alongside their citations as sidenotes,
|
||||
as well. This can be accomplished using the normal \Verb|\cite|
|
||||
command.\sidenote{The first paragraph of this document includes a citation.}
|
||||
|
||||
The complete list of references may also be printed automatically by using
|
||||
the \Verb|\bibliography| command. (See the end of this document for an
|
||||
example.) If you do not want to print a bibliography at the end of your
|
||||
document, use the \Verb|\nobibliography| command in its place.
|
||||
|
||||
To enter multiple citations at one location,\cite{Tufte2006,Tufte1990} you can
|
||||
provide a list of keys separated by commas and the same optional vertical
|
||||
offset argument: \Verb|\cite{Tufte2006,Tufte1990}|.
|
||||
\begin{docspec}
|
||||
\doccmd{cite[\docopt{offset}]\{\docarg{bibkey1,bibkey2,\ldots}\}}
|
||||
\end{docspec}
|
||||
|
||||
\section{Figures and Tables}\label{sec:figures-and-tables}
|
||||
Images and graphics play an integral role in Tufte's work.
|
||||
In addition to the standard \docenv{figure} and \docenv{tabular} environments,
|
||||
this style provides special figure and table environments for full-width
|
||||
floats.
|
||||
|
||||
Full page--width figures and tables may be placed in \docenv{figure*} or
|
||||
\docenv{table*} environments. To place figures or tables in the margin,
|
||||
use the \docenv{marginfigure} or \docenv{margintable} environments as follows
|
||||
(see figure~\ref{fig:marginfig}):
|
||||
|
||||
\begin{marginfigure}%
|
||||
%\includegraphics[width=\linewidth]{helix}
|
||||
\caption{This is a margin figure. The helix is defined by
|
||||
$x = \cos(2\pi z)$, $y = \sin(2\pi z)$, and $z = [0, 2.7]$. The figure was
|
||||
drawn using Asymptote (\url{http://asymptote.sf.net/}).}
|
||||
\label{fig:marginfig}
|
||||
\end{marginfigure}
|
||||
\begin{Verbatim}
|
||||
\begin{marginfigure}
|
||||
\includegraphics{helix}
|
||||
\caption{This is a margin figure.}
|
||||
\end{marginfigure}
|
||||
\end{Verbatim}
|
||||
|
||||
The \docenv{marginfigure} and \docenv{margintable} environments accept an optional parameter \docopt{offset} that adjusts the vertical position of the figure or table. See the ``\nameref{sec:sidenotes}'' section above for examples. The specifications are:
|
||||
\begin{docspec}
|
||||
\doccmd{begin\{marginfigure\}[\docopt{offset}]}\\
|
||||
\qquad\ldots\\
|
||||
\doccmd{end\{marginfigure\}}\\
|
||||
\mbox{}\\
|
||||
\doccmd{begin\{margintable\}[\docopt{offset}]}\\
|
||||
\qquad\ldots\\
|
||||
\doccmd{end\{margintable\}}\\
|
||||
\end{docspec}
|
||||
|
||||
Figure~\ref{fig:fullfig} is an example of the \Verb|figure*|
|
||||
environment and figure~\ref{fig:textfig} is an example of the normal
|
||||
\Verb|figure| environment.
|
||||
|
||||
\begin{figure*}[h]
|
||||
% \includegraphics[width=\linewidth]{sine.pdf}%
|
||||
\caption{This graph shows $y = \sin x$ from about $x = [-10, 10]$.
|
||||
\emph{Notice that this figure takes up the full page width.}}%
|
||||
\label{fig:fullfig}%
|
||||
\end{figure*}
|
||||
|
||||
\begin{figure}
|
||||
% \includegraphics{hilbertcurves.pdf}
|
||||
% \checkparity This is an \pageparity\ page.%
|
||||
\caption{Hilbert curves of various degrees $n$.
|
||||
\emph{Notice that this figure only takes up the main textblock width.}}
|
||||
\label{fig:textfig}
|
||||
%\zsavepos{pos:textfig}
|
||||
\setfloatalignment{b}
|
||||
\end{figure}
|
||||
|
||||
Table~\ref{tab:normaltab} shows table created with the \docpkg{booktabs}
|
||||
package. Notice the lack of vertical rules---they serve only to clutter
|
||||
the table's data.
|
||||
|
||||
\begin{table}[ht]
|
||||
\centering
|
||||
\fontfamily{ppl}\selectfont
|
||||
\begin{tabular}{ll}
|
||||
\toprule
|
||||
Margin & Length \\
|
||||
\midrule
|
||||
Paper width & \unit[8\nicefrac{1}{2}]{inches} \\
|
||||
Paper height & \unit[11]{inches} \\
|
||||
Textblock width & \unit[6\nicefrac{1}{2}]{inches} \\
|
||||
Textblock/sidenote gutter & \unit[\nicefrac{3}{8}]{inches} \\
|
||||
Sidenote width & \unit[2]{inches} \\
|
||||
\bottomrule
|
||||
\end{tabular}
|
||||
\caption{Here are the dimensions of the various margins used in the Tufte-handout class.}
|
||||
\label{tab:normaltab}
|
||||
%\zsavepos{pos:normaltab}
|
||||
\end{table}
|
||||
|
||||
\section{Full-width text blocks}
|
||||
|
||||
In addition to the new float types, there is a \docenv{fullwidth}
|
||||
environment that stretches across the main text block and the sidenotes
|
||||
area.
|
||||
|
||||
\begin{Verbatim}
|
||||
\begin{fullwidth}
|
||||
Lorem ipsum dolor sit amet...
|
||||
\end{fullwidth}
|
||||
\end{Verbatim}
|
||||
|
||||
\begin{fullwidth}
|
||||
\small\itshape\lipsum[1]
|
||||
\end{fullwidth}
|
||||
|
||||
\section{Typography}\label{sec:typography}
|
||||
|
||||
\subsection{Typefaces}\label{sec:typefaces}
|
||||
If the Palatino, \textsf{Helvetica}, and \texttt{Bera Mono} typefaces are installed, this style
|
||||
will use them automatically. Otherwise, we'll fall back on the Computer Modern
|
||||
typefaces.
|
||||
|
||||
\subsection{Letterspacing}\label{sec:letterspacing}
|
||||
This document class includes two new commands and some improvements on
|
||||
existing commands for letterspacing.
|
||||
|
||||
When setting strings of \allcaps{ALL CAPS} or \smallcaps{small caps}, the
|
||||
letter\-spacing---that is, the spacing between the letters---should be
|
||||
increased slightly.\cite{Bringhurst2005} The \Verb|\allcaps| command has proper letterspacing for
|
||||
strings of \allcaps{FULL CAPITAL LETTERS}, and the \Verb|\smallcaps| command
|
||||
has letterspacing for \smallcaps{small capital letters}. These commands
|
||||
will also automatically convert the case of the text to upper- or
|
||||
lowercase, respectively.
|
||||
|
||||
The \Verb|\textsc| command has also been redefined to include
|
||||
letterspacing. The case of the \Verb|\textsc| argument is left as is,
|
||||
however. This allows one to use both uppercase and lowercase letters:
|
||||
\textsc{The Initial Letters Of The Words In This Sentence Are Capitalized.}
|
||||
|
||||
|
||||
|
||||
\section{Installation}\label{sec:installation}
|
||||
To install the Tufte-\LaTeX\ classes, simply drop the
|
||||
following files into the same directory as your \texttt{.tex}
|
||||
file:
|
||||
\begin{quote}
|
||||
\ttfamily
|
||||
tufte-common.def\\
|
||||
tufte-handout.cls\\
|
||||
tufte-book.cls
|
||||
\end{quote}
|
||||
|
||||
% TODO add instructions for installing it globally
|
||||
|
||||
|
||||
|
||||
\section{More Documentation}\label{sec:more-doc}
|
||||
For more documentation on the Tufte-\LaTeX{} document classes (including commands not
|
||||
mentioned in this handout), please see the sample book.
|
||||
|
||||
\section{Support}\label{sec:support}
|
||||
|
||||
The website for the Tufte-\LaTeX\ packages is located at
|
||||
\url{http://code.google.com/p/tufte-latex/}. On our website, you'll find
|
||||
links to our \smallcaps{svn} repository, mailing lists, bug tracker, and documentation.
|
||||
|
||||
\bibliography{sample-handout}
|
||||
\bibliographystyle{plainnat}
|
||||
|
||||
|
||||
|
||||
\end{document}
|
||||
131
templates/WinPhilArticle.tex
Normal file
131
templates/WinPhilArticle.tex
Normal file
@ -0,0 +1,131 @@
|
||||
%%%%%%%%%%%%%%%%%%%%%%%% PREAMBLE %%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
%%% FORMATTING %%%
|
||||
\documentclass[11pt]{article} %%Font size and document presets
|
||||
\usepackage[top=1in, bottom=1in, left=1.25in, right=1.25in]{geometry} %%Margins
|
||||
\usepackage[protrusion=true,expansion=true]{microtype} %% Makes subtle line spacing shifts
|
||||
\usepackage{enumitem} %%Enables control over enumerate and itemize environments
|
||||
\setenumerate{label=(\arabic*), wide=\parindent} %%Changes enumeration style: use \begin{enumerate}
|
||||
\usepackage{setspace} %%Enables \doublespacing command for double linespacing
|
||||
\expandafter\def\expandafter\quote\expandafter{\quote\onehalfspacing} %%Makes 1.5 quote spacing
|
||||
%\usepackage{mdwlist} %% Compressed lists, use star: \begin{enumerate*} \end{'' *}
|
||||
%\usepackage{indentfirst} %%Indents first line of first paragraph of each section
|
||||
%\raggedbottom %% Lose the constraint on equalising page content
|
||||
%\frenchspacing %%Makes the sentence spacing single spaced
|
||||
%\usepackage{multicol} %% Use \begin{multicols}{3} for three columns and \end{multicols} after
|
||||
|
||||
|
||||
|
||||
%%% HEADER %%%
|
||||
\usepackage{fancyhdr} %%Permits \pagestyle{fancy}
|
||||
\pagestyle{fancy} %%Header style
|
||||
\usepackage{titlesec} %%Header style
|
||||
\titlespacing*{\subsection}{\parindent}{.25in}{\wordsep}% Reduces spacing after headings
|
||||
\rhead{Benjamin Brast-McKie} %%Right header
|
||||
\renewcommand{\sectionmark}[1]{\markright{$\S$\thesection\ #1}} %%Left header command
|
||||
\lhead{\nouppercase{\rightmark}} %%Left header
|
||||
|
||||
%%% FOOTNOTES %%%
|
||||
\usepackage{scrextend} %%Allows for changes to foodnotes
|
||||
\deffootnote[1em]{0in}{1em}{\textsuperscript{\thefootnotemark \ }} %%Footnote style
|
||||
\setlength{\footnotesep}{0.125in} %%Space between footnotes
|
||||
|
||||
%%% SYMBOLS %%%
|
||||
\usepackage{amssymb, amsmath, mathrsfs} %%Math packages
|
||||
\usepackage{stmaryrd} %%Use \llbracket and \rrbracket for double brackets
|
||||
%\usepackage{cancel} %%\cancel strikes out text diagonally
|
||||
%\usepackage{fitch}
|
||||
%\usepackage{turnstile}
|
||||
%\usepackage{linguex}
|
||||
%\usepackage{schemata}
|
||||
|
||||
%%% GRAPHICS %%%
|
||||
\usepackage{graphicx}
|
||||
%\DeclareGraphicsExtensions{.pdf,.jpeg,.jpg}
|
||||
%\usepackage{fancybox}
|
||||
%\begin{figure}[ht]
|
||||
%\shadowbox{\includegraphics{figure-file}}}
|
||||
%\end{figure}
|
||||
|
||||
%%% CITATIONS %%%
|
||||
%\usepackage{bibentry} %%Replace \bibliography{} with \nobibliography{} for no bib
|
||||
%\usepackage{epigraph} %%Use \epigraph{text}{citation}
|
||||
\usepackage[round]{natbib} %%Or change 'round' to 'square' for square backers
|
||||
\setcitestyle{aysep={}}
|
||||
\newcommand\citepl[2][]{\citeauthor{#2}'s (\citeyear[#1]{#2})} %%Use \citepl for possessive citation.
|
||||
\newcommand\citea[2][]{\citeauthor{#2}#1} %%Use \citea is for author name only, with optional page numbers.
|
||||
\newcommand\citeapl[2][]{\citeauthor{#2}'s#1} %%Use \citeapl is for possessive author name only.
|
||||
% \citet{key} ==>> Jones et al. (1990)
|
||||
% \citet*{key} ==>> Jones, Baker, and Smith (1990)
|
||||
% \citep{key} ==>> (Jones et al., 1990)
|
||||
% \citep*{key} ==>> (Jones, Baker, and Smith, 1990)
|
||||
% \citep[chap. 2]{key} ==>> (Jones et al., 1990, chap. 2)
|
||||
% \citep[e.g.][]{key} ==>> (e.g. Jones et al., 1990)
|
||||
% \citep[e.g.][p. 32]{key} ==>> (e.g. Jones et al., p. 32)
|
||||
% \citeauthor{key} ==>> Jones et al.
|
||||
% \citeauthor*{key} ==>> Jones, Baker, and Smith
|
||||
% \citeyear{key} ==>> 1990
|
||||
|
||||
|
||||
%%% DEFINITIONS FOR LOGICAL SYMBOLS AND QUOTES %%%
|
||||
%\newcommand{\corner}[1]{\ulcorner#1\urcorner} %%Corner quotes
|
||||
%\newcommand{\tuple}[1]{\langle#1\rangle} %%Angle brackets
|
||||
%\newcommand{\ttuple}[1]{$\langle$#1$\rangle$} %%Angle brackets
|
||||
%\newcommand{\set}[1]{\lbrace#1\rbrace} %%Set brackets
|
||||
%\newcommand{\interpret}[1]{\llbracket#1\rrbracket} %%Double brackets
|
||||
%\newcommand{\sq}[1]{`#1'} %%Proper opened-closed single quotation marks
|
||||
%\newcommand{\dq}[1]{``#1"} %%Proper opened-closed double quotation marks
|
||||
%\newcommand{\qed}[0]{$\hfill\square$} %%Box at end of proofs
|
||||
|
||||
|
||||
%%% ENVIRONMENTS %%%
|
||||
%\newenvironment{senum}[2][topsep=0in, itemsep=.05in]{\begin{enumerate}[#1,topsep=0in, itemsep=.05in]\begin{singlespace}#2}{\end{singlespace}\end{enumerate}\vspace{.175in}}
|
||||
|
||||
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%% TITLE %%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
|
||||
\begin{document}
|
||||
\title{TITLE}
|
||||
\author{Benjamin Brast-McKie}
|
||||
\date{\today}
|
||||
\maketitle
|
||||
\thispagestyle{empty}
|
||||
|
||||
\begin{abstract}
|
||||
\noindent BEGIN ABSTRACT
|
||||
\end{abstract}
|
||||
|
||||
\doublespacing
|
||||
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%% DOCUMENT %%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
|
||||
\section{Section Title}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%% BIBLIOGRAPHY %%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
|
||||
\newpage
|
||||
\begin{small} %%Makes bib small text size
|
||||
\singlespacing %%Makes single spaced
|
||||
\bibliographystyle{C:/texmf/bibtex/bst/Analysis} %%bib style found in bst folder, in bibtex folder, in texmf folder.
|
||||
%\setlength{\bibsep}{0.5pt} %%Changes spacing between bib entries
|
||||
\bibliography{C:/texmf/bibtex/bib/Zotero} %%bib database found in bib folder, in bibtex folder
|
||||
\thispagestyle{empty} %%Removes page numbers
|
||||
\end{small} %%End makes bib small text size
|
||||
|
||||
\end{document}
|
||||
Loading…
Reference in New Issue
Block a user