Git Product home page Git Product logo

tex's Introduction

The WebLatex

image

GitHub license GitHub forks GitHub stars

WebLaTeX - A LaTeX editor with Git, VSCode, Copilot, Grammarly and more | Product Hunt

A complete alternative for Overleaf with VSCode + Web + Git Integration + GitHub Copilot + Grammarly/LanguageTool + Live Collaboration Support

get-started

I am so glad to share that, the project has been recognized globally and many people are using this tool to create their journals, research paper, and personal resume. Students, Lecturers, and Professors from universities like the University of Minnesota, University of Colorado, University of Utah, Cornell University, and even MIT Plasma Science and Fusion Center are using this tool for creating documents. A few of you personally thanked me for this project and wished to contribute in the future, which honestly I did not expect myself! Thank you again, for the limitless support!

Preview

WebLaTeX.Demo.mp4

Star History

Star History Chart

Why

Do you use latex as your Resume builder / Research Project / Documentation / Article or any Documentation? Then you probably sometimes wondered in your life if you could use the advantages of git. You could just commit your changes and roll back to older versions anytime you like. When writing a journal, you suddenly remembered you need the section that you deleted earlier. What will you do?

Hasn't it occurred to you that if only you could use your favorite editor VSCode to write your documents? With all the settings you configured, themes you liked and the extensions you probably prefer over your toxic girlfriend?

Think of a moment, your thesis supervisor and co-supervisor wanted to make some changes to your document. What you will do? Email them your document and tell them to reply with the updated version? This is no 80's.

Or, you are in your car, away from your Laptop / Desktop. Suddenly remember you forgot to change the title of your document from "Loren Ipsum" to your actual document title. Won't it be great to modify your document On the Go with your phone? Or in a nerdy way, Apple Watch?

What if you could format your latex codes, automatically, after each save?

And most importantly, what if you could use GitHub Copilot to automatically complete your latex commands and sentences? Forget the command for a thing? No worry, this tool will guess what could be the next command and will suggest that to you in each step. Not only it complete and suggest commands, but also the full sentence, and Paragraphs! Can you imaging how powerful you can be with this tool?

And do I need to tell you about the usefulness of Grammarly for built in grammar and spelling checker? Or LanguageTool? if you prefer open-source?

Yes! You can do all of these things now with Git, GitHub, Full VSCode Integration, Grammarly, Live Collaboration and Web Support - The WebLatex.

Just use overleaf

Yes, but

  • In overleaf, you have to pay 40$ to get the git feature which isn't even have the best or full git experience.
  • Pay 40$ to collaborate with more than 1 person
  • No VSCode, Code formatting, Grammarly, Or Dark Mode / Customization
  • GitHub Copilot: Clippy, but a lot better!

Whats New

  • GitHub Copilot
  • Added support for the up-to-date texlive-full package. Now, You can stop worrying about package support.

Installation Instructions

get-started

You can either fork this repository or just use as a template. You will not get latest updates if you use this as a template. And you can only fork once. So, I will recommend this to use as a template and check for updates manually.

  1. Login or Sign Up to GitHub

  2. Use this as template or Fork.

    • Use as Template (Recommended): just Click on Use this template and Create a new Repository or just Click Here

    Or,

  3. Give it a name and select Create Fork / Create repository from template

  4. Select <> Code > CodeSpaces > Create Codespace on Main tutorial

  5. It will start installing. You Have to wait for 2 mins in the first time. After that it will take 2/3 seconds to open up

Where is my PDF?

Generated PDFs will be saved to /PDF directory

Editor Instructions

  1. Pressing Ctrl+S will save the document and generate PDF in the PDF folder
  2. To check the generated PDF click on the PDF file. However It will take 20/30 seconds to open the preview for the first time. So, do not panic. After that, it will generate and preview the pdf instantly.
  3. Your code will be automatically saved and the PDF will generate automatically each time you edit something
  4. You can see all the error logs in the Terminal > Output > Latex Compiler as well as in the Latex Workshop sidebar
  5. If it shows Error showing PDF or in case of any inconvenience, just reload the browser or press Ctrl+R
  6. Just use it as you use Visual Studio Code
  7. Do not delete the devcontainer.json file. However you can edit the properties there to customize many things!

