Tag Info

Hot answers tagged

46

I would recommend the embedfile or the navigator package (the latter has the additional advantage of working together with dvipdfmx, see this question of mine). Both are quite similar in usage: With the embedfile package: \documentclass{article} \usepackage{embedfile} \embedfile{\jobname.tex} \begin{document} The document \end{document} With the ...


21

You can attach arbitrary files to a PDF document using the attachfile2 package. The above package works only with pdfTeX and dvips. For a XeTeX/xdvipdfmx solution, see this question.


16

If you install AbiWord with the additional import and export plugins,* you can open a PDF file in the Word Processor, and then export to LaTeX. In fact, you can also convert from the commandline: abiword --to=tex filename.pdf Be warned that both its PDF import routine and its LaTeX export routine have serious limitations, and you should not expect anything ...


11

Check out InftyReader. Quoting the start page: InftyReader is an Optical Character Recognition (OCR) application that recognizes and translates scientific documents (including math symbols) into LaTeX, MathML and XHTML!


9

Somewhat alike to disassembling a compiled executable: Yes, technically it can be done - but you will lose much of the information that was contained in the original TeX source. For example, the DVI contains the text "see also chapter 11.2". You might be able to turn this into text again, but the information that this was originally written as see also ...


9

pdfTeX Source code: http://ctan.org/tex-archive/systems/pdftex/ XeTeX Homepage: http://xetex.sourceforge.net/ Source code: http://sourceforge.net/p/xetex/code LuaTeX Homepage: http://luatex.org/ Source code: http://foundry.supelec.fr/gf/project/luatex Friends, feel free to add more links if necessary.


8

No, technically it cannot be done. DVI, PDF and postscript contain text arranged on a page according to instructions in a (La)TeX document. You can extract the text, and you can try to guess at commands that would generate a similar page, and you might even guess well. But you'd be doing it by matching the result. If there is a number in the text, for ...


8

You can do this in ConTeXt as well. Example: \setupinteraction [state=start] \starttext Foo \attachment[file=attachfile.tex, title=Some file, author=Me] \stoptext The file key contains the file name, the title key is used (probably depending on the reader) e.g. for a tool tip (see screenshot). Interaction needs to be activated, otherwise the attachment ...


8

The Inlage editor integrates Math Input Panel seemlessly and is capable of producing LaTeX code directly. Actually it has two more - Sketch Input Panel and Text Input Panel. The window that opens when you press Math Input Panel: Here you can write, edit, correct etc. You will be better of with a tab with a stylus though. I used mouse. When you press ...


7

as a general rule, i would always recommend using the ctan copy, which is in this case at in the ctan graphics tree as it happens (in this case) the “private” copy of the file is the same as that on ctan. in general, one shouldn't count on that, since the "private" location may be an experimental version offered for testing. finally -- remember that ...


7

There are systems, but at the current state of the technology they are unlikely to be as fast or accurate as simply typing in the matrix. there is hardly any additional markup required, just a & separator between the cells. Here for example is a hand (well mouse) drawn matrix in the Math Input panel which is standard in Windows 7. The lower bit is hand ...


7

You can use a variation of the kernel's \on@line: \documentclass{article} \makeatletter \ifnum\inputlineno=\m@ne \let\showlineno\@empty \else \def\showlineno{ line \the\inputlineno} \fi \makeatother \begin{document} You are now at \showlineno. This paragraph starts at \showlineno, and some more text, and runs until \showlineno. on input line ...


6

the "mini-index" listings in volume b were generated separately and added in post-processing. there is a chapter in knuth's book "digital typography" entitled "mini-indexes for literate programs" (it's chapter 11, pp.225-245), as well as several other entries in the index. a program TWILL was used to create the mini-indexes in both volumes b and d. the ...


5

Yes: use the outfile={<outputfilename>} option. If your coauthors do not have PGF installed, you can set \let\pgfutilensuremath=\ensuremath and the resulting output file will be completely independent of pgfplotstable. You can even use the feature to modify the output files manually - and to tell pgfplotstable that the existing output file should ...


5

The first answer is already mentioned in the comments. Basic answer is look for the TeX distro's tex/pgf/generic folder. (TikZ/PGF has different implementation details depending on the driver choice so it further classifies code into ConTeXt/Lua/Xe/PDF/La(TeX) etc.) Generic tends to include the driver-independent code. To add yet another option from ...


4

