I'm creating some graphs for my thesis in a single .tex file using the TikZ package in LaTeX.
I'm using the standalone document class so that my graphs are generated without whitespaces.
How can I export every graph in a separate PDF file so I can load them individually in another project?
The tikz library external does just what you want:
\usetikzlibrary{external}
\tikzexternalize
It will generate one PDF per tikzpicture. You can define an output directory with:
\tikzexternalize[prefix=./dir]
When you compile generate1.tex file, it will produce generate1.pdf file. When you rename the .tex file (f.e. generate2.tex), new pdf will also have different name (generate2.pdf), thus the old pdf won't be deleted.
If you want to display TikZ images only, use \PreviewEnvironment{tikzpicture}. If you are interested, you can find the sample code here.
If you want to load them, use includepdf.
Related
I am trying to use the Python Client Library to add multiple files to a dataset I have created for AutoMl Translate. I was unable to find a good example for the csv file that is to be used. Here is the link to their Python Client Library example code to add files to a dataset.
I have created a csv in a bucket of the following form:
UNASSIGNED,gs://<bucket name>/x,gs://<bucket name>/y
Where I am trying to add two files called x and y.
and I get the following error:
google.api_core.exceptions.GoogleAPICallError: None No files to import. Please specify your input files.
The problem was how I formatted the csv file. Each file I want to add needs to have its own line,
The correct csv file would look like this:
UNASSIGNED,gs://<bucket name>/x
UNASSIGNED,gs://<bucket name>/y
I have an article document in LaTeX in which I cite sources from a bibtex file. I want to be able to still cite these sources, but I also want to be able to compile the bibliography into a separate pdf document. This document is a grant proposal for NSF, and they want the bibliography to be in a separate document.
I have searched the web for solutions to this problem. Each solution is slightly different than what I need for my particular problem.
\usepackage{cite}
\usepackage{bibentry}
...
\nocite{*}
\bibliographystyle{plain}
\bibliography{MyBibliography}
The sources are included at the end of the document, and they are labeled "References". I need them in a separate document, labeled "Bibliography".
Assuming your main file is called test, you can simply import its bibliography in a new file with \input{test.bbl} and change the \renewcommand{\refname}{Bibliography} or \renewcommand{\bibname}{Bibliography}, depending on the documentclass. This way the references will have the same numbering as in the original document.
\documentclass{article}
\usepackage{cite}
\usepackage{bibentry}
\renewcommand{\refname}{Bibliography}
\begin{document}
\input{test.bbl}
\end{document}
I am trying to figure a way to use already translated .md files (Russian Language) with Sphinx. I use readthedocs.io and I have already read the process of making translatable files (.po/.pot) from:
(1) https://docs.readthedocs.io/en/latest/localization.html
(2) https://docs.readthedocs.io/en/latest/guides/manage-translations.html.
This process requires to make .po or .pot files, translate them, and then produce translated html files - served under https://project.readthedocs.io/$language/$version
What I want is to use a different directory (for example named ru) and place there the Russian .md files.
Is that possible? How is it possible to avoid creating these .po/.pot files?
I have large numbers PDF document, from which I need to extract text. The extracted text I use for further processing. I did this for a small subset of documents using Tesseract API in a linear approach and I get the required output. However, this takes a very long time when I have a large number of documents.
I tried to use the Hadoop environment processing capabilities (Map-Reduce) and storage (HDFS) for solving this issue. However, I am facing problem to implement Tesseract API into the Hadoop (Map-Reduce) approach. As Teserract converts the files into intermediate image files, I am confused as to how intermediate result Image files of Tesseract-API-process can be handled inside HDFS.
I have searched and unsuccesfully tried a few options earlier like:
I have extracted text from PDF by extending FileInputFormat class into my own PdfInputFormat class using Hadoop-Map-Reduce, for this i used Apache PDFBox to extract text from pdf, but when it comes to scanned-pdf's which contains image, this solution does not give me the required results.
I found few answers on the same topic stating to use -Fuse and that will help or one should generate image files locally and than upload those into hdfs for further processing. Not sure if this is the correct approach.
Would like to know approaches around this.
This is an approach found to process multiple pdf's to extract text using the power of the Hadoop Framework, and then use this text for further processing:
Put all the PDFs to be converted to text in one folder.
Create one text file per pdf to contain the path to the pdf. e.g. if I have 10 pdfs to convert, then I have 10 text files generated, each containing the unique path to the respective pdf.
These text files are given as input in the map-reduce program
Because input file size is very small only 1 input split is generated by framework for 1 input. e.g if I have 10 pdfs as input, then framework will generate 10 input-split.
From each Input-split one line(record) is read by Record-Reader and passed to one mapper as a value. So if there are 10 records(line==File Path) in input text file , 10 times mapper will run. As I have one record per input-split so one mapper-reducer is assigned to do task for that input-split.
As I have 10 input-split 10 mapper will run, parallel.
Inside the Mapper ghost-script generates images, passing the file name from Mapper value attribute. The image is converted to text using Tesseract inside the mapper itself to get the text of each pdf. This is the output.
This is passed to the reducer to do other analytics work as required.
This is the current solution. Would like feedback on this.
I have had no luck figuring out how to insert an image (a gif in this case) created in perl with GD directly into an excel workbook, without first saving the image to a file. Is this possible using win32::OLE or one of the perl spreadsheet modules, or is there another trick I'm missing?
What I've tried:
searching google, stackoverflow, perlmonks
modules:
- spreadsheet::writeexcel
- excel::writer::xlsx
win32::OLE
- Pictures->Insert
- Shapes->AddPicture
All require a file as input; there was ONE (rejected) bug/patch to spreadsheet::writeexcel to allow inline images, but it didn't quite work and I'm disinclined to use non-baseline modules... any ideas?
Neither Spreadsheet::WriteExcel or Excel::Write::XLSX support adding images from anything other than a file.
I would suggest creating the images as temporary files, inserting them into a worksheet with Excel::Writer::XLSX (which has better image handling) and then removing the temporary files.