To use with LuaLatex or any other Tex program

Add this line to your main .tex file

%!TEX program = <tex_program>

For example, to use LuaLatex:

%!TEX program = lualatex

GitHub Copilot

Wonderful news, people! GitHub Copilot has been integrated with this tool, thanks to @thodson-hugs. This program will suggest the next command, sentence and paragraph based on your document and previous writings.

copilot

To turn this off just remove or comment out the "GitHub.copilot" extension from the extensions list in ./.devcontainer/devcontainer.json file.

 "extensions": [
      "...",
      //"GitHub.copilot",
      "..."
      ]

Grammarly

This editor has built-in Grammarly support for .tex files.

To disable grammarly, you can just remove or comment out the "ms-vsliveshare.vsliveshare" extension from the extensions list in ./.devcontainer/devcontainer.json file.

 "extensions": [
      "...",
      //"znck.grammarly",
      "..."
      ]

If you want to use Grammarly for other files, Go to ./.devcontainer/devcontainer.json and add your file extension in the

  "grammarly.files.include": ["*.md", ".YourFileExtension"]

And in case you do not want to use Grammarly for other files, add your file extension in the

  "grammarly.files.exclude": ["*.md", ".YourFileExtension"]

You can use Grammarly in any file apart from .tex files. Just press CTRL + SHIFT + P and search for Grammarly: Check text.

This editor uses Grammarly Free account to check grammar and spelling. However if you want to use your Grammarly Premium account, simply press CTRL + SHIFT + P and search for Grammarly: Login / Connect your account.

LanguageTools

This editor has built-in LanguageTool support for BibTEX, ConTEXt, LATEX, Markdown, Org, reStructuredText, R Sweave, and XHTML documents but it is disabled by default in favor of grammarly. If you want to use LanguageTool instead of grammarly, just uncomment the following lines from .devcontainer/devcontainer.json

"extensions": [
    "...",
    "valentjn.vscode-ltex",
    "..."
  ]

And the remove or comment out the "znck.grammarly" extension from the extensions list in ./.devcontainer/devcontainer.json file. (Recommended)

"extensions": [
    "...",
    // "znck.grammarly",
    "..."
  ]

Live Collaboration

All about Live Collaboration: Click Here

Just click on the Live Share Sidebar button and you are good to go

collaborate

If you do not need the Live Collaboration at all, you can just remove or comment out the "ms-vsliveshare.vsliveshare" extension from the extensions list in ./.devcontainer/devcontainer.json file.

"extensions": [
    "...",
    // "ms-vsliveshare.vsliveshare",
    "..."
  ]

PDF Viewer Dark Mode

The pdf viewer will preview the pdf in Dark Mode by default if your Operating System is in Dark Mode. To view the pdf in Normal mode in os-wide dark mode just remove or comment these lines from ./.devcontainer/devcontainer.json.

  //"latex-workshop.view.pdf.color.dark.pageColorsBackground":"#171717",
  //"latex-workshop.view.pdf.color.dark.pageColorsForeground":"#FFFFFF",
  //"latex-workshop.view.pdf.color.dark.backgroundColor":"#171717",

Configuration

  • To change the output directory change the following properties in ./.devcontainer/devcontainer.json

    "latex-workshop.latex.outDir": "<YourDirectoryName>",
    "latex-workshop.latex.magic.args": ["-output-directory=<YourDirectoryName>"],
  • Other configurations (e.g. PDF Generation Delay, Auto Saving etc.) can be modified in ./.devcontainer/devcontainer.json. Check the Wiki

More Features and Configurations

There are a lot of features like

And a lot more.