Just collect all the else statements together to save on typing and errors, as shown below. Then simply you only need to change one line of the code for the false, i.e., PIECESfalse. \documentclass{article} \usepackage{lipsum} \begin{document} \newif\ifPIECES \PIECEStrue \section{Lorem ipsum dolor} \lipsum[1] \ifPIECES This is small piece. I want this ...


4

If your editor knows about comments, then the simplest method is to put a comment character on the blank lines: lorem ipsums % \begin{align} foo & bar\\ qux & rofl\\ & toto \end{align} % lorem ipsums But this will only work if your editor knows not to break up comment lines. Update: Although I think that the real answer is: use a ...


4

Import the file using LibreOffice. It will create a Draw file. You have to copy and edit it by pieces into Writer. Then you can use the plugin writer2latex to export the results to LaTeX. The final code is dirty, with plenty of stuff you don't need and some errors. If your docs are large enough, this process might be easier than re-typing everything. ...


4

Currently, there is no way to make TeXShop indent long lines as you want. If you would like this feature to be implemented, you can “vote” for this feature request. However you might want to consider breaking the long lines into shorter ones and manually indenting as you will. Some of the advantages of doing so are: You get to indent however you want. For ...


3

I don't use minted, but here's how I would do it for fancyvrb, which minted uses internally. Here, I define new command \VerbLabel{linex}{a $ a} which assigns the label linex to the source code line a $ a. It's written using expl3, so see the source3 documentation for explanation for any of the commands that don't make sense. In brief: prop in expl3 is a ...


3

Create a batch file If you are working on a non-Windows computer, please adapt the following batch. rem batch.bat takes 2 mandatory arguments. rem %1 represents your java code directory path. rem %2 represents main TeX input file name (aka jobname). set curdir=%CD% cd %1 dir /b *.java > %curdir%\%2.xport For the sake of simplicity, save this batch in ...


3

Have a look at source2e.pdf. Besides downloading, you could write texdoc source2e at the command prompt This file contains the commented LaTeX sources. Use the PDF reader search feature for accent or \DeclareTextAccent and \DeclareTextCommand.


3

While the expanded code can not be recovered, your can generate the desired code. The MWE below creates a file foobar.tex with the following lines: \subsection{C 0-look explanations} \subsubsection{C0D0-look explanations} \rotatebox{90}{\input{table-July-c0d0.tex}} \includegraphics[scale=0.6]{plot-July-c0d0.eps} \subsubsection{C0D1-look ...


3

A mastersthesis entry accepts a type field: \begin{filecontents*}{\jobname.bib} @mastersthesis{x, author={Me Myself}, title={My thesis}, type={Masterarbeit}, school={That School}, year={2020}, } \end{filecontents*} \documentclass{article} \begin{document} \cite{x} \bibliographystyle{plain} \bibliography{\jobname} \end{document}


3

You can go back to your old computer and copy them to your external hard drive but try and change their extension from .tex to .txt in case they appear that way. Don't do that in the originals but in copies. There wouldn't be any problem but just in case. As it is already mentioned in the comments .tex files are simple text files.


3

In your long TeX input file (your source), use \ifsecret ... \fi to sandwich the secret parts that you want to either include or exclude. The common parts will always be included so don't sandwich them. % filename.tex \documentclass[preview,border=12pt]{standalone} \newif\ifsecret \begin{document} common 1 \ifsecret I have a top secret message here. \fi ...


3

I actually ponder this question often, and haven't yet (after decades) settled on a single approach that works universally. And as you see from your comments, each coder has their own "style" of indentation. I agree with egreg that it is most important in macro definitions. One method that I have found particularly useful, if you have to break up the ...


2

Kile does not know about the structure of your project. If you do not explicitly specify a master file, it assumes that the file you are currently editing is the master file and tries to open a PDF file with the same name (and produces the error you are getting). As a solution, you can either create a Kile project that stores the relationship between your ...


2

XeTeX is the binary, XeLaTeX is a XeTeX format file. While most systems do set up a 'wrapper' executable to allow you to do xelatex, this is essentially the same as xetex "&xelatex". So what you need to do is make the XeLaTeX format, which requires the LaTeX sources (latex.ltx, etc.) plus xelatex.ini, which makes the necessary adjustments to the set up ...


2

I not sure what exactly is your required feature, but maybe the following will satisfy you. I make use of another program to do the work, namely Textwrangler, to properly align and insert hard line breaks. Here is a macro that does the following: collects all marked text, passes it on to Textwrangler where the text is properly aligned and broken the ...



Only top voted, non community-wiki answers of a minimum length are eligible