Tag Info

New answers tagged

2

Like this: \documentclass[12pt]{article} \usepackage{listings} \usepackage{xcolor} \newcommand{\hilight}{\makebox[0pt][l]{% \color{yellow}\rule[-4pt]{0.65\linewidth}{14pt}}% } \begin{document} \begin{lstlisting}[language=C,escapechar=\%] public static void function(){ int i=0; %\hilight%char j = malloc(sizeof(char)); /.......some ...


2

In general, all TikZ commands has to be ended by a semicolon, so your code snippet should be \begin{tikzpicture} \draw (0,0)--(1,2)--(2,0); \draw[help lines] (0,0) grid (2,3); \end{tikzpicture} If you ran a LaTeX document where such a terminating semicolon was missing, you'd get an error saying ! Package tikz Error: Giving up on this path. Did you forget ...


2

Here is a solution that will add a running header to all unnumbered chapters, so handle with care. It uses package etoolbox to prepend the markboth command you would do manually. Be careful, this code is bound to fail. Best to set the headers manually. Just to point that out, the right way to uppercase something is to use \MakeUppercase{<content>}. ...


5

LyX produce a LaTeX file and then call to pdflatex (or other compiler) to produce the PDF with this LaTeX file, so the results is the same. The point is decide if you are more comfortable editing directly the LaTeX source or the Lyx document. No doubt, LyX is much more attractive than LaTeX for novices because is a WYSIWYM editor (see Werner ...


0

Refer pdf doc "Page Layout in Latex" written by Piet van Oostrum. He says if you want get your chapter headings in Uppercases you have to use the following command \renewcommand{\chaptermark}[1]{% \markboth{\MakeUppercase{% \chaptername\ \thechapter.% \ #1}}{}} in the preamable after the line \pagestyle{fancy} Default: The header text is turned into all ...


1

One partial method is using Close inset as sugggested in the comments of your question. Here's an ad-hoc add-on: Edit the preferences in your boss' LyX installation to make the closed ERT insets invisible. In particular, go to Tools > Preferences > Look & Feel > Colors and change the color of LaTeX text to be the same as background, and do the ...


2

When you say formulas, I assume you mean formulas in a display: Insert > Math > Display Formula (there is a keyboard shortcut, but I don't remember what the default is). These are LaTeX \[ \] environments, and become \equation environments upon labeling or numbering. Once you have inserted your display, you right-click the display and may from there ...


6

I think all the important points have been covered, but there is one more aspect I would consider when looking at LaTeX (or even a programming language, photo editor, etc.). "How important is the interface, what do I do if it dies?" In the context of LyX and LaTeX, LaTeX really just needs its compiler and some text editor, the latter we can be certain will ...


9

Here is, I think, a fairly objective distinction between using LyX and editing LaTeX directly: LyX is very good at exporting to LaTeX. If you create a document in LyX with sections and theorems and equations then the PDF you create will be just as if you wrote it in LaTeX, because that's exactly what LyX did for you. LyX is extremely bad at importing from ...


25

I always recommend that you learn the basics of LaTeX before you learn LyX. LyX will not save you from learning LaTeX so you might as well learn it well from the start. After you really understand what LyX is doing (through LaTeX), you might find you like it better than using LaTeX directly. This is the case for me. This is also why I don't think LyX is a ...


10

LyX provides a more user-friendly front-end to latex. I find it more productive to work in general in LyX. However, by its nature it is not as flexible as pure latex. I do have to sometimes use LaTeXcode to achieve the desired results in LyX. That can be achieved either by setting things up in the document preamble or inserting latex code directly into ...


19

Q: What is the difference between LyX and LaTeX? A: From the LyX website: LyX is a document processor that encourages an approach to writing based on the structure of your documents (WYSIWYM) and not simply their appearance (WYSIWYG). LyX combines the power and flexibility of TeX/LaTeX with the ease of use of a graphical interface. This results in ...


0

I'll address your objectives sequentially: To get the desired citation style -- author(s) and year separated by comma, parentheses placed around the entire citation block -- you should use the citation command \citep to generate the citation callouts, and load the natbib package with the options comma and authoryear. To list all authors the first time ...


2

This thread seems to be closed fo quite a while, but as I found it right after searching for a solution some minutes ago, I just thought I could add the solution I found for solving the problem. For all those of you who use KOMA Script Classes: its just adding one line if you are going for changing the color of all headlines during your document; be it ...


0

The way LyX decides what to put in front of a formatted reference is by what label the thing has e.g. if you make a formatted reference to "thm:clever-result" then it will be formatted with "Theorem" at the front (even if the label's in a lemma!). So you need to make sure that the appropriate prefix is in each of your labels. With theorems, LyX puts "thm:" ...


2

Compare your expression with and without amsmath: \documentclass{article} %\usepackage{amsmath} \begin{document} $u_{L}(k) = \sqrt{E}\begin{pmatrix} 0 \\ 1 \\ 0 \\ -1 \end{pmatrix}$ \end{document}


4

If I understand well what you're asking, you can do that with the etoolbox package: \documentclass[a4paper, 11pf]{article} \usepackage[utf8]{inputenc} \usepackage{lmodern} \usepackage[table, x11names]{xcolor} \usepackage{booktabs, caption} \colorlet{shadecolor}{LightSteelBlue1} \let\mytoprule\toprule \renewcommand{\toprule}{\mytoprule[2pt]} ...


0

I had the same problem, reinstalling Lyx wasn't enough, I needed to return to the previous version of MikTex too, thankfully I found and old installation of Lyx 2.0.6 on my computer with the older version of MikTex, after complitlt reinstalling it, and installing culmus again it worked like it used to, couldn't find it online so I uploaded it to google drive ...


0

It seems there's no easy way to do this, yet. Modifying Scripts Download files. (They are from Benjamin Kellermann, originally posted to Ubuntuusers on March 2011, based on an older version of the Gedit Synctex Plugin by Jose Aliste.) Extract them, e.g. to your desktop. Rename the file evince to evince-synctex. (To be sure that this file will be started ...


2

refstyle or prettyref is used only if you format the reference with the format style formatted cross-reference. You can change the reference to this format by right-clicking on the reference. If you've activated refstyle, \eqref{} is still used but this command is renewed in the preambel: \usepackage{refstyle} \makeatletter ...


2

I use LyX with BibDesk smoothly. Your question is a bit short on details so I'll just go over the obvious things. Make sure there are no spaces in the path/filename. You need to insert in your LyX document a bibtex pipe (Insert/List TOC/BibTex Bibliogrpahy. You then need to tell it where to find your .bib file, i.e., the bib database you maintain with ...


1

A possible, yet sort of hacky solution to this, would be to use the note field in your bibliography entry. This would usually print it out in your bibliography but not in the individual references in your thesis. Depending on your bibliography style and bibliography engine, there might be better ways with proper support, but the notes field should do the ...


0

According to the JavaScript for Acrobat API Reference, the method app.trustedFunction is security restricted and only allowed in batch, console and application initialization events, that is, not in document level JavaScript. On the other hand, app.openDoc() doesn't need to be called in a trusted environment. Therefore, \begin{insDLJS}{dljs}{Document ...


2

LyX sometimes parses the log-file wrongly, or at least it shows the error in a way that can only be interpreted wrong. If you click View complete log and do a bit of scrolling, you'll find that the error message is something like ! Undefined control sequence. \addtoDB ...ty#1 \g @addto@macro{#1}{#2} \else \g ...


0

You can change the heading of your bibliography by inserting a ERT element (Insert→TeX) right before the bibliography with the following command: \renewcommand\refname{References } or \renewcommand\bibname{References}, depending on whether you use an article or a report/book class.


2

The \citet command is not available by default in LaTeX, you need to load a bibliography package that defines it. In LyX, go to Document --> Settings --> Bibliography and set Natbib as Citation style. This loads the natbib package, where \citet and \citep are defined.


0

@Torbjørn T. Thank you very much. The problem has been solved. For anyone facing the same problem, the steps are as follows: Change the Document>Settings>Text Layout to Indentation: Default (Even if you still want to keep your document not-indented as I do) This will be quite tedious! For all figures: inside the figure float, change the paragraph settings ...


1

Another setting that helps with switching from one language to another in Lyx is to use the Text style dialog. So highlight the text that is in the Greek language, click the toolbar button: and then select Greek from the Language drop-down menu:


2

(It is a little bit difficult to say for sure, but I think I know why this happens. At least partly.) There are two problems relating to the paragraph settings of the paragraphs containing the floats that can produce additional whitespace. 1. Empty paragraphs If you look at the LaTeX source of one of the figures you'll see something like \noindent ...


0

LyX is pretty reasonable at exporting to LaTeX, although it could usually do with a bit of tweaking (a good start is removing the "do not edit this file" comment from the start of the exported file). But it is notoriously bad at importing TeX files. Expect very poor results at that, I'm afraid.


0

In the first step add \usepackage{colortbl} to the LaTeX preamble. After that at the start of every row type this command: \rowcolor[gray]{0.95} For example: \begin{tabular}{c c } \rowcolor[gray]{0.95} { a & b}\\ \rowcolor[gray]{0.95} { c & d}\\ \end{tabular} In many journals authors use gray color for tables.


2

I think you need to trick LyX a bit to do this, as it doesn't appear to allow you to add a new list item if the previous one is empty. A workaround is to add an empty ERT box in the first list item, then outside the ERT hit enter followed by tab to create the sublist. Here is how it appears in LyX and PDF with the default document settings. Those empty ...


6

A common problem I've experienced when copy-pasting stuff into ERTs, is that line breaks are not preserved. As a result of this, everything after % Two node styles .. is not seen by TeX, all it sees before \end{document} is \tikzstyle{, causing the error. Hence, to fix this you can go through the ERT and add the necessary line breaks after comments. This ...


3

By default, minitoc provides the user with a number of hints (a package option). These hints are printed to the console or executed \AtEndDocument, and there's a spurious space somewhere in the definition of the hints-printing macro (a definite bug). In your particular example, the page Back.pdf is inserted before \AtEndDocument, causing the spurious space ...


0

I finally solved this problem using the apalike package. As Mico commented, elsarticle has embebed the natbib package, which crashes somehow when using the apacite package. My solution was to add the option authoryear to the elsarticle documentclass: \documentclass[english,authoryear]{elsarticle} and include the apalike package: \usepackage{babel} ...


0

If you change the document class from svjour3 to revtex and the converter works well! If you still need to work in a svjour3 or report class, reconstruct an empty LyX file from the template and copy all things you obtained from the revtex class and this may solve the problem.



Top 50 recent answers are included