In a folder, I have number of files that are in .dat extension format (it is originally .xvg format but have changed to .dat format to plot all other graphs in a single plot) which contains the values along with the some written headings etc., as :   # Grace project file  #  @version 50125 @page size 792, 612  @page scroll 5%  @page inout 5%  @link page off  @map font 8 to "Courier", "Courier"  @map font 10 to "Courier-Bold", "Courier-Bold"  @map font 11 to "Courier-BoldOblique", "Courier-BoldOblique"  @map font 9 to "Courier-Oblique", "Courier-Oblique"  @map font 4 to "Helvetica", "Helvetica"  @map font 6 to "Helvetica-Bold", "Helvetica-Bold"  @map font 7 to "Helvetica-BoldOblique", "Helvetica-BoldOblique"  @map font 5 to "Helvetica-Oblique", "Helvetica-Oblique"  .  .  .  .  @    s0 errorbar riser linestyle 1  @    s0 errorbar riser clip off  @    s0 errorbar riser clip length 0.100000  @    s0 comment "rdf_CaNm.xvg"  @    s0 legend  "N1"  @target G0.S0  @type xy  0 0  0.002 0  0.004 0   ie., there are 327 lines  from #Grace project file(being line one) --> @type xy(being line 327) and then the 0 0 is the 328th line, 0.002 0 is the 329th line etc.  How can I delete all the first 327 lines in all the files of .dat format containing in the folder (yes all those .dat files have first 327 lines as stated above) through the command in terminal?
58175
I have multiple files that contain ascii text information in the first 5-10 lines, followed by well-tabulated matrix information.  In a shell script, I want to remove these first few lines of text so that I can use the pure matrix information in another program.  How can I use bash shell commands to do this?    If it's any help, I'm using RedHat and an Ubuntu linux systems.
36216
For example I want to use \iint from ams package  and also mathabx package in one file together. Actually I want a command that neutralizes ams package effect and replace it with mathabx package effect from here on in my file. Thanks for your responsibility.  This is my example minimal file:  \documentclass[12pt,a4paper]{report} \usepackage{amsmath}  \usepackage{mathabx}  \begin{document} i want this one in ams style:        \[ \iiint\,\iiint\, \iiint\,\oint\, \] text text text text text text text text text text text text   and this one in mathabx style:   \[ \iiint\,\iiint\, \iiint\,\oint\, \]   but both of them are the same and i don't like it ..... \end{document}
46527
I have several plots saved as .pdf in a folder and I would like to know if there is a way of adding all of them in a document at once, without typing the path to each file.
19789
I was trying to make a table with pgfplotstable and append one csv file to another by \pgfpotstablevertcat. Now I wanted to change the math font with unicode-math, but then I get the error "File ended while scanning use of \pgfplotslistpushback". I am using lualatex from MiKTeX to compile the document. Same problem for xelatex.  What could be the issue? Is it a bug or am I missing something obvious? Here is a MWE which produces the error.  \documentclass{article} \usepackage{unicode-math} \usepackage{pgfplotstable}  \begin{filecontents}{dataA.csv} pH,     concentration 1,      1.5 2,      -0.5 3,      -1.5 \end{filecontents} \begin{filecontents}{dataB.csv} pH,     concentration 4,      -2.5 5,      -3.5 6,      -4.5 \end{filecontents}   \begin{document} \pgfplotstableset{col sep=comma} \pgfplotstablevertcat{\outputa}{dataA.csv} % loads `dataA.csv' -&gt; `\outputa' \pgfplotstablevertcat{\outputa}{dataB.csv} % appends rows of dataB.csv \pgfplotstabletypeset[columns={pH, concentration},fixed zerofill]{\outputa}; \end{document}
73784
Sometimes it's impossible to upload .pdf, .dvi and .ps files (usually images of diagrams generated with TiKZ in my case). There, one wishes to obtain a way to export them directly to a .png or some other pic-like file extension. Unfortunately the result I get by taking a snapshot of my .pdf is awful.  Which is the better way to get, say, a .png out of a LaTeX base code?
59057
I want to define a command \filepath so that I can use \filepath{foo_bar.cpp} and it is printed in monospaced font.  Also, why does this not work? I get strange errors:  \newcommand{\filepath}[1]{\verb!#1!}
7661
Have anyone an idea how i can use \IfFileExist{}{}{} for file names with spaces?  f.e. didn't work  \newcommand{\runI}{D:/Test/run1 - T2} \newcommand\IG[2][]{\IfFileExists{#2}{\includegraphics[#1]{#2}}{\fbox{File #2 doesn't exist}}}  \begin{figure}[htbp] \centering \IG[trim = 40mm 10mm 40mm 2mm,clip = true, width=0.4\textwidth]{\runI/LatexTestFig2.png} \caption{run 1} \label{overflow} \end{figure}   f.e. work  \newcommand{\runII}{D:/Test/run1-T2-Kopie} \newcommand\IG[2][]{\IfFileExists{#2}{\includegraphics[#1]{#2}}{\fbox{File #2 doesn't exist}}}  \begin{figure}[htbp] \centering \IG[trim = 40mm 10mm 40mm 2mm,clip = true, width=0.4\textwidth]{\runII/LatexTestFig2.png} \caption{run 1} \label{overflow} \end{figure}   what can I do? THX
73581
For my study of physics I have to do various lab reports. Normally I just process all my data using python, gnuplot or Mathematica and copy it from there to my TeX document. Unfortunately all these applications use the . (dot) as a decimal seperator. Because I study in Germany the german standard says that I have to use , (comma) as the decimal seperator. In most cases the supervisors of the lab are forgiving, but one of them told me to redo my whole lab report because of this. Now I don't want to search all the 15 pages to replace all dots with commas. I could have used a  but this still implied editing the whole file.
48595
Very neat that I can use any available Truetype font on my Windows machine with MikTeX and XeTeX.  %!TEX TS-program = xelatex %!TEX encoding = UTF-8 Unicode \documentclass[]{article} \usepackage{xltxtra,fontspec,xunicode} \defaultfontfeatures{Scale=MatchLowercase} \title{Fonttest}    \begin{document}    \section{Section Title} {     \setromanfont{Palatino Linotype}       The quick brown fox jumps over the lazy dog.   }   \section{Section Title} {     \setromanfont{ProggyCleanTTSZBP}       The quick brown fox jumps over the lazy dog.   } \end{document}   Is there a way to automatically generate a font test page for every available font? So that I do not have to type a test page for every available font by hand?  Actually, I do not even know how to get to the Long Font Name required for \setromanfont -- short of typing it from the screen:   The Windows directory only lists the file names, obviously. Maybe this can be done in TeX itself, but I could manage it with a Python script or such like.
35718
\includegraphics cannot handle filenames that contain more than the one dot, separating the filename from the extension. Apparently it uses everything after the first dot as extension and then, of course, complains about an unknown graphics extension.  This is annoying as I very often have filenames that contain parameter values, e.g. plot_a0.4_b0.6.pdf.  Is there a way to teach LaTeX to interpret only the string behind the last dot as extension?
11740
I'm running tests of a variable-size-and-contents test set. Data files are added and removed frequently. I'm looking for an automated way of gathering a file list.  All files are in subdirectories of D; I need the full directory and name added to a text file. However, I only need those files that have a "paired" file, which has the same filename but a different extension (so... different filename, but in a structured way). So, if there is a MyFileName.A and MyFileName.B, then I want D/.../MyFileName added to the file list.  There are .A files without .B files, but no .B files without .A files. If a .A has a .B file, then both files are in the same directory.   Any advice?
119965
I have multiple image files inside a directory having the same extension (.mrc). In the terminal, if I do, header , it gives following output:   RO image file on unit   1 : FoilHole_17224697_Data_18256098_18256099_20150819_2015.mrc     Size=      65537 K           This file has invalid axis indices, adjusting them to 1,2,3   Number of columns, rows, sections .....    4096    4096       1  Map mode ..............................    2   (32-bit real)                Start cols, rows, sects, grid x,y,z ...    0     0     0    4096   4096      1  Pixel spacing (Angstroms)..............   1.000      1.000      1.000      Cell angles ...........................    0.000    0.000    0.000  Fast, medium, slow axes ...............    X    X    X  Origin on x,y,z .......................    0.000       0.000       0.000      Minimum density .......................   2056.0                                 Maximum density .......................   4462.0                                 Mean density ..........................   3213.5                                 tilt angles (original,current) ........   0.0   0.0   0.0   0.0   0.0   0.0  Space group,# extra bytes,idtype,lens .        0        0        0        0       1 Titles : EMAN 9/18/2015 15:41    I am looking for a script where I could specify a range for the "Mean density" value and selected files who contain their "Mean density" value in that range get copied to a new directory.  NB: Header is a program from IMOD image processing package. For more information on the function 'header' plaese visit:
76728
Whenever I try to use the gnuplottex package, I get the following error messages:  /usr/share/texlive/texmf-dist/tex/latex/gnuplottex/gnuplottex.sty:79: Argument of " has an extra }. [...te\write18{rm -f "\jobname.gnuploterrors"}] /usr/share/texlive/texmf-dist/tex/latex/gnuplottex/gnuplottex.sty:79: Paragraph ended before " was complete. [...te\write18{rm -f "\jobname.gnuploterrors"}] /home/myDocument.tex:118: Package catchfile Error: File `myDocument.gnuploterrors' not found. [\end{document}] TeX STOPPED: File ended while scanning use of \gnuploterrors@eatpa\ifx \gnuploterrors@ \@empty \else \PackageWarningNoLine {gnuplottex} TeX reports the error was in file: myDocument.tex   Line 79 of gnuplottex.sty reads \immediate\write18{rm -f "\jobname.gnuploterrors"}, so it not being executed seems to be the cause for the other errors.  Everything worked fine before, but I upgraded to Xubuntu 16.04 LTS lately, so this may be the cause. I already tried removing gnuplot and TeX Live completly and installing them again, but the error remains.  Edit:  I'm using pdflatex and Version 0.9.1 of gnuplottex. All it needs to produce this error is just a \usepackage{gnuplottex}, so for example this document doesn't compile:  %!TEX options = "--shell-escape"  \documentclass[a4paper]{article}  \usepackage{gnuplottex}   \begin{document} \end{document}   However, I noticed that with this minimal file, only the last 3 lines of the error message from above are shown. All 5 lines are only shown if I also add \usepackage{ngerman}.
65391
Ubuntu desktop with 12.04 is about to crash.  Installed 13.04 on a new machine, want to transfer Book Antiqua font from old machine to the new one.  How do I find it on the old machine?  My /usr directory is empty. My fonts.conf file has these lines: &lt;!-- Font directory list --&gt; &lt;dir&gt;/usr/share/fonts&lt;/dir&gt; &lt;dir&gt;/usr/x11R6/lib/X11/fonts&lt;/dir&gt;  &lt;dir&gt;/usr/local/share/fonts&lt;/dir&gt; &lt;dir&gt;~/.fonts&lt;/dir&gt;  Don't know what this means, but my /usr directory has nothing in it.
69314
I have several big files with some measurements.   It looks this way:  N 12344;PE 9.9999999;... #S 0 0 31 44 75 130 165 196... #S_+ "2 5 2 3 3 1 1 2 3 1 2 2...  N 12345;PE 9.9999999;... #S 0 0 34 57 84 133 152... #S_+ "1 0 1 1 2 3 0 0 0...  N 12346;PE 9.9999999;... #S 0 0 31 44 73 140 169... #S_+ "3 3 4 0 0 2 1 2 4...  N 25104;PE 9.9999999;... #S 0 0 36 52 102 108 145... #S_+ "1 1 0 1 0 0 3 0 1...  N 25105;PE 9.9999999;... #S 0 0 32 58 88 130 143...   Sample is here:   The file is much bigger but I replaced part of the data with "..." to make it shorter.  I need to somehow replace the line ends before "#S" - in fact simply merge the "N" line with the following two ones into one line (or with the following three ones so I can get rid of the blank lines). Expect output like this:  N 12344;PE 9.9999999; #S 0 0 31 44 75 130 165 196 #S_+ "2 5 2 3 3 1 1 2 3 1 2 2... N 12345;PE 9.9999999; #S 0 0 34 57 84 133 152 #S_+ "1 0 1 1 2 3 0 0 0... N 12346;PE 9.9999999; #S 0 0 31 44 73 140 169 #S_+ "3 3 4 0 0 2 1 2 4... N 25104;PE 9.9999999; #S 0 0 36 52 102 108 145 #S_+ "1 1 0 1 0 0 3 0 1... N 25105;PE 9.9999999; #S 0 0 32 58 88 130 143...   Is this possible to achieve using some command-line utility in linux?   My knowledge is quite limited in this area so I would appreciate any help.  thanks
81282
I have a problem with LaTeX packages. My problem seems to be with xcolor, and very close from this , but their solution does not work for me.   Unfortunatly, even if I put \usepackage[table,xcdraw]{xcolor} before \usepackage{xcolor} the problem continues...   Is there a simple/magic solution?  Here is the packages I use:  \documentclass[ 11pt, % The default document font size, options: 10pt, 11pt, 12pt %oneside, % Two side (alternating margins) for binding by default, uncomment to switch to one side french, % ngerman for German singlespacing, % Single line spacing, alternatives: onehalfspacing or doublespacing %draft, % Uncomment to enable draft mode (no pictures, no links, overfull hboxes indicated) %nolistspacing, % If the document is onehalfspacing or doublespacing, uncomment this to set spacing in lists to single %liststotoc, % Uncomment to add the list of figures/tables/etc to the table of contents %toctotoc, % Uncomment to add the main table of contents to the table of contents %parskip, % Uncomment to add space between paragraphs %nohyperref, % Uncomment to not load the hyperref package headsepline, % Uncomment to get a line under the header %chapterinoneline, % Uncomment to place the chapter title next to the number on one line %consistentlayout, % Uncomment to change the layout of the declaration, abstract and acknowledgements pages to match the default layout table, ]{MastersDoctoralThesis} % The class file specifying the document structure  \usepackage[utf8]{inputenc} % Required for inputting international characters \usepackage[T1]{fontenc} % Output font encoding for international characters  \usepackage{amsmath} % Use the Palatino font by default  \usepackage[table,xcdraw]{xcolor} % pas OK  \usepackage{xcolor} %OK  \usepackage{hyperref}  \usepackage[bottom]{footmisc}  \usepackage[backend=bibtex,style=authoryear,natbib=true]{biblatex} % Use the bibtex backend with the authoryear citation style (which resembles APA)  \addbibresource{example.bib} % The filename of the bibliography  \usepackage[autostyle=true]{csquotes} % Required to generate language-dependent quotes in the bibliography  \usepackage{capt-of}  \usepackage{subfigure}  \usepackage{caption}  \usepackage{float}  \usepackage{graphicx}  \usepackage{amssymb}  \usepackage{amsfonts}  \usepackage[framemethod=TikZ]{mdframed} \usepackage{lipsum} \mdfdefinestyle{MyFrame}{%     linecolor=black,     outerlinewidth=2pt,     roundcorner=20pt,     innertopmargin=\baselineskip,     innerbottommargin=\baselineskip,     innerrightmargin=20pt,     innerleftmargin=20pt,     backgroundcolor=gray!20!white}   And here is the table I used in one of the chapters ():   % Please add the following required packages to your document preamble: % \usepackage[table,xcdraw]{xcolor} % If you use beamer only pass "xcolor=table" option, i.e. \documentclass[xcolor=table]{beamer} \begin{table}[] \begin{tabular}{|c| &gt;{\columncolor[HTML]{FFFFFF}}c | &gt;{\columncolor[HTML]{EFEFEF}}c | &gt;{\columncolor[HTML]{FFFFFF}}c | &gt;{\columncolor[HTML]{EFEFEF}}c | &gt;{\columncolor[HTML]{FFFFFF}}c | &gt;{\columncolor[HTML]{EFEFEF}}c | &gt;{\columncolor[HTML]{FFFFFF}}c |} \hline Row 1: &amp; \#1   &amp; \#2  &amp; \#3   &amp; \#4   &amp; \#5      &amp; \#6     &amp; \#7     \\ \hline Row 2: &amp; 12 \% &amp; 1 \% &amp; 15 \% &amp; 25 \% &amp; 18.75 \% &amp; 12.5 \% &amp; 6.25 \% \\ \hline \end{tabular} \end{table}
85220
I have a directory of files such as:  file.1.png file.2.png … file.10.png … file.1000.png file.1001.png …   How can I pad the number to 4 digits? It should end up like this:  file.0001.png file.0002.png … file.0010.png … file.1000.png file.1001.png …