{"id":2073,"date":"2025-11-22T14:47:35","date_gmt":"2025-11-22T14:47:35","guid":{"rendered":"https:\/\/ghanim-solution.de\/?p=2073"},"modified":"2025-11-22T15:16:46","modified_gmt":"2025-11-22T15:16:46","slug":"latex-mit-vs-code-github-auf-dem-mac-nutzen","status":"publish","type":"post","link":"https:\/\/ghanim-solution.de\/index.php\/2025\/11\/22\/latex-mit-vs-code-github-auf-dem-mac-nutzen\/","title":{"rendered":"LaTeX mit VS Code &amp; GitHub auf dem Mac nutzen"},"content":{"rendered":"\n<p>Wenn du bei Overleaf schon einmal wegen begrenzter Kompilierungszeit oder gro\u00dfer Bilddateien Probleme hattest, dann ist der Umstieg auf <strong>Visual Studio Code (VS Code)<\/strong> die perfekte L\u00f6sung. Mit einer lokalen LaTeX-Installation, GitHub-Synchronisation und hilfreichen VS-Code-Erweiterungen bekommst du eine leistungsstarke, flexible und kollaborative Arbeitsumgebung.<\/p>\n\n\n\n<p>Diese Anleitung zeigt dir Schritt f\u00fcr Schritt, wie du LaTeX auf dem <strong>Mac<\/strong> mit <strong>VS Code<\/strong> &amp; <strong>GitHub<\/strong> optimal einrichtest.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\ud83c\udfaf Vorteile von VS Code f\u00fcr LaTeX<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Unbegrenzte Kompilierungszeit<\/strong> \u2013 im Gegensatz zu Overleaf<\/li>\n\n\n\n<li><strong>Gro\u00dfe Dateien problemlos verarbeiten<\/strong><\/li>\n\n\n\n<li><strong>Bessere Teamarbeit<\/strong> dank GitHub<\/li>\n\n\n\n<li><strong>Sichere Speicherung<\/strong> auf GitHub + lokal<\/li>\n\n\n\n<li><strong>Synchronisiertes Arbeiten<\/strong> \u00fcber mehrere Ger\u00e4te<\/li>\n\n\n\n<li><strong>AI-Unterst\u00fctzung<\/strong> durch GitHub Copilot<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">\ud83d\udee0 Schritt-f\u00fcr-Schritt Anleitung (macOS)<\/h3>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>1. GitHub-Repository erstellen<\/strong><\/h3>\n\n\n\n<p>Erstelle ein neues (privates oder \u00f6ffentliches) Repository auf GitHub.<br>\ud83d\udc49 Folge der <a href=\"https:\/\/docs.github.com\/en\/repositories\/creating-and-managing-repositories\/creating-a-new-repository\">GitHub-Quickstart-Anleitung<\/a>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>2. LaTeX-Projekt hochladen<\/strong><\/h3>\n\n\n\n<p>Wenn du bereits ein LaTeX-Projekt hast, lade es direkt ins Repository hoch.<br>Falls nicht: Du kannst die Dateien sp\u00e4ter hinzuf\u00fcgen.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>3. VS Code auf dem Mac installieren<\/strong><\/h3>\n\n\n\n<p>Lade VS Code hier herunter:<br>\ud83d\udc49 <a href=\"https:\/\/code.visualstudio.com\/\">https:\/\/code.visualstudio.com\/<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>4. MacTeX installieren (statt MiKTeX!)<\/strong><\/h3>\n\n\n\n<p>F\u00fcr macOS ben\u00f6tigst du <strong>MacTeX<\/strong> (ca. 6 GB):<\/p>\n\n\n\n<p>\ud83d\udc49 <a href=\"https:\/\/www.tug.org\/mactex\/mactex-download.html\">https:\/\/www.tug.org\/mactex\/mactex-download.html<\/a><\/p>\n\n\n\n<p><strong>Wichtig:<\/strong> Nach der Installation muss der LaTeX-Pfad korrekt gesetzt werden \u2013 siehe weiter unten.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>5. Strawberry Perl? \u2192 Nur f\u00fcr Windows<\/strong><\/h4>\n\n\n\n<p>Unter macOS <strong>nicht notwendig<\/strong>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>6. Wichtige LaTeX-Erweiterungen f\u00fcr VS Code<\/strong><\/h3>\n\n\n\n<p>Installiere in VS Code diese Erweiterungen:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>LaTeX Workshop<\/strong> (Pflicht)<\/li>\n\n\n\n<li><strong>LaTeX<\/strong><\/li>\n\n\n\n<li><strong>LaTeX Language Support<\/strong><\/li>\n\n\n\n<li>Optional: <strong>LaTeX Previewer<\/strong><\/li>\n\n\n\n<li>Optional: <strong>TeX Preview<\/strong><\/li>\n\n\n\n<li><strong>Rewrap<\/strong><\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>7. GitHub in VS Code verbinden<\/strong><\/h3>\n\n\n\n<p>Melde dich in VS Code \u00fcber das GitHub-Konto an.<br>\ud83d\udc49 Einstellungen &gt; Accounts &gt; GitHub<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>8. GitHub-Repository lokal klonen<\/strong><\/h3>\n\n\n\n<p>In VS Code:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>View \u2192 Command Palette<\/strong><\/li>\n\n\n\n<li>\u201e<strong>Git: Clone<\/strong>\u201d eingeben<\/li>\n\n\n\n<li>Repository-URL einf\u00fcgen<\/li>\n\n\n\n<li>Ordner ausw\u00e4hlen<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>9. Dein LaTeX-Projekt \u00f6ffnen<\/strong><\/h3>\n\n\n\n<p>\u00d6ffne deine <code>main.tex<\/code>.<\/p>\n\n\n\n<p>\ud83d\udccc Tipp: Ziehe die <code>main.pdf<\/code> in die rechte VS-Code-Seite, um Code + PDF gleichzeitig zu sehen.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>10. Text umbrechen (rewrap)<\/strong><\/h3>\n\n\n\n<p><strong>Alt + Q<\/strong> \u2192 f\u00fcr markierte Zeilen<\/p>\n\n\n\n<p><strong>Alt + Z<\/strong> \u2192 automatischer Zeilenumbruch<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>11. GitHub Copilot nutzen (optional, aber stark empfohlen!)<\/strong><\/h3>\n\n\n\n<p>F\u00fcr Studierende &amp; Lehrkr\u00e4fte kostenlos!<br>\ud83d\udc49 GitHub Education Antrag ausf\u00fcllen<\/p>\n\n\n\n<p>Nach Freischaltung:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>GitHub Copilot installieren<\/li>\n\n\n\n<li>GitHub Copilot Chat installieren<\/li>\n<\/ul>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\ud83d\udca1 N\u00fctzliche Tipp-Shortcuts<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Ctrl + Rechtsklick<\/strong> auf PDF \u2192 springt zum Code<\/li>\n\n\n\n<li><strong>Ctrl + Alt + J<\/strong> im Code \u2192 springt zur PDF-Position<\/li>\n\n\n\n<li><strong>Ctrl + B<\/strong> \u2192 Copilot Chat schnell \u00f6ffnen<\/li>\n<\/ul>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\ud83d\udd39  MacTeX \/ TexLive Pfad korrekt setzen<\/h3>\n\n\n\n<p><br>Nach der Installation von <strong>MacTeX<\/strong> muss h\u00e4ufig der LaTeX-Bin\u00e4rpfad zu <code>$PATH<\/code> hinzugef\u00fcgt werden, damit VS Code, LaTeX Workshop oder Terminal-Befehle wie <code>pdflatex<\/code> funktionieren.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>A. TexLive-Besitzrechte korrigieren<\/strong><\/h3>\n\n\n\n<p>Falls VS Code oder das Terminal keine Berechtigung haben:<\/p>\n\n\n\n<pre><code class=\"language-bash\"> sudo chown -R &lt;username&gt; \/usr\/local\/texlive <\/code><\/pre>\n\n\n\n<p><code>&lt;username><\/code> = dein macOS-Benutzername<br>Falls n\u00f6tig, kann auch die Gruppenberechtigung angepasst werden.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>B. TexLive-Pfad zu <code>\/etc\/paths<\/code> hinzuf\u00fcgen<\/strong><\/h3>\n\n\n\n<p>TexLive installiert seine Binaries unter:<\/p>\n\n\n\n<pre><code class=\"language-bash\"> \/usr\/local\/texlive\/<YEAR>\/bin\/<software_dialect>\/ <\/code><\/pre>\n\n\n\n<p>Beispiele:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>universal-darwin<\/code> \u2192 Mac (aktuell)<\/li>\n\n\n\n<li><code>x86_64-linux<\/code> \u2192 Linux<\/li>\n\n\n\n<li><code>x86_64-darwin<\/code> \u2192 \u00e4ltere Macs<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">F\u00fcr <strong>MacTeX 2025<\/strong> :<\/h4>\n\n\n\n<pre><code class=\"language-bash\"> sudo nano \/etc\/paths <\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Und dann am unteren Ende einf\u00fcgen:<\/h4>\n\n\n\n<pre><code class=\"language-bash\"> \/usr\/local\/texlive\/2025\/bin\/universal-darwin <\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>C. Pr\u00fcfen<\/strong><\/h4>\n\n\n\n<pre><code class=\"language-bash\"> pdflatex --version <\/code><\/pre>\n\n\n\n<p>Wenn Version &amp; Jahr angezeigt werden, ist alles korrekt.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>D. Falls Probleme bestehen \u2192 Rechte setzen<\/strong><\/h4>\n\n\n\n<pre><code class=\"language-bash\"> sudo chmod -R 755 \/usr\/local\/texlive <\/code><\/pre>\n\n\n\n<p>Das hilft, wenn VS Code keinen Zugriff bekommt.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\ud83d\udd39 Schritt: BibTeX \/ LaTeX Workshop in VS Code konfigurieren<\/h3>\n\n\n\n<p>Damit <strong>BibTeX<\/strong>, <strong>natbib<\/strong>, <strong>biblatex<\/strong> und generell die LaTeX-Kompilierung zuverl\u00e4ssig funktionieren, musst du in VS Code die Datei <strong>settings.json<\/strong> anpassen.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>1. User Settings (JSON) \u00f6ffnen<\/strong><\/h3>\n\n\n\n<p>Unter <strong>macOS<\/strong>:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Dr\u00fccke<br><strong>Shift + Cmd + P<\/strong><\/li>\n\n\n\n<li>Gib ein:<br><strong>Open User Settings (JSON)<\/strong><\/li>\n\n\n\n<li>W\u00e4hle <em>&#8220;Preferences: Open User Settings (JSON)&#8221;<\/em> aus.<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>2. Konfiguration in settings.json einf\u00fcgen<\/strong><\/h3>\n\n\n\n<p>Falls du bereits Eintr\u00e4ge in der Datei hast, f\u00fcge diese Konfiguration <strong>innerhalb der \u00e4u\u00dferen { }<\/strong> hinzu und achte darauf, dass vor jedem neuen Block ein <strong>Komma<\/strong> steht.<\/p>\n\n\n\n<p>Hier ist der korrekte JSON-Block (WordPress-tauglich formatiert):<\/p>\n\n\n\n<pre><code class=\"language-json\">{ &#10;&nbsp;&nbsp;&nbsp;&nbsp;\"latex-workshop.latex.recipes\": [ &#10;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{ &#10;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\"name\": \"\u26a1 FAST PDFLATEX\", &#10;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\"tools\": [ &#10;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\"pdflatex\" &#10;&nbsp;&nbsp;&nbsp;&n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&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} &#10;&nbsp;&nbsp;&nbsp;&nbsp;] &#10;} <\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Wenn du bei Overleaf schon einmal wegen begrenzter Kompilierungszeit oder gro\u00dfer Bilddateien Probleme hattest, dann ist der Umstieg auf Visual Studio Code (VS Code) die perfekte L\u00f6sung. Mit einer lokalen LaTeX-Installation, GitHub-Synchronisation und hilfreichen VS-Code-Erweiterungen bekommst du eine leistungsstarke, flexible und kollaborative Arbeitsumgebung. Diese Anleitung zeigt dir Schritt f\u00fcr Schritt, wie du LaTeX auf dem [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":2076,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-2073","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorised"],"_links":{"self":[{"href":"https:\/\/ghanim-solution.de\/index.php\/wp-json\/wp\/v2\/posts\/2073","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ghanim-solution.de\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ghanim-solution.de\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ghanim-solution.de\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ghanim-solution.de\/index.php\/wp-json\/wp\/v2\/comments?post=2073"}],"version-history":[{"count":6,"href":"https:\/\/ghanim-solution.de\/index.php\/wp-json\/wp\/v2\/posts\/2073\/revisions"}],"predecessor-version":[{"id":2080,"href":"https:\/\/ghanim-solution.de\/index.php\/wp-json\/wp\/v2\/posts\/2073\/revisions\/2080"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ghanim-solution.de\/index.php\/wp-json\/wp\/v2\/media\/2076"}],"wp:attachment":[{"href":"https:\/\/ghanim-solution.de\/index.php\/wp-json\/wp\/v2\/media?parent=2073"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ghanim-solution.de\/index.php\/wp-json\/wp\/v2\/categories?post=2073"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ghanim-solution.de\/index.php\/wp-json\/wp\/v2\/tags?post=2073"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}