Running Latex in a Windows commandline

3,055 views
Skip to first unread message

luciano de souza

unread,
Nov 14, 2012, 6:19:48 AM11/14/12
to latexus...@googlegroups.com
Hello listers,
Around one or two years ago, I have a contact with Latex. But my
efforts were not enough to learn it. I desire to restart this study,
but now, I lost the e-mails with precious tips I received.
Latex can be something important for me. I am blind and it's not eazy
to produce well formated documents with a convensional text editor.
Latex is based in classes. If I choose the correct class and use the
correct tags, the document will be interpreted correctly. Yes, a pair
of eyes are always neeeded to verify the visual aspect, but even if I
find problems, they will be undoubtedly much closer to the good
results.
Miktex seems to be a good option, specially because its portable
version. I downloaded it. But now I am not sure how to use it. I would
like to use Latex only typing commands. For me, the graphical
interface of Miktex is unsuitable. I browsered the Miktex folder. "If
I have a binary folder, perhaps, it's enough to call the commandline
tools passing the correct arguments". But how to do that? The number
of files, folders and subfolders is unbilievable.
So I write to you in order to understand how to use Miktex or any
another Windows, preferably, Windows portable version of Latex, using
only the commandline.
Best regards,
Luciano

luciano de souza

unread,
Nov 14, 2012, 8:20:35 AM11/14/12
to latexus...@googlegroups.com
Yes, it would be very good to use Tex Live since the same tool is
available in Linux.
I downloaded tl.zip, but it seems not to be a portable version. If I
understood there is a portable version, but I could not find it.
Actually, I can't complain about the accessibility. By means of my
screen reader, I can navigate through the links. Despite that, I seem
to navigate in circles and I couldn't find the installer.
My dream would be a self-contained package for portable devices.


2012/11/14, Raniere Gaia Silva <r.ga...@gmail.com>:
> Hi Luciano,
> I'm not a Windows guy and not use Miktex. I use TeX Live
> (http://www.tug.org/texlive/) in GNU/Linux but I already use it in Windows
> some time ago.
>
> To compile the .tex file to pdf with TeX Live you can do
>
> $ pdflatex main_file.tex
>
> It work in the GNU/Linux if you configure the PATH environment variable and
>
> must work in Windows too if you configure properly.
>
> To search for the documentation of some package you can use ``texdoc`` and
> for install/update packages use ``tlmgr`` in the command line.
>
> I hope that some Windows guy can help you more.
>
> Raniere
>
> --
> You received this message because you are subscribed to the Google Groups
> "LaTeX Users Group" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/latexusersgroup/-/DsqReWmHLLwJ.
> To post to this group, send email to latexus...@googlegroups.com.
> To unsubscribe from this group, send email to
> latexusersgro...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/latexusersgroup?hl=en.
>
>


--
Luciano de Souza

Raniere Gaia Silva

unread,
Nov 14, 2012, 8:36:45 AM11/14/12
to latexus...@googlegroups.com
> I downloaded tl.zip, but it seems not to be a portable version. If I
> understood there is a portable version, but I could not find it.

For the portable version, the instructions are:

The -portable installer option (or V command in the text installer
or corresponding GUI option) creates a completely self-contained TEX
Live installation under a common root and forgoes system integration.
You can create such an installation directly on a USB stick, or copy
it to a USB stick afterwards.

To run TEX using this portable installation, you need to add the
appropriate binary directory to the search path during your terminal
session, as usual. On Windows, you can double-click tl-tray-menu at
the root of the installation to choose between a few common tasks, as
shown in this screenshot:

More informations at
http://www.tug.org/texlive/doc/texlive-en/texlive-en.html#tlportable.

> Actually, I can't complain about the accessibility. By means of my
> screen reader, I can navigate through the links. Despite that, I seem
> to navigate in circles and I couldn't find the installer.
> My dream would be a self-contained package for portable devices.

For a self-contained package for portable devices take a look in
http://miktex.org/portable.

luciano de souza

unread,
Nov 14, 2012, 9:49:57 AM11/14/12
to latexus...@googlegroups.com
Raniere, thank you for the atention. You gave me the first success.
Let me show you what I did:
Firstly, I created the following bat:

lx.bat

@echo off
set latex="c:\Documents and Settings\luciano\Meus
documentos\Programas\miktex\miktex\bin\"

%latex%%1 %2

Afterwards, I did:

$ lx pdflatex sample.tex

The sample.tex has the following aspect:

\documentclass[11pt,a4paper]{article}
\usepackage[brazilian]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}

\title{Exemplo das funções do Latex}
\author{Luciano de Souza}
\begin{document}
\date{03/21/2005}
\maketitle
\clearpage


\section*{Introdução}

Esta é uma seção exemplo de introdução.

\end{document}

The PDF file was created, but all UTF-8 characters were wrongly placed.
I searched for some information about UTF-8 and I found the above
mentioned package declarations.
When I get the first correct example, the next steps is only to study
Latex syntax.
It seems to be close!


2012/11/14, Raniere Gaia Silva <r.ga...@gmail.com>:
> --
> You received this message because you are subscribed to the Google Groups
> "LaTeX Users Group" group.

Muhammad Imran KHAN

unread,
Nov 14, 2012, 9:53:08 AM11/14/12
to latexus...@googlegroups.com
Please use, 

\usepackage[utf8x]{inputenc}   instead of    \usepackage[utf8]{inputenc}  

May it could give the required results. , 


Please mention, what \clearpage command does ? Thanks :)




Imran

Raniere Gaia Silva

unread,
Nov 14, 2012, 10:03:39 AM11/14/12
to latexusersgroup
Luciano,

>> The PDF file was created, but all UTF-8 characters were wrongly placed.
>> I searched for some information about UTF-8 and I found the above
>> mentioned package declarations.

What editor are you using? The default characters encoding for Windows
are Latin1 and many of text editors running in Windows use that.

Maybe the problem are that the file you try to compile are using
Latin1 and not UTF8. If was that you can solve the problem replacing
the line

\usepackage[utf8]{inputenc}

for

\usepackage[latin1]{inputenc}

Another way to solve the problem is save the file using the UTF8
encoding but it is hard to explain and is different from editor to
editor.


Imran,

> Please mention, what \clearpage command does ? Thanks :)

The `\clearpage` command will print all the float objects that are not
print yet and after that start a new page.

Raniere

luciano de souza

unread,
Nov 14, 2012, 10:26:15 AM11/14/12
to latexus...@googlegroups.com
Using Latim 1, the compilation is fully sucessful. So I am ready to
start my studies.
My source code is correctly set as UTF-8, but the package is not found.
As the log is very complicated, it's not eazy to describe the error,
but I send it.
Even if I could not use UTF-8, I am really satisfied with Latim1.
Thank you very much for the precious help.


2012/11/14, luciano de souza <luch...@gmail.com>:
--
Luciano de Souza
sample.aux
sample.log
sample.tex

Peter Flynn

unread,
Nov 14, 2012, 2:09:22 PM11/14/12
to latexus...@googlegroups.com
On Wed, Nov 14, 2012 at 11:19 AM, luciano de souza <luch...@gmail.com> wrote:
Hello listers,
Around one or two years ago, I have a contact with Latex. But my
efforts were not enough to learn it. I desire to restart this study,
but now, I lost the e-mails with precious tips I received.
Latex can be something important for me. I am blind and it's not eazy
to produce well formated documents with a convensional text editor.

Have a look at Emacspeak. This was written by a blind TeX user and seems to be the most popular. http://emacspeak.sourceforge.net/  But I don't know how it works under Windows.

If you feel more comfortable using commandline tools anyway, perhaps switch to Linux?
 
Miktex seems to be a good option, specially because its portable
version. I downloaded it. But now I am not sure how to use it.

Install MiKTeX. It works from the command line like any other TeX system. Just ignore anything it says about editors.

///Peter


Reply all
Reply to author
Forward
0 new messages