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.

Full Image Length Line Art Demo

eyepictures  A recent post I saw here demonstrated   an artists technique of plotting lines across a page so that a series of lines pass through the entire page and together create a recognizable image. This post demonstrates a recreation of the technique using software.

Results are above (original, basic render, buildup render), and the references art image:

View post on imgur.com

 

I initially wanted to perform an exhaustive search of possible lines in the image, or find existing lines using something like a Hough Transform or curvelets. However, the exhaustive search of possible lines at each iteration was slow and complicated, so I ended up just test a couple hundred lines from a random edge to random edge and greedily minimize the remaining energy in the image.

The first iteration simply made a line across the image with magnitude one. This results of a very rough image:

result_buildup01_lines200

The next iteration allows the lines to build up, so lines can become darker and dark with each stroke. This results in a much nicer image while still requiring that each line fall across the entire image from edge to edge.

result_buildup64_lines2130

An interesting extension would be to choose a few colors and process a blue channel, as with the original author, rather than just processing grayscale.