All of the features and configurations can be found here.

Contribution

I am open to and request you to contribute to this project. You can just Create a new issue to let me know about your concern/requests or just send a pull request with your desired changes.

Credits

What's Next

  1. Will optimize the backend to decrease installation time and PDF showing time for the first time
  2. Documentation
  3. Release: Export PDF as a release version
  4. You tell me

Contact

  1. Send an email to [email protected]
  2. Facebook, LinkedIn

tex's People

Contributors

jiajialin1649 avatar

Watchers

 avatar

tex's Issues

卫星海洋学实验1

fname='subset_1_of_S2B_MSI_2021_08_28_02_39_17_T51RVP_L2R.nc';
finfo=ncinfo(fname);
b1_n=ncread(fname,'rhos_442');
b2_n=ncread(fname,'rhos_492');
b3_n=ncread(fname,'rhos_559');
b4_n=ncread(fname,'rhos_665');
b5_n=ncread(fname,'rhos_704');
b6_n=ncread(fname,'rhos_739');
b7_n=ncread(fname,'rhos_780');
b8_n=ncread(fname,'rhos_833');
b9_n=ncread(fname,'rhos_864');
b10_n=ncread(fname,'rhos_1610');
b11_n=ncread(fname,'rhos_2186');
% % %calculate ndwi20
NDWI_20=(b3_n-b10_n)./(b3_n+b10_n);%水体指数的判据
NDWI20=NDWI_20;
NDWI20(NDWI20<0)=0;
NDWI20(NDWI20>0)=1;%将水体和陆地提取出来分离
% figure
% subplot(1,2,1);
% imshow(NDWI20);
% title('NDWI水体提取','FontSize',9)
%
% subplot(1,2,2);
% rgb1=zeros(size(b3_n,1),size(b3_n,2),3);%创建了三维数组,制定好
% %数组的行数、列数、以及数组的深度,代表着数组是一个rgb图像
% rgb1(:,:,1)=adapthisteq(b10_n);
% rgb1(:,:,2)=adapthisteq(b3_n);
% rgb1(:,:,3)=adapthisteq(b4_n);
% imshow(rgb1);
% title(['20NDWI真彩图'],'FontSize',9)
%
% %水体指数2
MNDWI_21 =(b2_n-b11_n)./(b2_n+b11_n);
MNDWI21 =MNDWI_21;
MNDWI21(MNDWI21<0)=0;
MNDWI21(MNDWI21>0)=1;

