Git Product home page Git Product logo

obsidian-export-to-tex's People

Contributors

raineszm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

obsidian-export-to-tex's Issues

Choose how to export headers

Now, the following

# 1
## 2
### 3
#### 4
##### 5
###### 6

Exports like this:

\section*{1}\label{sec:1}
\subsection*{2}\label{sec:2}
\subsubsection*{3}\label{sec:3}
\paragraph*{4}\label{sec:4}
\subparagraph*{5}\label{sec:5}

Thing is, I rarely use # 1 as section, and just use it as title. For me it would be better to choose how this headers are exported

(also, notice that ###### 6 didnt even get exported)

The plugin does not give any output

Hi,

I am using Obsidian v. 0.10.11 on Windows 10, and the plugin v. 0.0.3 doesn't seem to make any outputs. The clipboard is empty after running the command and no file is saved after attempting to save via Export to TeX command.

P.S. I could get an output on a very small note without any embedded notes.

Export to sanitized (Pandoc-ready) markdown file

I recently was able to run Pandoc on to generate PDF right off the markdown notes in my vault.

With a bit of modification to the .md note, one can—using pandoc-xnos filter—add figure/table/equation/section numbers (and image captions). This is hugely helpful in cross-referencing within the text, and there would be no need to add a figure environment (#19). (There was an issue I had with equation environment when aligned environment was used in math blocks, and it screwed the rendered math in the compiled PDF.)

Moreover, footnotes are supported, too, and Pandoc takes care of citations (haven't tried yet) and makes quotes with curly quotation marks.

It would be great if the plugin had a command to export to a sanitized markdown file, wherein embedded notes were "flattened" (the way the plugin currently pastes the content of the embedded note), links sanitized, and image (relative) paths were corrected—both of which are taken care of already.

Pandoc requires an additional change to the way images are embedded:

The embedded image ![[figure.png]] should be converted to ![Alt text](/path/to/figure.png "Caption") or ![Caption](/path/to/figure.png). Adding {#fig:some-label} after the image would allow cross-referencing possible by calling @fig:some-label in the text.

Solutions I have in mind

Since Obsidian supports ^ for block referencing, (and given that it now supports %%comments that are not rendered in the View mode%%), I suggest using the following syntaxes that are compatible with Obsidian's View mode, thus not screwing the rendered text of the original note:

Desired feature behavior for figures

I personally would love if I can embed an image as

%%My caption here%%![[figure.png]]^my-sad-label

And it is converted to the following in the exported .md file:

![My caption here](/path/to/figure.png){#fig:my-sad-label}

Desired feature behavior for equations

One can append {#eq:my-label} at the end of the math block in the original note, which breaks the rendered math in View mode

$$
\Gamma = \sum_{i=1}^N i^2
$${#eq:a-terrible-equation}

Alternatively, if the ^ referencing (with a line break after the closing $$) would help, without making any problem in View mode:

$$
\Gamma = \sum_{i=1}^N i^2
$$
^a-terrible-equation

Are these feasible features?


(I truly appreciate your efforts and quick fixes, and I wish I could contribute by forking and pull requests. Though I have no knowledge of TypeScript and js, unfortunately. ❤️ )

Setting default folder for .tex outputs and relative path for images

Since compiling .tex file makes a lot of auxiliary files, it is better to keep them in a folder. It is good to set that in plugin options and so that relative paths to images are adapted to that.

For instance, if the exports are "by default" saved in TeX exports folder (placed in vault's root) then the relative paths to the attached images in \includegraphics should appear as ../attachments/figures/some image.png instead of attachments/figures/some image.png.

Thanks :)

Option to export headings as section* rather than section

Thanks so much for this plugin!

I have a feature request: It would be nice to be able to toggle an option that exports headings as section*, which don't have the section numbers that section does. I think having an option like this makes sense because the markdown files also don't display section numbers by default.

Auto generate labels and refs

  • Provide setting to turn this on and off
  • Allow handling of links to other files to be customized
  • Allow customizing whether link text should be included

Label item

Thanks for the plugin! Is very useful!
Please add label if a single letter is followed by a dot.

- a.) Some text here
- b.) another one

into

\begin{itemize}
\item [a.)] Some text here
\item [b.)] another one
\end{itemize}

Addendum: please change: \begin{Quotation} <-- Capital "Q". I receive error as it is undefined.

Export can sometimes choke on export with embeds

Export errors with

TypeError: Cannot read property 'start' of null
    at eval (eval at <anonymous> (app.js:1), <anonymous>:18521:50)
    at step (eval at <anonymous> (app.js:1), <anonymous>:76:23)
    at Object.eval [as next] (eval at <anonymous> (app.js:1), <anonymous>:57:53)
    at fulfilled (eval at <anonymous> (app.js:1), <anonymous>:47:58)

Setting additional figure environment

It would help if one could specify an environment for figures and, e.g., set width/height, with something like:

So, instead of getting \includegraphics{path/to/image.png} in the output, one can produce:

\begin{figure}
  \includegraphics[width=\linewidth,height=\textheight,keepaspectratio]{path/to/image.png}
\end{figure}

or

\begin{figure}
  \includegraphics[width=\linewidth,height=\textheight,keepaspectratio]{path/to/image.png}
  \caption{Some placeholder, to be change manually}
  \label{fig:placeholder}
\end{figure}

Thank you.

Plugin fails to load on mobile

When opening my vault on mobile, a little toast displays at the bottom that says "Failed to load plugin obsidian-export-to-tex."

Admittedly, I have no idea how to get at the dev console or logs on mobile, so I don't really know how to help you in that regard. I'm on the plugin's 0.3.0 version, and on Obsidian Mobile 1.2.0 (50).

I don't really know if this plugin is supposed to be compatible with mobile, but from this commit, it looks like it should be? If it shouldn't, it would make sense to set isDesktopOnly to true.

Thanks!

Image in Obsidian not converted to image in LaTex

In Obsidian, an image can be displayed using following syntax:

![[image_name.png]] .

This can be converted to:

\begin{figure}
\centering
\includegraphics[width=0.7\linewidth]{image_name}
\caption{}
\label{fig:image_name}
\end{figure}

Update readme

With version 0.3.0 some of the options listed in the README are out of date.

Export selection to clipboard

The current export to clipboard functionality is great! Would it be possible to add a command that only export what is selected instead?

Thanks!

Suggestion: Allow exporting as a complete LaTex source file with header information from settings

Hi! I've been loving this plugin so far, and I was wondering if you would consider this feature request:

I think it would be great if there was a way to export a document or selection to a LaTeX source file or to the clipboard, but with additional header information supplied from a setting in the plugin's settings menu.

Basically, what I'm envisioning is that there is an "Export document" or "Export document to clipboard" option, and if a new header information setting from the settings is set to, for example,

\documentclass[a4paper,12pt]{article}
\usepackage[a4paper,top=3cm,bottom=2cm,left=3cm,right=3cm,marginparwidth=1.75cm]{geometry}
\usepackage[utf8x]{inputenc}
\usepackage[T1]{fontenc}

then the final export using this new option would be

\documentclass[a4paper,12pt]{article}
\usepackage[a4paper,top=3cm,bottom=2cm,left=3cm,right=3cm,marginparwidth=1.75cm]{geometry}
\usepackage[utf8x]{inputenc}
\usepackage[T1]{fontenc}

\begin{document}
THE CONTENT FROM THE MARKDOWN FILE OR SELECTION
\end{document}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.