TexStudio and Building in a Working Directory

I have been using TexStudio with Miktex on Windows for years and find it to be an excellent tool for writing, reviewing, and navigating highly technical documents involving large amounts of mathematics and defined structure.

I recently went through another round with the build system while trying to build in a working directory. Latex tends to write a lot of logs, index files, and intermediate files to the base directory and this can clutter things up. This is especially troublesome when working with GIT for version control.

Below are the steps I took in 2021 to get everything running again on Windows with Miktex. The majority of the files are written to a subdirectory “__BUILD__PDF__” which is automatically created if needed, and the directory is ignored in GIT.

My TexStudio commands now look like this:

And the build system

Miktex apparent uses the “aux-directory” option while rather than “-output-directory”. I add the new __build__pdf__ directory to the search paths for good measure, and the bibtex build command must be modified to find everything.

As a bonus, I create the custom user command

cmd /c if not exist "__BUILD__PDF__" ( mkdir "__BUILD__PDF__" ) else ( echo Build Directory __BUILD__PDF__ already exists.)

and this runs a command console in windows with “cmd /c <whatever>” so I can script checking for existence of the directory and create it needed. I then add the custom command to the start of the build sequence.

Finally, I add the line

__build__pdf__/

to the .gitignore file to ignore all the build files.

Additional GLSL

I created a few additional GLSL Shaders  for fun: Brady, grayscale posterize,  slots, and Warhol. Video from Grandy Canyon B-Roll, public domain.

A demo app was created using OpenCV to load an MP4 video file and preview it in a side window. The frames were converted into OpenGL textures which were bound and used with a GLSL Shader again a simple rectangular geometry (two triangle fan).

The final result appears as follows:

GLSL Shader Demo

Created a simple demo application that loads video using OpenCV, converts to an OpenGL texture, and renders it in an OpenGL window with a Shader running on top of it. All colorization and animation beyond the original (nearly monochrome) video is in the shader, which was inspired by a Shadertoy Example by Justicle.