%
% figure
% subplot(1,2,1);
% imshow(MNDWI20);
% title('MNDWI水体提取','FontSize',9)
% subplot(1,2,2);
% rgb2=zeros(size(b2_n,1),size(b2_n,2),3);%创建了三维数组,制定好
% %数组的行数、列数、以及数组的深度,代表着数组是一个rgb图像
% rgb2(:,:,1)=adapthisteq(b11_n);
% rgb2(:,:,2)=adapthisteq(b2_n);
% rgb2(:,:,3)=adapthisteq(b3_n);
% imshow(rgb2);
% title(['20MNDWI真彩图'],'FontSize',9)
%
% %水体指数3
% W12015_20=1.7204+171b2_n+3b6_n-70b8_n-45b10_n-71b11_n;
% W1201520=W12015_20;
% W1201520(W1201520<0)=0;
% W1201520(W1201520>0)=1;
% figure
% subplot(1,2,1);
% imshow(W1201520);
% title('W2015水体提取','FontSize',9)
% subplot(1,2,2);
% rgb3=zeros(size(b2_n,1),size(b2_n,2),3);
% rgb3(:,:,1)=adapthisteq(b8_n);
% rgb3(:,:,2)=adapthisteq(b6_n);
% rgb3(:,:,3)=adapthisteq(b2_n);
% imshow(rgb3);
% title(['w2015真彩图'],'FontSize',9)
%
% %4
% AWEINsh_20=4
(b2_n-b10_n)-(0.25b8_n+2.75b11_n);
% AWEINsh20 =AWEINsh_20;
% AWEINsh20(AWEINsh20<0)=0;
% AWEINsh20(AWEINsh20>0)=1;
% figure
% subplot(1,2,1);
% imshow(AWEINsh20)
% title('AWEINsh水体提取','FontSize',9)
% subplot(1,2,2);
% rgb4=zeros(size(b2_n,1),size(b2_n,2),3);
% rgb4(:,:,1)=adapthisteq(b2_n);
% rgb4(:,:,2)=adapthisteq(b6_n);
% rgb4(:,:,3)=adapthisteq(b8_n);
% imshow(rgb4);
% title('AWEINsh真彩图','FontSize',9)
%
% %5
% AWElsh_20=b1_n+2.5b2_n-1.5(b8_n+b10_n)-0.25*b11_n;
% AWElsh20 =AWElsh_20;
% AWElsh20(AWElsh20<0)=0;
% AWElsh20(AWElsh20>0)=1;
% figure
% subplot(1,2,1);
% imshow(AWElsh20)
% title('AWEIlsh水体提取','FontSize',9)
% subplot(1,2,2);
% rgb5=zeros(size(b6_n,1),size(b6_n,2),3);
% rgb5(:,:,1)=adapthisteq(b8_n);
% rgb5(:,:,2)=adapthisteq(b6_n);
% rgb5(:,:,3)=adapthisteq(b2_n);
% imshow(rgb5);
% title('AWEIlsh真彩图','FontSize',9)
clear b9_n b8_n b7_n b6_n b5_n b4_n b3_n b2_n b1_n b10_n b11_n

