pip install pygame
sudo apt-get install timidity
Saturday, October 14, 2017
Wednesday, March 15, 2017
TeXStudio configuration
En TeXStudio->Options->Configure->Commands:
LaTeX: latex -src-specials -synctex=1 -interaction=nonstopmode %.texDVI viewer: okular --unique %.dvi#src:@?c:m.tex
PS viewer: okular --unique %.ps#src:@?c:m.tex
External PDF viewer: okular --unique %.pdf#src:@?c:m.tex
Ghostscript: gs -r150 -dGraphicsAlphaBits=4 -dTextAlphaBits=4 "?am.ps"
Preview scaling: 100%
Y en el archivo .tex escriba al inicio el modo de compilaciĆ³n deseado:
% !TeX program = txs:///dvi-ps-pdf-chain
Build:
Default compiler: txs:///latex
o
% !TeX program = txs:///dvi-chain
En Okular -> Settings -> Configure Okular -> Editor
texstudio %f -line %l
----------------
Trucos varios:
- Dele buscar... Ctrl+F en la ventana con el PDF... el entonces busca la palabra tanto en el PDF como en el .tex
- Ctrl+click en cualquier lado busca la palabra al otro (de texto a PDF o de PDF a texto. No funciona con DVI)
- Si le da shift+click en Okular, salta inmediatamente al respectivo lugar en el .tex
- To permanently save the language of the file TeXstudio supports a special "magic comment" % !TeX spellcheck = de_DE. If this comment is present in a file, its language is automatically set when the file is loaded.
- TeXstudio
also allows block cursors. Press
+ + and drag the cursor with the mouse. The block cursor works like a set of normal cursors. You can copy and paste text as usual. Also you can type in new text, which will be added in every row.
- If you select
something and then start to type in a command and complete it, the
selection is put in as first argument. E.g. you have a "text", select it
and start typing "\textbf", command which is completed. The resulting
text is "\textbf{text}"
- TeXstudio automatically detects the root document. If that does not work, you can place a magic comment % !TeX root = root-filename at the top of your included files.
---------------
Header recomendado del .tex
% BEGIN: BORRE ANTES DE ENVIAR\usepackage{silence}
\WarningFilter{latex}{Text page}
\WarningFilter{latex}{Float too large}
\usepackage{geometry}
\geometry{
paperwidth=170mm, % 216-10-6 ... 216mm size letterpaper
left=8mm, %% or inner=23mm
right=2mm %% or outer=18mm
}
\usepackage{parskip}
% END: BORRE ANTES DE ENVIAR
Sunday, May 19, 2013
Inkscape 0.46 + psfrag+ LaTeX
Inkscape 0.46 works nicely with psfrag and LaTeX. However, since
version 0.47 it has a bug that hinders this. As a workaround I still use
INKSCAPE 0.46 for WINDOWS running under WINE. In order to do this, I
use the following macro, which I located into ~/bin:
#!/bin/bash
wine /opt/windows/inkscape/inkscape.exe "$*"
#!/bin/bash
wine /opt/windows/inkscape/inkscape.exe "$*"
Friday, April 20, 2007
How to add commnets to PDF
The End user license agreement for Adobe Reader contains the following provisio:
4.3 Document Features. The Software may contain features and functionality that appear disabled or "grayed out" (the "Document Features"). The Document Features will only activate when opening certain PDF documents that have been created using corresponding enabling technology available only from Adobe ("Keys"). You agree not to access, or attempt to access, disabled Document Features or otherwise circumvent the permissions that control activation of such Document Features. You may only use the Document Features with PDF documents that have been enabled using Keys obtained under a valid license from Adobe. No other use is permitted.
So, some of the following are illegal:
If the PDF is given:
Windows:
AREnable
http://sourceforge.net/projects/arenable/
However it violates the LEGAL user agreement of Adobe
Windows/Linux
http://www.foxitsoftware.com/
Adds a small note that it was done with this program
Windows
PDF-Xchange viewer (free)
http://www.docu-track.com/home/prod_user/pdfx_viewer/
Linux
flpsed - a Postscript and PDF annotator
http://www.ecademix.com/JohannesHofmann/flpsed.html
flpsed is a WYSIWYG PostScript2 annotator. You can't remove or modify existing elements of a document. But flpsed lets you add arbitrary text lines to existing PostScript 2 documents. Added lines can later be reedited with flpsed. Using pdftops, which is part of xpdf one can convert PDF documents to PostScript and also add text to them. flpsed is useful for filling in forms, adding notes etc.
If I can create the PDF I can use the following techniques to allow to write PDFs using Acrobat Reader:
\documentclass[dvipdfm]{article}
\begin{document}
Test PDF document with annotations.
\special{pdf: ann width 3.0in height 36pt
<< /Type /Annot /Subtype /Text /Contents (This is a /Text Annotation that looks like a sticky note.) >>}
\end{document}
Put the \special{} in a \marginpar{} if you want it to appear in
the margin of your document, etc.
You can also write
\usepackage[pdftitle={Title},pdfsubject={Subject}]{hyperref}
in your preamble.
Windows/Linux
pdftk - A handy tool for manipulating PDF
http://www.accesspdf.com/pdftk/
use it to:
Merge PDF Documents
Split PDF Pages into a New Document
Rotate PDF Pages or Documents
Decrypt Input as Necessary (Password Required)
Encrypt Output as Desired
Fill PDF Forms with FDF Data or XFDF Data and/or Flatten Forms
Apply a Background Watermark or a Foreground Stamp
Report on PDF Metrics such as Metadata, Bookmarks, and Page Labels
Update PDF Metadata
Attach Files to PDF Pages or the PDF Document
Unpack PDF Attachments
Burst a PDF Document into Single Pages
Uncompress and Re-Compress Page Streams
Repair Corrupted PDF (Where Possible)
4.3 Document Features. The Software may contain features and functionality that appear disabled or "grayed out" (the "Document Features"). The Document Features will only activate when opening certain PDF documents that have been created using corresponding enabling technology available only from Adobe ("Keys"). You agree not to access, or attempt to access, disabled Document Features or otherwise circumvent the permissions that control activation of such Document Features. You may only use the Document Features with PDF documents that have been enabled using Keys obtained under a valid license from Adobe. No other use is permitted.
So, some of the following are illegal:
If the PDF is given:
Windows:
AREnable
http://sourceforge.net/projects/arenable/
However it violates the LEGAL user agreement of Adobe
Windows/Linux
http://www.foxitsoftware.com/
Adds a small note that it was done with this program
Windows
PDF-Xchange viewer (free)
http://www.docu-track.com/home/prod_user/pdfx_viewer/
Linux
flpsed - a Postscript and PDF annotator
http://www.ecademix.com/JohannesHofmann/flpsed.html
flpsed is a WYSIWYG PostScript2 annotator. You can't remove or modify existing elements of a document. But flpsed lets you add arbitrary text lines to existing PostScript 2 documents. Added lines can later be reedited with flpsed. Using pdftops, which is part of xpdf one can convert PDF documents to PostScript and also add text to them. flpsed is useful for filling in forms, adding notes etc.
If I can create the PDF I can use the following techniques to allow to write PDFs using Acrobat Reader:
\documentclass[dvipdfm]{article}
\begin{document}
Test PDF document with annotations.
\special{pdf: ann width 3.0in height 36pt
<< /Type /Annot /Subtype /Text /Contents (This is a /Text Annotation that looks like a sticky note.) >>}
\end{document}
Put the \special{} in a \marginpar{} if you want it to appear in
the margin of your document, etc.
You can also write
\usepackage[pdftitle={Title},pdfsubject={Subject}]{hyperref}
in your preamble.
Have a look at the hyperref manual.
http://multivalent.sourceforge.net/
Windows/Linux
pdftk - A handy tool for manipulating PDF
http://www.accesspdf.com/pdftk/
use it to:
Merge PDF Documents
Split PDF Pages into a New Document
Rotate PDF Pages or Documents
Decrypt Input as Necessary (Password Required)
Encrypt Output as Desired
Fill PDF Forms with FDF Data or XFDF Data and/or Flatten Forms
Apply a Background Watermark or a Foreground Stamp
Report on PDF Metrics such as Metadata, Bookmarks, and Page Labels
Update PDF Metadata
Attach Files to PDF Pages or the PDF Document
Unpack PDF Attachments
Burst a PDF Document into Single Pages
Uncompress and Re-Compress Page Streams
Repair Corrupted PDF (Where Possible)
Friday, February 2, 2007
\\ and \vspace{\baselineskip}
If you use \\ in the middle of a paragraph, that means that the paragraph ends with an empty line. However, this empty line will make part of the paragraph, and is not broken at the start of a new page.
To break and get the space of an empty line, type
\vspace{\baselineskip}
\vspace does not add lines, but space, and you don't want a line but space.
Remember that if you tell LaTeX to place an empty line, an empty line it will place. Even if that is at the beginning or at the end of a page.
And adding vertical space between paragraphs by using \\ is also not accepted by LaTeX ("Latex error. There's no line here to end.").
To break and get the space of an empty line, type
\vspace{\baselineskip}
\vspace does not add lines, but space, and you don't want a line but space.
Remember that if you tell LaTeX to place an empty line, an empty line it will place. Even if that is at the beginning or at the end of a page.
And adding vertical space between paragraphs by using \\ is also not accepted by LaTeX ("Latex error. There's no line here to end.").
Saturday, January 27, 2007
Configuring LaTeX in Kile
LATEX
texi2dvi --batch '%S.tex' #latex -interaction=nonstopmode '%S.tex'
PDFLATEX
texi2dvi --batch --pdf '%S.tex' #pdflatex -interaction=nonstopmode '%S.tex'
DVI to PS
dvips -Ppdf -G0 '%S.dvi' -o '%S.ps'
PS to PDF
ps2pdf -sPAPERSIZE=a4 -dMaxSubsetPct=100 -dCampatibilityLevel=1.2 -dSubsetFonts=true -dEmbedAllFonts=true '%S.ps' '%S.pdf'
Install the package: wmctrl
sudo apt-get install wmctrl
This is useful to transfer the control of the windows when doing forward/inverse search
In kile create the command
BringtoFrontDVI ->>> wmctrl -a "%S.dvi"
And add to the command QuickBuild that command.
In DVI change the option of inverse search from KILE to the customized:
kile %f --line %l && wmctrl -a "Kile"
texi2dvi --batch '%S.tex' #latex -interaction=nonstopmode '%S.tex'
PDFLATEX
texi2dvi --batch --pdf '%S.tex' #pdflatex -interaction=nonstopmode '%S.tex'
DVI to PS
dvips -Ppdf -G0 '%S.dvi' -o '%S.ps'
PS to PDF
ps2pdf -sPAPERSIZE=a4 -dMaxSubsetPct=100 -dCampatibilityLevel=1.2 -dSubsetFonts=true -dEmbedAllFonts=true '%S.ps' '%S.pdf'
Install the package: wmctrl
sudo apt-get install wmctrl
This is useful to transfer the control of the windows when doing forward/inverse search
In kile create the command
BringtoFrontDVI ->>> wmctrl -a "%S.dvi"
And add to the command QuickBuild that command.
In DVI change the option of inverse search from KILE to the customized:
kile %f --line %l && wmctrl -a "Kile"
Subscribe to:
Posts (Atom)