My old configuration
This commit is contained in:
parent
e40ec2d945
commit
be8d2d81f0
|
@ -1,2 +1,3 @@
|
|||
*.json
|
||||
packer_compiled.lua
|
||||
lua/config/
|
||||
|
|
|
@ -1,20 +0,0 @@
|
|||
require("nvim-surround").buffer_setup({
|
||||
surrounds = {
|
||||
["e"] = {
|
||||
add = function()
|
||||
local env = require("nvim-surround.config").get_input ("Environment: ")
|
||||
return { { "\\begin{" .. env .. "}" }, { "\\end{" .. env .. "}" } }
|
||||
end,
|
||||
},
|
||||
["b"] = {
|
||||
add = { "**", "**" },
|
||||
find = "**.-**",
|
||||
delete = "^(**)().-(**)()$",
|
||||
},
|
||||
["i"] = {
|
||||
add = { "*", "*" },
|
||||
find = "*.-*",
|
||||
delete = "^(*)().-(*)()$",
|
||||
},
|
||||
},
|
||||
})
|
|
@ -1,107 +0,0 @@
|
|||
local config = require("nvim-surround.config")
|
||||
|
||||
require("nvim-surround").buffer_setup({
|
||||
surrounds = {
|
||||
-- ["e"] = {
|
||||
-- add = function()
|
||||
-- local env = require("nvim-surround.config").get_input ("Environment: ")
|
||||
-- return { { "\\begin{" .. env .. "}" }, { "\\end{" .. env .. "}" } }
|
||||
-- end,
|
||||
-- },
|
||||
["Q"] = {
|
||||
add = { "``", "''" },
|
||||
find = "%b``.-''",
|
||||
delete = "^(``)().-('')()$",
|
||||
},
|
||||
["q"] = {
|
||||
add = { "`", "'" },
|
||||
find = "`.-'",
|
||||
delete = "^(`)().-(')()$",
|
||||
},
|
||||
["b"] = {
|
||||
add = { "\\textbf{", "}" },
|
||||
-- add = function()
|
||||
-- if vim.fn["vimtex#syntax#in_mathzone"]() == 1 then
|
||||
-- return { { "\\mathbf{" }, { "}" } }
|
||||
-- end
|
||||
-- return { { "\\textbf{" }, { "}" } }
|
||||
-- end,
|
||||
find = "\\%a-bf%b{}",
|
||||
delete = "^(\\%a-bf{)().-(})()$",
|
||||
},
|
||||
["i"] = {
|
||||
add = { "\\textit{", "}" },
|
||||
-- add = function()
|
||||
-- if vim.fn["vimtex#syntax#in_mathzone"]() == 1 then
|
||||
-- return { { "\\mathit{" }, { "}" } }
|
||||
-- end
|
||||
-- return { { "\\textit{" }, { "}" } }
|
||||
-- end,
|
||||
find = "\\%a-it%b{}",
|
||||
delete = "^(\\%a-it{)().-(})()$",
|
||||
},
|
||||
["s"] = {
|
||||
add = { "\\textsc{", "}" },
|
||||
find = "\\textsc%b{}",
|
||||
delete = "^(\\textsc{)().-(})()$",
|
||||
},
|
||||
["t"] = {
|
||||
add = { "\\texttt{", "}" },
|
||||
-- add = function()
|
||||
-- if vim.fn["vimtex#syntax#in_mathzone"]() == 1 then
|
||||
-- return { { "\\mathtt{" }, { "}" } }
|
||||
-- end
|
||||
-- return { { "\\texttt{" }, { "}" } }
|
||||
-- end,
|
||||
find = "\\%a-tt%b{}",
|
||||
delete = "^(\\%a-tt{)().-(})()$",
|
||||
},
|
||||
["$"] = {
|
||||
add = { "$", "$" },
|
||||
-- find = "%b$.-$",
|
||||
-- delete = "^($)().-($)()$",
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
-- PdfAnnots
|
||||
function PdfAnnots()
|
||||
local ok, pdf = pcall(vim.api.nvim_eval,
|
||||
"vimtex#context#get().handler.get_actions().entry.file")
|
||||
if not ok then
|
||||
vim.notify "No file found"
|
||||
return
|
||||
end
|
||||
|
||||
local cwd = vim.fn.getcwd()
|
||||
vim.fn.chdir(vim.b.vimtex.root)
|
||||
|
||||
if vim.fn.isdirectory('Annotations') == 0 then
|
||||
vim.fn.mkdir('Annotations')
|
||||
end
|
||||
|
||||
local md = vim.fn.printf("Annotations/%s.md", vim.fn.fnamemodify(pdf, ":t:r"))
|
||||
vim.fn.system(vim.fn.printf('pdfannots -o "%s" "%s"', md, pdf))
|
||||
vim.cmd.split(vim.fn.fnameescape(md))
|
||||
|
||||
vim.fn.chdir(cwd)
|
||||
end
|
||||
|
||||
-- -- LSP menu to preserve vimtex citation data
|
||||
-- require('cmp').setup.buffer {
|
||||
-- formatting = {
|
||||
-- format = function(entry, vim_item)
|
||||
-- vim_item.menu = ({
|
||||
-- omni = (vim.inspect(vim_item.menu):gsub('%"', "")),
|
||||
-- buffer = "[Buffer]",
|
||||
-- -- formatting for other sources
|
||||
-- })[entry.source.name]
|
||||
-- return vim_item
|
||||
-- end,
|
||||
-- },
|
||||
-- sources = {
|
||||
-- { name = 'omni' },
|
||||
-- { name = 'buffer' },
|
||||
-- -- other sources
|
||||
-- },
|
||||
-- }
|
|
@ -1,60 +1,14 @@
|
|||
-- GENERAL
|
||||
require "user.options"
|
||||
require "user.keymaps"
|
||||
require "user.plugins"
|
||||
require "user.autocommands"
|
||||
require "user.colorscheme"
|
||||
require "user.lsp.init"
|
||||
|
||||
-- PLUGINS
|
||||
|
||||
require "user.autopairs"
|
||||
require "user.comment"
|
||||
require "user.impatient"
|
||||
require "user.surround"
|
||||
--require "user.yanky"
|
||||
require "user.undotree"
|
||||
|
||||
-- Mappings
|
||||
require "user.whichkey"
|
||||
|
||||
-- Terminal
|
||||
require "user.toggleterm"
|
||||
|
||||
-- File Management
|
||||
require "user.nvim-tree"
|
||||
require "user.sessions"
|
||||
|
||||
-- Appearance
|
||||
--require "user.bufferline"
|
||||
require "user.lualine"
|
||||
require "user.indentline"
|
||||
require "user.alpha"
|
||||
require "user.illuminate"
|
||||
|
||||
-- Autocomplete
|
||||
require "user.cmp"
|
||||
|
||||
-- LaTeX
|
||||
require "user.vimtex"
|
||||
|
||||
-- Markdown
|
||||
require "user.autolist"
|
||||
|
||||
-- Snippets
|
||||
require "user.luasnip"
|
||||
|
||||
-- Telescope
|
||||
require "user.telescope"
|
||||
require "user.dressing"
|
||||
|
||||
-- Treesitter
|
||||
require "user.treesitter"
|
||||
|
||||
-- Git
|
||||
require "user.gitsigns"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
require("autopairs")
|
||||
-- require("buffers") -- not wotking atm
|
||||
require("colorscheme")
|
||||
require("grammar")
|
||||
require("keymaps")
|
||||
require("lsp")
|
||||
require("lua-line")
|
||||
require("nvimtree")
|
||||
require("options")
|
||||
require("plugins")
|
||||
require("telescope")
|
||||
require("term")
|
||||
require("treesitter")
|
||||
require("whichkey")
|
||||
|
|
|
@ -0,0 +1,148 @@
|
|||
---- If you want insert `(` after select function or method item
|
||||
--local cmp_autopairs = require('nvim-autopairs.completion.cmp')
|
||||
--local cmp = require('cmp')
|
||||
--cmp.event:on(
|
||||
-- 'confirm_done',
|
||||
-- cmp_autopairs.on_confirm_done()
|
||||
--)
|
||||
--local Rule = require('nvim-autopairs.rule')
|
||||
--local npairs = require('nvim-autopairs')
|
||||
--
|
||||
--npairs.add_rule(Rule("$$","$$","tex"))
|
||||
--
|
||||
--local handlers = require('nvim-autopairs.completion.handlers')
|
||||
--
|
||||
--cmp.event:on(
|
||||
-- 'confirm_done',
|
||||
-- cmp_autopairs.on_confirm_done({
|
||||
-- filetypes = {
|
||||
-- -- "*" is a alias to all filetypes
|
||||
-- ["*"] = {
|
||||
-- ["("] = {
|
||||
-- kind = {
|
||||
-- cmp.lsp.CompletionItemKind.Function,
|
||||
-- cmp.lsp.CompletionItemKind.Method,
|
||||
-- },
|
||||
-- handler = handlers["*"]
|
||||
-- }
|
||||
-- },
|
||||
-- lua = {
|
||||
-- ["("] = {
|
||||
-- kind = {
|
||||
-- cmp.lsp.CompletionItemKind.Function,
|
||||
-- cmp.lsp.CompletionItemKind.Method
|
||||
-- },
|
||||
-- ---@param char string
|
||||
-- ---@param item table item completion
|
||||
-- ---@param bufnr number buffer number
|
||||
-- ---@param rules table
|
||||
-- ---@param commit_character table<string>
|
||||
-- handler = function(char, item, bufnr, rules, commit_character)
|
||||
-- -- Your handler function. Inpect with print(vim.inspect{char, item, bufnr, rules, commit_character})
|
||||
-- end
|
||||
-- }
|
||||
-- },
|
||||
-- -- Disable for tex
|
||||
-- tex = false
|
||||
-- }
|
||||
-- })
|
||||
--)
|
||||
--
|
||||
---- you can use some built-in conditions
|
||||
--
|
||||
--local cond = require('nvim-autopairs.conds')
|
||||
--print(vim.inspect(cond))
|
||||
--
|
||||
--npairs.add_rules({
|
||||
-- Rule("$", "$",{"tex", "latex"})
|
||||
-- -- don't add a pair if the next character is %
|
||||
-- :with_pair(cond.not_after_regex("%%"))
|
||||
-- -- don't add a pair if the previous character is xxx
|
||||
-- :with_pair(cond.not_before_regex("xxx", 3))
|
||||
-- -- don't move right when repeat character
|
||||
-- :with_move(cond.none())
|
||||
-- -- don't delete if the next character is xx
|
||||
-- :with_del(cond.not_after_regex("xx"))
|
||||
-- -- disable adding a newline when you press <cr>
|
||||
-- :with_cr(cond.none())
|
||||
-- },
|
||||
-- -- disable for .vim files, but it work for another filetypes
|
||||
-- Rule("a","a","-vim")
|
||||
--)
|
||||
--
|
||||
--npairs.add_rules({
|
||||
-- Rule("$$","$$","tex")
|
||||
-- :with_pair(function(opts)
|
||||
-- print(vim.inspect(opts))
|
||||
-- if opts.line=="aa $$" then
|
||||
-- -- don't add pair on that line
|
||||
-- return false
|
||||
-- end
|
||||
-- end)
|
||||
-- }
|
||||
--)
|
||||
--
|
||||
---- you can use regex
|
||||
---- press u1234 => u1234number
|
||||
--npairs.add_rules({
|
||||
-- Rule("u%d%d%d%d$", "number", "lua")
|
||||
-- :use_regex(true)
|
||||
--})
|
||||
--
|
||||
--
|
||||
--
|
||||
---- press x1234 => x12341234
|
||||
--npairs.add_rules({
|
||||
-- Rule("x%d%d%d%d$", "number", "lua")
|
||||
-- :use_regex(true)
|
||||
-- :replace_endpair(function(opts)
|
||||
-- -- print(vim.inspect(opts))
|
||||
-- return opts.prev_char:sub(#opts.prev_char - 3,#opts.prev_char)
|
||||
-- end)
|
||||
--})
|
||||
--
|
||||
--
|
||||
---- you can do anything with regex +special key
|
||||
---- example press tab to uppercase text:
|
||||
---- press b1234s<tab> => B1234S1234S
|
||||
--
|
||||
--npairs.add_rules({
|
||||
-- Rule("b%d%d%d%d%w$", "", "vim")
|
||||
-- :use_regex(true,"<tab>")
|
||||
-- :replace_endpair(function(opts)
|
||||
-- return
|
||||
-- opts.prev_char:sub(#opts.prev_char - 4,#opts.prev_char)
|
||||
-- .."<esc>viwU"
|
||||
-- end)
|
||||
--})
|
||||
--
|
||||
---- you can exclude filetypes
|
||||
--npairs.add_rule(
|
||||
-- Rule("$$","$$")
|
||||
-- :with_pair(cond.not_filetypes({"lua"}))
|
||||
--)
|
||||
----- check ./lua/nvim-autopairs/rules/basic.lua
|
||||
--
|
||||
--local npairs = require("nvim-autopairs")
|
||||
--local Rule = require('nvim-autopairs.rule')
|
||||
--
|
||||
--npairs.setup({
|
||||
-- check_ts = true,
|
||||
-- ts_config = {
|
||||
-- lua = {'string'},-- it will not add a pair on that treesitter node
|
||||
-- javascript = {'template_string'},
|
||||
-- java = false,-- don't check treesitter on java
|
||||
-- }
|
||||
--})
|
||||
--
|
||||
--local ts_conds = require('nvim-autopairs.ts-conds')
|
||||
--
|
||||
--
|
||||
---- press % => %% only while inside a comment or string
|
||||
--npairs.add_rules({
|
||||
-- Rule("%", "%", "lua")
|
||||
-- :with_pair(ts_conds.is_ts_node({'string','comment'})),
|
||||
-- Rule("$", "$", "lua")
|
||||
-- :with_pair(ts_conds.is_not_ts_node({'function'}))
|
||||
--})
|
||||
--
|
|
@ -6,8 +6,8 @@ end
|
|||
bufferline.setup {
|
||||
options = {
|
||||
numbers = "none", -- | "ordinal" | "buffer_id" | "both" | function({ ordinal, id, lower, raise }): string,
|
||||
close_command = "Bdelete! %d", -- can be a string | function, see "Mouse actions"
|
||||
right_mouse_command = "Bdelete! %d", -- can be a string | function, see "Mouse actions"
|
||||
close_command = "bdelete! %d", -- can be a string | function, see "Mouse actions"
|
||||
right_mouse_command = "bdelete! %d", -- can be a string | function, see "Mouse actions"
|
||||
left_mouse_command = "buffer %d", -- can be a string | function, see "Mouse actions"
|
||||
middle_mouse_command = nil, -- can be a string | function, see "Mouse actions"
|
||||
-- NOTE: this plugin is designed with this icon in mind,
|
|
@ -0,0 +1,21 @@
|
|||
-- define colorscheme here
|
||||
--[[
|
||||
local colorscheme = "rose"
|
||||
|
||||
local is_ok, _ = pcall(vim.cmd, "colorscheme " .. colorscheme)
|
||||
if not is_ok then
|
||||
vim.notify("colorscheme " .. colorscheme .. " not found!")
|
||||
return
|
||||
end
|
||||
]]--
|
||||
|
||||
function ColorSchemes(color)
|
||||
color = color or "rose-pine"
|
||||
vim.cmd.colorscheme(color)
|
||||
|
||||
--vim.api.nvim_set_hl(0, "Normal", { bg = "none" })
|
||||
--vim.api.nvim_set_hl(0, "NormalFloat", { bg = "none" })
|
||||
end
|
||||
|
||||
ColorSchemes()
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
require("grammar-guard").init()
|
||||
|
||||
require("lspconfig").grammar_guard.setup({
|
||||
cmd = { '/usr/bin/ltex-ls' }, -- add this if you install ltex-ls yourself
|
||||
settings = {
|
||||
ltex = {
|
||||
enabled = { "latex", "tex", "bib", "markdown" },
|
||||
language = "en",
|
||||
diagnosticSeverity = "information",
|
||||
setenceCacheSize = 2000,
|
||||
additionalRules = {
|
||||
enablePickyRules = true,
|
||||
motherTongue = "en",
|
||||
},
|
||||
trace = { server = "verbose" },
|
||||
dictionary = {},
|
||||
disabledRules = {},
|
||||
hiddenFalsePositives = {},
|
||||
},
|
||||
},
|
||||
})
|
|
@ -0,0 +1,84 @@
|
|||
-- define common options
|
||||
local opts = {
|
||||
noremap = true, -- non-recursive
|
||||
silent = true, -- do not show message
|
||||
}
|
||||
|
||||
-----------------
|
||||
-- Normal mode --
|
||||
-----------------
|
||||
|
||||
-- Hint: see `:h vim.map.set()`
|
||||
-- Better window navigation
|
||||
vim.keymap.set("n", "<C-h>", "<C-w>h", opts)
|
||||
vim.keymap.set("n", "<C-j>", "<C-w>j", opts)
|
||||
vim.keymap.set("n", "<C-k>", "<C-w>k", opts)
|
||||
vim.keymap.set("n", "<C-l>", "<C-w>l", opts)
|
||||
|
||||
-- Resize with arrows
|
||||
-- delta: 2 lines
|
||||
vim.keymap.set("n", "<C-Up>", ":resize -2<CR>", opts)
|
||||
vim.keymap.set("n", "<C-Down>", ":resize +2<CR>", opts)
|
||||
vim.keymap.set("n", "<C-Left>", ":vertical resize -2<CR>", opts)
|
||||
vim.keymap.set("n", "<C-Right>", ":vertical resize +2<CR>", opts)
|
||||
|
||||
-- Open explorer
|
||||
--vim.keymap.set("n", "<leader>pv", vim.cmd.Ex, opts)
|
||||
|
||||
-- Navigate buffers
|
||||
vim.keymap.set("n", "<BS>", ":bnext<CR>", opts)
|
||||
vim.keymap.set("n", "<S-TAB>", ":bprevious<CR>", opts)
|
||||
|
||||
-- Telescope
|
||||
local builtin = require("telescope.builtin")
|
||||
--vim.keymap.set("n", "<leader>pf", builtin.find_files, {})
|
||||
--vim.keymap.set("n", "<C-p>", builtin.git_files, {})
|
||||
--vim.keymap.set("n", "<leader>ps", function ()
|
||||
-- builtin.grep_string( { search = vim.fn.input("Grep > ") } );
|
||||
--end)
|
||||
|
||||
-- Harpoon
|
||||
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", "<C-h>", function () ui.nav_file(1) end)
|
||||
vim.keymap.set("n", "<C-t>", function () ui.nav_file(2) end)
|
||||
vim.keymap.set("n", "<C-n>", function () ui.nav_file(3) end)
|
||||
vim.keymap.set("n", "<C-s>", function () ui.nav_file(4) end)
|
||||
|
||||
-- Undotree
|
||||
vim.keymap.set("n", "<leader>u", vim.cmd.UndotreeToggle)
|
||||
|
||||
-- Fugitive
|
||||
vim.keymap.set("n", "<leader>gs", vim.cmd.Git)
|
||||
|
||||
-- Put line bellow in-front of line
|
||||
vim.keymap.set("n", "J", "mzJ`z")
|
||||
|
||||
-- Keep cursor in the middle
|
||||
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")
|
||||
|
||||
-- Don't loose buffer
|
||||
vim.keymap.set("x", "<leader>p", "\"_dP")
|
||||
|
||||
|
||||
-----------------
|
||||
-- Visual mode --
|
||||
-----------------
|
||||
|
||||
-- Hint: start visual mode with the same area as the previous area and the same mode
|
||||
vim.keymap.set("v", "<", "<gv", opts)
|
||||
vim.keymap.set("v", ">", ">gv", opts)
|
||||
|
||||
-- Move text on visual mode
|
||||
vim.keymap.set("v", "J", ":m '>+1<CR>gv=gv", opts)
|
||||
vim.keymap.set("v", "K", ":m '<-2<CR>gv=gv", opts)
|
||||
|
||||
|
||||
|
||||
|
|
@ -12,7 +12,7 @@ require("mason-lspconfig").setup({
|
|||
-- A list of servers to automatically install if they"re not already installed
|
||||
--ensure_installed = { "pylsp", "gopls", "lua_ls", "rust_analyzer" },
|
||||
--ensure_installed = { "pylsp", "lua_ls", "julials", "zls", "ltex", "texlab" },
|
||||
ensure_installed = { "bashls", "pylsp", "lua_ls", "julials", "ltex", "texlab" },
|
||||
ensure_installed = { "pylsp", "lua_ls", "julials", "zls", "ltex", "texlab" },
|
||||
})
|
||||
|
||||
-- Set different settings for different languages" LSP
|
||||
|
@ -86,17 +86,18 @@ lspconfig.pylsp.setup({
|
|||
on_attach = on_attach,
|
||||
})
|
||||
|
||||
--lspconfig.julials.setup{}
|
||||
--[[
|
||||
]]--
|
||||
--lspconfig.gopls.setup({
|
||||
-- on_attach = on_attach,
|
||||
--})
|
||||
|
||||
lspconfig.julials.setup({
|
||||
--on_attach = on_attach,
|
||||
--symbol_cache_download = true,
|
||||
symbol_cache_download = true,
|
||||
--symbol_server = "https://symbol-server",
|
||||
on_new_config = function(new_config, _)
|
||||
local julia = vim.fn.expand("/usr/share/julia/bin/julia")
|
||||
if require'lspconfig'.util.path.is_file(julia) then
|
||||
vim.notify("julials loaded?!")
|
||||
vim.notify("Hello!")
|
||||
new_config.cmd[1] = julia
|
||||
end
|
||||
end
|
||||
|
@ -106,14 +107,6 @@ lspconfig.texlab.setup({
|
|||
on_attach = on_attach,
|
||||
})
|
||||
|
||||
lspconfig.ltex.setup({
|
||||
settings = {
|
||||
ltex = {
|
||||
language = "en-GB",
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
lspconfig.zls.setup({
|
||||
on_attach = on_attach,
|
||||
})
|
||||
|
@ -122,6 +115,13 @@ lspconfig.bashls.setup({
|
|||
on_attach = on_attach,
|
||||
})
|
||||
|
||||
lspconfig.ltex.setup({
|
||||
settings = {
|
||||
ltex = {
|
||||
language = "en-GB",
|
||||
},
|
||||
},
|
||||
})
|
||||
-- source: https://rust-analyzer.github.io/manual.html#nvim-lsp
|
||||
--lspconfig.rust_analyzer.setup({
|
||||
-- on_attach = on_attach,
|
|
@ -0,0 +1,43 @@
|
|||
require("lualine").setup({})
|
||||
--[[
|
||||
require("lualine").setup {
|
||||
options = {
|
||||
icons_enabled = true,
|
||||
theme = "auto",
|
||||
component_separators = { left = "", right = ""},
|
||||
section_separators = { left = "", right = ""},
|
||||
disabled_filetypes = {
|
||||
statusline = {},
|
||||
winbar = {},
|
||||
},
|
||||
ignore_focus = {},
|
||||
always_divide_middle = true,
|
||||
globalstatus = false,
|
||||
refresh = {
|
||||
statusline = 1000,
|
||||
tabline = 1000,
|
||||
winbar = 1000,
|
||||
}
|
||||
},
|
||||
sections = {
|
||||
lualine_a = {"mode"},
|
||||
lualine_b = {"branch", "diff", "diagnostics"},
|
||||
lualine_c = {"filename"},
|
||||
lualine_x = {"encoding", "fileformat", "filetype"},
|
||||
lualine_y = {"progress"},
|
||||
lualine_z = {"location"}
|
||||
},
|
||||
inactive_sections = {
|
||||
lualine_a = {},
|
||||
lualine_b = {},
|
||||
lualine_c = {"filename"},
|
||||
lualine_x = {"location"},
|
||||
lualine_y = {},
|
||||
lualine_z = {}
|
||||
},
|
||||
tabline = {},
|
||||
winbar = {},
|
||||
inactive_winbar = {},
|
||||
extensions = {}
|
||||
}
|
||||
]]--
|
|
@ -0,0 +1 @@
|
|||
require("nvim-tree").setup()
|
|
@ -0,0 +1,107 @@
|
|||
-- Hint: use `:h <option>` to figure out the meaning if needed
|
||||
vim.opt.clipboard = "unnamedplus" -- use system clipboard
|
||||
vim.opt.completeopt = {"menu", "menuone", "noselect"}
|
||||
vim.opt.mouse = "a" -- allow the mouse to be used in Nvim
|
||||
|
||||
-- Fonts
|
||||
vim.opt.encoding="utf-8"
|
||||
vim.opt.guifont = "Meslo LG M Bold for Powerline:h10"
|
||||
|
||||
-- Tab
|
||||
vim.opt.tabstop = 4 -- number of visual spaces per TAB
|
||||
vim.opt.softtabstop = 4 -- number of spacesin tab when editing
|
||||
vim.opt.shiftwidth = 4 -- insert 4 spaces on a tab
|
||||
vim.opt.expandtab = true -- tabs are spaces, mainly because of python
|
||||
|
||||
-- UI config
|
||||
vim.opt.number = true -- show absolute number
|
||||
vim.opt.relativenumber = true -- add numbers to each line on the left side
|
||||
vim.opt.cursorline = false -- highlight cursor line underneath the cursor horizontally
|
||||
vim.opt.splitbelow = true -- open new vertical split bottom
|
||||
vim.opt.splitright = true -- open new horizontal splits right
|
||||
vim.opt.termguicolors = true -- enable 23-bit RGB color in the TUI
|
||||
vim.opt.showmode = false -- we are experienced, wo don"t need the "-- INSERT --" mode hint
|
||||
|
||||
-- File recovery options
|
||||
vim.opt.swapfile = false
|
||||
vim.opt.backup = false
|
||||
vim.opt.undodir = os.getenv("HOME") .. "/.vim/undodir"
|
||||
vim.opt.undofile = true
|
||||
|
||||
-- Color column
|
||||
vim.opt.colorcolumn = "80"
|
||||
|
||||
-- Searching
|
||||
vim.opt.incsearch = true -- search as characters are entered
|
||||
vim.opt.hlsearch = false -- do not highlight matches
|
||||
vim.opt.ignorecase = true -- ignore case in searches by default
|
||||
vim.opt.smartcase = true -- but make it case sensitive if an uppercase is entered
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
-- Linter
|
||||
--vim.g.ale_completion_enabled = 1
|
||||
--vim.g.ale_completion_autoimport = 0
|
||||
--vim.g.ale_julia_executable="/usr/share/julia/bin/julia"
|
||||
--vim.g.ale_lint_on_enter = 0
|
||||
----vim.g.ale_linters_explicit = 1
|
||||
|
||||
-- Leader key
|
||||
vim.g.mapleader = " "
|
||||
--vim.g.maplocalleader = " "
|
||||
vim.g.maplocalleader = "\\"
|
||||
|
||||
-- REPL
|
||||
--vim.g.slime_target = "neovim"
|
||||
|
||||
-- Airline
|
||||
vim.g.airline_powerline_fonts = 1
|
||||
|
||||
-- Zig
|
||||
vim.g.zig_fmt_autosave = 1
|
||||
-- Set completeopt to have a better completion experience
|
||||
--set completeopt=menuone,noinsert,noselect
|
||||
vim.opt.completeopt = "menuone,noinsert,noselect"
|
||||
-- Enable completions as you type
|
||||
vim.g.completion_enable_auto_popup = 1
|
||||
|
||||
-- Python
|
||||
vim.g.loaded_python_provider = 0
|
||||
vim.g.python3_host_prog = "/usr/local/bin/python"
|
||||
|
||||
-- Close parenthesis
|
||||
--vim.g.AutoPairFlymode = 1
|
||||
--vim.g.AutoPairsShortcutBackInsert = "<M-b>"
|
||||
--vim.g.AutoPairsMapBS = 1
|
||||
|
||||
-- PDF Viewer:
|
||||
-- http://manpages.ubuntu.com/manpages/trusty/man5/zathurarc.5.html
|
||||
vim.g["vimtex_view_method"] = "zathura"
|
||||
vim.g["vimtex_quickfix_mode"] =0
|
||||
|
||||
-- Ignore mappings
|
||||
vim.g["vimtex_mappings_enabled"] = 1
|
||||
|
||||
-- Auto Indent
|
||||
vim.g["vimtex_indent_enabled"] = 1
|
||||
|
||||
-- Syntax highlighting
|
||||
vim.g["vimtex_syntax_enabled"] = 1
|
||||
|
||||
-- Error suppression:
|
||||
-- https://github.com/lervag/vimtex/blob/master/doc/vimtex.txt
|
||||
|
||||
vim.g["vimtex_log_ignore"] = ({
|
||||
"Underfull",
|
||||
"Overfull",
|
||||
"specifier changed to",
|
||||
"Token not allowed in a PDF string",
|
||||
})
|
||||
|
||||
vim.g["vimtex_context_pdf_viewer"] = "zathura"
|
||||
|
||||
-- vim.g["vimtex_complete_enabled"] = 1
|
||||
-- vim.g["vimtex_compiler_progname"] = "nvr"
|
||||
-- vim.g["vimtex_complete_close_braces"] = 1
|
|
@ -0,0 +1,202 @@
|
|||
-- Install Packer automatically if it"s not installed(Bootstraping)
|
||||
-- Hint: string concatenation is done by `..`
|
||||
local ensure_packer = function()
|
||||
local fn = vim.fn
|
||||
local install_path = fn.stdpath("data").."/site/pack/packer/start/packer.nvim"
|
||||
if fn.empty(fn.glob(install_path)) > 0 then
|
||||
fn.system({"git", "clone", "--depth", "1", "https://github.com/wbthomason/packer.nvim", install_path})
|
||||
vim.cmd [[packadd packer.nvim]]
|
||||
return true
|
||||
end
|
||||
return false
|
||||
end
|
||||
local packer_bootstrap = ensure_packer()
|
||||
|
||||
|
||||
-- Reload configurations if we modify plugins.lua
|
||||
-- Hint
|
||||
-- <afile> - replaced with the filename of the buffer being manipulated
|
||||
vim.cmd([[
|
||||
augroup packer_user_config
|
||||
autocmd!
|
||||
autocmd BufWritePost plugins.lua source <afile> | PackerSync
|
||||
augroup end
|
||||
]])
|
||||
|
||||
|
||||
-- Install plugins here - `use ...`
|
||||
-- Packer.nvim hints
|
||||
-- after = string or list, -- Specifies plugins to load before this plugin. See "sequencing" below
|
||||
-- config = string or function, -- Specifies code to run after this plugin is loaded
|
||||
-- requires = string or list, -- Specifies plugin dependencies. See "dependencies".
|
||||
-- ft = string or list, -- Specifies filetypes which load this plugin.
|
||||
-- run = string, function, or table, -- Specify operations to be run after successful installs/updates of a plugin
|
||||
return require("packer").startup(function(use)
|
||||
-- Packer can manage itself
|
||||
use "wbthomason/packer.nvim"
|
||||
|
||||
|
||||
|
||||
--use "tanvirtin/monokai.nvim"
|
||||
-- Autocomplete
|
||||
use {
|
||||
"williamboman/mason.nvim",
|
||||
run = ":MasonUpdate" -- :MasonUpdate updates registry contents
|
||||
}
|
||||
use { "williamboman/mason-lspconfig.nvim"}
|
||||
use { "neovim/nvim-lspconfig" } -- previous installed
|
||||
-- Cmp
|
||||
use { "hrsh7th/nvim-cmp", config = [[require("config.nvim-cmp")]] }
|
||||
use { "hrsh7th/cmp-nvim-lsp", after = "nvim-cmp" }
|
||||
use { "hrsh7th/cmp-buffer", after = "nvim-cmp" } -- buffer auto-completion
|
||||
use { "hrsh7th/cmp-path", after = "nvim-cmp" } -- path auto-completion
|
||||
use { "hrsh7th/cmp-cmdline", after = "nvim-cmp" } -- cmdline auto-completion
|
||||
use "L3MON4D3/LuaSnip"
|
||||
use "saadparwaiz1/cmp_luasnip"
|
||||
|
||||
-- helps Vimtex completions
|
||||
use { "hrsh7th/cmp-omni" }
|
||||
|
||||
-- ALE Linter
|
||||
use { "dense-analysis/ale" }
|
||||
|
||||
-- :FixWhitespace
|
||||
use "bronson/vim-trailing-whitespace"
|
||||
-- Close parenthesis
|
||||
use {
|
||||
"windwp/nvim-autopairs",
|
||||
config = function() require("nvim-autopairs").setup {} end
|
||||
}
|
||||
|
||||
-- gitgutter
|
||||
use { "airblade/vim-gitgutter" }
|
||||
|
||||
-- Mappings
|
||||
use { "folke/which-key.nvim" }
|
||||
|
||||
-- zig.vim
|
||||
use { "ziglang/zig.vim" }
|
||||
|
||||
-- julia-vim
|
||||
--use { "JuliaEditorSupport/julia-vim" }
|
||||
|
||||
-- LaTeX
|
||||
use { "lervag/vimtex" } -- essential for LaTeX; Vimscript
|
||||
use { "kdheepak/cmp-latex-symbols" }
|
||||
use { "jbyuki/nabla.nvim" } -- show symbols in editor
|
||||
use {
|
||||
"brymer-meneses/grammar-guard.nvim",
|
||||
requires = {
|
||||
"neovim/nvim-lspconfig",
|
||||
"williamboman/nvim-lsp-installer"
|
||||
}
|
||||
}
|
||||
|
||||
-- Devicons
|
||||
use { "nvim-tree/nvim-web-devicons" }
|
||||
|
||||
-- Lua Line
|
||||
use {
|
||||
"nvim-lualine/lualine.nvim",
|
||||
requires = { "nvim-tree/nvim-web-devicons", opt = true }
|
||||
}
|
||||
|
||||
-- nvim tree
|
||||
use { "nvim-tree/nvim-tree.lua" }
|
||||
|
||||
-- Airline
|
||||
--[[
|
||||
use "vim-airline/vim-airline"
|
||||
use "vim-airline/vim-airline-themes"
|
||||
]]--
|
||||
|
||||
-- vim-visual-multi
|
||||
use { "mg979/vim-visual-multi" }
|
||||
|
||||
-- Telescope fuzzy finder
|
||||
use {
|
||||
"nvim-telescope/telescope.nvim", tag = "0.1.1",
|
||||
-- or , branch = "0.1.x",
|
||||
requires = { {"nvim-lua/plenary.nvim"} }
|
||||
}
|
||||
|
||||
use {
|
||||
'nvim-telescope/telescope-fzf-native.nvim',
|
||||
run = 'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build'
|
||||
}
|
||||
|
||||
-- Nord colorscheme
|
||||
--[[
|
||||
use {
|
||||
"arcticicestudio/nord-vim",
|
||||
config = function ()
|
||||
vim.cmd("colorscheme nord")
|
||||
vim.api.nvim_set_hl(0, "Normal", { bg = "none" })
|
||||
vim.api.nvim_set_hl(0, "NormalFloat", { bg = "none" })
|
||||
end
|
||||
}
|
||||
]]--
|
||||
|
||||
-- Rose-Pine
|
||||
use ({
|
||||
"rose-pine/neovim",
|
||||
as = "rose-pine",
|
||||
config = function ()
|
||||
vim.cmd("colorscheme rose-pine")
|
||||
end
|
||||
})
|
||||
|
||||
-- Shadotheme
|
||||
--[[
|
||||
use ({
|
||||
"Shadorain/shadotheme",
|
||||
config = function ()
|
||||
vim.cmd("colorscheme shado")
|
||||
end
|
||||
})
|
||||
]]--
|
||||
|
||||
-- Terminal toggle
|
||||
use ({"akinsho/toggleterm.nvim", tag = "*",
|
||||
config = function()
|
||||
require("toggleterm").setup()
|
||||
end
|
||||
})
|
||||
|
||||
-- Alpha-nvim
|
||||
use {
|
||||
"goolord/alpha-nvim",
|
||||
requires = { "nvim-tree/nvim-web-devicons" },
|
||||
config = function ()
|
||||
require"alpha".setup(require"alpha.themes.startify".config)
|
||||
end
|
||||
}
|
||||
|
||||
-- Source code coloring
|
||||
use {
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
{run = ":TSUpdate"},
|
||||
}
|
||||
use "nvim-treesitter/playground"
|
||||
-- Harpoon
|
||||
use "nvim-lua/plenary.nvim"
|
||||
use "ThePrimeagen/harpoon"
|
||||
-- Undotree
|
||||
use "mbbill/undotree"
|
||||
-- Fugitive
|
||||
use "tpope/vim-fugitive"
|
||||
-- Buffers for nvim
|
||||
use {"akinsho/bufferline.nvim", tag = "v3.*", requires = "nvim-tree/nvim-web-devicons"}
|
||||
|
||||
|
||||
---------------------------------------
|
||||
-- NOTE: PUT YOUR THIRD PLUGIN HERE --
|
||||
---------------------------------------
|
||||
|
||||
-- Automatically set up your configuration after cloning packer.nvim
|
||||
-- Put this at the end after all plugins
|
||||
if packer_bootstrap then
|
||||
require("packer").sync()
|
||||
end
|
||||
end)
|
||||
|
|
@ -100,39 +100,42 @@ telescope.setup {
|
|||
-- Now the picker_config_key will be applied every time you call this
|
||||
-- builtin picker
|
||||
},
|
||||
load_extensions = { "yank_history", "bibtex" },
|
||||
extensions = {
|
||||
bibtex = {
|
||||
depth = 1,
|
||||
-- Depth for the *.bib file
|
||||
custom_formats = {},
|
||||
-- Custom format for citation label
|
||||
format = '',
|
||||
-- Format to use for citation label.
|
||||
-- Try to match the filetype by default, or use 'plain'
|
||||
global_files = {'~/texmf/bibtex/bib/Zotero.bib'},
|
||||
-- Path to global bibliographies (placed outside of the project)
|
||||
search_keys = { 'author', 'year', 'title' },
|
||||
-- Define the search keys to use in the picker
|
||||
citation_format = '{{author}} ({{year}}), {{title}}.',
|
||||
-- Template for the formatted citation
|
||||
citation_trim_firstname = true,
|
||||
-- Only use initials for the authors first name
|
||||
citation_max_auth = 2,
|
||||
-- Max number of authors to write in the formatted citation
|
||||
-- following authors will be replaced by "et al."
|
||||
context = false,
|
||||
-- Context awareness disabled by default
|
||||
context_fallback = true,
|
||||
-- Fallback to global/directory .bib files if context not found
|
||||
-- This setting has no effect if context = false
|
||||
wrap = false,
|
||||
-- Wrapping in the preview window is disabled by default
|
||||
},
|
||||
-- Your extension configuration goes here:
|
||||
-- extension_name = {
|
||||
-- extension_config_key = value,
|
||||
-- }
|
||||
-- please take a look at the readme of the extension you want to configure
|
||||
},
|
||||
--load_extensions = { "yank_history", "bibtex" },
|
||||
--extensions = {
|
||||
-- bibtex = {
|
||||
-- depth = 1,
|
||||
-- -- Depth for the *.bib file
|
||||
-- custom_formats = {},
|
||||
-- -- Custom format for citation label
|
||||
-- format = '',
|
||||
-- -- Format to use for citation label.
|
||||
-- -- Try to match the filetype by default, or use 'plain'
|
||||
-- global_files = {'~/texmf/bibtex/bib/Zotero.bib'},
|
||||
-- -- Path to global bibliographies (placed outside of the project)
|
||||
-- search_keys = { 'author', 'year', 'title' },
|
||||
-- -- Define the search keys to use in the picker
|
||||
-- citation_format = '{{author}} ({{year}}), {{title}}.',
|
||||
-- -- Template for the formatted citation
|
||||
-- citation_trim_firstname = true,
|
||||
-- -- Only use initials for the authors first name
|
||||
-- citation_max_auth = 2,
|
||||
-- -- Max number of authors to write in the formatted citation
|
||||
-- -- following authors will be replaced by "et al."
|
||||
-- context = false,
|
||||
-- -- Context awareness disabled by default
|
||||
-- context_fallback = true,
|
||||
-- -- Fallback to global/directory .bib files if context not found
|
||||
-- -- This setting has no effect if context = false
|
||||
-- wrap = false,
|
||||
-- -- Wrapping in the preview window is disabled by default
|
||||
-- },
|
||||
-- -- Your extension configuration goes here:
|
||||
-- -- extension_name = {
|
||||
-- -- extension_config_key = value,
|
||||
-- -- }
|
||||
-- -- please take a look at the readme of the extension you want to configure
|
||||
--},
|
||||
}
|
||||
|
||||
require('telescope').load_extension('fzf')
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
require("toggleterm").setup{
|
||||
open_mapping = [[<C-\>]],
|
||||
autochdir = false,
|
||||
}
|
||||
|
||||
function _G.set_terminal_keymaps()
|
||||
local opts = {buffer = 0}
|
||||
vim.keymap.set('t', '<esc>', [[<C-\><C-n>]], opts)
|
||||
vim.keymap.set('t', 'jk', [[<C-\><C-n>]], opts)
|
||||
vim.keymap.set('t', '<C-h>', [[<Cmd>wincmd h<CR>]], opts)
|
||||
vim.keymap.set('t', '<C-j>', [[<Cmd>wincmd j<CR>]], opts)
|
||||
vim.keymap.set('t', '<C-k>', [[<Cmd>wincmd k<CR>]], opts)
|
||||
vim.keymap.set('t', '<C-l>', [[<Cmd>wincmd l<CR>]], opts)
|
||||
vim.keymap.set('t', '<C-w>', [[<C-\><C-n><C-w>]], opts)
|
||||
end
|
|
@ -0,0 +1,42 @@
|
|||
require"nvim-treesitter.configs".setup {
|
||||
-- A list of parser names, or "all" (the five listed parsers should always be installed)
|
||||
ensure_installed = { "zig", "c", "lua", "vim", "vimdoc", "query" },
|
||||
|
||||
-- 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 = { "javascript" },
|
||||
|
||||
---- If you need to change the installation directory of the parsers (see -> Advanced Setup)
|
||||
-- parser_install_dir = "/some/path/to/store/parsers", -- Remember to run vim.opt.runtimepath:append("/some/path/to/store/parsers")!
|
||||
|
||||
highlight = {
|
||||
enable = true,
|
||||
|
||||
-- NOTE: these are the names of the parsers and not the filetype. (for example if you want to
|
||||
-- disable highlighting for the `tex` filetype, you need to include `latex` in this list as this is
|
||||
-- the name of the parser)
|
||||
-- list of language that will be disabled
|
||||
--disable = { "rust" },
|
||||
-- Or use a function for more flexibility, e.g. to disable slow treesitter highlight for large files
|
||||
--disable = function(_, 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,
|
||||
|
||||
-- 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 = false,
|
||||
},
|
||||
}
|
||||
|
|
@ -1,47 +0,0 @@
|
|||
local status_ok, alpha = pcall(require, "alpha")
|
||||
if not status_ok then
|
||||
return
|
||||
end
|
||||
|
||||
local dashboard = require("alpha.themes.dashboard")
|
||||
dashboard.section.header.val = {
|
||||
[[ ]],
|
||||
[[ ███╗ ██╗███████╗ ██████╗ ██╗ ██╗██╗███╗ ███╗ ]],
|
||||
[[ ████╗ ██║██╔════╝██╔═══██╗██║ ██║██║████╗ ████║ ]],
|
||||
[[ ██╔██╗ ██║█████╗ ██║ ██║██║ ██║██║██╔████╔██║ ]],
|
||||
[[ ██║╚██╗██║██╔══╝ ██║ ██║╚██╗ ██╔╝██║██║╚██╔╝██║ ]],
|
||||
[[ ██║ ╚████║███████╗╚██████╔╝ ╚████╔╝ ██║██║ ╚═╝ ██║ ]],
|
||||
[[ ╚═╝ ╚═══╝╚══════╝ ╚═════╝ ╚═══╝ ╚═╝╚═╝ ╚═╝ ]],
|
||||
[[ ]],
|
||||
}
|
||||
dashboard.section.buttons.val = {
|
||||
-- dashboard.button("e", " New file", ":ene <BAR> startinsert <CR>"),
|
||||
-- dashboard.button("p", " Find project", ":Telescope projects <CR>"),
|
||||
-- dashboard.button("t", " Find text", ":Telescope live_grep <CR>"),
|
||||
-- dashboard.button("d", "✗ Delete session", "<cmd>SessionsManager delete_session<CR>"),
|
||||
dashboard.button("s", " Sessions", "<cmd>SessionManager load_session<CR>"),
|
||||
dashboard.button("r", " Recent", ":Telescope oldfiles <CR>"),
|
||||
dashboard.button("f", " Find", ":Telescope find_files <CR>"),
|
||||
dashboard.button("c", " Config", ":e $MYVIMRC <CR>"),
|
||||
dashboard.button("i", " Info", "<cmd>e ~/.config/CheatSheet.md<cr>"),
|
||||
dashboard.button("q", " Quit", ":qa<CR>"),
|
||||
}
|
||||
|
||||
local function footer()
|
||||
-- NOTE: requires the fortune-mod package to work
|
||||
-- local handle = io.popen("fortune")
|
||||
-- local fortune = handle:read("*a")
|
||||
-- handle:close()
|
||||
-- return fortune
|
||||
return ""
|
||||
end
|
||||
|
||||
dashboard.section.footer.val = footer()
|
||||
|
||||
dashboard.section.footer.opts.hl = "Type"
|
||||
dashboard.section.header.opts.hl = "Include"
|
||||
dashboard.section.buttons.opts.hl = "Keyword"
|
||||
|
||||
dashboard.opts.opts.noautocmd = true
|
||||
-- vim.cmd([[autocmd User AlphaReady echo 'ready']])
|
||||
alpha.setup(dashboard.opts)
|
|
@ -1,37 +0,0 @@
|
|||
vim.cmd [[
|
||||
augroup _general_settings
|
||||
autocmd!
|
||||
autocmd FileType qf,help,man,lspinfo nnoremap <silent> <buffer> q :close<CR>
|
||||
autocmd TextYankPost * silent!lua require('vim.highlight').on_yank({higroup = 'Visual', timeout = 200})
|
||||
autocmd BufWinEnter * :set formatoptions-=cro
|
||||
autocmd FileType qf set nobuflisted
|
||||
augroup end
|
||||
|
||||
augroup _git
|
||||
autocmd!
|
||||
autocmd FileType gitcommit setlocal wrap
|
||||
autocmd FileType gitcommit setlocal spell
|
||||
augroup end
|
||||
|
||||
augroup _markdown
|
||||
autocmd!
|
||||
autocmd FileType markdown setlocal wrap
|
||||
autocmd FileType markdown setlocal spell
|
||||
augroup end
|
||||
|
||||
augroup _auto_resize
|
||||
autocmd!
|
||||
autocmd VimResized * tabdo wincmd =
|
||||
augroup end
|
||||
|
||||
augroup _alpha
|
||||
autocmd!
|
||||
autocmd User AlphaReady set showtabline=0 | autocmd BufUnload <buffer> set showtabline=2
|
||||
augroup end
|
||||
]]
|
||||
|
||||
-- Autoformat
|
||||
-- augroup _lsp
|
||||
-- autocmd!
|
||||
-- autocmd BufWritePre * lua vim.lsp.buf.formatting()
|
||||
-- augroup end
|
|
@ -1,33 +0,0 @@
|
|||
-- local status_ok, autolist = pcall(require, "autolist")
|
||||
-- if not status_ok then
|
||||
-- return
|
||||
-- end
|
||||
|
||||
-- return {
|
||||
-- "gaoDean/autolist.nvim",
|
||||
-- ft = {
|
||||
-- "markdown",
|
||||
-- "text",
|
||||
-- "tex",
|
||||
-- "plaintex",
|
||||
-- },
|
||||
-- config = function()
|
||||
-- local autolist = require("autolist")
|
||||
-- autolist.setup()
|
||||
-- autolist.create_mapping_hook("i", "<CR>", autolist.new)
|
||||
-- autolist.create_mapping_hook("i", "<Tab>", autolist.indent)
|
||||
-- autolist.create_mapping_hook("i", "<S-Tab>", autolist.indent, "<C-D>")
|
||||
-- autolist.create_mapping_hook("n", "o", autolist.new)
|
||||
-- autolist.create_mapping_hook("n", "O", autolist.new_before)
|
||||
-- -- autolist.create_mapping_hook("n", ">>", autolist.indent)
|
||||
-- -- autolist.create_mapping_hook("n", "<<", autolist.indent)
|
||||
-- autolist.create_mapping_hook("n", "<leader>r", autolist.force_recalculate)
|
||||
-- autolist.create_mapping_hook("n", "<leader>x", autolist.invert_entry, "")
|
||||
-- vim.api.nvim_create_autocmd("TextChanged", {
|
||||
-- pattern = "-",
|
||||
-- callback = function()
|
||||
-- vim.cmd.normal({autolist.force_recalculate(nil, nil), bang = false})
|
||||
-- end
|
||||
-- })
|
||||
-- end,
|
||||
-- }
|
|
@ -1,85 +0,0 @@
|
|||
-- Setup nvim-cmp.
|
||||
local status_ok, npairs = pcall(require, "nvim-autopairs")
|
||||
if not status_ok then
|
||||
return
|
||||
end
|
||||
|
||||
npairs.setup {
|
||||
check_ts = true,
|
||||
ts_config = {
|
||||
lua = { "string", "source" },
|
||||
javascript = { "string", "template_string" },
|
||||
java = false,
|
||||
},
|
||||
disable_filetype = { "TelescopePrompt", "spectre_panel" },
|
||||
disable_in_macro = true,
|
||||
disable_in_replace_mode = true,
|
||||
enable_moveright = true,
|
||||
ignored_next_char = "",
|
||||
enable_check_bracket_line = true, --- check bracket in same line
|
||||
-- enable_afterquote = true, -- add bracket pairs after quote
|
||||
-- enable_bracket_in_quote = true,
|
||||
-- enable_abbr = false, -- trigger abbreviation
|
||||
-- fast_wrap = {
|
||||
-- map = "<C-l>",
|
||||
-- chars = { "$", "{", "[", "(", '"', "'" },
|
||||
-- pattern = string.gsub([=[[%'%"%)%>%]%)%}%,]]=], "%s+", ""),
|
||||
-- offset = 1, -- Offset from pattern match
|
||||
-- end_key = "L",
|
||||
-- keys = "qwertyuiopzxcvbnmasdfghjkl",
|
||||
-- check_comma = true,
|
||||
-- highlight = "PmenuSel",
|
||||
-- highlight_grey = "LineNr",
|
||||
-- -- highlight = 'Search',
|
||||
-- -- highlight_grey='Comment'
|
||||
-- },
|
||||
}
|
||||
|
||||
local npairs = require'nvim-autopairs'
|
||||
|
||||
local Rule = require'nvim-autopairs.rule'
|
||||
|
||||
local cond = require'nvim-autopairs.conds'
|
||||
|
||||
npairs.add_rules({
|
||||
Rule("`","'","tex"),
|
||||
Rule("$","$","tex"),
|
||||
Rule(' ', ' ')
|
||||
:with_pair(function(opts)
|
||||
local pair = opts.line:sub(opts.col, opts.col + 1)
|
||||
return vim.tbl_contains({ '$$', '()', '{}', '[]' }, pair)
|
||||
end)
|
||||
:with_move(cond.none())
|
||||
:with_cr(cond.none())
|
||||
:with_del(function(opts)
|
||||
local col = vim.api.nvim_win_get_cursor(0)[2]
|
||||
local context = opts.line:sub(col - 1, col + 2)
|
||||
return vim.tbl_contains({ '$ $', '( )', '{ }', '[ ]' }, context)
|
||||
end),
|
||||
Rule("$ "," ","tex")
|
||||
:with_pair(cond.not_after_regex(" "))
|
||||
:with_del(cond.none()),
|
||||
Rule("[ "," ","tex")
|
||||
:with_pair(cond.not_after_regex(" "))
|
||||
:with_del(cond.none()),
|
||||
Rule("{ "," ","tex")
|
||||
:with_pair(cond.not_after_regex(" "))
|
||||
:with_del(cond.none()),
|
||||
Rule("( "," ","tex")
|
||||
:with_pair(cond.not_after_regex(" "))
|
||||
:with_del(cond.none()),
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
require('nvim-autopairs').get_rule('$'):with_move(function(opts)
|
||||
return opts.char == opts.next_char:sub(1, 1)
|
||||
end)
|
||||
|
||||
|
||||
local cmp_autopairs = require "nvim-autopairs.completion.cmp"
|
||||
local cmp_status_ok, cmp = pcall(require, "cmp")
|
||||
if not cmp_status_ok then
|
||||
return
|
||||
end
|
||||
cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done { map_char = { tex = "" } })
|
197
lua/user/cmp.lua
197
lua/user/cmp.lua
|
@ -1,197 +0,0 @@
|
|||
local cmp_status_ok, cmp = pcall(require, "cmp")
|
||||
if not cmp_status_ok then
|
||||
return
|
||||
end
|
||||
|
||||
local snip_status_ok, luasnip = pcall(require, "luasnip")
|
||||
if not snip_status_ok then
|
||||
return
|
||||
end
|
||||
|
||||
local check_backspace = function()
|
||||
local col = vim.fn.col "." - 1
|
||||
return col == 0 or vim.fn.getline("."):sub(col, col):match "%s"
|
||||
end
|
||||
|
||||
-- פּ ﯟ some other good icons
|
||||
local kind_icons = {
|
||||
Text = "",
|
||||
Method = "m",
|
||||
Function = "",
|
||||
Constructor = "",
|
||||
Field = "",
|
||||
Variable = "",
|
||||
Class = "",
|
||||
Interface = "",
|
||||
Module = "",
|
||||
Property = "",
|
||||
Unit = "",
|
||||
Value = "",
|
||||
Enum = "",
|
||||
Keyword = "",
|
||||
Snippet = "",
|
||||
Color = "",
|
||||
File = "",
|
||||
Reference = "",
|
||||
Folder = "",
|
||||
EnumMember = "",
|
||||
Constant = "",
|
||||
Struct = "",
|
||||
Event = "",
|
||||
Operator = "",
|
||||
TypeParameter = "",
|
||||
}
|
||||
-- find more here: https://www.nerdfonts.com/cheat-sheet
|
||||
|
||||
cmp.setup {
|
||||
-- preselect = cmp.PreselectMode.None,
|
||||
completion = {
|
||||
-- autocomplete = {
|
||||
-- cmp.TriggerEvent.TextChanged,
|
||||
-- cmp.TriggerEvent.InsertEnter,
|
||||
-- },
|
||||
completeopt = "menu,noselect",
|
||||
-- completeopt = "menuone,noinsert,noselect",
|
||||
keyword_length = 1,
|
||||
},
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
luasnip.lsp_expand(args.body) -- For `luasnip` users.
|
||||
end,
|
||||
},
|
||||
mapping = {
|
||||
["<C-k>"] = cmp.mapping(cmp.mapping.select_prev_item(), { "i", "c" }),
|
||||
["<C-j>"] = cmp.mapping(cmp.mapping.select_next_item(), { "i", "c" }),
|
||||
["<CR>"] = cmp.mapping.confirm({ select = false }),
|
||||
-- Set `select` to `false` to only confirm selected
|
||||
["<Tab>"] = cmp.mapping(function(fallback)
|
||||
if luasnip.expandable() then
|
||||
luasnip.expand()
|
||||
elseif luasnip.expand_or_jumpable() then
|
||||
luasnip.expand_or_jump()
|
||||
elseif check_backspace() then
|
||||
fallback()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, {
|
||||
"i",
|
||||
"s",
|
||||
}),
|
||||
["<S-Tab>"] = cmp.mapping(function(fallback)
|
||||
-- if cmp.visible() then
|
||||
-- cmp.select_prev_item()
|
||||
if luasnip.jumpable(-1) then
|
||||
luasnip.jump(-1)
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, {
|
||||
"i",
|
||||
"s",
|
||||
}),
|
||||
},
|
||||
formatting = {
|
||||
fields = { "kind", "abbr", "menu" },
|
||||
format = function(entry, vim_item)
|
||||
-- Kind icons
|
||||
vim_item.kind = string.format("%s", kind_icons[vim_item.kind])
|
||||
-- vim_item.kind = string.format('%s %s', kind_icons[vim_item.kind], vim_item.kind) -- This concatonates the icons with the name of the item kind
|
||||
vim_item.menu = ({
|
||||
-- omni = "[VimTex]",
|
||||
omni = (vim.inspect(vim_item.menu):gsub('%"', "")),
|
||||
nvim_lsp = "[LSP]",
|
||||
luasnip = "[Snippet]",
|
||||
buffer = "[Buffer]",
|
||||
spell = "[Spell]",
|
||||
latex_symbols = "[Symbols]",
|
||||
cmdline = "[CMD]",
|
||||
path = "[Path]",
|
||||
})[entry.source.name]
|
||||
return vim_item
|
||||
end,
|
||||
},
|
||||
sources = cmp.config.sources({
|
||||
{ name = "nvim_lsp" },
|
||||
{ name = "luasnip" },
|
||||
{ name = "omni" },
|
||||
{ name = "buffer", keyword_length = 3 },
|
||||
{ name = "spell",
|
||||
keyword_length = 4,
|
||||
option = {
|
||||
keep_all_entries = false,
|
||||
enable_in_context = function()
|
||||
return true
|
||||
end
|
||||
},
|
||||
},
|
||||
{ name = "latex_symbols",
|
||||
filetype = { "tex", "latex" },
|
||||
option = { cache = true }, -- avoids reloading each time
|
||||
},
|
||||
{ name = "path" },
|
||||
}),
|
||||
confirm_opts = {
|
||||
behavior = cmp.ConfirmBehavior.Replace,
|
||||
select = false,
|
||||
},
|
||||
view = {
|
||||
entries = 'custom',
|
||||
},
|
||||
window = {
|
||||
documentation = {
|
||||
border = { "╭", "─", "╮", "│", "╯", "─", "╰", "│" },
|
||||
}
|
||||
},
|
||||
performance = {
|
||||
trigger_debounce_time = 500,
|
||||
throttle = 550,
|
||||
fetching_timeout = 80,
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
-- TODO zotero import
|
||||
-- { name = "cmp_zotcite",
|
||||
-- filetype = { "tex", "latex", "pandoc", "markdown", "rmd", "quarto" },
|
||||
-- },
|
||||
-- could use but seems like vimtex has access to .bib
|
||||
|
||||
-- `/` cmdline setup.
|
||||
cmp.setup.cmdline('/', {
|
||||
mapping = cmp.mapping.preset.cmdline(),
|
||||
sources = {
|
||||
{name = 'buffer'}
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
-- `:` cmdline setup.
|
||||
cmp.setup.cmdline(':', {
|
||||
mapping = cmp.mapping.preset.cmdline(),
|
||||
sources = {
|
||||
{name = 'path'},
|
||||
{name = 'cmdline'}
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
-- Toggle cmp entrirely
|
||||
vim.g.cmptoggle = true -- nvim-cmp off by default if false
|
||||
|
||||
local cmp = require('cmp')
|
||||
cmp.setup {
|
||||
enabled = function()
|
||||
return vim.g.cmptoggle
|
||||
end
|
||||
}
|
||||
|
||||
-- TODO was trying to get <C-j>, <C-k> to work in the command line
|
||||
|
||||
-- mapping = cmp.mapping.preset.cmdline({
|
||||
-- ["<C-j>"] = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Insert }),
|
||||
-- ["<C-k>"] = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Insert }),
|
||||
-- ["<CR>"] = cmp.mapping.confirm({ select = true }),
|
||||
-- ['<C-j>'] = cmp.mapping(cmp.mapping.select_next_item()),
|
||||
-- ['<C-k>'] = cmp.mapping(cmp.mapping.select_prev_item()),
|
||||
-- }),
|
|
@ -1,37 +0,0 @@
|
|||
-- GRUVBOX --
|
||||
--[[
|
||||
local colorscheme = "rose-pine"
|
||||
-- local colorscheme = "gruvbox-baby"
|
||||
|
||||
-- OTHER ---
|
||||
|
||||
-- local colorscheme = "duskfox"
|
||||
-- local colorscheme = "melange"
|
||||
-- local colorscheme = "tokyonight-night"
|
||||
|
||||
-- local colorscheme = "onedark"
|
||||
-- -- style options: dark, darker, cool, deep, warm, warmer, light
|
||||
-- require('onedark').setup {
|
||||
-- style = 'dark'
|
||||
-- }
|
||||
-- require('onedark').load()
|
||||
|
||||
-- GENERAL --
|
||||
|
||||
local status_ok, _ = pcall(vim.cmd, "colorscheme " .. colorscheme)
|
||||
if not status_ok then
|
||||
return
|
||||
end
|
||||
]]--
|
||||
|
||||
function ColorSchemes(color)
|
||||
color = color or "rose-pine"
|
||||
vim.cmd.colorscheme(color)
|
||||
|
||||
--vim.api.nvim_set_hl(0, "Normal", { bg = "none" })
|
||||
--vim.api.nvim_set_hl(0, "NormalFloat", { bg = "none" })
|
||||
end
|
||||
|
||||
ColorSchemes()
|
||||
|
||||
|
|
@ -1,51 +0,0 @@
|
|||
local status_ok, comment = pcall(require, "Comment")
|
||||
if not status_ok then
|
||||
return
|
||||
end
|
||||
|
||||
comment.setup {
|
||||
---Add a space b/w comment and the line
|
||||
padding = true,
|
||||
---Whether the cursor should stay at its position
|
||||
sticky = true,
|
||||
---Lines to be ignored while (un)comment
|
||||
ignore = nil,
|
||||
---Function to call before (un)comment
|
||||
pre_hook = nil,
|
||||
mappings = {
|
||||
---Operator-pending mapping; `gcc` `gbc` `gc[count]{motion}` `gb[count]{motion}`
|
||||
basic = false,
|
||||
---Extra mapping; `gco`, `gcO`, `gcA`
|
||||
extra = false,
|
||||
},
|
||||
}
|
||||
|
||||
---LHS of toggle mappings in NORMAL mode
|
||||
-- ---Enable keybindings
|
||||
-- ---NOTE: If given `false` then the plugin won't create any mappings
|
||||
---Function to call before (un)comment
|
||||
-- pre_hook = function(ctx)
|
||||
-- local U = require "Comment.utils"
|
||||
--
|
||||
-- local status_utils_ok, utils = pcall(require, "ts_context_commentstring.utils")
|
||||
-- if not status_utils_ok then
|
||||
-- return
|
||||
-- end
|
||||
--
|
||||
-- local location = nil
|
||||
-- if ctx.ctype == U.ctype.block then
|
||||
-- location = utils.get_cursor_location()
|
||||
-- elseif ctx.cmotion == U.cmotion.v or ctx.cmotion == U.cmotion.V then
|
||||
-- location = utils.get_visual_start_location()
|
||||
-- end
|
||||
--
|
||||
-- local status_internals_ok, internals = pcall(require, "ts_context_commentstring.internals")
|
||||
-- if not status_internals_ok then
|
||||
-- return
|
||||
-- end
|
||||
--
|
||||
-- return internals.calculate_commentstring {
|
||||
-- key = ctx.ctype == U.ctype.line and "__default" or "__multiline",
|
||||
-- location = location,
|
||||
-- }
|
||||
-- end,
|
|
@ -1,155 +0,0 @@
|
|||
require('dressing').setup({
|
||||
input = {
|
||||
-- Set to false to disable the vim.ui.input implementation
|
||||
enabled = true,
|
||||
|
||||
-- Default prompt string
|
||||
default_prompt = "Input:",
|
||||
|
||||
-- Can be 'left', 'right', or 'center'
|
||||
prompt_align = "center",
|
||||
|
||||
-- When true, <Esc> will close the modal
|
||||
insert_only = true,
|
||||
|
||||
-- When true, input will start in insert mode.
|
||||
start_in_insert = true,
|
||||
|
||||
-- These are passed to nvim_open_win
|
||||
anchor = "SW",
|
||||
border = "rounded",
|
||||
-- 'editor' and 'win' will default to being centered
|
||||
relative = "cursor",
|
||||
|
||||
-- These can be integers or a float between 0 and 1 (e.g. 0.4 for 40%)
|
||||
prefer_width = 40,
|
||||
width = nil,
|
||||
-- min_width and max_width can be a list of mixed types.
|
||||
-- min_width = {20, 0.2} means "the greater of 20 columns or 20% of total"
|
||||
max_width = { 140, 0.9 },
|
||||
min_width = { 20, 0.2 },
|
||||
|
||||
-- Window transparency (0-100)
|
||||
-- winblend = 20, -- causing errors
|
||||
-- Change default highlight groups (see :help winhl)
|
||||
-- winhighlight = "", -- causing errors
|
||||
|
||||
-- Set to `false` to disable
|
||||
mappings = {
|
||||
n = {
|
||||
["<Esc>"] = "Close",
|
||||
["<CR>"] = "Confirm",
|
||||
},
|
||||
i = {
|
||||
["<C-c>"] = "Close",
|
||||
["<CR>"] = "Confirm",
|
||||
["<Up>"] = "HistoryPrev",
|
||||
["<Down>"] = "HistoryNext",
|
||||
},
|
||||
},
|
||||
|
||||
override = function(conf)
|
||||
-- This is the config that will be passed to nvim_open_win.
|
||||
-- Change values here to customize the layout
|
||||
return conf
|
||||
end,
|
||||
|
||||
-- see :help dressing_get_config
|
||||
get_config = nil,
|
||||
},
|
||||
select = {
|
||||
-- Set to false to disable the vim.ui.select implementation
|
||||
enabled = true,
|
||||
|
||||
-- Priority list of preferred vim.select implementations
|
||||
backend = { "telescope", "fzf_lua", "fzf", "builtin", "nui" },
|
||||
|
||||
-- Trim trailing `:` from prompt
|
||||
trim_prompt = true,
|
||||
|
||||
-- Options for telescope selector
|
||||
-- These are passed into the telescope picker directly. Can be used like:
|
||||
-- telescope = require('telescope.themes').get_ivy({...})
|
||||
telescope = nil,
|
||||
|
||||
-- Options for fzf selector
|
||||
fzf = {
|
||||
window = {
|
||||
width = 0.5,
|
||||
height = 0.4,
|
||||
},
|
||||
},
|
||||
|
||||
-- Options for fzf_lua selector
|
||||
fzf_lua = {
|
||||
winopts = {
|
||||
width = 0.5,
|
||||
height = 0.4,
|
||||
},
|
||||
},
|
||||
|
||||
-- Options for nui Menu
|
||||
nui = {
|
||||
position = "50%",
|
||||
size = nil,
|
||||
relative = "editor",
|
||||
border = {
|
||||
style = "rounded",
|
||||
},
|
||||
buf_options = {
|
||||
swapfile = false,
|
||||
filetype = "DressingSelect",
|
||||
},
|
||||
-- win_options = {
|
||||
-- winblend = 10, -- might also cause errors
|
||||
-- },
|
||||
max_width = 80,
|
||||
max_height = 40,
|
||||
min_width = 40,
|
||||
min_height = 10,
|
||||
},
|
||||
|
||||
-- Options for built-in selector
|
||||
builtin = {
|
||||
-- These are passed to nvim_open_win
|
||||
anchor = "NW",
|
||||
border = "rounded",
|
||||
-- 'editor' and 'win' will default to being centered
|
||||
relative = "editor",
|
||||
|
||||
-- Window transparency (0-100)
|
||||
-- winblend = 10, -- causing errors
|
||||
-- Change default highlight groups (see :help winhl)
|
||||
-- winhighlight = "", -- causing errors
|
||||
|
||||
-- These can be integers or a float between 0 and 1 (e.g. 0.4 for 40%)
|
||||
-- the min_ and max_ options can be a list of mixed types.
|
||||
-- max_width = {140, 0.8} means "the lesser of 140 columns or 80% of total"
|
||||
width = nil,
|
||||
max_width = { 140, 0.8 },
|
||||
min_width = { 40, 0.2 },
|
||||
height = nil,
|
||||
max_height = 0.9,
|
||||
min_height = { 10, 0.2 },
|
||||
|
||||
-- Set to `false` to disable
|
||||
mappings = {
|
||||
["<Esc>"] = "Close",
|
||||
["<C-c>"] = "Close",
|
||||
["<CR>"] = "Confirm",
|
||||
},
|
||||
|
||||
override = function(conf)
|
||||
-- This is the config that will be passed to nvim_open_win.
|
||||
-- Change values here to customize the layout
|
||||
return conf
|
||||
end,
|
||||
},
|
||||
|
||||
-- Used to override format_item. See :help dressing-format
|
||||
format_item_override = {},
|
||||
|
||||
-- see :help dressing_get_config
|
||||
get_config = nil,
|
||||
},
|
||||
})
|
|
@ -1,48 +0,0 @@
|
|||
local status_ok, gitsigns = pcall(require, "gitsigns")
|
||||
if not status_ok then
|
||||
return
|
||||
end
|
||||
|
||||
gitsigns.setup {
|
||||
signs = {
|
||||
add = { hl = "GitSignsAdd", text = "▎", numhl = "GitSignsAddNr", linehl = "GitSignsAddLn" },
|
||||
change = { hl = "GitSignsChange", text = "▎", numhl = "GitSignsChangeNr", linehl = "GitSignsChangeLn" },
|
||||
delete = { hl = "GitSignsDelete", text = "契", numhl = "GitSignsDeleteNr", linehl = "GitSignsDeleteLn" },
|
||||
topdelete = { hl = "GitSignsDelete", text = "契", numhl = "GitSignsDeleteNr", linehl = "GitSignsDeleteLn" },
|
||||
changedelete = { hl = "GitSignsChange", text = "▎", numhl = "GitSignsChangeNr", linehl = "GitSignsChangeLn" },
|
||||
},
|
||||
signcolumn = true, -- Toggle with `:Gitsigns toggle_signs`
|
||||
numhl = false, -- Toggle with `:Gitsigns toggle_numhl`
|
||||
linehl = false, -- Toggle with `:Gitsigns toggle_linehl`
|
||||
word_diff = false, -- Toggle with `:Gitsigns toggle_word_diff`
|
||||
watch_gitdir = {
|
||||
interval = 1000,
|
||||
follow_files = true,
|
||||
},
|
||||
attach_to_untracked = true,
|
||||
current_line_blame = false, -- Toggle with `:Gitsigns toggle_current_line_blame`
|
||||
current_line_blame_opts = {
|
||||
virt_text = true,
|
||||
virt_text_pos = "eol", -- 'eol' | 'overlay' | 'right_align'
|
||||
delay = 1000,
|
||||
ignore_whitespace = false,
|
||||
},
|
||||
current_line_blame_formatter_opts = {
|
||||
relative_time = false,
|
||||
},
|
||||
sign_priority = 6,
|
||||
update_debounce = 100,
|
||||
status_formatter = nil, -- Use default
|
||||
max_file_length = 40000,
|
||||
preview_config = {
|
||||
-- Options passed to nvim_open_win
|
||||
border = "single",
|
||||
style = "minimal",
|
||||
relative = "cursor",
|
||||
row = 0,
|
||||
col = 1,
|
||||
},
|
||||
yadm = {
|
||||
enable = false,
|
||||
},
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
vim.cmd('hi IlluminatedWordText guibg=#504945 gui=bold')
|
||||
-- vim.cmd('hi IlluminatedWordRead guibg=#ffffff gui=bold')
|
||||
-- vim.cmd('hi IlluminatedWordWrite guibg=#ffffff gui=bold')
|
|
@ -1,6 +0,0 @@
|
|||
local status_ok, impatient = pcall(require, "impatient")
|
||||
if not status_ok then
|
||||
return
|
||||
end
|
||||
|
||||
impatient.enable_profile()
|
|
@ -1,70 +0,0 @@
|
|||
local status_ok, indent_blankline = pcall(require, "indent_blankline")
|
||||
if not status_ok then
|
||||
return
|
||||
end
|
||||
|
||||
vim.g.indent_blankline_buftype_exclude = { "terminal", "nofile" }
|
||||
vim.g.indent_blankline_filetype_exclude = {
|
||||
"help",
|
||||
"startify",
|
||||
"dashboard",
|
||||
"packer",
|
||||
"neogitstatus",
|
||||
"NvimTree",
|
||||
"Trouble",
|
||||
}
|
||||
vim.g.indentLine_enabled = 1
|
||||
-- vim.g.indent_blankline_char = "│"
|
||||
vim.g.indent_blankline_char = "▏"
|
||||
-- vim.g.indent_blankline_char = "▎"
|
||||
vim.g.indent_blankline_show_trailing_blankline_indent = false
|
||||
vim.g.indent_blankline_show_first_indent_level = true
|
||||
vim.g.indent_blankline_use_treesitter = true
|
||||
vim.g.indent_blankline_show_current_context = true
|
||||
vim.g.indent_blankline_context_patterns = {
|
||||
"class",
|
||||
"return",
|
||||
"function",
|
||||
"method",
|
||||
"^if",
|
||||
"^while",
|
||||
"jsx_element",
|
||||
"^for",
|
||||
"^object",
|
||||
"^table",
|
||||
"block",
|
||||
"arguments",
|
||||
"if_statement",
|
||||
"else_clause",
|
||||
"jsx_element",
|
||||
"jsx_self_closing_element",
|
||||
"try_statement",
|
||||
"catch_clause",
|
||||
"import_statement",
|
||||
"operation_type",
|
||||
}
|
||||
-- HACK: work-around for https://github.com/lukas-reineke/indent-blankline.nvim/issues/59
|
||||
vim.wo.colorcolumn = "99999"
|
||||
|
||||
-- vim.cmd [[highlight IndentBlanklineIndent1 guifg=#E06C75 gui=nocombine]]
|
||||
-- vim.cmd [[highlight IndentBlanklineIndent2 guifg=#E5C07B gui=nocombine]]
|
||||
-- vim.cmd [[highlight IndentBlanklineIndent3 guifg=#98C379 gui=nocombine]]
|
||||
-- vim.cmd [[highlight IndentBlanklineIndent4 guifg=#56B6C2 gui=nocombine]]
|
||||
-- vim.cmd [[highlight IndentBlanklineIndent5 guifg=#61AFEF gui=nocombine]]
|
||||
-- vim.cmd [[highlight IndentBlanklineIndent6 guifg=#C678DD gui=nocombine]]
|
||||
-- vim.opt.list = true
|
||||
-- vim.opt.listchars:append "space:⋅"
|
||||
-- vim.opt.listchars:append "space:"
|
||||
-- vim.opt.listchars:append "eol:↴"
|
||||
|
||||
indent_blankline.setup({
|
||||
-- show_end_of_line = true,
|
||||
-- space_char_blankline = " ",
|
||||
show_current_context = true,
|
||||
-- show_current_context_start = true,
|
||||
-- char_highlight_list = {
|
||||
-- "IndentBlanklineIndent1",
|
||||
-- "IndentBlanklineIndent2",
|
||||
-- "IndentBlanklineIndent3",
|
||||
-- },
|
||||
})
|
|
@ -1,146 +0,0 @@
|
|||
local opts = { noremap = true, silent = true }
|
||||
|
||||
local term_opts = { silent = true }
|
||||
|
||||
-- Shorten function name
|
||||
local keymap = vim.api.nvim_set_keymap
|
||||
|
||||
--Remap space as leader key
|
||||
vim.g.mapleader = " "
|
||||
--vim.g.maplocalleader = " "
|
||||
--vim.g.maplocalleader = "Bslash"
|
||||
vim.g.maplocalleader = "\\"
|
||||
|
||||
-- Modes
|
||||
-- normal_mode = "n",
|
||||
-- insert_mode = "i",
|
||||
-- visual_mode = "v",
|
||||
-- visual_block_mode = "x",
|
||||
-- term_mode = "t",
|
||||
-- command_mode = "c",
|
||||
|
||||
|
||||
-- NOTE Check mapping with :verbose map ____
|
||||
|
||||
-- Unmappings
|
||||
keymap("n", "<C-z>", "<nop>", opts)
|
||||
|
||||
|
||||
-- Surround
|
||||
-- vim.keymap.set("v", '<C-s>', 'S', { remap = true }) -- see surround.lua
|
||||
|
||||
|
||||
-- Spelling
|
||||
vim.keymap.set("n", "<C-s>", function()
|
||||
require("telescope.builtin").spell_suggest(require("telescope.themes").get_cursor({
|
||||
previewer = false,
|
||||
layout_config = {
|
||||
width = 50,
|
||||
height = 15,
|
||||
}
|
||||
})
|
||||
)
|
||||
end, { remap = true })
|
||||
-- vim.keymap.set("n", "<C-s>", "z=", { remap = true})
|
||||
-- keymap("n", "<C-s>", "<cmd>Telescope spell_suggest<cr>", { remap = true})
|
||||
|
||||
-- Kill search highlights
|
||||
keymap("n", "<CR>", ":noh<CR>", opts)
|
||||
|
||||
|
||||
-- Find project files
|
||||
vim.keymap.set("n", "<C-p>", function ()
|
||||
require('telescope.builtin').find_files(require('telescope.themes').get_dropdown({previewer = false})
|
||||
)
|
||||
end, { remap = true })
|
||||
|
||||
|
||||
-- Toggle comments
|
||||
vim.keymap.set('n', '<C-c>', '<Plug>(comment_toggle_linewise_current)')
|
||||
vim.keymap.set('x', '<C-c>', '<Plug>(comment_toggle_linewise_visual)')
|
||||
|
||||
-- Open help on word
|
||||
keymap("n", "<S-m>", ':execute "help " . expand("<cword>")<cr>', opts)
|
||||
|
||||
|
||||
-- Fix 'Y', 'E'
|
||||
keymap("n", "Y", "y$", opts)
|
||||
keymap("n", "E", "ge", opts)
|
||||
keymap("v", "Y", "y$", opts)
|
||||
keymap("v", "E", "ge", opts)
|
||||
|
||||
|
||||
-- Avoid cutting text pasted over
|
||||
keymap("v", "p", '"_dP', opts)
|
||||
|
||||
|
||||
-- Center cursor
|
||||
keymap("n", "m", "zz", opts)
|
||||
keymap("v", "m", "zz", opts)
|
||||
|
||||
|
||||
-- Better window navigation
|
||||
keymap("n", "<C-h>", "<C-w>h", opts)
|
||||
keymap("n", "<C-j>", "<C-w>j", opts)
|
||||
keymap("n", "<C-k>", "<C-w>k", opts)
|
||||
keymap("n", "<C-l>", "<C-w>l", opts)
|
||||
|
||||
|
||||
-- Resize with arrows
|
||||
-- keymap("n", "<C-Up>", ":resize -2<CR>", opts)
|
||||
-- keymap("n", "<C-Down>", ":resize +2<CR>", opts)
|
||||
keymap("n", "<A-Left>", ":vertical resize -2<CR>", opts)
|
||||
keymap("n", "<A-Right>", ":vertical resize +2<CR>", opts)
|
||||
keymap("n", "<A-h>", ":vertical resize -2<CR>", opts)
|
||||
keymap("n", "<A-l>", ":vertical resize +2<CR>", opts)
|
||||
|
||||
|
||||
-- Navigate buffers
|
||||
keymap("n", "<BS>", ":bnext<CR>", opts)
|
||||
keymap("n", "<S-TAB>", ":bprevious<CR>", opts)
|
||||
|
||||
|
||||
-- Drag lines
|
||||
keymap("n", "<A-j>", "<Esc>:m .+1<CR>==", opts)
|
||||
keymap("n", "<A-k>", "<Esc>:m .-2<CR>==", opts)
|
||||
keymap("x", "<A-j>", ":move '>+1<CR>gv-gv", opts)
|
||||
keymap("x", "<A-k>", ":move '<-2<CR>gv-gv", opts)
|
||||
keymap("v", "<A-j>", ":m'>+<CR>gv", opts)
|
||||
keymap("v", "<A-k>", ":m-2<CR>gv", opts)
|
||||
|
||||
-- Toggle Terminal
|
||||
keymap("n", "<c-t>",":ToggleTerm", opts)
|
||||
--keymap("n", "<c-v>",":ToggleTermSendCurrentLine", opts)
|
||||
|
||||
-- Horizontal lime movments --
|
||||
keymap("n", "<c-u>", "<c-u>zz", opts)
|
||||
keymap("n", "<c-d>", "<c-d>zz", opts)
|
||||
|
||||
|
||||
-- Horizontal lime movments --
|
||||
keymap("v", "<S-h>", "g^", opts)
|
||||
keymap("v", "<S-l>", "g$", opts)
|
||||
keymap("n", "<S-h>", "g^", opts)
|
||||
keymap("n", "<S-l>", "g$", opts)
|
||||
|
||||
-- Indentation
|
||||
keymap("v", "<", "<gv", opts)
|
||||
keymap("v", ">", ">gv", opts)
|
||||
keymap("n", "<", "<S-v><<esc>", opts)
|
||||
keymap("n", ">", "<S-v>><esc>", opts)
|
||||
|
||||
|
||||
-- Navigate display lines
|
||||
keymap("n", "J", "gj", opts)
|
||||
keymap("n", "K", "gk", opts)
|
||||
keymap("v", "J", "gj", opts)
|
||||
keymap("v", "K", "gk", opts)
|
||||
|
||||
|
||||
-- Terminal --
|
||||
-- Better terminal navigation
|
||||
-- keymap("t", "<C-h>", "<C-\\><C-N><C-w>h", term_opts)
|
||||
-- keymap("t", "<C-j>", "<C-\\><C-N><C-w>j", term_opts)
|
||||
-- keymap("t", "<C-k>", "<C-\\><C-N><C-w>k", term_opts)
|
||||
-- keymap("t", "<C-l>", "<C-\\><C-N><C-w>l", term_opts)
|
||||
|
|
@ -1,90 +0,0 @@
|
|||
local M = {}
|
||||
|
||||
local status_cmp_ok, cmp_nvim_lsp = pcall(require, "cmp_nvim_lsp")
|
||||
if not status_cmp_ok then
|
||||
return
|
||||
end
|
||||
|
||||
M.capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||
M.capabilities.textDocument.completion.completionItem.snippetSupport = true
|
||||
M.capabilities = cmp_nvim_lsp.default_capabilities(M.capabilities)
|
||||
|
||||
M.setup = function()
|
||||
local signs = {
|
||||
{ name = "DiagnosticSignError", text = "" },
|
||||
{ name = "DiagnosticSignWarn", text = "" },
|
||||
{ name = "DiagnosticSignHint", text = "" },
|
||||
{ name = "DiagnosticSignInfo", text = "" },
|
||||
}
|
||||
|
||||
for _, sign in ipairs(signs) do
|
||||
vim.fn.sign_define(sign.name, { texthl = sign.name, text = sign.text, numhl = "" })
|
||||
end
|
||||
|
||||
local config = {
|
||||
virtual_text = false, -- disable virtual text
|
||||
signs = {
|
||||
active = signs, -- show signs
|
||||
},
|
||||
update_in_insert = true,
|
||||
underline = true,
|
||||
severity_sort = true,
|
||||
float = {
|
||||
focusable = true,
|
||||
style = "minimal",
|
||||
border = "rounded",
|
||||
source = "always",
|
||||
header = "",
|
||||
prefix = "",
|
||||
},
|
||||
}
|
||||
|
||||
vim.diagnostic.config(config)
|
||||
|
||||
vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, {
|
||||
border = "rounded",
|
||||
})
|
||||
|
||||
vim.lsp.handlers["textDocument/signatureHelp"] = vim.lsp.with(vim.lsp.handlers.signature_help, {
|
||||
border = "rounded",
|
||||
})
|
||||
end
|
||||
|
||||
local function lsp_keymaps(bufnr)
|
||||
local opts = { noremap = true, silent = true }
|
||||
local keymap = vim.api.nvim_buf_set_keymap
|
||||
keymap(bufnr, "n", "gD", "<cmd>lua vim.lsp.buf.declaration()<CR>", opts)
|
||||
keymap(bufnr, "n", "gd", "<cmd>lua vim.lsp.buf.definition()<CR>", opts)
|
||||
keymap(bufnr, "n", "N", "<cmd>lua vim.lsp.buf.hover()<CR>", opts)
|
||||
keymap(bufnr, "n", "gI", "<cmd>lua vim.lsp.buf.implementation()<CR>", opts)
|
||||
keymap(bufnr, "n", "gr", "<cmd>lua vim.lsp.buf.references()<CR>", opts)
|
||||
-- keymap(bufnr, "n", "gl", "<cmd>lua vim.diagnostic.open_float()<CR>", opts)
|
||||
-- keymap(bufnr, "n", "<leader>lf", "<cmd>lua vim.lsp.buf.format{ async = true }<cr>", opts)
|
||||
-- keymap(bufnr, "n", "<leader>li", "<cmd>LspInfo<cr>", opts)
|
||||
-- keymap(bufnr, "n", "<leader>lI", "<cmd>LspInstallInfo<cr>", opts)
|
||||
-- keymap(bufnr, "n", "<leader>la", "<cmd>lua vim.lsp.buf.code_action()<cr>", opts)
|
||||
-- keymap(bufnr, "n", "<leader>lj", "<cmd>lua vim.diagnostic.goto_next({buffer=0})<cr>", opts)
|
||||
-- keymap(bufnr, "n", "<leader>lk", "<cmd>lua vim.diagnostic.goto_prev({buffer=0})<cr>", opts)
|
||||
-- keymap(bufnr, "n", "<leader>lr", "<cmd>lua vim.lsp.buf.rename()<cr>", opts)
|
||||
-- keymap(bufnr, "n", "<leader>ls", "<cmd>lua vim.lsp.buf.signature_help()<CR>", opts)
|
||||
-- keymap(bufnr, "n", "<leader>lq", "<cmd>lua vim.diagnostic.setloclist()<CR>", opts)
|
||||
end
|
||||
|
||||
M.on_attach = function(client, bufnr)
|
||||
if client.name == "tsserver" then -- turns off formatting
|
||||
client.server_capabilities.documentFormattingProvider = false
|
||||
end
|
||||
|
||||
if client.name == "lua_ls" then -- turns off formatting
|
||||
client.server_capabilities.documentFormattingProvider = false
|
||||
end
|
||||
|
||||
lsp_keymaps(bufnr)
|
||||
local status_ok, illuminate = pcall(require, "illuminate")
|
||||
if not status_ok then
|
||||
return
|
||||
end
|
||||
illuminate.on_attach(client)
|
||||
end
|
||||
|
||||
return M
|
|
@ -1,9 +0,0 @@
|
|||
local status_ok, _ = pcall(require, "lspconfig")
|
||||
if not status_ok then
|
||||
return
|
||||
end
|
||||
|
||||
require "user.lsp.mason"
|
||||
-- require "user.lsp.texlab"
|
||||
require ("user.lsp.handlers").setup()
|
||||
require "user.lsp.null-ls"
|
|
@ -1,24 +0,0 @@
|
|||
local null_ls_status_ok, null_ls = pcall(require, "null-ls")
|
||||
if not null_ls_status_ok then
|
||||
return
|
||||
end
|
||||
|
||||
-- https://github.com/jose-elias-alvarez/null-ls.nvim/tree/main/lua/null-ls/builtins/formatting
|
||||
local formatting = null_ls.builtins.formatting
|
||||
-- https://github.com/jose-elias-alvarez/null-ls.nvim/tree/main/lua/null-ls/builtins/diagnostics
|
||||
local diagnostics = null_ls.builtins.diagnostics
|
||||
|
||||
-- local sources = { null_ls.builtins.diagnostics.cspell, null_ls.builtins.code_actions.cspell }
|
||||
|
||||
null_ls.setup({
|
||||
debug = false,
|
||||
sources = {
|
||||
formatting.prettier.with({ extra_args = { "--no-semi", "--single-quote", "--jsx-single-quote" } }),
|
||||
formatting.black.with({ extra_args = { "--fast" } }),
|
||||
formatting.stylua,
|
||||
-- null_ls.builtins.diagnostics.cspell,
|
||||
-- null_ls.builtins.code_actions.cspell,
|
||||
null_ls.builtins.completion.spell,
|
||||
-- diagnostics.flake8
|
||||
},
|
||||
})
|
|
@ -1,197 +0,0 @@
|
|||
local default_schemas = nil
|
||||
local status_ok, jsonls_settings = pcall(require, "nlspsettings.jsonls")
|
||||
if status_ok then
|
||||
default_schemas = jsonls_settings.get_default_schemas()
|
||||
end
|
||||
|
||||
local schemas = {
|
||||
{
|
||||
description = "TypeScript compiler configuration file",
|
||||
fileMatch = {
|
||||
"tsconfig.json",
|
||||
"tsconfig.*.json",
|
||||
},
|
||||
url = "https://json.schemastore.org/tsconfig.json",
|
||||
},
|
||||
{
|
||||
description = "Lerna config",
|
||||
fileMatch = { "lerna.json" },
|
||||
url = "https://json.schemastore.org/lerna.json",
|
||||
},
|
||||
{
|
||||
description = "Babel configuration",
|
||||
fileMatch = {
|
||||
".babelrc.json",
|
||||
".babelrc",
|
||||
"babel.config.json",
|
||||
},
|
||||
url = "https://json.schemastore.org/babelrc.json",
|
||||
},
|
||||
{
|
||||
description = "ESLint config",
|
||||
fileMatch = {
|
||||
".eslintrc.json",
|
||||
".eslintrc",
|
||||
},
|
||||
url = "https://json.schemastore.org/eslintrc.json",
|
||||
},
|
||||
{
|
||||
description = "Bucklescript config",
|
||||
fileMatch = { "bsconfig.json" },
|
||||
url = "https://raw.githubusercontent.com/rescript-lang/rescript-compiler/8.2.0/docs/docson/build-schema.json",
|
||||
},
|
||||
{
|
||||
description = "Prettier config",
|
||||
fileMatch = {
|
||||
".prettierrc",
|
||||
".prettierrc.json",
|
||||
"prettier.config.json",
|
||||
},
|
||||
url = "https://json.schemastore.org/prettierrc",
|
||||
},
|
||||
{
|
||||
description = "Vercel Now config",
|
||||
fileMatch = { "now.json" },
|
||||
url = "https://json.schemastore.org/now",
|
||||
},
|
||||
{
|
||||
description = "Stylelint config",
|
||||
fileMatch = {
|
||||
".stylelintrc",
|
||||
".stylelintrc.json",
|
||||
"stylelint.config.json",
|
||||
},
|
||||
url = "https://json.schemastore.org/stylelintrc",
|
||||
},
|
||||
{
|
||||
description = "A JSON schema for the ASP.NET LaunchSettings.json files",
|
||||
fileMatch = { "launchsettings.json" },
|
||||
url = "https://json.schemastore.org/launchsettings.json",
|
||||
},
|
||||
{
|
||||
description = "Schema for CMake Presets",
|
||||
fileMatch = {
|
||||
"CMakePresets.json",
|
||||
"CMakeUserPresets.json",
|
||||
},
|
||||
url = "https://raw.githubusercontent.com/Kitware/CMake/master/Help/manual/presets/schema.json",
|
||||
},
|
||||
{
|
||||
description = "Configuration file as an alternative for configuring your repository in the settings page.",
|
||||
fileMatch = {
|
||||
".codeclimate.json",
|
||||
},
|
||||
url = "https://json.schemastore.org/codeclimate.json",
|
||||
},
|
||||
{
|
||||
description = "LLVM compilation database",
|
||||
fileMatch = {
|
||||
"compile_commands.json",
|
||||
},
|
||||
url = "https://json.schemastore.org/compile-commands.json",
|
||||
},
|
||||
{
|
||||
description = "Config file for Command Task Runner",
|
||||
fileMatch = {
|
||||
"commands.json",
|
||||
},
|
||||
url = "https://json.schemastore.org/commands.json",
|
||||
},
|
||||
{
|
||||
description = "AWS CloudFormation provides a common language for you to describe and provision all the infrastructure resources in your cloud environment.",
|
||||
fileMatch = {
|
||||
"*.cf.json",
|
||||
"cloudformation.json",
|
||||
},
|
||||
url = "https://raw.githubusercontent.com/awslabs/goformation/v5.2.9/schema/cloudformation.schema.json",
|
||||
},
|
||||
{
|
||||
description = "The AWS Serverless Application Model (AWS SAM, previously known as Project Flourish) extends AWS CloudFormation to provide a simplified way of defining the Amazon API Gateway APIs, AWS Lambda functions, and Amazon DynamoDB tables needed by your serverless application.",
|
||||
fileMatch = {
|
||||
"serverless.template",
|
||||
"*.sam.json",
|
||||
"sam.json",
|
||||
},
|
||||
url = "https://raw.githubusercontent.com/awslabs/goformation/v5.2.9/schema/sam.schema.json",
|
||||
},
|
||||
{
|
||||
description = "Json schema for properties json file for a GitHub Workflow template",
|
||||
fileMatch = {
|
||||
".github/workflow-templates/**.properties.json",
|
||||
},
|
||||
url = "https://json.schemastore.org/github-workflow-template-properties.json",
|
||||
},
|
||||
{
|
||||
description = "golangci-lint configuration file",
|
||||
fileMatch = {
|
||||
".golangci.toml",
|
||||
".golangci.json",
|
||||
},
|
||||
url = "https://json.schemastore.org/golangci-lint.json",
|
||||
},
|
||||
{
|
||||
description = "JSON schema for the JSON Feed format",
|
||||
fileMatch = {
|
||||
"feed.json",
|
||||
},
|
||||
url = "https://json.schemastore.org/feed.json",
|
||||
versions = {
|
||||
["1"] = "https://json.schemastore.org/feed-1.json",
|
||||
["1.1"] = "https://json.schemastore.org/feed.json",
|
||||
},
|
||||
},
|
||||
{
|
||||
description = "Packer template JSON configuration",
|
||||
fileMatch = {
|
||||
"packer.json",
|
||||
},
|
||||
url = "https://json.schemastore.org/packer.json",
|
||||
},
|
||||
{
|
||||
description = "NPM configuration file",
|
||||
fileMatch = {
|
||||
"package.json",
|
||||
},
|
||||
url = "https://json.schemastore.org/package.json",
|
||||
},
|
||||
{
|
||||
description = "JSON schema for Visual Studio component configuration files",
|
||||
fileMatch = {
|
||||
"*.vsconfig",
|
||||
},
|
||||
url = "https://json.schemastore.org/vsconfig.json",
|
||||
},
|
||||
{
|
||||
description = "Resume json",
|
||||
fileMatch = { "resume.json" },
|
||||
url = "https://raw.githubusercontent.com/jsonresume/resume-schema/v1.0.0/schema.json",
|
||||
},
|
||||
}
|
||||
|
||||
local function extend(tab1, tab2)
|
||||
for _, value in ipairs(tab2 or {}) do
|
||||
table.insert(tab1, value)
|
||||
end
|
||||
return tab1
|
||||
end
|
||||
|
||||
local extended_schemas = extend(schemas, default_schemas)
|
||||
|
||||
local opts = {
|
||||
settings = {
|
||||
json = {
|
||||
schemas = extended_schemas,
|
||||
},
|
||||
},
|
||||
setup = {
|
||||
commands = {
|
||||
Format = {
|
||||
function()
|
||||
vim.lsp.buf.range_formatting({}, { 0, 0 }, { vim.fn.line "$", 0 })
|
||||
end,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
return opts
|
|
@ -1,9 +0,0 @@
|
|||
return {
|
||||
settings = {
|
||||
python = {
|
||||
analysis = {
|
||||
typeCheckingMode = "off",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
|
@ -1,16 +0,0 @@
|
|||
return {
|
||||
settings = {
|
||||
|
||||
Lua = {
|
||||
diagnostics = {
|
||||
globals = { "vim" },
|
||||
},
|
||||
workspace = {
|
||||
library = {
|
||||
[vim.fn.expand("$VIMRUNTIME/lua")] = true,
|
||||
[vim.fn.stdpath("config") .. "/lua"] = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
|
@ -1,93 +0,0 @@
|
|||
local status_ok, lualine = pcall(require, "lualine")
|
||||
if not status_ok then
|
||||
return
|
||||
end
|
||||
|
||||
local hide_in_width = function()
|
||||
return vim.fn.winwidth(0) > 80
|
||||
end
|
||||
|
||||
local diagnostics = {
|
||||
"diagnostics",
|
||||
sources = { "nvim_diagnostic" },
|
||||
sections = { "error", "warn" },
|
||||
symbols = { error = " ", warn = " " },
|
||||
colored = false,
|
||||
update_in_insert = false,
|
||||
always_visible = true,
|
||||
}
|
||||
|
||||
local diff = {
|
||||
"diff",
|
||||
colored = false,
|
||||
symbols = { added = " ", modified = " ", removed = " " }, -- changes diff symbols
|
||||
cond = hide_in_width
|
||||
}
|
||||
|
||||
local mode = {
|
||||
"mode",
|
||||
fmt = function(str)
|
||||
return "-- " .. str .. " --"
|
||||
end,
|
||||
}
|
||||
|
||||
local filetype = {
|
||||
"filetype",
|
||||
icons_enabled = false,
|
||||
icon = nil,
|
||||
}
|
||||
|
||||
local branch = {
|
||||
"branch",
|
||||
icons_enabled = true,
|
||||
icon = "",
|
||||
}
|
||||
|
||||
local location = {
|
||||
"location",
|
||||
padding = 0,
|
||||
}
|
||||
|
||||
-- cool function for progress
|
||||
local progress = function()
|
||||
local current_line = vim.fn.line(".")
|
||||
local total_lines = vim.fn.line("$")
|
||||
local chars = { "__", "▁▁", "▂▂", "▃▃", "▄▄", "▅▅", "▆▆", "▇▇", "██" }
|
||||
local line_ratio = current_line / total_lines
|
||||
local index = math.ceil(line_ratio * #chars)
|
||||
return chars[index]
|
||||
end
|
||||
|
||||
local spaces = function()
|
||||
return "spaces: " .. vim.api.nvim_buf_get_option(0, "shiftwidth")
|
||||
end
|
||||
|
||||
lualine.setup({
|
||||
options = {
|
||||
icons_enabled = true,
|
||||
theme = "auto",
|
||||
component_separators = { left = "", right = "" },
|
||||
section_separators = { left = "", right = "" },
|
||||
disabled_filetypes = { "alpha", "dashboard", "NvimTree", "Outline" },
|
||||
always_divide_middle = true,
|
||||
},
|
||||
sections = {
|
||||
lualine_a = { branch, diagnostics },
|
||||
lualine_b = { mode },
|
||||
lualine_c = {},
|
||||
-- lualine_x = { "encoding", "fileformat", "filetype" },
|
||||
lualine_x = { diff, spaces, "encoding", filetype },
|
||||
lualine_y = { location },
|
||||
lualine_z = { progress },
|
||||
},
|
||||
inactive_sections = {
|
||||
lualine_a = {},
|
||||
lualine_b = {},
|
||||
lualine_c = { "filename" },
|
||||
lualine_x = { "location" },
|
||||
lualine_y = {},
|
||||
lualine_z = {},
|
||||
},
|
||||
tabline = {},
|
||||
extensions = {},
|
||||
})
|
|
@ -1,3 +0,0 @@
|
|||
local ls = require("luasnip")
|
||||
|
||||
require("luasnip.loaders.from_snipmate").load({ paths = "~/.config/nvim/snippets/" })
|
|
@ -1,99 +0,0 @@
|
|||
local status_ok, nvim_tree = pcall(require, "nvim-tree")
|
||||
if not status_ok then
|
||||
return
|
||||
end
|
||||
|
||||
local config_status_ok, nvim_tree_config = pcall(require, "nvim-tree.config")
|
||||
if not config_status_ok then
|
||||
return
|
||||
end
|
||||
|
||||
local tree_cb = nvim_tree_config.nvim_tree_callback
|
||||
|
||||
-- vim.g.loaded_netrw = 1
|
||||
-- vim.g.loaded_netrwPlugin = 1
|
||||
vim.g.nvim_tree_respect_buf_cwd = 1
|
||||
|
||||
nvim_tree.setup {
|
||||
-- sync_root_with_cwd = true,
|
||||
-- respect_buf_cwd = true,
|
||||
-- disable_netrw = true,
|
||||
-- hijack_netrw = true,
|
||||
-- respect_buf_cwd = false,
|
||||
-- update_cwd = false,
|
||||
actions = {
|
||||
open_file = {
|
||||
quit_on_open =true,
|
||||
},
|
||||
change_dir = {
|
||||
enable = true,
|
||||
global = false,
|
||||
},
|
||||
},
|
||||
git = {
|
||||
enable = true,
|
||||
ignore = false,
|
||||
timeout = 500,
|
||||
},
|
||||
filters = {
|
||||
custom = { ".git" },
|
||||
},
|
||||
update_focused_file = {
|
||||
enable = true,
|
||||
update_cwd = true,
|
||||
-- ignore_list = {},
|
||||
-- update_root = true,
|
||||
},
|
||||
renderer = {
|
||||
root_folder_modifier = ":t",
|
||||
icons = {
|
||||
glyphs = {
|
||||
default = "",
|
||||
symlink = "",
|
||||
folder = {
|
||||
arrow_open = "",
|
||||
arrow_closed = "",
|
||||
default = "",
|
||||
open = "",
|
||||
empty = "",
|
||||
empty_open = "",
|
||||
symlink = "",
|
||||
symlink_open = "",
|
||||
},
|
||||
git = {
|
||||
unstaged = "",
|
||||
staged = "S",
|
||||
unmerged = "",
|
||||
renamed = "➜",
|
||||
untracked = "U",
|
||||
deleted = "",
|
||||
ignored = "◌",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
diagnostics = {
|
||||
enable = true,
|
||||
show_on_dirs = true,
|
||||
icons = {
|
||||
hint = "",
|
||||
info = "",
|
||||
warning = "",
|
||||
error = "",
|
||||
},
|
||||
},
|
||||
--[[
|
||||
view = {
|
||||
width = 30,
|
||||
side = "left",
|
||||
mappings = {
|
||||
list = {
|
||||
{ key = { "l", "<CR>", "o" }, cb = tree_cb "edit" },
|
||||
{ key = "h", cb = tree_cb "close_node" },
|
||||
{ key = "v", cb = tree_cb "vsplit" },
|
||||
},
|
||||
},
|
||||
},
|
||||
]]--
|
||||
}
|
||||
|
|
@ -1,77 +0,0 @@
|
|||
local options = {
|
||||
spell = true,
|
||||
spelllang = { 'en_gb' },
|
||||
backup = false, -- creates a backup file
|
||||
clipboard = "unnamedplus", -- allows neovim to access the system clipboard
|
||||
cmdheight = 2, -- 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 = true, -- highlight all matches on previous search pattern
|
||||
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 = 2, -- always show tabs
|
||||
smartcase = true, -- smart case
|
||||
smartindent = false, -- make indenting smarter again
|
||||
autoindent = false, -- 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 = 100, -- time to wait for a mapped sequence to complete (in milliseconds)
|
||||
undofile = true, -- enable persistent undo
|
||||
updatetime = 300, -- 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 = 2, -- the number of spaces inserted for each indentation
|
||||
tabstop = 2, -- insert 2 spaces for a tab
|
||||
cursorline = true, -- highlight the current line
|
||||
number = true, -- set numbered lines
|
||||
relativenumber = true, -- set relative numbered lines
|
||||
numberwidth = 4, -- set number column width to 2 {default 4}
|
||||
|
||||
signcolumn = "yes", -- always show the sign column, otherwise it would shift the text each time
|
||||
wrap = true, -- display lines as one long line
|
||||
breakindent = true, -- tab wrapped lines
|
||||
linebreak = true, -- companion to wrap, don't split words
|
||||
showbreak = " ", -- set indent of wrapped lines
|
||||
scrolloff = 7, -- minimal number of screen lines to keep above and below the cursor
|
||||
sidescrolloff = 7, -- minimal number of screen columns either side of cursor if wrap is `false`
|
||||
guifont = "monospace:h17", -- the font used in graphical neovim applications
|
||||
}
|
||||
|
||||
-- INDENT -- (see also vimtex.lua)
|
||||
vim.g['tex_flavor'] = 'latex'
|
||||
vim.g['tex_indent_items'] = 0 -- turn off enumerate indent
|
||||
vim.g['tex_indent_brace'] = 0 -- turn off brace indent
|
||||
-- vim.g['tex_indent_and'] = 0 -- whether to align with &
|
||||
-- vim.g['latex_indent_enabled'] = 0
|
||||
-- vim.g['vimtex_indent_enabled'] = 0
|
||||
-- vim.g['did_indent'] = 1
|
||||
|
||||
vim.opt.shortmess:append "c"
|
||||
|
||||
for k, v in pairs(options) do
|
||||
vim.opt[k] = v
|
||||
end
|
||||
|
||||
vim.cmd "set whichwrap+=<,>,[,],h,l"
|
||||
-- vim.cmd [[set iskeyword+=-]] -- unites dashed words
|
||||
|
||||
-- CLIPBOARD -- (for yanky)
|
||||
-- Mac users delete to avoid "target string not available" error
|
||||
--vim.g.clipboard = {
|
||||
-- name = "xsel_override",
|
||||
-- copy = {
|
||||
-- ["+"] = "xsel --input --clipboard",
|
||||
-- ["*"] = "xsel --input --primary",
|
||||
-- },
|
||||
-- paste = {
|
||||
-- ["+"] = "xsel --output --clipboard",
|
||||
-- ["*"] = "xsel --output --primary",
|
||||
-- },
|
||||
-- cache_enabled = 1,
|
||||
--}
|
||||
|
|
@ -1,180 +0,0 @@
|
|||
local fn = vim.fn
|
||||
|
||||
-- Automatically install packer
|
||||
local install_path = fn.stdpath("data") .. "/site/pack/packer/start/packer.nvim"
|
||||
if fn.empty(fn.glob(install_path)) > 0 then
|
||||
PACKER_BOOTSTRAP = fn.system({
|
||||
"git",
|
||||
"clone",
|
||||
"--depth",
|
||||
"1",
|
||||
"https://github.com/wbthomason/packer.nvim",
|
||||
install_path,
|
||||
})
|
||||
print("Installing packer close and reopen Neovim...")
|
||||
vim.cmd([[packadd packer.nvim]])
|
||||
end
|
||||
|
||||
-- Autocommand that reloads neovim whenever you save the plugins.lua file
|
||||
vim.cmd([[
|
||||
augroup packer_user_config
|
||||
autocmd!
|
||||
autocmd BufWritePost plugins.lua source <afile> | PackerSync
|
||||
augroup end
|
||||
]])
|
||||
|
||||
-- Use a protected call so we don't error out on first use
|
||||
local status_ok, packer = pcall(require, "packer")
|
||||
if not status_ok then
|
||||
return
|
||||
end
|
||||
|
||||
-- Have packer use a popup window
|
||||
packer.init({
|
||||
display = {
|
||||
open_fn = function()
|
||||
return require("packer.util").float({ border = "rounded" })
|
||||
end,
|
||||
},
|
||||
})
|
||||
|
||||
-- Packer
|
||||
return packer.startup(function(use)
|
||||
-- Have packer manage itself
|
||||
use { "wbthomason/packer.nvim" }
|
||||
-- Useful lua functions used by lots of plugins
|
||||
use { "nvim-lua/plenary.nvim" }
|
||||
|
||||
-- General
|
||||
use { "windwp/nvim-autopairs" }
|
||||
use { "numToStr/Comment.nvim" }
|
||||
use { "lewis6991/impatient.nvim" }
|
||||
use { "kylechui/nvim-surround" }
|
||||
use { "mbbill/undotree" } -- Vimscript
|
||||
-- use { "mg979/vim-visual-multi" } -- Vimscript
|
||||
use { "glacambre/firenvim" } -- Vimscript
|
||||
--use { "gbprod/yanky.nvim" }
|
||||
|
||||
-- Mappings
|
||||
use { "folke/which-key.nvim" }
|
||||
|
||||
-- Terminal
|
||||
use { "akinsho/toggleterm.nvim" }
|
||||
|
||||
-- File Management
|
||||
use { "kyazdani42/nvim-tree.lua" }
|
||||
use { "kyazdani42/nvim-web-devicons" }
|
||||
use { "Shatur/neovim-session-manager" }
|
||||
|
||||
-- Appearance
|
||||
-- use { "akinsho/bufferline.nvim" }
|
||||
use { "nvim-lualine/lualine.nvim" }
|
||||
use { "lukas-reineke/indent-blankline.nvim" }
|
||||
use { "goolord/alpha-nvim" }
|
||||
use { "RRethy/vim-illuminate" }
|
||||
|
||||
-- Colorschemes
|
||||
use {
|
||||
"rose-pine/neovim",
|
||||
as = "rose-pine",
|
||||
}
|
||||
-- use { "ellisonleao/gruvbox.nvim" }
|
||||
-- use { "luisiacc/gruvbox-baby" }
|
||||
-- use { "folke/tokyonight.nvim" }
|
||||
-- use { "lunarvim/darkplus.nvim" }
|
||||
-- use { "navarasu/onedark.nvim" }
|
||||
-- use { "savq/melange" }
|
||||
-- use { "EdenEast/nightfox.nvim" }
|
||||
-- use { "navarasu/onedark.nvim" }
|
||||
|
||||
-- Cmp
|
||||
use { "hrsh7th/nvim-cmp" }
|
||||
use { "hrsh7th/cmp-nvim-lsp" }
|
||||
-- buffer completions
|
||||
use { "hrsh7th/cmp-buffer" }
|
||||
-- path completions
|
||||
use { "hrsh7th/cmp-path" }
|
||||
-- snippet completions
|
||||
use { "saadparwaiz1/cmp_luasnip" }
|
||||
-- command completions
|
||||
use { "hrsh7th/cmp-cmdline" }
|
||||
-- spelling completions
|
||||
use { "f3fora/cmp-spell" }
|
||||
-- helps Vimtex completions
|
||||
use { "hrsh7th/cmp-omni" }
|
||||
-- use { "aspeddro/cmp-pandoc.nvim" }
|
||||
|
||||
-- LSP
|
||||
-- enable LSP
|
||||
use { "neovim/nvim-lspconfig" }
|
||||
-- simple to use language server installer
|
||||
use { "williamboman/mason.nvim", run = ":MasonUpdate" }
|
||||
use { "williamboman/mason-lspconfig.nvim" }
|
||||
-- for formatters and linters
|
||||
use { "jose-elias-alvarez/null-ls.nvim" }
|
||||
|
||||
-- LaTeX
|
||||
use { "lervag/vimtex" } -- essential for LaTeX; Vimscript
|
||||
use { "kdheepak/cmp-latex-symbols" }
|
||||
use { "jbyuki/nabla.nvim" } -- show symbols in editor
|
||||
|
||||
-- Markdown
|
||||
use({
|
||||
"gaoDean/autolist.nvim",
|
||||
ft = {
|
||||
"markdown",
|
||||
"text",
|
||||
"tex",
|
||||
"plaintex",
|
||||
},
|
||||
config = function()
|
||||
local autolist = require("autolist")
|
||||
autolist.setup()
|
||||
autolist.create_mapping_hook("i", "<CR>", autolist.new)
|
||||
autolist.create_mapping_hook("i", "<Tab>", autolist.indent)
|
||||
autolist.create_mapping_hook("i", "<S-Tab>", autolist.indent, "<C-D>")
|
||||
autolist.create_mapping_hook("n", "o", autolist.new)
|
||||
autolist.create_mapping_hook("n", "O", autolist.new_before)
|
||||
-- autolist.create_mapping_hook("n", ">>", autolist.indent)
|
||||
-- autolist.create_mapping_hook("n", "<<", autolist.indent)
|
||||
autolist.create_mapping_hook("n", "<leader>r", autolist.force_recalculate)
|
||||
autolist.create_mapping_hook("n", "<leader>x", autolist.invert_entry, "")
|
||||
vim.api.nvim_create_autocmd("TextChanged", {
|
||||
pattern = "-",
|
||||
callback = function()
|
||||
vim.cmd.normal({autolist.force_recalculate(nil, nil), bang = false})
|
||||
end
|
||||
})
|
||||
end,
|
||||
})
|
||||
|
||||
-- Snippets
|
||||
--snippet engine
|
||||
use { "L3MON4D3/LuaSnip" }
|
||||
-- a bunch of snippets to use
|
||||
-- use { "garbas/vim-snipmate" }
|
||||
-- use { "rafamadriz/friendly-snippets" }
|
||||
|
||||
-- Telescope
|
||||
use { "nvim-telescope/telescope.nvim" }
|
||||
-- , commit = "76ea9a898d3307244dce3573392dcf2cc38f340f"
|
||||
use { "stevearc/dressing.nvim" }
|
||||
use { "nvim-telescope/telescope-bibtex.nvim",
|
||||
config = function ()
|
||||
require"telescope".load_extension("bibtex")
|
||||
end,
|
||||
}
|
||||
|
||||
-- Treesitter
|
||||
use { "nvim-treesitter/nvim-treesitter" }
|
||||
-- , commit = "8e763332b7bf7b3a426fd8707b7f5aa85823a5ac"
|
||||
|
||||
-- Git
|
||||
use { "lewis6991/gitsigns.nvim" }
|
||||
|
||||
-- Automatically set up your configuration after cloning packer.nvim
|
||||
-- Put this at the end after all plugins
|
||||
if PACKER_BOOTSTRAP then
|
||||
require("packer").sync()
|
||||
end
|
||||
end)
|
|
@ -1,17 +0,0 @@
|
|||
local Path = require('plenary.path')
|
||||
|
||||
require('session_manager').setup({
|
||||
sessions_dir = Path:new(vim.fn.stdpath('data'), 'sessions'), -- The directory where the session files will be saved.
|
||||
path_replacer = '__', -- The character to which the path separator will be replaced for session files.
|
||||
colon_replacer = '++', -- The character to which the colon symbol will be replaced for session files.
|
||||
autoload_mode = require('session_manager.config').AutoloadMode.Disabled, -- Define what to do when Neovim is started without arguments. Possible values: Disabled, CurrentDir, LastSession
|
||||
autosave_last_session = true, -- Automatically save last session on exit and on session switch.
|
||||
autosave_ignore_not_normal = true, -- Plugin will not save a session when no buffers are opened, or all of them aren't writable or listed.
|
||||
autosave_ignore_dirs = {}, -- A list of directories where the session will not be autosaved.
|
||||
autosave_ignore_filetypes = { -- All buffers of these file types will be closed before the session is saved.
|
||||
'gitcommit',
|
||||
},
|
||||
autosave_ignore_buftypes = {}, -- All buffers of these bufer types will be closed before the session is saved.
|
||||
autosave_only_in_session = true, -- Always autosaves session. If true, only autosaves after a session is active.
|
||||
max_path_length = 80, -- Shorten the display path if length exceeds this threshold. Use 0 if don't want to shorten the path at all.
|
||||
})
|
|
@ -1,22 +0,0 @@
|
|||
require("nvim-surround").setup({
|
||||
keymaps = {
|
||||
insert = false,
|
||||
insert_line = false,
|
||||
normal = false,
|
||||
normal_cur = false,
|
||||
normal_line = false,
|
||||
normal_cur_line = false,
|
||||
visual = "<S-s>",
|
||||
visual_line = false,
|
||||
delete = false,
|
||||
change = false,
|
||||
},
|
||||
aliases = {
|
||||
["a"] = false,
|
||||
["b"] = false,
|
||||
["B"] = false,
|
||||
["r"] = false,
|
||||
["q"] = false,
|
||||
["s"] = false,
|
||||
},
|
||||
})
|
|
@ -1,72 +0,0 @@
|
|||
local status_ok, toggleterm = pcall(require, "toggleterm")
|
||||
if not status_ok then
|
||||
return
|
||||
end
|
||||
|
||||
toggleterm.setup({
|
||||
--size = 20,
|
||||
size = 8,
|
||||
open_mapping = [[<c-t>]],
|
||||
hide_numbers = true,
|
||||
shade_filetypes = {},
|
||||
shade_terminals = true,
|
||||
shading_factor = 2,
|
||||
start_in_insert = true,
|
||||
insert_mappings = true,
|
||||
persist_size = true,
|
||||
-- direction = 'vertical' | 'horizontal' | 'tab' | 'float'
|
||||
direction = "horizontal",
|
||||
close_on_exit = true,
|
||||
shell = vim.o.shell,
|
||||
float_opts = {
|
||||
border = "curved",
|
||||
winblend = 0,
|
||||
highlights = {
|
||||
border = "Normal",
|
||||
background = "Normal",
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
function _G.set_terminal_keymaps()
|
||||
local opts = {noremap = true}
|
||||
vim.api.nvim_buf_set_keymap(0, 't', '<esc>', [[<C-t><C-n>]], opts)
|
||||
vim.api.nvim_buf_set_keymap(0, 't', 'jk', [[<C-t><C-n>]], opts)
|
||||
vim.api.nvim_buf_set_keymap(0, 't', '<C-h>', [[<C-t><C-n><C-W>h]], opts)
|
||||
vim.api.nvim_buf_set_keymap(0, 't', '<C-j>', [[<C-t><C-n><C-W>j]], opts)
|
||||
vim.api.nvim_buf_set_keymap(0, 't', '<C-k>', [[<C-t><C-n><C-W>k]], opts)
|
||||
vim.api.nvim_buf_set_keymap(0, 't', '<C-l>', [[<C-t><C-n><C-W>l]], opts)
|
||||
end
|
||||
|
||||
vim.cmd('autocmd! TermOpen term://* lua set_terminal_keymaps()')
|
||||
|
||||
local Terminal = require("toggleterm.terminal").Terminal
|
||||
local lazygit = Terminal:new({ cmd = "lazygit", hidden = true })
|
||||
|
||||
function _LAZYGIT_TOGGLE()
|
||||
lazygit:toggle()
|
||||
end
|
||||
|
||||
local node = Terminal:new({ cmd = "node", hidden = true })
|
||||
|
||||
function _NODE_TOGGLE()
|
||||
node:toggle()
|
||||
end
|
||||
|
||||
local ncdu = Terminal:new({ cmd = "ncdu", hidden = true })
|
||||
|
||||
function _NCDU_TOGGLE()
|
||||
ncdu:toggle()
|
||||
end
|
||||
|
||||
local htop = Terminal:new({ cmd = "htop", hidden = true })
|
||||
|
||||
function _HTOP_TOGGLE()
|
||||
htop:toggle()
|
||||
end
|
||||
|
||||
local python = Terminal:new({ cmd = "python", hidden = true })
|
||||
|
||||
function _PYTHON_TOGGLE()
|
||||
python:toggle()
|
||||
end
|
|
@ -1,33 +0,0 @@
|
|||
local status_ok, configs = pcall(require, "nvim-treesitter.configs")
|
||||
if not status_ok then
|
||||
return
|
||||
end
|
||||
|
||||
configs.setup({
|
||||
ensure_installed = { -- list "all" or a list of languages
|
||||
"markdown_inline",
|
||||
"markdown",
|
||||
"lua",
|
||||
"python",
|
||||
"vim",
|
||||
"yaml",
|
||||
--"perl",
|
||||
"json",
|
||||
"html",
|
||||
"vimdoc",
|
||||
--"haskell",
|
||||
"gitignore",
|
||||
"bibtex",
|
||||
"julia",
|
||||
},
|
||||
ignore_install = { "latex" }, -- List of parsers to ignore installing
|
||||
highlight = {
|
||||
enable = true, -- false will disable the whole extension
|
||||
disable = { "css", "latex" }, -- list of language that will be disabled
|
||||
-- additional_vim_regex_highlighting = { "latex", "markdown" },
|
||||
},
|
||||
autopairs = {
|
||||
enable = true,
|
||||
},
|
||||
indent = { enable = true, disable = { "latex", "python", "css", "julia" } },
|
||||
})
|
|
@ -1,2 +0,0 @@
|
|||
vim.g["undotree_SetFocusWhenToggle"] = true
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
-- PDF Viewer:
|
||||
-- http://manpages.ubuntu.com/manpages/trusty/man5/zathurarc.5.html
|
||||
vim.g['vimtex_view_method'] = 'zathura'
|
||||
vim.g['vimtex_quickfix_mode'] =0
|
||||
|
||||
-- Ignore mappings
|
||||
vim.g['vimtex_mappings_enabled'] = 1
|
||||
|
||||
-- Auto Indent
|
||||
vim.g['vimtex_indent_enabled'] = 1
|
||||
|
||||
-- Syntax highlighting
|
||||
vim.g['vimtex_syntax_enabled'] = 1
|
||||
|
||||
-- Error suppression:
|
||||
-- https://github.com/lervag/vimtex/blob/master/doc/vimtex.txt
|
||||
|
||||
vim.g['vimtex_log_ignore'] = ({
|
||||
'Underfull',
|
||||
'Overfull',
|
||||
'specifier changed to',
|
||||
'Token not allowed in a PDF string',
|
||||
})
|
||||
|
||||
--vim.g['vimtex_context_pdf_viewer'] = 'okular'
|
||||
vim.g['vimtex_context_pdf_viewer'] = 'zathura'
|
||||
|
||||
-- vim.g['vimtex_complete_enabled'] = 1
|
||||
-- vim.g['vimtex_compiler_progname'] = 'nvr'
|
||||
-- vim.g['vimtex_complete_close_braces'] = 1
|
|
@ -1,209 +0,0 @@
|
|||
local status_ok, which_key = pcall(require, "which-key")
|
||||
if not status_ok then
|
||||
return
|
||||
end
|
||||
|
||||
local setup = {
|
||||
plugins = {
|
||||
marks = false, -- 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 = 10, -- 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 = false, -- adds help for motions
|
||||
text_objects = false, -- help for text objects triggered after entering an operator
|
||||
windows = false, -- default bindings on <c-w>
|
||||
nav = false, -- misc bindings to work with windows
|
||||
z = false, -- bindings for folds, spelling and others prefixed with z
|
||||
g = false, -- bindings for prefixed with g
|
||||
},
|
||||
},
|
||||
-- add operators that will trigger motion and text object completion
|
||||
-- to enable 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
|
||||
}
|
||||
|
||||
-- hjknoyz
|
||||
|
||||
-- GENERAL MAPPINGS
|
||||
|
||||
local mappings = {
|
||||
["b"] = { "<cmd>VimtexCompile<CR>" , "build" },
|
||||
["c"] = { "<cmd>VimtexCountWords!<CR>" , "count" },
|
||||
["d"] = { "<cmd>bdelete!<CR>" , "delete buffer" },
|
||||
["e"] = { "<cmd>NvimTreeToggle<CR>" , "explorer" },
|
||||
["i"] = { "<cmd>VimtexTocOpen<CR>" , "index" },
|
||||
["q"] = { "<cmd>wqa!<CR>" , "quit" },
|
||||
["r"] = { "" , "reorder" },
|
||||
-- ["r"] = { "<cmd>lua require('autolist').force_recalculate()<CR>" , "reorder list" },
|
||||
["u"] = { "<cmd>UndotreeToggle<CR>" , "undo" },
|
||||
["v"] = { "<cmd>VimtexView<CR>" , "view" },
|
||||
["w"] = { "<cmd>wa!<CR>" , "write" },
|
||||
["x"] = { "" , "checkmark" },
|
||||
-- ["x"] = { "<cmd>lua require('autolist').invert_entry()<CR>" , "checkmark" },
|
||||
a = {
|
||||
name = "ACTIONS",
|
||||
a = { "<cmd>lua PdfAnnots()<CR>", "annotate"},
|
||||
b = { "<cmd>terminal bibexport -o %:p:r.bib %:p:r.aux<CR>", "bib export"},
|
||||
c = { "<cmd>VimtexClean<CR>" , "clean aux" },
|
||||
g = { "<cmd>e ~/.config/nvim/templates/Glossary.tex<CR>", "edit glossary"},
|
||||
h = { "<cmd>lua _HTOP_TOGGLE()<CR>", "htop" },
|
||||
i = { "<cmd>IlluminateToggle<CR>" , "illuminate" },
|
||||
l = { "<cmd>lua vim.g.cmptoggle = not vim.g.cmptoggle<CR>", "LSP"},
|
||||
p = { '<cmd>lua require("nabla").popup()<CR>', "preview symbols"},
|
||||
r = { "<cmd>VimtexErrors<CR>" , "report errors" },
|
||||
s = { "<cmd>e ~/.config/nvim/snippets/tex.snippets<CR>", "edit snippets"},
|
||||
u = { "<cmd>cd %:p:h<CR>" , "update cwd" },
|
||||
-- w = { "<cmd>TermExec cmd='pandoc %:p -o %:p:r.docx'<CR>" , "word"},
|
||||
v = { "<plug>(vimtex-context-menu)" , "vimtex menu" },
|
||||
},
|
||||
f = {
|
||||
name = "FIND",
|
||||
b = {
|
||||
"<cmd>lua require('telescope.builtin').buffers(require('telescope.themes').get_dropdown{previewer = false})<CR>",
|
||||
"buffers",
|
||||
},
|
||||
c = { "<cmd>Telescope bibtex<CR>" , "citations" },
|
||||
f = { "<cmd>Telescope live_grep theme=ivy<CR>", "project" },
|
||||
g = { "<cmd>Telescope git_branches<CR>", "branches" },
|
||||
h = { "<cmd>Telescope help_tags<CR>", "help" },
|
||||
k = { "<cmd>Telescope keymaps<CR>", "keymaps" },
|
||||
-- m = { "<cmd>Telescope man_pages<CR>", "man pages" },
|
||||
r = { "<cmd>Telescope registers<CR>", "registers" },
|
||||
t = { "<cmd>Telescope colorscheme<CR>", "theme" },
|
||||
y = { "<cmd>YankyRingHistory<CR>" , "yanks" },
|
||||
-- c = { "<cmd>Telescope commands<CR>", "commands" },
|
||||
-- r = { "<cmd>Telescope oldfiles<CR>", "recent" },
|
||||
},
|
||||
g = {
|
||||
name = "GIT",
|
||||
g = { "<cmd>lua _LAZYGIT_TOGGLE()<CR>", "lazygit" },
|
||||
j = { "<cmd>lua require 'gitsigns'.next_hunk()<CR>", "next hunk" },
|
||||
k = { "<cmd>lua require 'gitsigns'.prev_hunk()<CR>", "prev hunk" },
|
||||
l = { "<cmd>lua require 'gitsigns'.blame_line()<CR>", "blame" },
|
||||
p = { "<cmd>lua require 'gitsigns'.preview_hunk()<CR>", "preview hunk" },
|
||||
r = { "<cmd>lua require 'gitsigns'.reset_hunk()<CR>", "reset hunk" },
|
||||
s = { "<cmd>lua require 'gitsigns'.stage_hunk()<CR>", "stage hunk" },
|
||||
u = {
|
||||
"<cmd>lua require 'gitsigns'.undo_stage_hunk()<CR>", "unstage hunk" },
|
||||
o = { "<cmd>Telescope git_status<CR>", "open changed file" },
|
||||
b = { "<cmd>Telescope git_branches<CR>", "checkout branch" },
|
||||
c = { "<cmd>Telescope git_commits<CR>", "checkout commit" },
|
||||
d = { "<cmd>Gitsigns diffthis HEAD<CR>", "diff" },
|
||||
},
|
||||
m = {
|
||||
name = "MANAGE SESSIONS",
|
||||
s = { "<cmd>SessionManager save_current_session<CR>", "save" },
|
||||
d = { "<cmd>SessionManager delete_session<CR>", "delete" },
|
||||
l = { "<cmd>SessionManager load_session<CR>", "load" },
|
||||
},
|
||||
p = {
|
||||
name = "PANDOC",
|
||||
w = { "<cmd>TermExec cmd='pandoc %:p -o %:p:r.docx'<CR>" , "word"},
|
||||
m = { "<cmd>TermExec cmd='pandoc %:p -o %:p:r.md'<CR>" , "markdown"},
|
||||
h = { "<cmd>TermExec cmd='pandoc %:p -o %:p:r.html'<CR>" , "html"},
|
||||
l = { "<cmd>TermExec cmd='pandoc %:p -o %:p:r.tex'<CR>" , "latex"},
|
||||
p = { "<cmd>TermExec cmd='pandoc %:p -o %:p:r.pdf'<CR>" , "pdf"},
|
||||
-- x = { "<cmd>echo "run: unoconv -f pdf path-to.docx"" , "word to pdf"},
|
||||
},
|
||||
s = {
|
||||
name = "SURROUND",
|
||||
s = { "<Plug>(nvim-surround-normal)", "surround" },
|
||||
d = { "<Plug>(nvim-surround-delete)", "delete" },
|
||||
c = { "<Plug>(nvim-surround-change)", "change" },
|
||||
},
|
||||
t = {
|
||||
name = "TEMPLATES",
|
||||
c = { "<cmd>PackerCompile<CR>", "Compile" },
|
||||
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)
|
|
@ -1,11 +0,0 @@
|
|||
--require("yanky").setup({
|
||||
-- ring = {
|
||||
-- history_length = 100,
|
||||
-- storage = "shada",
|
||||
-- sync_with_numbered_registers = true,
|
||||
-- cancel_event = "update",
|
||||
-- },
|
||||
-- system_clipboard = {
|
||||
-- sync_with_ring = true,
|
||||
-- },
|
||||
--})
|
|
@ -0,0 +1,228 @@
|
|||
local status_ok, which_key = pcall(require, "which-key")
|
||||
if not status_ok then
|
||||
return
|
||||
end
|
||||
|
||||
local setup = {
|
||||
plugins = {
|
||||
marks = false, -- 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 = 10, -- 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 = false, -- adds help for motions
|
||||
text_objects = false, -- help for text objects triggered after entering an operator
|
||||
windows = false, -- default bindings on <c-w>
|
||||
nav = false, -- misc bindings to work with windows
|
||||
z = false, -- bindings for folds, spelling and others prefixed with z
|
||||
g = false, -- bindings for prefixed with g
|
||||
},
|
||||
},
|
||||
-- add operators that will trigger motion and text object completion
|
||||
-- to enable 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
|
||||
}
|
||||
|
||||
-- hjknoyz
|
||||
|
||||
-- GENERAL MAPPINGS
|
||||
|
||||
local builtin = require("telescope.builtin")
|
||||
local mappings = {
|
||||
c = {
|
||||
name = "Commands",
|
||||
e = { "<cmd>wqa!<CR>", "exit vim"},
|
||||
},
|
||||
l = {
|
||||
name = "LaTeX",
|
||||
b = { "<cmd>VimtexCompile<CR>" , "build" },
|
||||
c = { "<cmd>VimtexCountWords!<CR>" , "count" },
|
||||
v = { "<cmd>VimtexView<CR>" , "view" },
|
||||
|
||||
},
|
||||
p = {
|
||||
name = "Project",
|
||||
v = {"<cmd>Ex<CR>" , "explorer"},
|
||||
f = {builtin.find_files , "find-file"},
|
||||
g = {builtin.git_files , "find-git-file"},
|
||||
},
|
||||
--["b"] = { "<cmd>VimtexCompile<CR>" , "build" },
|
||||
--["c"] = { "<cmd>VimtexCountWords!<CR>" , "count" },
|
||||
--["d"] = { "<cmd>bdelete!<CR>" , "delete buffer" },
|
||||
--["e"] = { "<cmd>NvimTreeToggle<CR>" , "explorer" },
|
||||
--["i"] = { "<cmd>VimtexTocOpen<CR>" , "index" },
|
||||
--["q"] = { "<cmd>wqa!<CR>" , "quit" },
|
||||
--["r"] = { "" , "reorder" },
|
||||
---- ["r"] = { "<cmd>lua require('autolist').force_recalculate()<CR>" , "reorder list" },
|
||||
--["u"] = { "<cmd>UndotreeToggle<CR>" , "undo" },
|
||||
--["v"] = { "<cmd>VimtexView<CR>" , "view" },
|
||||
--["w"] = { "<cmd>wa!<CR>" , "write" },
|
||||
--["x"] = { "" , "checkmark" },
|
||||
---- ["x"] = { "<cmd>lua require('autolist').invert_entry()<CR>" , "checkmark" },
|
||||
--a = {
|
||||
-- name = "ACTIONS",
|
||||
-- a = { "<cmd>lua PdfAnnots()<CR>", "annotate"},
|
||||
-- b = { "<cmd>terminal bibexport -o %:p:r.bib %:p:r.aux<CR>", "bib export"},
|
||||
-- c = { "<cmd>VimtexClean<CR>" , "clean aux" },
|
||||
-- g = { "<cmd>e ~/.config/nvim/templates/Glossary.tex<CR>", "edit glossary"},
|
||||
-- h = { "<cmd>lua _HTOP_TOGGLE()<CR>", "htop" },
|
||||
-- i = { "<cmd>IlluminateToggle<CR>" , "illuminate" },
|
||||
-- l = { "<cmd>lua vim.g.cmptoggle = not vim.g.cmptoggle<CR>", "LSP"},
|
||||
-- p = { '<cmd>lua require("nabla").popup()<CR>', "preview symbols"},
|
||||
-- r = { "<cmd>VimtexErrors<CR>" , "report errors" },
|
||||
-- s = { "<cmd>e ~/.config/nvim/snippets/tex.snippets<CR>", "edit snippets"},
|
||||
-- u = { "<cmd>cd %:p:h<CR>" , "update cwd" },
|
||||
-- -- w = { "<cmd>TermExec cmd='pandoc %:p -o %:p:r.docx'<CR>" , "word"},
|
||||
-- v = { "<plug>(vimtex-context-menu)" , "vimtex menu" },
|
||||
--},
|
||||
--f = {
|
||||
-- name = "FIND",
|
||||
-- b = {
|
||||
-- "<cmd>lua require('telescope.builtin').buffers(require('telescope.themes').get_dropdown{previewer = false})<CR>",
|
||||
-- "buffers",
|
||||
-- },
|
||||
-- c = { "<cmd>Telescope bibtex<CR>" , "citations" },
|
||||
-- f = { "<cmd>Telescope live_grep theme=ivy<CR>", "project" },
|
||||
-- g = { "<cmd>Telescope git_branches<CR>", "branches" },
|
||||
-- h = { "<cmd>Telescope help_tags<CR>", "help" },
|
||||
-- k = { "<cmd>Telescope keymaps<CR>", "keymaps" },
|
||||
-- -- m = { "<cmd>Telescope man_pages<CR>", "man pages" },
|
||||
-- r = { "<cmd>Telescope registers<CR>", "registers" },
|
||||
-- t = { "<cmd>Telescope colorscheme<CR>", "theme" },
|
||||
-- y = { "<cmd>YankyRingHistory<CR>" , "yanks" },
|
||||
-- -- c = { "<cmd>Telescope commands<CR>", "commands" },
|
||||
-- -- r = { "<cmd>Telescope oldfiles<CR>", "recent" },
|
||||
--},
|
||||
--g = {
|
||||
-- name = "GIT",
|
||||
-- g = { "<cmd>lua _LAZYGIT_TOGGLE()<CR>", "lazygit" },
|
||||
-- j = { "<cmd>lua require 'gitsigns'.next_hunk()<CR>", "next hunk" },
|
||||
-- k = { "<cmd>lua require 'gitsigns'.prev_hunk()<CR>", "prev hunk" },
|
||||
-- l = { "<cmd>lua require 'gitsigns'.blame_line()<CR>", "blame" },
|
||||
-- p = { "<cmd>lua require 'gitsigns'.preview_hunk()<CR>", "preview hunk" },
|
||||
-- r = { "<cmd>lua require 'gitsigns'.reset_hunk()<CR>", "reset hunk" },
|
||||
-- s = { "<cmd>lua require 'gitsigns'.stage_hunk()<CR>", "stage hunk" },
|
||||
-- u = {
|
||||
-- "<cmd>lua require 'gitsigns'.undo_stage_hunk()<CR>", "unstage hunk" },
|
||||
-- o = { "<cmd>Telescope git_status<CR>", "open changed file" },
|
||||
-- b = { "<cmd>Telescope git_branches<CR>", "checkout branch" },
|
||||
-- c = { "<cmd>Telescope git_commits<CR>", "checkout commit" },
|
||||
-- d = { "<cmd>Gitsigns diffthis HEAD<CR>", "diff" },
|
||||
--},
|
||||
--m = {
|
||||
-- name = "MANAGE SESSIONS",
|
||||
-- s = { "<cmd>SessionManager save_current_session<CR>", "save" },
|
||||
-- d = { "<cmd>SessionManager delete_session<CR>", "delete" },
|
||||
-- l = { "<cmd>SessionManager load_session<CR>", "load" },
|
||||
--},
|
||||
--p = {
|
||||
-- name = "PANDOC",
|
||||
-- w = { "<cmd>TermExec cmd='pandoc %:p -o %:p:r.docx'<CR>" , "word"},
|
||||
-- m = { "<cmd>TermExec cmd='pandoc %:p -o %:p:r.md'<CR>" , "markdown"},
|
||||
-- h = { "<cmd>TermExec cmd='pandoc %:p -o %:p:r.html'<CR>" , "html"},
|
||||
-- l = { "<cmd>TermExec cmd='pandoc %:p -o %:p:r.tex'<CR>" , "latex"},
|
||||
-- p = { "<cmd>TermExec cmd='pandoc %:p -o %:p:r.pdf'<CR>" , "pdf"},
|
||||
-- -- x = { "<cmd>echo "run: unoconv -f pdf path-to.docx"" , "word to pdf"},
|
||||
--},
|
||||
--s = {
|
||||
-- name = "SURROUND",
|
||||
-- s = { "<Plug>(nvim-surround-normal)", "surround" },
|
||||
-- d = { "<Plug>(nvim-surround-delete)", "delete" },
|
||||
-- c = { "<Plug>(nvim-surround-change)", "change" },
|
||||
--},
|
||||
--t = {
|
||||
-- name = "TEMPLATES",
|
||||
-- c = { "<cmd>PackerCompile<CR>", "Compile" },
|
||||
-- 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)
|
||||
|
14976
minimal/minimal.bib
14976
minimal/minimal.bib
File diff suppressed because it is too large
Load Diff
|
@ -1,28 +0,0 @@
|
|||
-- vim.opt.runtimepath:prepend "PATH/nvim-lua/plenary.nvim"
|
||||
-- vim.opt.runtimepath:prepend "PATH/hrsh7th/nvim-cmp"
|
||||
-- vim.opt.runtimepath:prepend "PATH/hrsh7th/cmp-nvim-lsp"
|
||||
-- vim.opt.runtimepath:prepend "PATH/hrsh7th/cmp-buffer"
|
||||
-- vim.opt.runtimepath:prepend "PATH/hrsh7th/cmp-omni"
|
||||
-- vim.opt.runtimepath:prepend "PATH/neovim/nvim-lspconfig"
|
||||
-- vim.opt.runtimepath:prepend "PATH/williamboman/mason.nvim"
|
||||
-- vim.opt.runtimepath:prepend "PATH/williamboman/mason-lspconfig.nvim"
|
||||
vim.opt.runtimepath:prepend "/home/benjamin/.local/share/nvim/site/pack/packer/start/cmp-omni"
|
||||
vim.opt.runtimepath:append "/home/benjamin/.local/share/nvim/site/pack/packer/start/cmp-omni/after"
|
||||
vim.opt.runtimepath:prepend "/home/benjamin/.local/share/nvim/site/pack/packer/start/nvim-cmp"
|
||||
vim.opt.runtimepath:append "/home/benjamin/.local/share/nvim/site/pack/packer/start/nvim-cmp/after"
|
||||
vim.opt.runtimepath:prepend "/home/benjamin/.local/share/nvim/site/pack/packer/start/vimtex"
|
||||
vim.opt.runtimepath:append "/home/benjamin/.local/share/nvim/site/pack/packer/start/vimtex/after"
|
||||
|
||||
vim.cmd[[filetype plugin indent on]]
|
||||
|
||||
local cmp = require("cmp")
|
||||
|
||||
cmp.setup({
|
||||
sources = cmp.config.sources({
|
||||
{ name = "omni" },
|
||||
{ name = "nvim_lsp" },
|
||||
{ name = "buffer", keyword_length = 3 },
|
||||
}),
|
||||
})
|
||||
|
||||
vim.g.vimtex_view_method = "zathura"
|
|
@ -1,25 +0,0 @@
|
|||
\documentclass[11pt]{article}
|
||||
\usepackage[a4paper, margin=4cm]{geometry}
|
||||
\usepackage[english]{babel}
|
||||
|
||||
\begin{document}
|
||||
\title{\sc TITLE}
|
||||
\author{\it Benjamin Brast-McKie}
|
||||
\date{\today}
|
||||
\maketitle
|
||||
\thispagestyle{empty}
|
||||
|
||||
\begin{abstract}
|
||||
\noindent
|
||||
ABSTRACT
|
||||
\end{abstract}
|
||||
|
||||
\section{Introduction}\label{Intro}
|
||||
|
||||
\cite{Sta}
|
||||
|
||||
\bibliographystyle{plain}
|
||||
\bibliography{minimal}
|
||||
\thispagestyle{empty}
|
||||
|
||||
\end{document}
|
|
@ -1,262 +0,0 @@
|
|||
# -- SNIPPETS --
|
||||
#
|
||||
# new glossary entry
|
||||
snippet gloss "Glossary Entry" b
|
||||
\newglossaryentry{${1:entry}}{
|
||||
name = {${2:name}},
|
||||
symbol = {\ensuremath{${3:symbol}}},
|
||||
description = {${4:description}}
|
||||
}
|
||||
#
|
||||
|
||||
# custom theorem enviornment
|
||||
snippet customthm "Custom Theorem" b
|
||||
\vspace{.1in}
|
||||
\begin{customthm}{(${1:label})}
|
||||
${2:claim}
|
||||
\end{customthm}
|
||||
|
||||
\begin{Answer}
|
||||
${0}
|
||||
\end{Answer}
|
||||
#
|
||||
|
||||
# framed text enviornment
|
||||
snippet textbox "Text Box" b
|
||||
\begin{tcolorbox}
|
||||
${0}
|
||||
\end{tcolorbox}
|
||||
#
|
||||
|
||||
# new command
|
||||
snippet nc "New Command" b
|
||||
\newcommand{${1:cmd}}[${2:opt}]{${3:realcmd}} ${0}
|
||||
#
|
||||
|
||||
#usepackage
|
||||
snippet up "Use Package" b
|
||||
\usepackage[${1:options}]{${2:package}} ${0}
|
||||
#
|
||||
|
||||
# \begin{}...\end{}
|
||||
snippet begin "Begin End"
|
||||
\begin{${1:env}}
|
||||
${2:${VISUAL}}
|
||||
\end{$1}${0}
|
||||
#
|
||||
|
||||
# Align(ed)
|
||||
snippet align "Align Env" b
|
||||
\begin{align${1:ed}}
|
||||
\label{${2:name}}
|
||||
${0}
|
||||
\end{align$1}
|
||||
#
|
||||
|
||||
# Quote
|
||||
snippet quote "Quotation" b
|
||||
\vspace{-.1in}
|
||||
\begin{quote}\singlespacing\small
|
||||
${0}
|
||||
\hfill(p.~${1})
|
||||
\end{quote}
|
||||
\vspace{.1in}
|
||||
#
|
||||
|
||||
# Labelalign
|
||||
snippet labelalign "Label Align" b
|
||||
\vspace{.05in}
|
||||
\begin{labelalign} %\small\onehalfspacing
|
||||
\item[${2:\it} ${3:Label:}] ${0}
|
||||
\end{labelalign}
|
||||
\vspace{.05in}
|
||||
#
|
||||
|
||||
# Enumerate
|
||||
snippet enum "Enumerate" b
|
||||
\begin{enumerate}
|
||||
\item[${1:\it }${2:Label:}] ${0}
|
||||
\end{enumerate}
|
||||
#
|
||||
|
||||
# Itemize
|
||||
snippet item "Itemize" b
|
||||
\begin{itemize}
|
||||
\item[${1:\it} ${2:Label:}] ${0}
|
||||
\end{itemize}
|
||||
#
|
||||
|
||||
#Item
|
||||
snippet i "Item"
|
||||
\item[${1:\it} ${2:Label:}] ${0}
|
||||
#
|
||||
|
||||
# Cases
|
||||
snippet case "Cases"
|
||||
${1:LHS}=
|
||||
\begin{cases}
|
||||
${2:Value}, &\text{ if } ${3:case}\\
|
||||
${4:Value}, &\text{ otherwise.} ${5:otherwise}.
|
||||
\end{cases}${0}
|
||||
#
|
||||
|
||||
# Section
|
||||
snippet sec "Section" b
|
||||
\section{${1:Name}}%
|
||||
\label{sec:${2:$1}}
|
||||
${0}
|
||||
#
|
||||
|
||||
# Sub Section
|
||||
snippet sub "Sub Section" b
|
||||
\subsection{${1:Name}}%
|
||||
\label{sub:${2:$1}}
|
||||
${0}
|
||||
#
|
||||
|
||||
# Sub Sub Section
|
||||
snippet ssub "Sub Sub Section" b
|
||||
\subsubsection{${1:Name}}%
|
||||
\label{sub:${2:$1}}
|
||||
${0}
|
||||
#
|
||||
|
||||
# Hyper Section
|
||||
snippet hsec "Hyper Section" b
|
||||
\hypsection{${1:Name}}%
|
||||
\label{sec:${2:$1}}
|
||||
${0}
|
||||
#
|
||||
|
||||
# Hyper Sub Section
|
||||
snippet hsub "Hyper Sub Section" b
|
||||
\hypsubsection{${1:Name}}%
|
||||
\label{sub:${2:$1}}
|
||||
${0}
|
||||
#
|
||||
|
||||
# Hyper Sub Sub Section
|
||||
snippet hssub "Hyper Sub Sub Section" b
|
||||
\hypsubsubsection{${1:Name}}%
|
||||
\label{sub:${2:$1}}
|
||||
${0}
|
||||
#
|
||||
|
||||
#Formating text: italic, bold, underline, small capital, emphase ..
|
||||
snippet it "Italics" wi
|
||||
\textit{${1}}${0}
|
||||
#
|
||||
|
||||
snippet tt "Teletype" wi
|
||||
\texttt{${1}}${0}
|
||||
#
|
||||
|
||||
snippet bf "Bold" wi
|
||||
\textbf{${1}}${0}
|
||||
#
|
||||
|
||||
snippet sc "Small Caps" wi
|
||||
\textsc{${1}}${0}
|
||||
#
|
||||
|
||||
snippet tsub "Subscripted" i
|
||||
\textsubscript{${1}}${0}
|
||||
#
|
||||
|
||||
snippet tsup "Superscripted" i
|
||||
\textsuperscript{${1}}${0}
|
||||
#
|
||||
|
||||
#Math font
|
||||
snippet mf "Mathfrak" w
|
||||
\mathfrak{${1}}${0}
|
||||
#
|
||||
|
||||
snippet mc "Mathcal" w
|
||||
\mathcal{${1}}${0}
|
||||
#
|
||||
|
||||
snippet ms "Mathscr" w
|
||||
\mathscr{${1}}${0}
|
||||
#
|
||||
|
||||
#misc
|
||||
snippet fproof "Footnote Proof" bi
|
||||
\footnote{\textit{Proof:} ${1:Begin} \qed}${0}
|
||||
#
|
||||
|
||||
snippet lab "Label" wi
|
||||
\label{${1:LABEL}}${0}
|
||||
#
|
||||
|
||||
snippet fn "Footnote" wi
|
||||
\footnote{${1:FOOTNOTE}}${0}
|
||||
#
|
||||
|
||||
snippet fig "Figure environment" b
|
||||
\begin{figure}
|
||||
\begin{center}
|
||||
\includegraphics[scale=${1}]{Figures/${2}}
|
||||
\end{center}
|
||||
\caption{${3}}
|
||||
\label{fig:${4}}
|
||||
\end{figure}
|
||||
${0}
|
||||
#
|
||||
|
||||
snippet tikz "Tikz environment" b
|
||||
\begin{figure}[htpb]
|
||||
\begin{center}
|
||||
\begin{tikzpicture}[scale=${1:1}, transform shape]
|
||||
${2}
|
||||
\end{tikzpicture}
|
||||
\end{center}
|
||||
\caption{${3}}%
|
||||
\label{fig:${4}}
|
||||
\end{figure}
|
||||
${0}
|
||||
|
||||
snippet lemma "Lemma" bi
|
||||
\begin{lemma}
|
||||
${0:${VISUAL}}
|
||||
\end{lemma}
|
||||
|
||||
snippet prop "Proposition" bi
|
||||
\begin{prop}[$1]
|
||||
${0:${VISUAL}}
|
||||
\end{prop}
|
||||
|
||||
snippet thrm "Theorem" bi
|
||||
\begin{theorem}[$1]
|
||||
${0:${VISUAL}}
|
||||
\end{theorem}
|
||||
|
||||
snippet prf "Proof" bi
|
||||
\begin{myproof}[$1]
|
||||
${0:${VISUAL}}
|
||||
\end{myproof}
|
||||
|
||||
snippet def "Definition" bi
|
||||
\begin{definition}[$1]
|
||||
${0:${VISUAL}}
|
||||
\end{definition}
|
||||
|
||||
snippet prob "Problem" bi
|
||||
\begin{problem}[$1]
|
||||
${0:${VISUAL}}
|
||||
\end{problem}
|
||||
|
||||
snippet corl "Corollary" bi
|
||||
\begin{corollary}[$1]
|
||||
${0:${VISUAL}}
|
||||
\end{corollary}
|
||||
|
||||
snippet example "Example" bi
|
||||
\begin{example}[$1]
|
||||
${0:${VISUAL}}
|
||||
\end{example}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -1,144 +0,0 @@
|
|||
%%% 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}
|
||||
}
|
||||
|
|
@ -1,81 +0,0 @@
|
|||
|
||||
\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}
|
|
@ -1,65 +0,0 @@
|
|||
|
||||
\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}
|
|
@ -1,169 +0,0 @@
|
|||
%%%%%%%%%%%%%%%%%%%%%%%% 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}
|
|
@ -1,147 +0,0 @@
|
|||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% 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}
|
|
@ -1,63 +0,0 @@
|
|||
|
||||
\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}
|
|
@ -1,168 +0,0 @@
|
|||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% 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}
|
|
@ -1,245 +0,0 @@
|
|||
%%%%%%%%%%%%%%%%%%%%%%%% 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}
|
|
@ -1,207 +0,0 @@
|
|||
%%%%%%%%%%%%%%%%%%%%%%%% 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}
|
|
@ -1,43 +0,0 @@
|
|||
%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}
|
|
@ -1,41 +0,0 @@
|
|||
%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}
|
|
@ -1,43 +0,0 @@
|
|||
%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}
|
|
@ -1,155 +0,0 @@
|
|||
%%%%%%%%%%%%%%%%%%%%%%%% 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}
|
|
@ -1,154 +0,0 @@
|
|||
%%%%%%%%%%%%%%%%%%%%%%%% 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}
|
|
@ -1,243 +0,0 @@
|
|||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
%%%%%%%%% 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}
|
|
@ -1,300 +0,0 @@
|
|||
\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}
|
|
@ -1,131 +0,0 @@
|
|||
%%%%%%%%%%%%%%%%%%%%%%%% 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