Skip to content

Instantly share code, notes, and snippets.

@Manuel-S
Last active March 12, 2018 14:22
Show Gist options
  • Select an option

  • Save Manuel-S/6db8b12835a71d9baf146af2964ee1c8 to your computer and use it in GitHub Desktop.

Select an option

Save Manuel-S/6db8b12835a71d9baf146af2964ee1c8 to your computer and use it in GitHub Desktop.
LaTex for Windows Setup Script
# Usage: Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://gist.githubusercontent.com/Manuel-S/6db8b12835a71d9baf146af2964ee1c8/raw/'))
#install chocolatey if it isn't here already
if ((Get-Command "choco.exe" -ErrorAction SilentlyContinue) -eq $null)
{
iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
}
#install tex backend
cinst miktex -y
#install tex editor and pdf viewer
cinst texniccenter -y
cinst sumatrapdf -y
#auxiliary useful stuff
cinst pandoc -y
#import settings
$path = [System.IO.Path]::GetTempFileName()
((New-Object System.Net.WebClient).DownloadFile('https://gist.githubusercontent.com/Manuel-S/6db8b12835a71d9baf146af2964ee1c8/raw/profile.reg', $path))
regedit -p "$path"
rm $path
$path = @"C:\ProgramData\chocolatey\lib\sumatrapdf.commandline\tools"@
((New-Object System.Net.WebClient).DownloadFile('https://gist.githubusercontent.com/Manuel-S/6db8b12835a71d9baf146af2964ee1c8/raw/sumatraPDF-settings.txt', $path))
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\ToolsCenter\TeXnicCenterNT\Profiles\LaTeX ⇨ PDF]
"RunLatex"=dword:00000001
"LatexPath"="C:\\Program Files\\MiKTeX 2.9\\miktex\\bin\\x64\\pdflatex.exe"
"LatexArgs"="-max-print-line=120 -interaction=nonstopmode \"%wm\" -synctex=-1"
"LatexStopOnError"=dword:00000000
"RunBibTex"=dword:00000001
"BibTexPath"="C:\\Program Files\\MiKTeX 2.9\\miktex\\bin\\x64\\bibtex.exe"
"BibTexArgs"="\"%tm\""
"RunMakeIndex"=dword:00000001
"MakeIndexPath"="C:\\Program Files\\MiKTeX 2.9\\miktex\\bin\\x64\\makeindex.exe"
"MakeIndexArgs"="\"%tm.idx\" -t \"%tm.ilg\" -o \"%tm.ind\""
"ViewerPath"="C:\\ProgramData\\chocolatey\\lib\\sumatrapdf.commandline\\tools\\SumatraPDF.exe -reuse-instance"
"CloseViewBeforeCompilation"=dword:00000000
[HKEY_CURRENT_USER\Software\ToolsCenter\TeXnicCenterNT\Profiles\LaTeX ⇨ PDF\PostProcessors]
[HKEY_CURRENT_USER\Software\ToolsCenter\TeXnicCenterNT\Profiles\LaTeX ⇨ PDF\PreProcessors]
[HKEY_CURRENT_USER\Software\ToolsCenter\TeXnicCenterNT\Profiles\LaTeX ⇨ PDF\ViewCloseCmd]
"ActiveType"=dword:00000001
"ProcessCmdExecutable"=""
"ProcessCmdArguments"=""
"DDECmdServerName"="SUMATRA"
"DDECmdTopic"="control"
"DDECmdCommand"="[DocClose(\"%bm.pdf\")]"
"DDECmdExecutable"=""
[HKEY_CURRENT_USER\Software\ToolsCenter\TeXnicCenterNT\Profiles\LaTeX ⇨ PDF\ViewCurrentCmd]
"ActiveType"=dword:00000001
"ProcessCmdExecutable"=""
"ProcessCmdArguments"=""
"DDECmdServerName"="SUMATRA"
"DDECmdTopic"="control"
"DDECmdCommand"="[ForwardSearch(\"%bm.pdf\",\"%Wc\",%l,0,0,0)]"
"DDECmdExecutable"="C:\\ProgramData\\chocolatey\\lib\\sumatrapdf.commandline\\tools\\SumatraPDF.exe -reuse-instance"
[HKEY_CURRENT_USER\Software\ToolsCenter\TeXnicCenterNT\Profiles\LaTeX ⇨ PDF\ViewProjectCmd]
"ActiveType"=dword:00000001
"ProcessCmdExecutable"="C:\\ProgramData\\chocolatey\\lib\\sumatrapdf.commandline\\tools\\SumatraPDF.exe"
"ProcessCmdArguments"="\"%pm\""
"DDECmdServerName"="SUMATRA"
"DDECmdTopic"="control"
"DDECmdCommand"="[Open(\"%bm.pdf\",0,1,1)]"
"DDECmdExecutable"="C:\\ProgramData\\chocolatey\\lib\\sumatrapdf.commandline\\tools\\SumatraPDF.exe -reuse-instance"
# For documentation, see http://www.sumatrapdfreader.org/settings3.2.html
MainWindowBackground = #80fff200
EscToExit = true
ReuseInstance = true
UseSysColors = true
RestoreSession = true
FixedPageUI [
TextColor = #000000
BackgroundColor = #ffffff
SelectionColor = #f5fc0c
WindowMargin = 2 4 2 4
PageSpacing = 4 4
]
EbookUI [
FontName = Georgia
FontSize = 12.5
TextColor = #5f4b32
BackgroundColor = #fbf0d9
UseFixedPageUI = false
]
ComicBookUI [
WindowMargin = 0 0 0 0
PageSpacing = 4 4
CbxMangaMode = false
]
ChmUI [
UseFixedPageUI = false
]
ExternalViewers [
]
ShowMenubar = true
ReloadModifiedDocuments = true
FullPathInTitle = false
ZoomLevels = 8.33 12.5 18 25 33.33 50 66.67 75 100 125 150 200 300 400 600 800 1000 1200 1600 2000 2400 3200 4800 6400
ZoomIncrement = 0
PrinterDefaults [
PrintScale = shrink
]
ForwardSearch [
HighlightOffset = 0
HighlightWidth = 15
HighlightColor = #6581ff
HighlightPermanent = false
]
CustomScreenDPI = 0
RememberStatePerDocument = true
UiLanguage = de
ShowToolbar = true
ShowFavorites = false
AssociateSilently = false
CheckForUpdates = true
RememberOpenedFiles = true
InverseSearchCmdLine = C:\Program Files\TeXnicCenter\TeXnicCenter.exe /ddecmd "[goto('%f','%l')]"
EnableTeXEnhancements = true
DefaultDisplayMode = automatic
DefaultZoom = fit page
WindowState = 1
WindowPos = 488 26 664 860
ShowToc = true
SidebarDx = 0
TocDy = 0
ShowStartPage = true
UseTabs = true
FileStates [
[
FilePath = C:\Users\masc3\Desktop\Präsentation\slides.pdf
Favorites [
]
IsPinned = false
IsMissing = false
OpenCount = 21
UseDefaultState = false
DisplayMode = continuous
ScrollPos = -1 88
PageNo = 19
Zoom = fit page
Rotation = 0
WindowState = 1
WindowPos = 488 26 664 860
ShowToc = false
SidebarDx = 0
DisplayR2L = false
ReparseIdx = 0
]
]
SessionData [
]
TimeOfLastUpdateCheck = 0 0
OpenCountWeek = 359
# Settings after this line have not been recognized by the current version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment