1

This is infuriating.

I cannot even get the text to compile into a pdf. Something as simple as this doesn't work:

\documentclass[12pt]{article}
\usepackage{a4}

\begin{document}
Hello World!
\end{document}

When I click "run", for a quick build to pdf, nothing happens. When I hover the mouse over texmaker, it shows the second pdf window but it's blank. When I click it, nothing happens i.e. it doesn't open and I remain in the texmaker.

Can anyone help with this? If Latex is supposed to be easy to use and cleaner than word, I wish it wasn't so difficult to get even a single line of text.

CampanIgnis
  • 4,624
Matt
  • 71
  • 5
  • First of all, what system are you using? did you install MikTeX in Windows? MacTex? TexLive? What is your quick build in Texmaker? You need to use pdflatex to compile (I guess is F6 in Texmaker) – bingung May 10 '20 at 13:29
  • LaTeX isn't difficult to use but it isn't as easy as WYSIWYG processors; eg, this. Your document is fine; your issues are most likely with TeXmaker. To experiment with LaTeX and not worry about these issues, consider 1. an online account with Overleaf or 2. Gummi to get a live preview so you'll quickly know when there's a mistake. The .log file is where latex will explain what went wrong. What message does it have? – DJP May 10 '20 at 14:52
  • I have no error messages. I am on windows and installed MikTex with Texmaker. – Matt May 10 '20 at 17:09
  • It looks like Matt found the problem and it was due to the window appearing outside the screen. This is no longer a LaTeX question, but (possibly) an editor question, so I'm voting to close. – Circumscribe May 10 '20 at 19:28

2 Answers2

1

Just figured it out and it is a much more simpler and surprising issue. I had previously connected another screen to my laptop where I had dragged the compiled pdf window into. When I disconnected the monitor, it still would open the window on a second screen that no longer existed instead of refreshing and realising it was the laptop screen only.

I don't know if that's a windows bug or a latex but bug what a stupid piece of software that must be for this to happen.

I am new to Latex and coding but this is by far and away the weirdest and dumbest glitch I have encountered!

Matt
  • 71
  • 5
  • This may well be a Texmaker bug, but it's not a LaTeX bug. If the problem is reproducible you could consider filing a bug report with the developers. – Circumscribe May 10 '20 at 19:38
1

There is no need to load the a4 package since the article class supports this paper format with the a4paper option.

I quote the documentation:

Update for LATEX 2ε

With the new document classes this package may not be needed much longer, because A4 paper is now supported through the standard option a4paper.

And here, under windows with MikTeX, the compilation works with TexMaker and produces this: screenshot

\documentclass[12pt,a4paper]{article}
%\usepackage{a4}

\begin{document}
Hello World!
\end{document}
AndréC
  • 24,137