Tag Info

2

As far as I can see, the only difference is, that latex was used for case 2 and pdflatex for the other cases. Therefore, case 2 has loaded the graphics driver dvips.def as default driver, which is not able to include PDF files. The output format should not be changed by a package. It confuses the user, if he runs pdflatex and gets DVI and vise versa. But ...

0

I think it depends on the language of the text you use. But you should use XeTeX or luaTeX. This is a minimal example from Wikipedia: \documentclass[11pt]{article} \usepackage{fontspec} \setmainfont[Ligatures=TeX]{Linux Libertine O} \begin{document} \subsection{Ελληνικά} Ὅλοι οἱ ἄνθρωποι γεννιοῦνται ἐλεύθεροι καὶ ἴσοι στὴν ἀξιοπρέπεια καὶ τὰ δικαιώματα. ...

1

So i kind of solved the problem with some help form the pgfplots manual pages 470-2, and this other question. I have this in my preamble: \usepackage{tikz,pgfplots,pgfplotstable} \pgfplotsset{compat=1.9} %\usetikzlibrary{external} \usepgfplotslibrary{external} \tikzexternalize \tikzset{external/system call={lualatex -shell-escape -halt-on-error -interact ...

2

You can achieve this effect with wrapfig.sty. In its documentation, you find: Placment and floating Parameter #2 (required) is the figure placement code, but the valid codes are different from regular figures. They come in pairs: an uppercase version which allows the figure to float, and a lowercase version that puts the figure "exactly here". [...] ...

2

It seems, you have the wrong category code of @. Then TeX will not see the token \@doctitle but the tokens \@, d, o, t, i, t, t, l, e. The first token \@ is filtered out (the command sets the space factor) and the string doctitle remains. In the class file, the category of @ is usually "letter", thus that @ can be used in command names. Maybe you have ...

4

You can what you want with the plaintex package insbox. It defines \InsertBoxL and \InsertBoxR commands, with two arguments: the number of untouched lines before inserting the box, and the contents of the box. Also an optional argument: the number of supplementary wrapped lines, if the height of the box is not correctly calculated. ...

0

I finally found an easy solution to embed a video in a beamer presentation. Previously, it is needed to decompose the movie into its frames. I did it by using ffmpeg. For the new distributions of Ubuntu (I use the 14.04 release) one should download and build the source code as ffmpeg was removed from the official repository. The command to extract the ...

3

If you have Charis SIL in your computer (or any font that supports IPA characters), then you can use Xelatex or Lualatex. Here's an example with Xelatex. Alternatively you can also use the tipa package with pdflatex, see also the relevant Wikipedia page, but you would not be entering IPA directly, rather you'd use regular letters and Latex will interpret ...

0


2

I would do it by using the lipsum package \documentclass{article} \usepackage{lipsum} % To include dummy text "lorem ipsum..." \begin{document} \section{My section one} \lipsum % this will give you a little more that one page for a4 paper \section{My section two} \lipsum[1-23] % the numbers indicate how long the dummy text will be % So it ...

2

Run texdoc media9 which opens the documentation of the package media9. It has examples for videos and 3d images.

1

The xstring and standalone processing is making this vastly more complicated and fragile than it needs to be, I'd just use \input. In the following I changed highlight.sty to make bgcolor grey rather than white so it shows up, if you want it white put it back or simply remove the \colorbox{bgcolor} main.tex \documentclass[a4paper,twoside]{article} ...

6

Latex can control the scaling steps. Add \RequirePackage{fix-cm} before \documentclass if you want smooth scaling with the cm-fonts.

1

I have had good mileage with and would recommend pandoc for converting LaTeX to HTML output. Pandoc provides capability for applying CSS styling to HTML output and can take care of equation rendering with e.g. MathML and citation/bibliography styling, among many other features, and is well documented.

1

Your effort for prepare MWE is to minimal :_), so I down wrote from your image only beginning of table. For your table you don't need multirow cells. An simple solution is as follows: \documentclass{article} %just for show only a table \usepackage[active,tightpage]{preview} \PreviewEnvironment{tabular} \setlength\PreviewBorder{1em} ...

1

You could use the \multicol package for this task. Here I have an example of the first few rows: \documentclass{article} \usepackage{multicol} \begin{document} \begin{tabular}{ |p{5cm}|p{2cm}|p{2cm}|p{3cm}|p{3cm}| } \hline \multicolumn{5}{|c|}{\textbf{Crop field location info}} \\ \hline \textbf{District name} & \multicolumn{2}{ |c| ...

2

I don't recommend that \\[...] stuff there, but it's possible to include the graphic file as part of the title itself. (Remove the demo option afterwards) \documentclass{article} \usepackage[demo]{graphicx} \begin{document} \title{% \includegraphics[width=0.1\textwidth]{images/Company_Groups.jpg}~ \\[1cm] xxxxxxx \\In xxxxx } \author{N. N. Arif \\ xxxx ...

1

Close Kile, then go to folder /home/{USER_NAME}/.kde/share/apps/kile/ and remove or rename the file kileui.rc. Reopen Kile and check if it solves your problem. Another option is to go to Settings > Configure Kile > Tools > Build and click on Restore Default Tools... on the right.

3

I do not know which is your system --- in TeXLive pdftex should embed all fonts by default since ages. In the linked article you can see it. To check, I used this MWE: \documentclass{article} \usepackage{mathpazo} \begin{document} This is just an example $a^b-\sqrt{c}$. \end{document} and with the utility pdffonts: [romano:~/tmp] pdffonts example.pdf ...

3

Move \hypersetup with pdfauthor and friends before \begin{document}. The title is overwritten by \title, but you can use \texorpdfstring there: \title{\texorpdfstring{Hypersetup (with PDFLaTeX) and Beamer}{% The Meaning of Everything}} Or option usepdftitle can be set to false, then beamer does not use the title of \title for the PDF title: ...

6

Use the fancyvrb package: \documentclass{article} \usepackage{fancyvrb} \fvset{tabsize=4} \begin{document} I'm regular text \begin{Verbatim} I have no tab I have 1 tab I have 2 tabs I have no space I have 4 spaces I have 8 spaces \end{Verbatim} \end{document} The site is changing tabs to four spaces, so this might seem ...

2

As Mike Renfro points out in the comments, many text editors support converting between tabs and spaces; some will even make the change seamless and transparent by printing some number of blank spaces when you press the tab key. This is probably the easiest answer to your exact question. Another solution if you happen to be a Linux (maybe OSX) user would be ...

4

Package pdfrender Package pdfrender provides a higher level interface for what you want to do. It uses the color stack of pdfTeX to provide rendering mode settings similar to colors. The solution via color stack also supports line and even page breaks. \documentclass[a4paper,11pt]{article} \usepackage{pdfrender} \begin{document} NAME: \hfill SURNAME: ...

1

Building on Gustavo Mezzetti's answer, the image can be placed in a figure environment so it can be captioned and listed in the \listoffigures. A few other modifications are required, shown below. The \paperheight adjustment (-6cm) needs to be manually tuned depending on the aspect ratio of your image. This is best done by eye anyway, as an automatic ...

1

I am not completely sure of what you want to achieve and what limitations you have got, but, to begin with, you might want to have a look at the following code: \documentclass[a4paper]{report} \usepackage[T1]{fontenc} \usepackage{geometry} \usepackage{pdflscape} \usepackage{mwe} % for sample figures -- automatically loads graphicx \begin{document} ...

0

I found the solution by using : \usepackage{grffile}

9

You have a + on line one of your file which is not in a comment so TeX tries to typeset it before the \documentclass (and before \begin{document}). Hence the error message.

0

This is really more a response to @HeikoOberdiek's knowledgeable answer, but it is unsuited for a comment. First, I tried two of your proposed workarounds, the "more automatic solution" and the redefinition of \@combinedblfloats. The former did not work for me (I got a couple of * Additional boxing messages, but the error still happened), but the latter ...

5

New answer If you want to use Consolas font, you have to use xelatex which means to use fontspec but NOT inputenc. You can read why in Using XeLaTeX instead of pdfLaTeX ph command doesn't need fontspec as Paul Gessler showed to you. scrbook perfectly works with pdflatex, xelatex or lualatex. This is what I get from your code commenting out fontenc and ...

5

The MWE is a good starting point. From there I could simplify it further. frontmatter sets the title in the optional argument of \twocolumn. Thus \twocolumn[] is sufficient. The text can be replaced by vertical spaces. The class can be replaced by the standard article class. MWE: \documentclass{article} \usepackage{hyperref} \begin{document} \twocolumn[] ...

1

You don't mention makeindex in your question, are you running the makeindex command? From the manual: Run makeindex with the .glo file as the input file and the .ist file as the style so that it creates an output file with the extension .gls. If you have access to a terminal or a command prompt (for example, the MSDOS command prompt for Windows ...

0

I recently posted a link to a new package "xcomply" on this web site (search for it). It might work for you. One of the choices offered is PDF/X-3:2002.

1

You could make use of the “piped \input” feature. For example, this is a MWE that inputs from the standard output of a cat command: the same idea can be applied to other commands, and, in principle, also to wget: \begin{filecontents}{myTempFile.tex} \section{A test} This is a test.\par \end{filecontents} \documentclass[a4paper]{article} ...

2

The right margin for equations can be set by lying about the line width, \hsize. Example: \theequation without extra space. It's bad anyway, because package amsmath might move it below the equation, if the equation is too long. Environment eq, which sets \mathindent for the left margin and \hsize for the right: \newenvironment{eq}[2]{% ...

1

Your Problem is that you declare ϑ to mean $\vartheta$. Thus as long as you only use text-mode TeX shows no error. Unfortunately your example $ϑ$ will lead to $$\vartheta$$. So you will end up with two (empty) parts of inline math and a \vartheta in text-mode what is not allowed as \vartheta is math-only. As a quick fix one could suggest using ...

3

For an “underdot” accent in math mode, use the accents package: \documentclass[12pt]{article} \usepackage[utf8]{inputenc} \usepackage{amsmath,accents} \DeclareUnicodeCharacter{1EA1}{% \ifmmode \underaccent{\dot}{a}% \else \d{a}% \fi } \begin{document} ạ $ạ$ \end{document} However, I'd avoid using ạ in math mode for this, as “a with an ...

0

There is a preflight function of Adobe Acrobat Pro you could leverage. IMHO, this is the easiest method. Here are the tutorial: https://www.youtube.com/watch?v=9SdIVy2D4b4

0

I was getting the same error, and it is because of Windows 8.1 feature "smart files". These are files that you can see in windows explorer, and they apparently exists in your hard drive, but their content is online, possibly on your onedrive account. When I made sure my file was available offline, then I was able to compile my latex. In windows explorer, ...

0

Got the answer. Installed the basic installation. Then found the setup file in the path 'C:/Users/User_name/temp/MikTex/***.exe'. Installed it. Then went to RStudio software, tools>global options>Sweave. Changed the 'Typset LaTeX into PDF using:' to pdfLaTeX. Ran the knit PDF command for a R Markdown file and it asked for the installation of the ...

6

Use the colorbox command from xcolor package: \documentclass{article} \usepackage{xcolor} \newcommand{\SEBox}[1]{\texttt{\colorbox{gray!10}{#1}}} \begin{document} \SEBox{blahblah} \end{document}

2

I'd use the rotating package: Using the sideways, turn and rotating environments you can put display the page prettty much anyway you want. Here's the code for the MWE: \documentclass[border=5mm,tikz]{report} \usepackage{mwe}% only for images \usepackage{rotating} \begin{document}\quad\newpage% only for creating the image \begin{sideways} ...

3

Here is a solution using \expandafter and \space. With \pdfcompresslevel 0 and \pdfobjcompresslevel 0 into the preamble, you can verify directly the PDF document: /MediaBox [0 0 611.9985 791.99806] /BleedBox [0.00000 0.00000 611.9985 791.99806] /CropBox [0 0 611.9985 791.99806] /TrimBox [0.00000 0.00000 611.9985 791.99806] \documentclass{article} ...

3

Here's a simple script that will mark up words that you specify by editing the script-- it was the simplest way to handle lots of words and lots of different colors. It requires perl, which is standard on Unix (Linux/OS X) and a single download away on Windows. I'm assuming you have lots and lots of keywords to mark, so I've used perl which makes it easy to ...

3

Some suggestions: The main issue that's making the longtable wider than the text block is the material in the header row. To shrink the width of the cells (without outright deletion of any material...), you need to reduce the value of \thickmuskip, the parameter that governs the amount of whitespace that's inserted around the < symbols. In the example ...

2

The latexprogram is actually pdflatex running in dvi mode. According to latex --help, the output format can be set with -output-format=FORMAT use FORMAT for job output; FORMAT is dvi' or pdf' So you can try to force the dvi output by compiling with: latex file.tex -output-format=dvi What you have though actually does the same, if latex is giving ...

4

ConTeXt provides a proof of concept module for such translations: m-translate. You could use it to translate text, but the translation takes place before macro expansion. So, the method will fail if the translation string is part of a macro name. The translation can be enabled and disabled using \enableinputtranstion and \disableinputtranslation. Here is an ...

0

first of all, thank you for your suggestions. I solved the problem by writing the same script directly into lyx. Is it possible that by copying and pasting the original script from R into lyx, some "invisible rubbish" could have been included and finally caused trouble?

7

Here's another with l3regex. \documentclass{scrartcl} \usepackage{xcolor,xparse,l3regex} \ExplSyntaxOn \NewDocumentCommand \texthighlight { +m } { \david_texthighlight:n { #1 } } \cs_new_protected:Npn \david_texthighlight:n #1 { \group_begin: \tl_set:Nn \l_tmpa_tl { #1 } \seq_map_inline:Nn \g_david_highlight_colors_seq { \clist_map_inline:cn { ...

12

Solution using LuaTeX callbacks. Library luacolor.lua from luacolor is also used. First package luahighlight.sty: \ProvidesPackage{luahighlight} %\RequirePackage{luacolor} \@ifpackageloaded{xcolor}{}{\RequirePackage{xcolor}} \RequirePackage{luatexbase} \RequirePackage{luacode} \newluatexattribute\luahighlight \begin{luacode*} highlight = require ...

5

Strongly based on my answer at How to insert a symbol to the beginning of a line for which a word appears?. However, I had to extend the logic to handle multiple color assignments. Syntax is multiple invocations of \WordsToNote{space separated list}{color} and then \NoteWords{multiple paragraph input} Macros in the input are limited to style (e.g., ...

Top 50 recent answers are included