fname='subset_0_of_S2B_MSI_2020_08_13_02_39_23_T51RVP_L2R.nc';
finfo=ncinfo(fname);
b1_n=ncread(fname,'rhos_442');
b2_n=ncread(fname,'rhos_492');
b3_n=ncread(fname,'rhos_559');
b4_n=ncread(fname,'rhos_665');
b5_n=ncread(fname,'rhos_704');
b6_n=ncread(fname,'rhos_739');
b7_n=ncread(fname,'rhos_780');
b8_n=ncread(fname,'rhos_833');
b9_n=ncread(fname,'rhos_864');
b10_n=ncread(fname,'rhos_1610');
b11_n=ncread(fname,'rhos_2186');
% % % % %calculate ndwi20
% % % NDWI_20=(b3_n-b10_n)./(b3_n+b10_n);%水体指数的判据
% % % NDWI20=NDWI_20;
% % % NDWI20(NDWI20<0)=0;
% % % NDWI20(NDWI20>0)=1;%将水体和陆地提取出来分离
% % % figure
% % % subplot(2,5,1);
% % % imshow(NDWI20);
% % % title('NDWI水体提取','FontSize',6)
% % %
% % % subplot(2,5,6);
% % % rgb1=zeros(size(b3_n,1),size(b3_n,2),3);%创建了三维数组,制定好
% % % %数组的行数、列数、以及数组的深度,代表着数组是一个rgb图像
% % % rgb1(:,:,1)=adapthisteq(b10_n);
% % % rgb1(:,:,2)=adapthisteq(b3_n);
% % % rgb1(:,:,3)=adapthisteq(b4_n);
% % % imshow(rgb1);
% % % title(['20NDWI真彩图'],'FontSize',6)
% % %
% % %
% % % %水体指数2
MNDWI_20 =(b2_n-b11_n)./(b2_n+b11_n);
MNDWI20 =MNDWI_20;
MNDWI20(MNDWI20<0)=0;
MNDWI20(MNDWI20>0)=1;
% % %
% % % subplot(2,5,2);
% % % imshow(MNDWI20);
% % % title('MNDWI水体提取','FontSize',6)
% % % subplot(2,5,7);
% % % rgb2=zeros(size(b2_n,1),size(b2_n,2),3);%创建了三维数组,制定好
% % % %数组的行数、列数、以及数组的深度,代表着数组是一个rgb图像
% % % rgb2(:,:,1)=adapthisteq(b11_n);
% % % rgb2(:,:,2)=adapthisteq(b2_n);
% % % rgb2(:,:,3)=adapthisteq(b3_n);
% % % imshow(rgb2);
% % % title(['20MNDWI真彩图'],'FontSize',6)
% % %
% % % %水体指数3
% % % W12015_20=1.7204+171b2_n+3b6_n-70b8_n-45b10_n-71b11_n;
% % % W1201520=W12015_20;
% % % W1201520(W1201520<0)=0;
% % % W1201520(W1201520>0)=1;
% % %
% % % subplot(2,5,3);
% % % imshow(W1201520);
% % % title('W2015水体提取','FontSize',6)
% % % subplot(2,5,8);
% % % rgb3=zeros(size(b2_n,1),size(b2_n,2),3);
% % % rgb3(:,:,1)=adapthisteq(b8_n);
% % % rgb3(:,:,2)=adapthisteq(b6_n);
% % % rgb3(:,:,3)=adapthisteq(b2_n);
% % % imshow(rgb3);
% % % title(['w2015真彩图'],'FontSize',6)
% % %
% % %
% % % AWEINsh_20=4
(b2_n-b10_n)-(0.25b8_n+2.75b11_n);
% % % AWEINsh20 =AWEINsh_20;
% % % AWEINsh20(AWEINsh20<0)=0;
% % % AWEINsh20(AWEINsh20>0)=1;
% % %
% % % subplot(2,5,4);
% % % imshow(AWEINsh20)
% % % title('AWEINsh水体提取','FontSize',6)
% % % subplot(2,5,9);
% % % rgb4=zeros(size(b2_n,1),size(b2_n,2),3);
% % % rgb4(:,:,1)=adapthisteq(b2_n);
% % % rgb4(:,:,2)=adapthisteq(b6_n);
% % % rgb4(:,:,3)=adapthisteq(b8_n);
% % % imshow(rgb4);
% % % title('AWEINsh真彩图','FontSize',6)
% % %
% % %
% % % AWElsh_20=b1_n+2.5b2_n-1.5(b8_n+b10_n)-0.25*b11_n;
% % % AWElsh20 =AWElsh_20;
% % % AWElsh20(AWElsh20<0)=0;
% % % AWElsh20(AWElsh20>0)=1;
% % %
% % % subplot(2,5,5);
% % % imshow(AWElsh20)
% % % title('AWEIlsh水体提取','FontSize',6)
% % % subplot(2,5,10);
% % % rgb5=zeros(size(b6_n,1),size(b6_n,2),3);
% % % rgb5(:,:,1)=adapthisteq(b8_n);
% % % rgb5(:,:,2)=adapthisteq(b6_n);
% % % rgb5(:,:,3)=adapthisteq(b2_n);
% % % imshow(rgb5);
% % % title('AWEIlsh真彩图','FontSize',6)

%这段代码用于显示两个不同年份的MNDWI(修正归一化差异水体指数)图像之间的差异。
% 它计算了两个MNDWI图像之间的差异,
% 将结果进行了缩放,并以带有颜色条的图像形式显示差异的情况。
MNDWI_21_2=MNDWI_21.*2;
NMNDWI_20_2=MNDWI_20;
dif=MNDWI_21_2-NMNDWI_20_2;
figure;
imshow(dif);
c=colorbar;
%caxis([-1 2]);
%c.Ticks = -1:1:2;
%c.TickLabels={'土地退化为水','两年均是土地','两年均是水体','水干涸为土地'};
map = [33/255,230/255,122/255;222/255,244/255,250/255;176/255,224/255,230/255;220/255,20/255,60/255];
colormap(map);
title('两年水体土地差异');
% set( gcf , 'position' , [ 0 50 800 600 ] );

physic marine

\documentclass{article}
\usepackage{ctex}%使用该编码可以支持中文
\usepackage{setspace}
\begin{document}
\section{geostrophic current}
{\zihao{6}大尺度的海水在压强梯度力和coriolis力平衡下的流动,流动基本是近水平的,近似认为定常的}

{\zihao{7}倾斜流的定义:海水分布均匀但是还还海面倾斜造成不均匀的水压场,在这种压力产生的地转流成为地转流}

{\heiti 倾斜流公式}
\begin{equation}
0=-\frac{1}{\rho}\frac{\partial \rho}{\partial x}+fv
\end{equation}
\begin{equation}
0=-\frac{1}{\rho}\frac{\partial \rho}{\partial y}+fu
\end{equation}
\begin{equation}
0=-\frac{1}{\rho}\frac{\partial \rho}{\partial z}-g
\end{equation}
\begin{equation}
\frac{\partial u}{\partial x}+\frac{\partial v}{\partial y}+\frac{\partial w}{\partial z}=0
\end{equation}
\begin{equation}
u\frac{\partial \theta}{\partial x}+v\frac{\partial \theta}{\partial y}+w\frac{\partial \theta}{\partial z}=0
\end{equation}
\begin{equation}
\rho=\rho(s,\theta)
\end{equation}
\begin{enumerate}
\zihao{6}\item \quad 倾斜流沿着水位线流动
\item \quad 流动方向右边为高水位
\item \quad 倾斜流从海面到海底的整个水柱具有相同的速度
\item \quad 均匀海洋中的海绵坡度可作为倾斜流大小的度量
\end{enumerate}
\heiti 梯度流公式
\begin{equation}
\frac{\partial u}{\partial t}-fv=-\frac{1}{\rho}\frac{\partial p}{\partial x}
\end{equation}
\begin{equation}
\frac{\partial v}{\partial t}-fu=-\frac{1}{\rho}\frac{\partial p}{\partial y}
\end{equation}
\begin{equation}
0=-\frac{1}{\rho}\frac{\partial p}{\partial z}-g
\end{equation}
\begin{equation}
\frac{\partial u}{\partial x}+\frac{\partial v}{\partial y}+\frac{\partial w}{\partial z}=0
\end{equation}
\begin{equation}
\frac{d\theta}{dt}=K_\theta_Z\frac{\partial^2 \theta}{\partial z^2}+K_\theta _t(\frac{\partial \theta^2}{\partial x^2}+\frac{\partial \theta^2}{\partial y^2})
\end{equation}
\begin{equation}
\frac{ds}{dt}=K_S_Z\frac{\partial^2 s}{\partial z^2}+K_S_t(\frac{\partial s^2}{\partial x^2}+\frac{\partial s^2}{\partial y^2})
\end{equation}
\begin{equation}
\rho=\rho(s,\theta,p)
\end{equation}
\begin{enumerate}
\zihao{6}\item \quad 水平流速与压强梯度垂直,梯度流沿着等压线方向流动
\item \quad 在北半球,高压在运动方向的右边;相反南半球高压在运动方向的左边
\item \quad 水平无辐散,忽略f随y的变化,梯度流沿着等温度线方向流动;沿着等密面、等盐线方向流动
\end{enumerate}
其他概念

\zihao{6}利用海兰汉森公式计算流速

流速零面

位势高度图

热成风方程的应用

\section{复习思考题}
\begin{enumerate}
\zihao{6}\item 什么是海流
\item 什么是地转流及其分类
\item 给出梯度流的定义方程以及表达式
\item 推倒方程,讨论倾斜流的特征
\item 梯度流的温度、盐度、密度的分布,说明
\item 梯度流什么情况不适用
\item 如何确定零流速面
\item 说明动力高度和流速的关系
\item 推导地转流随深度变化的公式
\end{enumerate}

\clearpage
\section{Ekman Spiral}

\end{document}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.